All models

TREBA

Self-supervised trajectory embedding for animal behavior analysis, trained on expert-programmed tasks.

Time series · 2,915 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,915 operations (1.6 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
9.6M
Operations
2,915
Framework
PyTorch
Recurrent
Yes
Published
CVPR 2021
Cited by
43 (as of 3 November 2026)
Authors
Jennifer J. Sun, Ann Kennedy, Eric Zhan and others
License
CC-BY-NC-SA-4.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20835
Graph hash
14530217f96265741863ef2e1e28bd9305cb075140f49dda7ff63d7ff858c5d4
Skeleton hash
28325d8d8328d23b1501d414691935925b538c9c42a7ae4c7e6b8e4b0a71023f
Architecture hash
a152897baba855605fb1916bbf73f72ee33f332c94733fe1bfeb283deee2fdd4
Diagram SHA-256
19c0c747e5448547a9d5c34a753344e8a73d03c18600421cb15385649f1251f0
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

TREBA, short for Trajectory Embedding for Behavior Analysis, learns embeddings of movement trajectories that can then feed behavior analysis tasks. It targets the cost of expert annotation, since labeling training sets for in-depth analysis takes specialized domain knowledge that is slow to obtain from experts.

Instead of labeling more data, experts write programs that encode their knowledge, a process the paper calls task programming, and these programs define self-supervised training tasks. On top of the trajectory generation losses of a Trajectory-VAE, the full model adds decoders for the programmed tasks, trained with contrastive and consistency losses. For the fruit fly data, the authors' released TREBA features come from a model trained with task programming and 13 programs.

The paper evaluates on three datasets across two domains, mice and fruit flies. It reports that TREBA embeddings reduce annotation burden by up to a factor of 10 without compromising accuracy compared with existing features. On the fly data split given in the repository, adding TREBA with task programming to pose input raised mean average precision with 10% of the training data from 0.348 to 0.650.

Key idea. TREBA uses expert-written programs as self-supervised tasks, and the paper's results suggest that this task programming can reduce annotation effort for domain experts.

  • TREBA
  • Trajectory Embedding for Behavior Analysis
  • task programming
  • behavior analysis
  • trajectory embedding
  • animal behavior
  • fruit fly
  • mouse
  • self-supervised learning

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{sun2021taskprogramminglearningdata,
      title={Task Programming: Learning Data Efficient Behavior Representations}, 
      author={Jennifer J. Sun and Ann Kennedy and Eric Zhan and David J. Anderson and Yisong Yue and Pietro Perona},
      year={2021},
      eprint={2011.13917},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2011.13917}, 
}