Modeling Fly Social Behavior with Agent-Centric Pose Forecasting
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom, and with me are Jane, Lu, senior AI researcher at Tsinghua, Meng, lead engineer at a mysterious AI startup and Lalam, the in-house Large Language Model.
Jane: Today's paper: "Modeling Fly Social Behavior with Agent-Centric Pose Forecasting".
Tom: The gist:
Jane: First, who's behind it and why it matters.
Paper summary: Tom: So, to recap, this paper introduces the "Modeling Fly Social Behavior with Agent-Centric Pose Forecasting" framework. The core thesis is building autoregressive models of animal behavior where every animal is an agent that inputs sensory data and outputs movements in its own body frame.
Jane: They claim this approach allows the network and the animal to solve the same problem, shifting the focus from just fitting trajectories to understanding how an animal generates its behavior.
Lu: The framework requires managing many parallel representations of data alongside ML-specific transformations like discretization, which they support with a library called AnimalPoseForecasting.
Meng: This library handles the necessary transformations between different pose representations—world-frame, egocentric, and ML-friendly ones—through composable and invertible operations.
Lalam: The sensory input is hand-crafted to respect what the animal perceives, like using depth maps for visual information about other flies or summarizing tactile info by looking at ceiling height at keypoints.
Tom: And they also explore output representation choices across three axes: the form of the prediction, whether it's continuous, discrete, or hybrid; the temporal frame of reference, absolute pose versus change in pose; and how you parameterize the pose itself.
Jane: When dealing with dynamic environments where agents interact, generation happens by applying next-step prediction iteratively. This requires inverting every agent’s predicted movement back into a change in world-coordinate pose at each rollout step.
Lu: They show that this library design ensures that the same operations used to map raw pose into the model's egocentric input space during training are inverted at rollout time to map predictions back into world coordinates.
Meng: The evaluation looked at qualitative characterization, quantitatively comparing distributions of behavior features between real and simulated data, and training discriminators to tell real from simulated data.
Lalam: Their key finding is that agent-centric representations enabled by the library are most important for accurate behavior modeling in this work on fly social behavior.
Conclusion: Tom: So, looking at the full paper, "Modeling Fly Social Behavior with Agent-Centric Pose Forecasting," the authors are aiming to use these models as tools for scientific discovery, trying to figure out what internal structures animals implement.
Jane: They show that this agent-centric formulation is essential infrastructure for using data-driven predictive models as actual tools for finding new behaviors.
Lu: The work suggests that mechanistic interpretability, by interrogating a trained model, is a promising path toward this goal, letting scientists extract patterns that they haven't previously articulated.
Meng: From an engineering standpoint, it’s interesting because the framework's adaptability was demonstrated by applying it successfully to RatInABox, which is a synthetic neuro-behavior environment.
Lalam: The paper also highlights that discretization plays a vital role in avoiding the pitfall of forecasting no movement when modeling these systems.
Tom: Ultimately, this work pushes us toward using these models not just as simulators but as ways to understand the computations animals are actually performing, which is a big step for ethology and neuroscience.
HHMI Janelia Research Campus
cs.LG
Submitted: 2026-07-21
Updated: 2026-10-09
Code: https://github.com/kristinbranson/AnimalPoseForecasting
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 88/100
The gist: The gist: This work introduces an agent-centric framework for training autoregressive models of animal behavior by constraining deep networks to receive sensory inputs and produce motor outputs
Key concepts
- Agent-Centric Framework
- This core idea treats each animal as an independent agent that receives sensory information and produces movements in the body's frame. The network is constrained so that it must solve the same problem as the animal itself, aiming to understand how behavior is generated rather than just predicting movement paths.
- AnimalPoseForecasting Library
- This general-purpose library manages complex data representations needed for the framework. It handles invertible operations between different views of pose and sensing—such as world-frame, egocentric, and machine learning friendly formats—using composable sequences to connect these representations.
- Sensory Input/Output Representations
- The input is carefully designed to limit the agent to what the animal can actually perceive. For flies, this includes depth maps for visual information about other flies and summarized tactile data like ceiling height at keypoints. Output choices explore different prediction forms and temporal frames.
- Autoregressive Rollout
- Generation involves iteratively predicting the next step in a dynamic environment. Because the next step depends on all agents' previous actions, this requires inverting predicted movements back into world coordinates at each step to maintain consistency across the simulation.
Terminology
Summary
The gist: This work introduces an agent-centric framework for training autoregressive models of animal behavior by constraining deep networks to receive sensory inputs and produce motor outputs matching those of the animal being modeled, which is applicable to single animals and groups.
Agent-Centric Framework
The core idea is to build generative models where each animal is treated as a separate agent that inputs sensory information and outputs movements in the body’s frame
The framework constrains the deep network’s inputs and outputs to match the animal’s so that the network and the animal solve the same problem
This approach is designed to make fitting a hypothesis about how an animal generates its behavior rather than a fit to its trajectories.
Representational Machinery and Library
The framework requires managing many parallel representations of the same data, along with ML-specific transformations like discretization
To handle this, the authors release a general-purpose library called AnimalPoseForecasting, which handles the representational machinery this approach requires: composable, invertible operations between world-frame, egocentric, and ML-friendly representations of pose and sensing
. The library is organized around composable and invertible sequences of operations that connect parallel representations of the data
.
Sensory Input and Output Representations
The input sensory representation is hand-crafted to limit the agent to what the animal can perceive, rather than giving it omniscient access to the full state of the world
For interacting flies, visual information about other flies is represented as a depth map, and tactile information is summarized by the height of the domed ceiling at each keypoint
and pairwise distances between body parts of the focal fly and others
. The output representation choices are explored along three axes: the form of the prediction (continuous, discrete, or hybrid), the temporal frame of reference (absolute pose versus change in pose), and the parameterization of pose (raw 2D keypoints, egocentric keypoints, or a character-animation-inspired decomposition).
Autoregressive Rollout in Dynamic Environments
Generation is performed by applying next-step prediction iteratively
In a dynamic, multi-agent environment, the next step’s input depends on the state of the world, which depends on the actions of all agents in the previous step This necessitates several operations beyond the network forward pass
at each rollout step, including every agent’s predicted movement must be inverted back to a change in world-coordinate pose
. The library's design ensures that the same operations that map raw pose into the model’s egocentric input space at training time are inverted, at rollout time, to map predictions back into world coordinates
.
Evaluation Criteria and Key Findings
The paper evaluates models using a suite of complementary criteria, including Qualitative characterization,
Quantitatively comparing the distributions of selected behavior features between real and simulated data,
and training discriminators to distinguish real from simulated data. Experiments on courting male flies show that the resulting models capture properties at multiple scales, including fine-grained motor patterns such as the coordinated leg gait of walking, recognizable behavioral motifs such as chasing and wing extension
. The analysis reveals that agent-centric representations enabled by our library is most important for accurate behavior modeling
Furthermore, the work demonstrates that discretization is important to avoid the pitfall of forecasting no movement
. The framework's adaptability is shown by applying it to a new domain like RatInABox.
Model Comparison Insights
When comparing variants, the REFERENCE and NO HANDCRAFTED POSE model variants appear to produce realistic fly behavior
The worst-performing variant is the KEYPOINTS model, which is the only variant that does not use an egocentric representation of sensory input and motion output
. The study concludes that the agent-centric representations enabled by our library is most important for accurate behavior modeling
. The ultimate goal is to use such models as instruments for scientific discovery, interrogating their internal structure to reveal computations the animal itself implements
.
Improvements for AI systems
-
Agent-centric modeling for animal behavior allows fitting
a hypothesis about how the animal generates its behavior rather than a fit to its trajectories.
This enables AI systems to model complex social behaviors by constraining the deep network toreceive the same sensory input and produce the same kind of motor output as the animal it models.
-
The AnimalPoseForecasting library provides
composable, invertible operations between world-frame, egocentric, and ML-friendly representations,
which allows researchers to systematically compare design choices likeagent-centric versus world-centric representations
without rewriting rollout machinery. -
The framework facilitates mechanistic interpretability by allowing the interrogation of trained models to
extract structure in the phenomenon the model has learned to capture,
potentially revealingpatterns that scientists have not previously articulated.
Abstract
Understanding animal behavior at an algorithmic level -- what animals attend to, how they form internal representations, and how this maps to action -- remains a central challenge in neuroethology. We explore how well large generative models capture properties of fly social behavior. We combine transformers with agent-centric representations. Models input egocentric sensory observations and output egocentric movements, mirroring biological constraints. Social behavior emerges from agents independently sensing and responding to one another. We demonstrate that this simple model captures many properties of fly behavior, outperforming the world-centric representation and achieving SOTA on MABe 2022-fly. We systematically evaluate properties of the representation important for capturing the behavior distribution through a series of lesioning experiments. These comparisons were enabled by a new, general-purpose library for animal-centric pose forecasting.
Sources
- MABe22: A Multi-Species Multi-Task Benchmark for Learned Representations of Behavior
- Review of Pedestrian Trajectory Prediction Methods: Comparing Deep Learning and Knowledge-based Approaches
- DESIRE: Distant Future Prediction in Dynamic Scenes with Interacting Agents
- The Trajectron: Probabilistic Multi-Agent Trajectory Modeling With Dynamic Spatiotemporal Graphs
- AgentFormer: Agent-Aware Transformers for Socio-Temporal Multi-Agent Forecasting
- Learning recurrent representations for hierarchical behavior modeling
- Evaluation metrics for behaviour modeling
- Recurrent Network Models for Human Dynamics
- QuaterNet: A Quaternion-based Recurrent Model for Human Motion
- SoMoFormer: Multi-Person Pose Forecasting with Transformers
- On human motion prediction using recurrent neural networks
- Learning Trajectory Dependencies for Human Motion Prediction
- Is Behavior Cloning All You Need? Understanding Horizon in Imitation Learning
- Offline Reinforcement Learning as One Big Sequence Modeling Problem
- RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Control
- OpenVLA: An Open-Source Vision-Language-Action Model
- A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks