Video and Temporal Reasoning

Michael BrenndoerferDecember 1, 202627 min read

Frame sampling, temporal localization, event ordering, and causal reasoning for video models. Learn how sampling grids, token budgets, and tIoU shape what remains observable.

Language AI HandbookAll chapters
Part 52 of 67Omni-Modal and Embodied Language Systems
Chapter 399Video and Temporal Reasoning
Reading the full chapter · 12 sections · 27 min12 sections · 27 min

All 12 sections · 27 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Video and Temporal Reasoning

At one frame per second, a model reviewing a ten-second clip can miss a flash between 3.1 and 3.5 seconds. It still has enough context to guess and may return a plausible timestamp. The sampling grid decides whether the visual evidence reaches the model at all. Start by checking that grid before you judge the model’s reasoning.

A video pipeline turns frames into a sequence of features or tokens. Here we follow what survives that conversion. We then use separate tests for temporal localization, event ordering, and causal reasoning. They ask for an interval, a sequence, and the effect of an intervention, respectively.

The examples use small timestamped sequences. We compare sampling policies at the same frame budget, calculate interval overlap, and use two clips with the same events in a different order. The last comparison tests sensitivity to order.

Build on what you already know. From Part L: Multimodal Models you have vision encoders, projection layers, and the LLaVA-style architecture that stitches an image encoder to a language model. This chapter takes that machinery and asks: what changes when the input is not one image but a thousand? From Part LI: Speech and Audio you have the idea of a time-series signal turned into frames (mel spectrograms) and fed to an encoder; video is the visual analogue, and several ideas carry over directly. And from Part XVIII: Long Context you have the toolkit for handling sequences that exceed a transformer's comfortable window, which is exactly the regime long videos live in.

What this chapter treats as separate

Localization predicts an event’s start and end. Ordering compares events in time. Causal reasoning asks whether changing one event or condition would change an outcome. A pair of timestamps can answer an ordering question. A causal claim also needs a justified comparison, such as an intervention with relevant conditions held fixed.

The shape of the problem

The frame rate, clip duration, and encoder patch size determine the uncompressed token estimate.

Take a constant-rate, 10-minute clip at 30 frames per second. It contains 18,000 frames. A frame of 1920 × 1080 pixels has 2,073,600 pixels. If each frame is resized to 224 × 224 and encoded as non-overlapping 14-pixel square patches, it has 256 patch positions. Keeping one token per patch gives 4,608,000 visual tokens before adding text or special tokens. That exceeds a 128,000-token budget by a factor of 36. Full attention also computes a quadratic number of token pairs. Reducing frames, tokens per frame, or the amount of material passed to a single model call addresses different parts of this budget.

A frame budget is one part of end-to-end latency. Even with a model that accepts the sequence, computing the video features, reading its prefix and storing the retained representation have separate costs.

A pipeline needs a rule for choosing frames and a way to represent their timing. If an event leaves no evidence in the retained channels, the model can still guess from context. A fluent answer does not establish that the event was observed.

Frame sampling

Frame sampling selects some of the frames already present in a decoded clip. A sampled sequence can preserve a presentation timestamp for each frame, along with its image or encoded features.

Frame sampling

Choose a frame budget based on the event durations and kinds of evidence your task needs. Regular sampling leaves gaps. Content-aware sampling moves samples toward the changes its scoring rule detects.

Think of the selection rule as a lossy transform. Regular sampling allocates coverage over time. A rule based on frame differences allocates more of its budget to changes, even when the changes reflect camera motion or lighting rather than the event.

Regular sampling and the event phase

Consider an ideal grid with one sample every s>0s>0 seconds and an event of duration Δ≥0\Delta\geq 0. Take the event as the half-open interval [u,u+Δ)[u,u+\Delta) and place it away from the ends of the clip, so samples cover the adjacent grid positions. An event at least as long as the spacing always contains a sample on this grid, including at Δ=s\Delta=s. A shorter event can fit between neighboring samples.

Now suppose the starting phase uu modulo ss is uniformly distributed. The catch probability is the fraction of phases for which some sample lies within the event interval:

P(catch)=min⁡(Δs, 1).P(\text{catch}) = \min\left(\frac{\Delta}{s},\,1\right).

The symbols are:

  • Δ\Delta: the event duration, measured in seconds.
  • ss: the constant spacing between sample times, measured in seconds.
  • Δ/s\Delta/s: the event duration in units of the sampling spacing. Values above one are clipped to one.

For 0<Δ<s0<\Delta<s, the start phases that put the next sample inside the event occupy length Δ\Delta out of each interval of length ss. At zero duration the interval is empty. At or above one sampling interval, every start phase contains a sample. This ideal calculation assumes a regular sample grid and continuous start phases. Rounding to source frame times or clipping at the ends changes the available sample times.

A 0.3-second event hits this ideal grid with probability 0.30 at a one-second spacing and 0.15 at a two-second spacing. This randomness is across event phases. For one clip and one fixed grid, the sampled frames are deterministic.

The catch probability is a simple ratio, but seeing it across a range of sampling intervals makes the blind spot concrete. The sweep below evaluates the formula on a grid of intervals for several event durations.

PythonIn [3]
CollapseExpand
import numpy as np

# Catch probability P(catch) = min(Delta / s, 1) evaluated on a grid.
# Selection rule: event durations span 0.1s to 0.5s; sampling intervals
# span 0.25s to 4.0s. No randomness involved (deterministic sweep).
event_durations = np.array([0.1, 0.2, 0.3, 0.4, 0.5])
sampling_intervals = np.linspace(0.25, 4.0, 200)
# catch_prob[i, j] = probability for duration i at interval j
catch_prob = np.clip(
    event_durations[:, None] / sampling_intervals[None, :], 0.0, 1.0
)
VisualizationOut [4]
CollapseExpand
Line plot of catch probability versus sampling interval for event durations from 0.1 to 0.5 seconds.
Probability that uniform sampling catches an event of duration Delta as the sampling interval grows from 0.25 to 4.0 seconds. Curves flatten to a 100% ceiling once the interval is shorter than the event. The 0.3-second and 0.4-second events cross the 1-fps interval at 30% and 40% respectively.

The dashed line is a one-second sampling interval. There, event durations of 0.3 and 0.4 seconds correspond to catch probabilities of 0.30 and 0.40. A catch means that a timestamp intersects the interval. One frame may show only a small part of the action.

A detected change can also depend on whether the sample falls at the beginning, middle, or end of an action. The catch formula does not estimate recognition from those partial observations.

Repeating a query with the same sampled frames leaves the visual evidence unchanged. The answer can still vary with generation settings. To diagnose a suspected sampling miss, inspect the timestamps or rerun with a different grid.

If a discarded event left visible consequences, audio, or other traces in the retained input, a downstream model can sometimes infer it. An answer based on those traces is indirect evidence.

Uniform, dense, and adaptive sampling

Three selection strategies are useful starting points.

Uniform sampling allocates a regular time grid when sampling by timestamp. A fixed frame-index stride is equivalent only on a constant-rate sequence. Both rules can miss a short event.

Dense sampling keeps more frames within a selected interval. It improves coverage there and uses more of the frame budget, so the rest of the clip may receive fewer samples.

Adaptive sampling selects frames using a signal computed from the input. A content-change signal can respond to motion, lighting, editing cuts, or noise. Its useful target depends on the desired task.

One example is the distance between consecutive frame features. A large distance marks a change in the chosen representation. The distance alone cannot tell whether the change is relevant to the query.

dt=∥ϕ(ft)−ϕ(ft−1)∥2,d_t = \lVert \phi(f_t) - \phi(f_{t-1}) \rVert_2,

The symbols are:

  • ftf_t: frame tt in the video, in temporal order
  • ϕ(⋅)\phi(\cdot): a mapping from a raw frame to a feature vector (a histogram, a downsampled thumbnail, or a vision-encoder embedding)
  • dtd_t: the frame-difference magnitude at time tt, i.e., the Euclidean distance between consecutive frames' feature vectors (note this requires t≥1t \geq 1; d0d_0 is undefined)

A sampler can keep the top kk scores or combine a change score with periodic anchors. The same signal can miss changes when the features are insensitive to them.

A top-kk rule can allocate many of its slots to one dramatic event and leave another region thinly sampled. Reserving some slots for a time grid protects coverage over that grid.

Keyframe extraction and scene segmentation

Shot-boundary detection can seed keyframe selection in edited footage. A histogram or feature change can flag a possible cut. Choosing one frame per shot reduces the sequence length and can also lose actions that occur within a shot.

A continuous take can still contain useful keyframes. A sampler based only on cuts has no within-shot selection rule, so it needs another way to represent changes in that take.

Sparse "bursts" and the multi-scale compromise

Because each sampling strategy is a compromise, practical systems combine them. A common pattern is multi-scale sampling:

  • Coarse pass: uniformly sample a few dozen frames across the whole video to give the model a global, low-resolution sense of the arc.
  • Fine pass: once the model (or a cheap first stage) identifies a region of interest, densely sample that region to get temporal detail.

This mirrors how long-document retrieval works in Part XLIV: Retrieval-Augmented Generation: retrieve a coarse region first, then read it closely. The difference is that the "document" here is indexed by time rather than by text, and the model must learn to point at a region with timestamps.

A coarse pass can miss a small event and never request a fine pass at its location. Let event visibility guide your choice of coarse spacing and the triggers for dense resampling.

The timestamp primitive

Frame order and elapsed time are different inputs. Frame indices plus a known constant frame rate can give elapsed time. With variable frame timing, preserve the original presentation timestamps or another explicit time representation.

One way to pass elapsed time to a model is to attach a text marker to each retained frame. The example below uses hours, minutes, seconds, and milliseconds since the start of the clip:

[frame 00:00:00.500] <visual tokens for frame 17> [frame 00:00:01.000] <visual tokens for frame 21> ...

A model can copy a displayed timestamp without computing the difference between two timestamps. For duration tasks, verify the subtraction or compute it outside the text generator using numeric times.

These markers carry elapsed time on the clip timeline. Sequence positions represent the order of retained tokens. Two neighboring frames can occupy neighboring positions even when their timestamps differ by an unusually large interval.

In the next example, the first two gaps are 33 milliseconds and the third is 167 milliseconds. Each is one frame step. The frame index alone loses the difference in elapsed time.

PythonIn [5]
CollapseExpand
presentation_ms = np.array([0, 33, 66, 233], dtype=int)
print("Neighbor spacings (ms):", np.diff(presentation_ms).tolist())
ConsoleOut [5]
CollapseExpand
Neighbor spacings (ms): [33, 33, 167]

From frames to tokens: the video encoder pipeline

Once frames are chosen, each frame is encoded, and the encoded frames are stitched into the language model's input. This is the video version of the LLaVA pipeline from Part L, Ch 5: LLaVA Architecture, with the addition of time. There are three main architectural choices.

Frame-as-image, concatenated. Encode selected frames separately and concatenate their visual representations in order. The sequence preserves order. To represent irregular spacing, supply timestamps or time-based positions alongside the frame representations.

Temporal pooling and aggregation. Merge information within a time window. If that operation outputs fewer tokens, the language model receives a shorter sequence. A mean over the whole window can lose fine order unless the feature representation separately encodes it.

Explicit temporal encoding. Add a time feature to the visual representation. An embedding parameterized by elapsed time can distinguish equal frame-index gaps with different durations. Whether the model uses that feature correctly is an evaluation question.

The LLaVA-OneVision paper gives a concrete token-budget example. Its documented video path encodes frames individually and uses spatial interpolation to reduce their visual token count. That compression within each frame is independent of pooling across time. Both choices affect the evidence available further downstream.

The worked example compares the two samplers on the same feature sequence.

A worked sampling example

We'll build a toy video as a sequence of per-frame feature vectors, the way a real pipeline would after the vision encoder. Using features instead of raw pixels keeps the example cheap and makes the temporal structure visible. Imagine a 10-second clip at 30 fps with an event that flashes for 0.4 seconds at the 3.1-second mark.

PythonIn [6]
CollapseExpand
import numpy as np

rng = np.random.default_rng(0)
fps = 30
duration_s = 10
n_frames = fps * duration_s

# Each frame is a short feature vector; baseline content is slowly drifting.
t = np.arange(n_frames) / fps
feature_dim = 8
features = 0.05 * np.sin(t)[:, None] + 0.02 * rng.standard_normal(
    (n_frames, feature_dim)
)

# A short event at 3.1s lasting 0.4s: a strong, brief spike in features.
event_start = 3.1
event_dur = 0.4
event_mask = (t >= event_start) & (t < event_start + event_dur)
features[event_mask] += 1.0

n_event_frames = int(event_mask.sum())
ConsoleOut [7]
CollapseExpand
Frames: 300
Event frames: 12 (between t=3.1 and t=3.5)

Twelve of the 300 frame timestamps fall in the interval [3.1,3.5)[3.1,3.5) seconds. Sampling one frame each second retains ten frames starting at second zero.

PythonIn [8]
CollapseExpand
sample_stride = fps  # one frame per second
sampled_idx = np.arange(0, n_frames, sample_stride)
caught = bool(event_mask[sampled_idx].any())
ConsoleOut [9]
CollapseExpand
Sampled frame indices (first 10): [  0  30  60  90 120 150 180 210 240 270]
Sampled 10 of 300 frames
Event caught by uniform 1-fps sampling: False

The latest uniform sample before the event arrives at 3.0 seconds. The next arrives at 4.0 seconds. Neither is inside the interval. Shifting the event start to 3.0 seconds would include a sample under the same grid and endpoint rule.

Now compare with an adaptive strategy that keeps frames where the frame-difference signal spikes.

PythonIn [10]
CollapseExpand
# Difference i compares frame i with frame i + 1.
diffs = np.linalg.norm(np.diff(features, axis=0), axis=1)
frame_budget = len(sampled_idx)
change_order = np.argsort(-diffs, kind="stable")
adaptive_idx = np.sort(change_order[:frame_budget] + 1)
caught_adaptive = bool(event_mask[adaptive_idx].any())
ConsoleOut [11]
CollapseExpand
Adaptive kept 10 frames
Event caught by adaptive sampling: True
Event-frame indices: [93 94 95 96 97] ...

In this seeded toy clip, the adaptive sampler catches the event with the same ten-frame output budget. It keeps frame 93 as its only event frame, and it also keeps frame 105, just after the event. It computed scores using the full 300-frame feature sequence up front, so equal output budgets do not imply equal preprocessing cost. It can spend several samples on one change or choose a departure frame just outside the event. A limit on gaps between sampled timestamps can protect broad coverage while leaving sub-gap events at risk.

The chart puts both policies on the same timeline. Uniform samples appear as vertical marks. Adaptive samples are triangles in a separate row below the frame-difference signal.

PythonIn [12]
CollapseExpand
diff_time = t[1:]
VisualizationOut [13]
CollapseExpand
Uniform marks miss the event band while an adaptive triangle falls inside.
The line shows differences between consecutive features at the later frame time. The shaded interval is the 0.4-second event. The two policies each retain 10 frames. Vertical lines mark uniform samples and triangles mark adaptive samples.

Uniform samples skip the shaded interval entirely. The two largest feature changes are at frames 93 and 105, at the event onset and offset. An adaptive sample at onset falls inside the interval, while a sample exactly at the offset falls outside by the half-open convention.

Event localization

Temporal localization answers an event query with a time interval. A different task can ask for a spatial region as well. Here the predicted and reference intervals are measured in seconds on the same clip timeline.

An interval prediction supports a precise timing check. Ordering can also be correct from relative signals when exact start and end times are unavailable.

Temporal intersection over union (tIoU) compares a predicted interval [ps,pe)[p_s,p_e) and a reference interval [gs,ge)[g_s,g_e). Use finite, nonnegative times and require positive duration for both. Define the overlap length II first, then divide by the length of the union:

I=max⁡(0,min⁡(pe,ge)−max⁡(ps,gs)),tIoU⁡=I(pe−ps)+(ge−gs)−I.I=\max\bigl(0,\min(p_e,g_e)-\max(p_s,g_s)\bigr),\qquad \operatorname{tIoU}=\frac{I}{(p_e-p_s)+(g_e-g_s)-I}.

The symbols are:

  • ps,pep_s, p_e: the start and end times of the predicted interval
  • gs,geg_s, g_e: the start and end times of the ground-truth interval
  • II: the overlap length, truncated at zero for disjoint or touching intervals.
  • (pe−ps)+(ge−gs)−I(p_e-p_s)+(g_e-g_s)-I: the union length. Adding both lengths counts shared time twice, so subtract it once.

The union is positive under these duration assumptions. A threshold α\alpha turns the continuous score into a hit when tIoU is at least α\alpha. Report the threshold and how invalid predictions affect the denominator. In this example protocol, an invalid prediction counts as a miss and stays in the denominator. Validate reference intervals before running the evaluation.

Moving or widening a predicted interval changes its overlap and union. A containing prediction larger than the reference keeps the full reference overlap and increases the union.

Temporal IoU (tIoU)

For positive-duration intervals, tIoU ranges from 0 for no overlap to 1 for identical intervals. The reported hit rate depends on the chosen threshold.

Disjoint intervals all score zero, even if the prediction misses by only one frame. A containing interval scores the reference duration divided by its own duration. Widening a misplaced interval can recover a hit at a low threshold, while widening an already perfect interval lowers its score. A separate endpoint-error metric can describe the size of near-misses.

The main approaches to temporal localization differ in whether they treat candidate intervals explicitly.

  • Proposal-and-select scores candidate windows. The highest attainable overlap depends on the candidates available to score.
  • Boundary regression estimates start and end offsets or probabilities over candidate boundary times.
  • Timestamp generation asks a text model to emit numeric boundaries. Parse the times as numbers and check that both endpoints fall inside the clip before calculating overlap.

A matching interval only establishes the overlap score. A broad guess can overlap by chance. For a 0.4-second reference, a containing 0.8-second prediction scores 0.50; the same prediction misses at a 0.70 threshold.

PythonIn [14]
CollapseExpand
from math import isfinite


def temporal_iou(predicted, reference):
    p_start, p_end = predicted
    r_start, r_end = reference
    if any(not isfinite(t) or t < 0 for t in (p_start, p_end, r_start, r_end)):
        raise ValueError("Endpoints must be finite, nonnegative clip times.")

    p_length = p_end - p_start
    r_length = r_end - r_start
    if p_length <= 0 or r_length <= 0:
        raise ValueError("Both intervals must have positive duration.")

    overlap = max(0, min(p_end, r_end) - max(p_start, r_start))
    longer = max(p_length, r_length)
    shorter = min(p_length, r_length)
    # Scale both lengths by the longer interval before forming their ratio.
    return (overlap / longer) / (1 + (shorter - overlap) / longer)


reference = (3.1, 3.5)
print(f"Containing prediction: {temporal_iou((2.9, 3.7), reference):.2f}")
print(f"Touching prediction: {temporal_iou((3.5, 3.9), reference):.2f}")
ConsoleOut [14]
CollapseExpand
Containing prediction: 0.50
Touching prediction: 0.00

The function divides the overlap and the union by the longer interval length. This gives the same ratio without adding two potentially large durations. Pass it parsed times after checking the clip duration.

Temporal ordering

An ordering question asks which event came first or how several events were arranged. A model can infer relative order without exact times. It can also misread two timestamps after localizing both events correctly.

Two useful formats are pairwise comparisons and reconstruction of a shuffled sequence. Either can be answered from a familiar script in some examples. Swap the relative order of two events while keeping their identities fixed to test whether the answer follows the clip.

A long clip can exceed the active context. A system can summarize earlier frames, retrieve earlier evidence from an index, or process the clip in stages and compare the retained information.

  • Compressed frame memory: maintain a running summary of past frames as a fixed-size set of "memory tokens," which get attended to alongside the current window. This is analogous to a recurrent memory state: it was covered for text in Part XVIII, Ch 7: Recurrent Memory, and the video version applies the same idea to a stream of frames.
  • Retrieval memory: index frames (or their captions) and retrieve relevant ones when a question refers back to an earlier time. This is Part XLIV: Retrieval-Augmented Generation applied to a timestamped video index.

A summary can omit a brief event. A retrieval policy can miss an indexed frame when its query, index, or similarity rule selects a different entry.

The next figure uses two invented curves to demonstrate a reporting format. The score at each distance is assigned by an exponential formula. The two curves use different floors, decay constants, and amplitudes, so their gap has no causal interpretation about either memory mechanism.

PythonIn [15]
CollapseExpand
# Synthetic distance-stratified ordering accuracy. This is an illustrative
# model, not measured data. The "compressed" curve decays exponentially with
# distance; the "hybrid" (retrieval + compression) curve decays more slowly.
# Parameters are fixed, no random sampling.
distances_s = np.array([2, 5, 10, 15, 30, 60, 120, 180, 240])
# Exponential decay toward a long-range floor.
compressed_acc = 0.05 + 0.90 * np.exp(-distances_s / 40.0)
hybrid_acc = 0.15 + 0.80 * np.exp(-distances_s / 110.0)
stratified = {"compressed": compressed_acc, "hybrid": hybrid_acc}
VisualizationOut [16]
CollapseExpand
Line plot of ordering accuracy against evidence distance for two memory strategies.
Two illustrative ordering score curves use fixed exponential decays. The retrieval-plus-compression curve is higher at each plotted distance. The displayed gap is largest at 60 seconds, then narrows. These are formula values.

The curves are close at two seconds, separate across the middle distances, and come closer again at the far right. Mixing different distance buckets into a single score changes their relative weight. Report the count as well as the score in each bucket.

A retrieval path can recover an indexed frame when it finds the right entry. A summary is available within its window and can omit details. Combining both gives the model two sources of evidence, and the evaluation can test whether using both helps.

Compare evidence-distance slices while controlling for event type and visibility. Shorter distance alone does not make a question easy. Conversely, a long-range question can remain easy when an earlier event is distinctive and correctly indexed.

Causal reasoning

A temporal sequence can help decide which mechanisms are possible. Establishing that one event produced another needs additional evidence or explicitly stated assumptions.

Start by identifying the candidate cause, the outcome, and possible common causes.

In the sequential examples here, a cause acts before its outcome. An earlier observation can still be incidental. A causal comparison asks how the outcome changes when the earlier event changes under a specified intervention.

An unobserved condition can cause two visible events. For example, a gust can move a curtain and close a door. Their order alone does not tell us whether the curtain moved the door. Identifying a causal effect from observations requires assumptions about what was measured and what was held fixed.

Paired causal comparisons. To test whether a bump changes the outcome in a toy setup, start from the same placement and toggle the bump while keeping the other conditions fixed. Record whether the glass falls in each run. Changing the glass placement while keeping the bump fixed instead tests how placement changes the outcome in those bumped runs. In an observational video, a hidden cause can produce both the apparent cause and the outcome.

Recorded interventions or valid simulations can provide paired evidence. Editing two clips to change the image order tests order sensitivity. A causal comparison additionally requires a justified change to the generating conditions and a measured outcome.

A mean over a fixed collection of features is invariant to their ordering. If the tokens already contain time information, the features may still carry positional evidence after pooling. In the following toy, the event vectors are identical in both clips and contain no time features.

The next toy tests a narrower question by changing event order while holding the observed outcome fixed.

An order-swapped toy pair

We'll represent events as labeled feature vectors and build two clips that differ only in event order, then check whether a simple order-sensitive versus order-insensitive scoring rule distinguishes them.

PythonIn [17]
CollapseExpand
# Two events as feature vectors, plus a shared "setup" and "outcome".
setup = np.array([0.1, 0.1, 0.1, 0.1])
bump = np.array([1.0, 0.0, 0.0, 0.0])
tilt = np.array([0.0, 1.0, 0.0, 0.0])
fall = np.array([0.0, 0.0, 1.0, 0.0])

# Clip A: setup -> bump -> tilt -> fall   (bump precedes tilt)
clip_a = np.stack([setup, bump, tilt, fall])
# Clip B: setup -> tilt -> bump -> fall   (tilt precedes bump)
clip_b = np.stack([setup, tilt, bump, fall])

row_a_bump = np.where((clip_a == bump).all(axis=1))[0]
row_b_bump = np.where((clip_b == bump).all(axis=1))[0]
ConsoleOut [18]
CollapseExpand
Clip A event lengths: [4, 4, 4, 4]
Clip A row index of bump: [1]
Clip B row index of bump: [2]

The two clips contain the same events; only the order of bump and tilt differs. An order-insensitive scorer that pools frames (e.g., takes the mean) cannot tell them apart, because the multiset of events is identical.

PythonIn [19]
CollapseExpand
# Order-insensitive: mean-pool the events into one summary vector.
summary_a = clip_a.mean(axis=0)
summary_b = clip_b.mean(axis=0)
summaries_identical = bool(np.allclose(summary_a, summary_b))


def event_index(clip, event):
    matches = np.flatnonzero((clip == event).all(axis=1))
    if matches.size != 1:
        raise ValueError("The target event must match exactly one row.")
    return int(matches[0])


# Order-sensitive: does bump precede tilt?
def bump_before_tilt(clip):
    return event_index(clip, bump) < event_index(clip, tilt)


clip_a_bump_first = bump_before_tilt(clip_a)
clip_b_bump_first = bump_before_tilt(clip_b)
ConsoleOut [20]
CollapseExpand
Mean-pooled summaries identical: True
Clip A bump-before-tilt: True
Clip B bump-before-tilt: False

The two clips have identical means and opposite answers to the ordering question. They also end in the same outcome, so this pair does not identify the effect of changing either event. The toy compares exact labeled vectors and raises an error when a target has no matching row or more than one. Real videos require a way to recognize and associate the repeated actions before comparing their times.

Long-video evaluation

Choose an evaluation based on the behavior you need from the model. Video-MME spans three clip-duration groups and includes subtitles and audio as additional modalities. LongVideoBench defines referring reasoning, where a question identifies an earlier or otherwise relevant context within the input. Neither benchmark name by itself specifies the exact sampling, modality, or slice settings to report.

Use four checks when reviewing a joint video evaluation.

Sampling coverage. Report exact frame selection and accessible modalities. If the video path misses a short event, a subtitle, audio cue, or event regularity may still supply an answer. Compare input variants when you need to attribute performance to visual observations.

Contamination. Evaluate data overlap or duplicate clips when the provenance is available. Compare against held-out material collected after the training cutoff when you can establish that cutoff. A high score alone cannot establish or rule out exposure.

Localization metrics. Report overlap and, where useful, absolute endpoint error. State the threshold and how invalid predictions are counted. A low threshold can accept some loose containing intervals.

Causal comparisons. A question about which event came first requires ordering. To evaluate an effect, specify which input changes, what remains fixed, which output should change, and how you judge the paired answer.

Report separate results for interval localization, ordering, and intervention-based questions when all three are tested. Include the frame budget, timestamp method, available modalities, and number of examples per evidence-distance or event-duration slice. For paired tests, report joint correctness across both versions as well as the individual scores.

A single average can hide strong performance on frequent short-range questions and weak performance on rare long-range ones. Inspect both the slice sizes and their scores before changing the sampling or memory policy.

Limitations and impact

A model answer cannot resolve whether evidence survived sampling. Keep a diagnostic trace of sampled times and available modalities. If a short event falls between retained frames, a denser pass may recover it, provided the source contains the relevant frames.

Localization, ordering, and causal answers carry different error modes. A good ordering score can coexist with wrong causal conclusions. A paired evaluation can make those failures visible when the pair’s changed mechanism is known.

Video timestamps support search, navigation, and questions about step order. Coverage and memory limit the resolution and distance at which those questions can be answered. An event log or controlled recording can provide stronger evidence for some questions than a larger model.

The same distinction between stored evidence and the requested inference applies to audio and streaming multimodal systems. In an online stream, a coarse pass may have to choose a segment before later evidence arrives. A buffered offline clip can revisit a segment after the first pass.

Summary

  • Regular time sampling can miss any event shorter than the spacing. The phase formula assumes a uniform start phase, a regular ideal grid, and a position away from the clip boundaries.
  • Compare frame policies at the same output budget and account for scoring cost separately. Keep elapsed timestamps when frame spacing varies.
  • Temporal IoU measures positive-length interval overlap. Ordering requires evidence about sequence. A causal claim needs a justified comparison of outcomes under a change in conditions.
  • Record the sampling configuration and available modalities. Report results by event duration or evidence distance when those slices matter to the task.

Quiz

Ready to test your understanding? Take this quick quiz to reinforce what you've learned about video and temporal reasoning.

Video and Temporal Reasoning

Question 1 of 80 of 8 completed
For an event with duration Δ uniformly distributed in phase against a regular sampling grid with spacing s, where 0 < Δ < s, what fraction of start phases catches the event?
Join the discussionAsk a question or share what you learned.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

A different angle
All writing
Language AI Handbook · Vol. 17

Multimodal Safety and Evaluation

Evaluate multimodal systems for cross-modal injection, privacy leakage, deepfake provenance, and modality imbalance using slice-based measurement harnesses.

26 min read
Language AI Handbook · Vol. 17

Document, Diagram, and Interface Understanding

Learn how document, chart, and interface readers separate detection, recognition, and structure to ground answers in verifiable evidence.

51 min read
Language AI Handbook · Vol. 17

Vision-Language-Action Models

How vision-language-action models turn images and instructions into robot commands. Compare action heads, controller timing, and evaluation methods.

48 min read

About the author

Reference

Citation details

Cite or share this article.

BIBTEXAcademic
@misc{brenndoerfer2026videotemporal, author = {Michael Brenndoerfer}, title = {Video and Temporal Reasoning}, year = {2026}, url = {https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal}, organization = {mbrenndoerfer.com}, note = {Accessed: 2026-12-03} }
APAAcademic
Michael Brenndoerfer (2026). Video and Temporal Reasoning. Retrieved from https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal
MLAAcademic
Michael Brenndoerfer. "Video and Temporal Reasoning." 2026. Web. December 3, 2026. <https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal>.
CHICAGOAcademic
Michael Brenndoerfer. "Video and Temporal Reasoning." Accessed December 3, 2026. https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal.
HARVARDAcademic
Michael Brenndoerfer (2026) 'Video and Temporal Reasoning'. Available at: https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal (Accessed: December 3, 2026).
SimpleBasic
Michael Brenndoerfer (2026). Video and Temporal Reasoning. https://mbrenndoerfer.com/writing/video-temporal-reasoning-frame-sampling-localization-causal
Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy