Abstract:The existing automated modeling methods do not match the information processing characteristics of biological swarms, making it difficult to realize the interactive modeling of individual information. To address this, a biomechanical hybrid system to inspire the regulation of artificial complex systems was designed. This system integrated biological tissues with mechanical components to conduct controlled biological experiments. In the two-fish experiment, controlled mechanical units were introduced to observe the interactions of fish in a threatening environment. An interaction model based on the attention mechanism was developed to extract high-impact spatiotemporal features. To validate the model's ability to replicate fish avoidance behaviors, simulations of individual behaviors, overall order, and interactive motion were performed, and the simulation results were compared with the original data. Finally, a sensitivity analysis of machine-induced threat parameters was conducted to verify the model's interpretability. The experimental results show that the attention mechanism effectively captures the avoidance responses of the fish when the mechanical units approach, revealing the underlying patterns of biological interactions in a threatening environment. This provides a crucial modeling foundation for understanding the interaction mechanisms of larger-scale biological swarms in threat environments. The proposed method holds promise for applications in swarm robotic systems in complex adversarial environments.