We introduce a self‑supervised representation learning framework built on the hypothesis that behavioral characteristics linked to identity and learning remain relatively stable over nearby time intervals. Temporal proximity is used as supervision, allowing the model to learn compact embeddings directly from short‑term movement trajectories of freely behaving rats. Experiments show that trajectories as brief as one second already contain sufficient information to predict both individual identity and learning progress. Egocentric pose dynamics are more informative for identity, whereas allocentric motion better captures learning‑related variation, with both signals peaking at decision junctions in the alternation task. A representation‑conditioned diffusion model is then employed to visualize movement patterns associated with different identities and learning stages. Compared with handcrafted kinematic features or task‑level performance metrics, our approach achieves markedly higher accuracy in identity recognition and learning‑progress prediction, offering a new tool for behavioral science. Code is released at https://github.com/pizhn/TRAIL.
Review