NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Counting Beyond Frames: Codec Motion Tells Frozen Diffusion VLMs How Many

Zhuoqin Li, Jiayu Ding, Ge LiarXiv 2026

TL;DR

Ask a massive video-language model how many push-ups someone did, and it will likely guess wrong because it only sees a handful of sampled frames—missing the movement in between. CoDiCount fixes this without any training by extracting dense motion data already stored inside standard video files (codec motion vectors) and turning it into a mathematical test for every possible count. By feeding this motion evidence into a frozen diffusion vision-language model while it iteratively refines its answer, a compact 7B model can suddenly out-count frontier giants like GPT-5.1 and Gemini-2.5-Pro.

What Problem Does This Paper Address?

Counting repeated actions is surprisingly brutal for modern video-language models (VLMs). To keep compute manageable, VLMs typically sample just a few RGB frames from a video (say, 16 or 32). If someone is jumping rope or pushing a skateboard quickly, entire cycles of motion vanish into the blind spots between sampled frames.

Existing workarounds either train specialized "repetition counter" networks (which can't answer general language queries about what to count) or feed video compression artifacts into VLMs as learned visual tokens. Furthermore, standard autoregressive VLMs generate answers left-to-right: if the true count is "14" vs. "8", the model has to commit to the first digit before the whole number even exists, making it hard to weigh evidence for complete multi-digit integers.

Figure 1. Codec motion tells a frozen diffusion VLM how many. Video codecs record the movement between the sampled frames, and CoDiCount turns this motion into a count potential ℓ(n) that tests every candidate count. During denoising, this evidence conditions the evolving answer of a frozen dVLM and steers its unresolved tokens toward the supported count before they are committed.

Methods

The authors pair two key ingredients in a completely training-free framework called CoDiCount: compressed video motion and diffusion VLMs (dVLMs). Unlike autoregressive models, dVLMs generate text via iterative parallel denoising—starting with [MASK] tokens and refining all positions simultaneously over several steps. Because the whole answer stays "open" during generation, external evidence can steer multi-digit numbers before tokens are locked in.

Here is how CoDiCount bridges raw video files and token probabilities:

  1. Motion-Progress Clock: Video codecs compress files by storing motion vectors—tiny arrows showing how image blocks shift between frames. CoDiCount extracts these vectors, subtracts global camera movement, and builds a timeline based on accumulated movement rather than wall-clock time. If the actor pauses or speeds up, the clock pauses or speeds up too.
  2. Winding Hypothesis (The Count Potential): Think of a candidate count $n$ as a physics hypothesis. If a rhythmic motion happened $n$ times over the video's total movement, "unwinding" the observed motion angles by $n$ cycles should align the directions neatly into a semicircle (handling both circular and back-and-forth motion). CoDiCount scores every integer $n$ by how well it organizes these unwound angles compared to raw directions, creating a count potential $\ell(n)$.
  3. Structured Count Messages: At each denoising step, CoDiCount maps the model's current token options—either multiple-choice letters or valid multi-token integer edits (tracked via a deterministic finite automaton)—to the numbers they represent. It then reweights the dVLM's probabilities using $\ell(n)$. The frozen VLM's visual brain decides what is being counted; the codec math decides how many.

In their full implementation on Dream-VL, this loop is paired with standard training-free tricks like codec-selected visual memory patches, temporal contrastive decoding, and soft-token feedback.

Datasets

Because CoDiCount is training-free, no training datasets are used. It is evaluated across three existing benchmarks (no new datasets are introduced):

  • MotionBench (Repetition Count subset): Multiple-choice questions across gaming, industrial, medical, and sports videos.
  • TOMATO (Action Count subset): Multiple-choice temporal reasoning questions spanning human, object, and simulated actions.
  • SVCBench: A streaming benchmark asking for open-integer counts after video prefixes, covering actions, transitions, episodes, periodic activities, and objects.

Key Insights and Ideas

  • Compression is free dense supervision: You don't need heavy optical flow networks to see between frames; the video encoder already did the block-matching work when saving the MP4, and CoDiCount compresses this raw data ~500x into reusable fields without adding a single neural forward pass.
  • Order matters, not just motion volume: When the authors shuffled the codec motion vectors across time (keeping magnitudes and directions identical), performance collapsed back to baseline. The magic lies strictly in the temporal winding of directions.
  • Diffusion models have a structural superpower for math/counting: Injecting count evidence only at the final denoising step failed; similarly, restricting edits to single tokens tanked accuracy on double-digit periodic counts (dropping GPA from 66.1 to 16.7). Parallel, multi-token refinement while the draft is still malleable is what lets large open-integer counts emerge.

Key Results

Applied to two frozen dVLMs (Dream-VL 7B and LaViDa 8B), CoDiCount beats native decoders across every benchmark and category:

  • MotionBench: Dream-VL jumps from 23.0% to 57.5% (+34.5), surpassing Gemini-2.5-Pro (57.0%) and GPT-5.1 (56.7%). Gaming repetitions leap from 21.7% to 90.8%. LaViDa jumps from 23.2% to 55.2%.
  • TOMATO: Dream-VL rises from 31.5% to 43.2%, beating GPT-4o (36.0%), Gemini-1.5-Pro (36.3%), and 72B open-source models.
  • SVCBench: Using Gaussian Precision Accuracy (GPA), Dream-VL rises from 26.4 to 29.1 overall—matching GPT-5.4 (29.1). On periodic activities, where almost all models fail, Dream-VL rockets from 0.0 to 66.1 (vs. GPT-5.4's 3.2).
Table 3. SVCBench. With CoDiCount, the 7B Dream-VL matches GPT-5.4 overall and leads every listed model on periodic activities. Official GPA×100 on the complete benchmark (Overall) and on its periodic activities (Periodic). Autoregressive results are reported by the SVCBench authors [14] on the same queries, with 64 frames or one frame per second. Size denotes total parameters. Shaded rows are ours, with the gain over the official decoder.

Limitations and Future Work

CoDiCount's count potential strictly measures cycles of motion direction. Consequently, when counting non-repetitive units like distinct objects, identities, or scene transitions, gains are much smaller (e.g., Industrial videos on MotionBench improve by a modest +5.9%, compared to +69.1% in Gaming) because the method relies heavily on the base VLM's visual recognition when directional cycles are absent. For future work, the authors note that their count-conditioning interface could host new potentials built from other free codec signals—such as compression residuals or block types—to bring direct evidence about object identity, grouping, and sudden scene boundaries into the denoising loop.

Summary updated

BibTeX
@misc{li2026counting,
  author = {Zhuoqin Li and Jiayu Ding and Ge Li},
  title = {{Counting Beyond Frames: Codec Motion Tells Frozen Diffusion VLMs How Many}},
  year = {2026},
  eprint = {2611.34657},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34657},
}
Figure