When Should the Count Change? Learning State Maintenance for Causal Video Counting
Organizations: Beihang University · Peking University
Abstract
Continuous video counting requires distinguishing new observations from new objects or completed events. We introduce StaMina (State Maintenance), which learns to maintain counting state through state-conditioned updates. Recurrent visual context supports recognition; learned transitions maintain visibility, persistent identities, and completed-event records. A differentiable recurrence trains event transitions over legal paths constrained by count endpoints; visibility and association objectives train the object branch. A multi-source pipeline organizes 39.8K spatial queries and complementary event annotations into counting trajectories. On SVCBench, we evaluate counting adaptation with partial video overlap and held-out groups of linked annotations. Under prefix replay (Full) and persistent streaming (Stream), 4B and 8B models reach 41.9/36.4 and 44.9/38.2 Gaussian Precision Accuracy, respectively. The 8B model gains 10.9/3.2 points over Counting-SFT on the same queries. Matched-graph comparisons isolate phase conditioning and trajectory supervision, assessing training objectives alongside hard decisions. Online video benchmarks and count-conditioned decisions assess online understanding and task eligibility. Project Page: https://PLACEHOLDER.github.io/StaMina/
Figures & tables
| Model | Access | O1 | O2 | E1 | E2 | Overall | ||||||
| Snap | Delta | Unique | Gain | Action | Transit | Episode | Periodic | GPA | MoC | UDA | ||
| Human reference | ||||||||||||
| Human | Human | 96.7 | 100.0 | 94.5 | 100.0 | 94.9 | 98.3 | 97.0 | 93.2 | 96.1 | 100.0 | 99.3 |
| Text-only reference | ||||||||||||
| GPT-4-Turbo | Text | 15.7 | 19.4 | 15.8 | 50.0 | 13.1 | 23.6 | 21.9 | 0.0 | 18.7 | 95.7 | 4.3 |
| Proprietary VLMs | ||||||||||||
| Phase input | Endpoint objective | GPA | Hard exact | False updates |
| Off | Mean | 40.8 | 40.1 | 1.1 |
| On | Mean | 46.3 | 45.7 | 0.5 |
| Off | Path | 50.7 | 49.9 | 0.8 |
| On | Path | 65.1 | 64.4 | 0.4 |
| Model | Access | OVO-Bench Avg. | OVO-S L-Avg. |
| Qwen3-VL-4B | Full | 50.81 | 46.93 |
| Qwen3-VL-8B | Full | 55.02 | 48.58 |
| StaMina-4B (Ours) | Full | 51.66 | 48.57 |
| StaMina-8B (Ours) | Full | 55.46 | 50.32 |
| StreamForest-7B | Stream | 55.57 | 44.13 |
| Flash-VStream-7B | Stream | 33.15 | 24.94 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Setting | Value |
| Memory heads width; block stride | ; 4 |
| Transition/association hidden width | 256 (GELU) |
| Pooling queries; entity-event slots | 32; 4 |
| Identity shortlist; visibility threshold | 8; 0.5 |
| Deduplication/track cosine thresholds | 0.95/0.5 |
| Token chunk; continuous truncation | 128; 8 chunks |
| Operator | Queries |
| O1-Snap | 16379 |
| O1-Delta | 6746 |
| O2-Unique | 10627 |
| O2-Gain | 6077 |
| E1-Action | 4606 |
| E1-Transit | 885 |
| Phase | Objective | GPA | Exact | NLL | Duplicate | Miss | Delay |
| Off | Mean | 40.8 | 40.1 | 0.93 | 2.8 | 17.4 | 1.11 |
| On | Mean | 46.3 | 45.7 | 0.94 | 1.2 | 16.6 | 0.93 |
| Off | Path | 50.7 | 49.9 | 0.67 | 1.8 | 10.7 | 1.15 |
| On | Path | 65.1 | 64.4 | 0.58 | 1.1 | 7.0 | 0.89 |
| Phase | Objective | Source stratum | GPA | Exact | NLL |
| Off | Mean | Endpoint only | 38.1 | 37.4 | 0.95 |
| Off | Mean | Boundary supported | 43.5 | 42.8 | 0.90 |
| On | Mean | Endpoint only | 41.6 | 41.0 | 0.98 |
| On | Mean | Boundary supported | 51.0 | 50.3 | 0.90 |
| Off | Path | Endpoint only | 45.3 | 44.5 | 0.71 |
| Off | Path | Boundary supported | 56.2 | 55.3 | 0.62 |
| Identity loss | Source stratum | Soft | Hard | Soft Gain | Hard Gain |
| Count only | 0.56 | 0.89 | 0.55 | 0.68 | |
| Identity verified | 0.56 | 0.94 | 0.56 | 0.69 | |
| Complete | Count only | 0.40 | 0.69 | 0.39 | 0.50 |
| Complete | Identity verified | 0.23 | 0.43 | 0.25 | 0.31 |
| Identity loss | NEW precision | NEW recall | Re-entry | Unresolved | Delay |
| 88.1 | 87.9 | 11.8 | 18.3 | 3.04 | |
| Complete | 96.3 | 95.1 | 3.7 | 7.1 | 1.08 |
| Access | GPA | Hard exact |
| Full | 63.2 | 62.4 |
| Stream | 60.9 | 60.1 |
| Selection statistic | Count |
| Source train pool | 47882 |
| OVO media exclusion | 2710 |
| Dependency-family exclusion | 2316 |
| Graph-incompatible exclusion | 694 |
| Other unsupported records | 550 |
| Selected training queries | 41612 |
| Supervision | Selected queries |
| Endpoint only | 26068 |
| Verified identity | 11328 |
| Verified boundary | 4216 |
| Verified stable interval | 12894 |
| Source | Audited records | Endpoint correct (%) | Increment correct (%) |
| Objects | 320 | 93.1 | 89.4 |
| Natural events | 240 | 88.8 | 85.4 |
| Periodic | 240 | 96.7 | 93.8 |
| Operator | Endpoint queries | Full upper coverage | Stream upper coverage |
| Action | 1281 | 100.0 | 100.0 |
| Transit | 205 | 100.0 | 100.0 |
| Episode | 513 | 100.0 | 100.0 |
| Periodic | 280 | 44.3 | 58.2 |
| Access / population | Configuration | GPA |
| Full / 3706 queries | First-stage adaptation | 42.01 |
| Full / 3706 queries | Two-stage adaptation | 55.61 |
| Full / 3706 queries | Two-stage, branch gates zero | 30.65 |
| Stream / 866 queries | Recurrent initialization | 31.91 |
| Stream / 866 queries | Fixed fast weights | 26.12 |
| Stream / 866 queries | Full-adapted initialization | 36.80 |
| Condition | Full | Stream |
| Complete model | 44.9 | 38.2 |
| Threshold updates in place of FSM | 38.2 | 34.4 |
| Clear count projection | 6.1 | 6.1 |
| Cross-video count projection | 12.7 | 15.6 |
| Previous-endpoint projection | 16.1 | 15.8 |
| OVO-Bench | OVO-S | |||||||
| Model | Access | RT | BT | FA | L1 | L2 | L3 | L4 |
| Qwen3-VL-4B | Full | 57.32 | 46.38 | 48.75 | 42.01 | 49.01 | 53.67 | 43.05 |
| Qwen3-VL-8B | Full | 62.16 | 50.56 | 52.35 | 42.48 | 50.68 | 55.20 | 45.98 |
| StaMina-4B (Ours) | Full | 56.11 | 49.63 | 49.23 | 41.91 | 54.67 | 53.72 | 43.96 |
| StaMina-8B (Ours) | Full | 60.71 | 52.97 | 52.68 | 42.68 | 56.93 | 54.91 | 46.77 |
| StreamForest-7B | Stream | 61.20 | 52.02 | 53.49 | 46.64 | 45.20 | 49.75 | 34.92 |
| Model | Full | Stream |
| Qwen3-VL-8B | 31.0 | 28.0 |
| Counting-SFT | 34.0 | 35.0 |
| Counting-SFT + delta memory | 37.1 | 36.5 |
| Counting-SFT + explicit state | 41.3 | 36.3 |
| StaMina-8B (Ours) | 44.9 | 38.2 |