Understanding how animals move between behaviors is a central question in neuroethology, yet most segmentation methods first partition time into discrete states, leaving transitions as the unmodeled residue between them. We take the opposite view: in a suitable feature space, sustained behaviors are dense regions of the trajectory's density landscape, and transitions are the sparse corridors and loops that connect them. Because this structure is a property of the landscape's shape rather than of any particular coordinates, it can be read off directly with topology and should persist across feature spaces. We build this landscape from frame-by-frame trajectories, extract its discrete-Morse graph, and keep two kinds of structure: paths, the corridors a trajectory follows between dense behavioral regions, and cycles, closed routes whose entry and exit take different ways. Clustering these structures yields transitions directly, with no upstream state partition. On a rat behavior dataset across three feature spaces, including the latent space of a neural-network controller that imitates the animal in a physics simulator, the approach recovers transitions at coverage comparable to state-space and topological-clustering baselines, while carrying substantially more information about the transition identity, forming clusters at least as tight as the baselines', and matching annotated transitions with less reliance on time-warping. More broadly, the results show that behavioral transitions are a topological feature of a representation: recoverable from the shape of its trajectories, and consistent across distinct feature spaces.
Figures & tables
Figure 1: Method overview. A trajectory Ti is Takens-embedded and skeletonized into a discrete-Morse graph Gi (Step 1), decomposed into DM-cycles ( H1 loops) and DM-paths (the split tree) (Step 2), and the pooled primitives are clustered under W2 into behavioral transition clusters (Step 3). Arrows mark each step’s output as the next step’s input. The two primitives are illustrated on a synthetic skeleton in Appendix Figure 3 .
DTW to GT ( ↓ )
Consistency ( ↓ )
Non-diag ( ↓ )
KID ( ↓ )
Transition
DMC ∗ (Int)
DMP ∗ (Qpos)
Mapper (Qpos)
KPMS (KP)
DMC ∗ (Int)
DMP ∗ (Qpos)
Mapper (Qpos)
KPMS (KP)
DMC ∗ (Int)
DMP ∗ (Qpos)
Mapper (Qpos)
KPMS (KP)
DMC ∗ (Int)
DMP ∗ (Qpos)
Mapper (Qpos)
KPMS (KP)
Immobile → Rear [L]
—
0.854
—
0.831
—
0.803
—
0.821
—
0.128
—
0.245
—
0.002
—
0.006
Rear → Immobile [L]
—
0.855 †
0.879
0.855
—
0.659 †
0.743
0.708
—
0.111 †
0.178
0.165
—
0.026 †
0.009
0.010
Immobile → Rear [R]
—
0.880 †
—
0.848 †
—
0.718 †
—
0.854 †
—
0.170 †
—
0.173 †
—
0.033 †
—
0.010 †
Immobile → Rear [S]
0.934
0.892
0.895
0.967
0.766
0.632
0.714
0.936
0.080
0.063
0.055
0.096
0.032
0.024
0.010
0.011
Rear → Immobile [S]
0.863 †
—
0.856
0.877
0.802 †
—
0.765
0.816
0.080 †
—
0.052
0.109
0.011 †
—
0.008
0.008
Table 1: Alignment, coherence, warping and distributional fidelity. One fixed variant per family: DMC-Int, DMP-Qpos, Mapper-Qpos, KPMS-KP. Rows are directed transitions with turn direction ([L] left, [R] right, [S] straight). Lower is better in all four blocks. — = not discovered; † = one seed only. Summary rows give the per-column mean and std of the 3-seed ± . ∗ Ours.
Figure 2: How each coarse-graining preserves the transition signal. (A) Information Bottleneck plane: per-frame capacity H(T) vs. transition information I(T;Y) in bits, one dot per (method, seed); up-and-left dominates. (B,C) Family-pooled I(T;Y) and adjusted mutual information (AMI); the KPMS box is bimodal because KPMS-KP (high) and KPMS-Int (low) bracket the family. Per-variant numbers: Table 8 .
Appendix figures & tables24 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: Discrete-Morse skeletonization and the two primitives. (A) Skeletonization intuition: a near-uniform point cloud sampled around a hidden graph induces a density terrain, and the discrete-Morse reconstruction recovers the hidden graph (red) as the ridges of that terrain, the road-network intuition of § 3.2 . (B) The two DM primitives on one synthetic skeleton (a split tree plus one loop): the DM-cycle is the H1 loop, and the DM-paths are the split-tree persistence pairs, each an up-fork leaf-to-saddle corridor (green, red), together with the essential global-max-to-global-min pair (blue). The skeleton is exactly the DM-cycle together with the DM-paths.
Figure 4: The MIMIC-MJX pipeline that produces the trajectories analyzed here ( Zhang et al., 2025 ) . (A) 3D markerless motion capture is fit by inverse kinematics to a biomechanical model, and a deep-RL policy is trained to imitate the resulting joint trajectories. (B) The encoder maps a short reference trajectory st:t+5ref into a low-dimensional latent intention it under Gaussian and AR(1) regularization, and the decoder combines it with the proprioceptive state st to produce a biomechanically realistic action at .
Figure 5: Rat behavior lexicon. Each panel superimposes six poses of one representative ground-truth transition between two of the four macro-behaviors (Walk, Immobile, Turn, Rear), rendered in-scene from MJX rollouts with a shared camera, so the bodies occupy the positions the animal actually visited. Temporal progression is light-to-dark. Instances are selected by scoring each side of the labelled boundary against the kinematic signature of its own label (speed, yaw rate, torso height) and taking the weaker of the two, so both behaviors are legible rather than only the more energetic one. Panel titles give the directed transition type and its instance count n . Purely rotational transitions ( Turn → Immobile , Immobile → Turn ) remain the most compact, since a heading change at fixed position projects into self-occlusion from any single viewpoint.
Figure 6: DM-cycles × feature space. Rows: intention / qpos / ekp; columns: the canonical transition pools. t-SNE of the Takens-embedded point cloud, with frames of the first behavior in blue, the second in red, and all other frames grey; gold stars mark the persistent density peaks (minima of ρ ) DM-G identifies with the two behaviors, and the dashed black curve is the top DM-cycle of that pool, drawn closed. Intention and qpos recover clean loops for every pool; ekp, the most drift-laden space, recovers a loop in each but a visibly sparser one.
Figure 7: DM-cycle filmstrips, all feature spaces. Same layout as Figure 6 : rows are feature spaces, columns the transition pools. Each strip shows the poses actually traversed around that pool’s top DM-cycle, tinted light-to-dark by position along the loop, so the loop reads as a movement rather than as a curve in an embedding.
Figure 8: DM-G identifies stationary clips. (A) Root displacement per frame ( ∣Δx∣,∣Δy∣,∣Δz∣ ) for clips with DM-cycles (orange) vs. without (blue), n=50 per group; cycle-bearing clips move more along every world axis. (B) Longest DM-loop length on a 5 -clip moving (orange) vs. stationary (blue) pool: with no topological feature to encode, the skeleton collapses on the stationary pool. (C) Same contrast swept across pool size n∈{2,3,4,5} , 10 trials per point: pooled moving clips sustain a long loop across the full sweep while stationary-only pools stay flat near zero.
Figure 9: Asymmetric A → B → A triplets carry strictly more cycles than symmetric ones across all feature spaces. Violins are over bootstrap-mean ( nboot=1000 ) cycle counts per 100 frames. Orange = asymmetric (outgoing and returning routes differ in the dynamics), blue = symmetric. Mean and 95% bootstrap percentile interval overlaid as black markers. Each panel uses its own y-axis because EKP cycle magnitudes are an order of magnitude smaller than intention / qpos.
Transition
GT n
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
31
✓
✓
✓
×
✓
✓
✓
✓
✓
✓
✓
✓
Immobile → Rear [L]
4
×
✓
✓
✓
✓
✓
✓
×
×
×
✓
✓
Immobile → Rear [R]
2
×
×
✓
×
✓
✓
×
×
×
×
✓
✓
Immobile → Turn [L]
95
✓
✓
×
✓
✓
×
✓
✓
✓
✓
✓
✓
Immobile → Turn [R]
45
✓
✓
×
✓
✓
×
✓
✓
✓
×
✓
✓
Immobile → Walk [L]
1
✓
×
×
×
×
×
✓
×
×
×
×
×
Appendix
Table 2: Behavioral coverage by method (directed, direction-turn). Each cell indicates whether the method discovered ( ✓ ) or missed ( × ) at least one cluster majority-voted to the given directed transition and turn direction (Immobile → Turn is distinct from Turn → Immobile). Direction tags: [L] left, [R] right, [S] straight. GT n = ground-truth instances in the evaluation split. Only the 16 classes that at least one method discovers are listed; the evaluation split contains 25 classes with ground-truth instances.
Feature space
Frames
Skeleton
DM-cycle
DM-path
Intention
499
263
75
62
Qpos
500
344
113
113
EKP
500
260
191
105
Appendix
Table 4: Trajectory-to-skeleton reduction by feature space. Mean over rat clips of the original trajectory length (Frames), the DM-skeleton vertex count (Skeleton), and the per-primitive lengths of the DM-cycles and DM-paths. Frames and both primitive lengths are in frames; Skeleton is in graph vertices. Skeleton is averaged over clips that yield a non-empty skeleton, the primitive lengths over all extracted primitives. Each primitive is resampled to L=100 frames before clustering (§ 4.3 ).
Space
k
cycles/clip
giant-CC
DTW
KID
cov
Intention
3
2.20
0.51
0.80
0.009
6.0
5
1.59
0.40
0.83
0.014
6.3
8
0.83
0.25
0.82
0.017
7.3
Qpos
3
0.83
0.41
0.85
0.008
5.0
5
0.75
0.44
0.83
0.009
5.3
8
0.67
0.46
0.83
0.009
5.7
Appendix
Table 5: Discrete-Morse k -neighbor sensitivity on rat transitions. Per feature space and kNN parameter k (shipped value k=3 in bold), the label-free skeleton structure (mean number of DM-cycle primitives per clip, counted after temporal splitting, and the fraction of all embedded points in the largest connected component of the skeleton) and the DM-cycle ground-truth alignment (DTW, KID, and number of discovered transitions). DTW is flat across k in every space; larger k erodes the intention cycle structure and its KID with no alignment gain.
Space
δpath/δ
paths
I(T;Y)
AMI
H(T)
Intention
0
1389
0.511
0.172
2.98
0.5
1333
0.495
0.169
2.90
1
1201
0.462
0.163
2.70
2
881
0.368
0.146
2.13
4
825
0.346
0.141
2.00
Qpos
0
1140
0.896
0.230
4.92
Appendix
Table 6: Path-selection persistence: transition information. Per feature space and path-persistence multiplier δpath/δ (shipped 0 in bold), the number of DM-paths and the transition information of the per-frame DMP coarse-graining: mutual information I(T;Y) , cardinality-corrected AMI, and label entropy H(T) . All three decrease monotonically as the threshold rises.
Space
δpath/δ
DTW
KID
cov
Intention
0
0.758
0.013
2.7
1
0.755
0.007
3.0
4
0.801
0.010
3.0
Qpos
0
0.840
0.013
4.3
1
0.842
0.011
6.3
4
0.838
0.010
6.3
Appendix
Table 7: Path-selection persistence: downstream alignment. DMP clustering alignment (DTW, KID, and discovered-transition coverage) at three path-persistence multipliers ( 0 = shipped, in bold). A mild threshold ( δpath=δ ) lowers KID and raises coverage in intention and qpos with DTW unchanged, while ekp is roughly unchanged.
Method
H(T)
I(T;Y)
lift over floor
NMI
AMI
efficiency
H(Y∣T)
DMC-Ekp
1.068
0.234
0.040
0.138
0.123
0.219
2.441
DMC-Intention
5.184
0.873
0.278
0.234
0.213
0.168
1.802
DMC-Qpos
2.853
0.474
0.121
0.172
0.166
0.166
2.200
DMP-Ekp
1.674
0.363
0.089
0.171
0.163
0.217
2.312
DMP-Intention
2.977
0.511
0.162
0.181
0.172
0.171
2.164
DMP-Qpos
4.918
0.895
0.276
0.247
0.230
0.182
1.780
Appendix
Table 8: Information-theoretic coarse-graining metrics on rat transitions. Each row is one method variant, averaged over three seeds for stochastic baselines and deterministic for DM methods. Columns report the entropy of the coarsening label H(T) ; mutual information I(T;Y) ; lift over the within-clip shuffle floor; normalized mutual information (NMI); cardinality-corrected adjusted mutual information (AMI); coarsening efficiency I(T;Y)/H(T) ; and residual transition entropy H(Y∣T) . Bold = best per column, underline = second. Baseline methods have different seeds due to their stochasticity in coarse-graining stage whereas DM decomposition is deterministic.
Transition
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
0.934
0.913
0.941
—
0.892
0.948
0.906
0.895
0.945
0.961
0.967
0.949 †
Immobile → Rear [L]
—
0.929
0.934
0.927 †
0.854
0.966
0.756
—
—
—
0.831
0.978
Immobile → Rear [R]
—
—
0.972
—
0.880 †
1.009
—
—
—
—
0.848 †
0.989
Immobile → Turn [L]
0.809
0.792
—
0.805
0.788
—
0.952 †
0.801
0.810
0.872
0.770
0.817
Immobile → Turn [R]
0.759
0.732
—
0.727 †
0.756 †
—
0.810 †
0.715 †
0.795
—
0.747
0.770
Immobile → Walk [L]
0.759 †
—
—
—
—
—
0.767
—
—
—
—
—
Appendix
Table 9: DTW distance to ground truth by directed transition ( ↓ lower is better). Bold = best per row over populated cells; underline = second. — = method did not discover this transition. Direction tags: [L] left, [R] right, [S] straight. ∗ Ours. † marks cells populated by only a single seed (no ± available). The two summary rows under the table give the per-column mean and standard deviation of the per-cell ± (std across 3 random seeds), aggregated over the populated rows.
Transition
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
0.766
0.754
0.931
—
0.632
0.780
0.999
0.714
0.771
0.928
0.936
0.779 †
Immobile → Rear [L]
—
0.813
0.744
0.877 †
0.803
0.979
0.831
—
—
—
0.821
0.868
Immobile → Rear [R]
—
—
0.823
—
0.718 †
0.911
—
—
—
—
0.854 †
0.886
Immobile → Turn [L]
0.652
0.573
—
0.552
0.724
—
1.120 †
0.690
0.704
0.749
0.686
0.788
Immobile → Turn [R]
0.703
0.638
—
0.706 †
0.729 †
—
0.844 †
0.669 †
0.648
—
0.688
0.768
Immobile → Walk [L]
0.928 †
—
—
—
—
—
0.790
—
—
—
—
—
Appendix
Table 10: Internal cluster consistency by directed transition ( ↓ lower is better). Bold = best per row over populated cells; underline = second. — = method did not discover this transition. Direction tags: [L] left, [R] right, [S] straight. ∗ Ours. † marks cells populated by only a single seed (no ± available). The two summary rows under the table give the per-column mean and standard deviation of the per-cell ± (std across 3 random seeds), aggregated over the populated rows.
Transition
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
0.491
0.493
0.483
—
0.494
0.496
0.495
0.495
0.495
0.492
0.489
0.497 †
Immobile → Rear [L]
—
0.473
0.464
0.490 †
0.476
0.477
0.448
—
—
—
0.462
0.484
Immobile → Rear [R]
—
—
0.477
—
0.482 †
0.478
—
—
—
—
0.474 †
0.480
Immobile → Turn [L]
0.498
0.498
—
0.498
0.499
—
0.498 †
0.495
0.494
0.499
0.497
0.495
Immobile → Turn [R]
0.500
0.499
—
0.500 †
0.500 †
—
0.499 †
0.498 †
0.494
—
0.498
0.498
Immobile → Walk [L]
0.493 †
—
—
—
—
—
0.483
—
—
—
—
—
Appendix
Table 11: DTW-to-frame-sync ratio by directed transition ( ↑ higher is better). Bold = best per row over populated cells; underline = second. — = method did not discover this transition. Direction tags: [L] left, [R] right, [S] straight. ∗ Ours. Higher means less reliance on warping rescue. † marks cells populated by only a single seed (no ± available). The two summary rows under the table give the per-column mean and standard deviation of the per-cell ± (std across 3 random seeds), aggregated over the populated rows.
Transition
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
0.080
0.092
0.143
—
0.063
0.063
0.045
0.055
0.032
0.097
0.096
0.025 †
Immobile → Rear [L]
—
0.221
0.270
0.072 †
0.128
0.148
0.273
—
—
—
0.245
0.131
Immobile → Rear [R]
—
—
0.201
—
0.170 †
0.173
—
—
—
—
0.173 †
0.184
Immobile → Turn [L]
0.012
0.023
—
0.022
0.019
—
0.040 †
0.033
0.051
0.011
0.036
0.049
Immobile → Turn [R]
0.013
0.015
—
0.006 †
0.005 †
—
0.007 †
0.019 †
0.028
—
0.025
0.026
Immobile → Walk [L]
0.080 †
—
—
—
—
—
0.089
—
—
—
—
—
Appendix
Table 12: Non-diagonal fraction of DTW warping path by directed transition ( ↓ lower is better). Bold = best per row over populated cells; underline = second. — = method did not discover this transition. Direction tags: [L] left, [R] right, [S] straight. ∗ Ours. Lower means the warping path runs closer to the diagonal, so the primitive matches the annotated window at its own timescale rather than being stretched or compressed onto it. † marks cells populated by only a single seed (no ± available). The two summary rows under the table give the per-column mean and standard deviation of the per-cell ± (std across 3 random seeds), aggregated over the populated rows.
Transition
DMC ∗ (Int)
DMC ∗ (Qpos)
DMC ∗ (EKP)
DMP ∗ (Int)
DMP ∗ (Qpos)
DMP ∗ (EKP)
Mapper (Int)
Mapper (Qpos)
Mapper (EKP)
KPMS (Int)
KPMS (KP)
Full (Int)
Immobile → Rear [S]
0.032
0.019
0.012
—
0.024
0.016
0.007
0.010
0.016
0.022
0.011
0.021 †
Immobile → Rear [L]
—
0.010
0.005
0.028 †
0.002
0.009
0.005
—
—
—
0.006
0.022
Immobile → Rear [R]
—
—
0.014
—
0.033 †
0.045
—
—
—
—
0.010 †
0.011
Immobile → Turn [L]
0.009
0.011
—
0.015
0.003
—
0.018 †
0.006
0.011
0.009
0.002
0.001
Immobile → Turn [R]
0.007
0.011
—
0.006 †
0.009 †
—
0.008 †
0.008 †
0.011
—
0.003
0.003
Immobile → Walk [L]
0.003 †
—
—
—
—
—
0.013
—
—
—
—
—
Appendix
Table 13: Kernel Inception Distance by directed transition ( ↓ lower is better). Bold = best per row over populated cells; underline = second. — = method did not discover this transition. Direction tags: [L] left, [R] right, [S] straight. ∗ Ours. † marks cells populated by only a single seed (no ± available). The two summary rows under the table give the per-column mean and standard deviation of the per-cell ± (std across 3 random seeds), aggregated over the populated rows.
Dataset
Feature space
Raw dim
PCA dim
m
τ
k
δ
rat
Intention
16
—
3
6
3
1.0
rat
Qpos
67
10
3
9
3
0.2
rat
EKP
60
10
3
8
3
0.1
Appendix
Table 14: DM-G hyperparameters by feature space and dataset.
Table 15: Selection of the MDS embedding dimension. Sweep over {3,5,10,20,40,60} at three seeds. The dimension is selected per variant by minimising within-cluster consistency (block a), which uses no ground-truth labels; blocks (b)–(d) take no part in the choice. Best per row in bold . Means are over the transitions a variant populates at every dimension. DMP-Int shares only two such transitions, so its block (c) row is noisy.
Figure 10: DMP-Qpos cluster examples , seed 0. Two clusters per row, two members per cluster, six poses per member superimposed in-scene under a shared camera and tinted light-to-dark by time. The title above each pair is the cluster’s majority-vote label. All five of this variant’s unique labels are shown.
Figure 11: DMC-Int cluster examples. Same layout as Figure 10 ; all six of this variant’s unique labels are shown.
Figure 12: KPMS-KP cluster examples. Same layout as Figure 10 . KPMS-KP yields 7 unique cluster labels at this seed, against 5 for DMP-Qpos and 6 for DMC-Int; six of the seven are shown, to keep every panel of this appendix on one page.
Figure 13: Mapper-Qpos cluster examples. Same layout as Figure 10 , for the Mapper variant reported in Table 1 ; all four of its unique labels are shown.
Interdisciplinary Program in Artificial Intelligence Seoul National University Seoul, 08826, South Korea · Department of Psychology Seoul National University Seoul, 08826, South Korea