Views
No views yet
Video Frames → ViT (per-frame) → All Patch Tokens → Mean Pool
→ TRM Reasoning (H=2 cycles, L=2 shared layers) → Temporal Transformer (1 layer)
→ Classifier (51 classes)vit_tiny_patch16_224 (pretrained on ImageNet)| Model | Parameters | Val Accuracy | Test Accuracy |
|---|---|---|---|
| Baseline (standard pipeline) | ~6M | 60% | 58% |
| Recursive Reasoning (2 cycles) | ~6M | 69.4% | 69% |
| Improvement | — | +9.4 pts | +11 pts |
1backbone: vit_tiny_patch16_224 (pretrained)
2trm_H_cycles: 2
3trm_L_layers: 2
4trm_num_heads: 4
5temporal_num_layers: 1
6temporal_num_heads: 4
7learning_rate: 3e-4
8weight_decay: 0.05
9warmup_epochs: 5
10max_epochs: 30
11batch_size: 8
12num_temporal_clips: 4
13num_frames: 16
14frame_stride: 4
15label_smoothing: 0.1
16seed: 22
17optimizer: AdamW
18scheduler: cosine with warmup1import torch
2from vit_trm_video import ViTTRMVideo
3
4# Load from checkpoint
5model = ViTTRMVideo.load_from_checkpoint(
6 "vit-trm-epoch=29-val_acc=0.7113.ckpt",
7 strict=False,
8)
9model.eval()
10
11# Inference: video tensor of shape (batch, num_frames, 3, 224, 224)
12video = torch.randn(1, 16, 3, 224, 224)
13with torch.no_grad():
14 logits = model(video)
15 predicted_class = logits.argmax(dim=-1)vit-trm-epoch=29-val_acc=0.7113.ckpt — PyTorch Lightning checkpoint (best validation accuracy)vit_trm_video.py — Model architecture (ViTTRMVideo)vit_video_baseline.py — Baseline model for comparison (ViTVideoBaseline)1@article{jolicoeur2025less,
2 title={Less is More: Recursive Reasoning with Tiny Networks},
3 author={Jolicoeur-Martineau, Alexia},
4 journal={arXiv preprint arXiv:2510.04871},
5 year={2025}
6}