Covariance Trajectories for Fine-Grained Action Recognition

Telling apart two gymnastics elements, such as a double salto with a half twist and one with a full twist, rarely depends on which body parts are visible. Both clips show the same athlete, the same apparatus, and the same arena. What differs is how body configurations change over time: which visual features fire together in a given frame, and in what order those patterns of co-firing arise and dissolve. Standard video transformers do not keep this information. They summarize each moment by averaging feature vectors, which discards co-firing. Second-order "covariance pooling" methods have the opposite problem. They record co-firing by computing a channel-by-channel covariance matrix over all positions, but they sum over the whole clip, so the result is the same whether the clip plays forward or backward.

We propose to keep both pieces of information by building the representation as a trajectory of covariance matrices. For each frame, a video transformer whose attention is already split into separate within-frame and across-frame steps produces a small, properly normalized covariance matrix of that frame's patch features. A dedicated temporal module then reads the resulting ordered sequence of matrices, including their signed frame-to-frame changes. The hypothesis is that fine-grained sub-actions are separable by the time-ordered evolution of feature co-activation, and that neither a single clip-level covariance nor a sequence of first-order frame summaries captures it. We test this on FineGym, Diving48 and Something-Something.

Core Claim

Covariance pooling and decoupled attention have complementary blind spots. Global covariance pooling computes, for a feature map $X$ with $C$ channels over $N$ positions, the matrix $\Sigma = \sum_k (x_k-\bar x)(x_k-\bar x)^T$. That matrix records which channels co-activate, a property shown to improve representation and generalization in Deep CNNs Meet Global Covariance Pooling and in matrix-power-normalized variants (Peihua Li et al.). Because the sum ignores the order of its terms, it is blind to direction in time. Divided space-time attention, introduced by TimeSformer, attends first along time at each patch position and then across patches within a frame. It handles time order explicitly, but it compares tokens only through scalar dot products and pools with a first-order class token.

Our claim is that the right place to compute covariance is within each frame, where ignoring patch order is harmless and even desirable because it makes the descriptor robust to where the athlete stands. Order should then be modeled across these per-frame descriptors. Divided attention already separates the computation along exactly this seam. The new element is a temporal reader that operates on normalized per-frame covariance matrices and their signed differences. We expect it to be most useful where the class depends on the ordering of configurations: FineGym element-level labels, Diving48, and Something-Something.

Research Program

The backbone is a divided-attention TimeSformer initialized from ImageNet-21K. The TimeSformer authors found this image pre-training essential, and FineGym found that Kinetics-400 pre-training transfers poorly to gymnastics, so we do not rely on coarse video pre-training.

From the patch tokens of frame $t$ after the last spatial attention step, we apply a learned linear map that reduces 768 channels to $d=64$. We then compute the frame covariance $\Sigma_t$ and normalize it with a matrix square root, $P_t=\Sigma_t^{1/2}$. The square root is computed with the Newton–Schulz iteration of iSQRT-COV, which uses only matrix multiplications and therefore runs efficiently on GPUs. We will also try the Halley-type solver of Revitalizing SVD for GCP as a precision check.

The cost stays small for two reasons. With roughly 196 patches per frame, $\Sigma_t$ has rank at most 196 regardless of channel width. A $64\times64$ matrix has 2,080 unique entries, so processing 8–32 frames means $T$ small matrix square roots per clip. This avoids the quadratic channel blow-up that TCPNet handled with a $1\times1$ projection at full clip scale.

The temporal reader takes the upper-triangular entries of $P_t$ together with the signed differences $P_t - P_{t-1}$. It embeds them, adds temporal position encodings, and runs two layers of temporal self-attention before classification. The differences are signed and are not passed through a softmax. This deliberately follows the observation in Relational Self-Attention that softmax attention cannot express subtractive changes between adjacent frames.

If the head-level version helps, a second stage moves the same per-frame covariance computation into the last two or three divided blocks. There, the covariance summary of frame $t$ conditions the temporal attention keys. This is the "covariance inside the transformer" direction that TCPNet's authors listed as future work. We treat it as conditional on the first stage succeeding, not as the main bet.

The analysis component asks where the gain comes from. We will measure the effect of reversing time order, compare accuracy at the event and element levels of FineGym, and inspect confusions between elements within the same set. These are the pairs that share appearance and differ in kinematics.

Baselines

The naive reference point is TimeSformer with divided attention and its standard class-token head, fine-tuned on each benchmark. Every variant, including ours, uses the same initialization, frame count, sampling, augmentation, epoch budget and hyperparameter search budget. The file contains no reported Diving48 number for TimeSformer, so we will report our own reproduction. Its Kinetics-400 figure of 80.7% top-1 serves only as a sanity check that the reproduction is sound.

The strongest direct competitor is TimeSformer plus a TCP head. We will reimplement the Temporal-attentive Covariance Pooling module from TCPNet on the same backbone tokens. The module includes temporal channel and spatial calibration, intra- and adjacent inter-frame covariance, and fast matrix square-root normalization. It is the strongest competitor because it already adds second-order statistics and some inter-frame structure. On CNNs it gave large gains: 70.6% to 75.3% on Kinetics-400 with TSN ResNet-50, and +18.6% on Something-Something V1. We will match its projected channel count and total head parameters to ours.

The strongest external methods with reported fine-grained numbers are RSA, which reports 86.4% top-1 on Gym99 and 84.2% on Diving48 with a TSN-ResNet50 backbone, and StructViT, which reports 71.5% on SSv2 but has no FineGym or Diving48 number reported on Lacuna. These backbones differ from ours, so we cite these numbers as context rather than as controlled comparisons. Where code permits, we will retrain StructViT under our budget.

Two ablations isolate the key ingredient. The first is a first-order trajectory variant: the same temporal reader is applied to per-frame mean tokens and their differences, with width increased to match parameters. This tests whether second-order statistics matter. The second is an orderless trajectory variant: the same per-frame covariances are averaged over time, with no temporal reader. This tests whether order matters.

Beating the field means two things. First, a statistically reliable improvement, across three seeds, over both the TCP-head competitor and the first-order trajectory on Gym288 per-class mean accuracy and on Diving48 top-1. Second, the improvement must be concentrated at the element level rather than the event level.

Why not just…?

Why not just attach TCPNet's head to TimeSformer? This is the real threat, and it is the main controlled comparison above. TCP adds cross-covariance between adjacent frames, but it folds everything into one clip-level matrix, so long-range ordering, such as twist-before-tuck versus tuck-before-twist, is summed away. The reversal test described below settles this. If the TCP head is as reverse-sensitive and as accurate as our model on Diving48 and Gym288, the trajectory idea adds nothing, and we will say so.

Why not just feed per-frame average tokens to a temporal transformer? This is the first-order trajectory ablation. The argument against it is the co-occurrence point from Peihua Li et al.: an average records that "arm extended" and "body inverted" features are each present in a frame, but not that they occur together. Whether that matters for gymnastics is an empirical question, and if this ablation matches our model, the second-order component is unnecessary.

Why not just use local correlation operators like RSA or StructViT? These methods model local query–key correlation patterns and already perform strongly on FineGym and Diving48. They capture short-range motion well, but they do not provide a global, geometry-respecting summary of each frame's feature configuration. The two approaches may be complementary, so beyond the head-to-head comparison we will test whether adding our head on top of StructViT tokens still helps.

Proposed Experiments

The main experiments use Gym99 and Gym288, reporting both top-1 and per-class mean accuracy, together with Diving48 top-1. We use 8, 16 and 32 frames, because FineGym reports that dense sampling matters. Something-Something V2 serves as a check outside sports, where object-interaction direction defines the class. Kinetics-400 serves as a check that nothing breaks on appearance-dominated data, and we expect no large gain there.

The decisive check is a time-reversal test. At test time we reverse each clip and measure the change in the predicted class distribution. On Something-Something we also run a version where reversal changes the label. An orderless covariance head should be largely unaffected by reversal. Our model should change its predictions substantially, and its accuracy gain should be largest on the classes whose reversal changes the label.

The second check stratifies results by FineGym hierarchy level. We expect near-zero gain at the event level, where FineGym reports about 98% for all models, and gains that grow at the element level, especially on confusable pairs within the same set.

The third check is cost. We report throughput and memory against the class-token baseline. Our expectation is a head overhead well under the backbone's cost, since the extra work is $T$ square roots of $64\times64$ matrices. A measured overhead above roughly 10% would itself be a finding against the design.