research30 min studyLesson 820 in Engineering

Test the temporal evidence boundary before interpreting quality

Separate source-group leakage, feature-support overlap, timestamp integrity, class imbalance, and temporal localization so evaluation matches its declared generalization task.

On this page

What you’ll understand

  • Construct split boundaries from source groups and full feature-support intervals.
  • Compute class-balanced recall and temporal overlap under stated matching rules.
  • Distinguish independent-sample uncertainty from correlated frame counts.

A video benchmark can produce impressive numbers by testing almost the same recording fragments used for training. Adjacent clips, reuploads, shared camera sessions, and temporal state can carry information across a nominal file split. Even without that leakage, broken timestamps or an inappropriate metric can hide failure on the event of interest. Define the generalization claim first, then test source identity, feature availability, temporal support, and metric denominators. Quality is a claim about a specified cohort and information boundary rather than one scalar detached from its construction.

Split the relevant source groups before generating windows

Choose a group based on the intended deployment question: episode, source recording, camera/session, participant, or another justified unit. GroupKFold's official contract keeps a supplied group out of both sides of a fold, but choosing group labels correctly remains the experimenter's responsibility. Hash-based duplicate checks, provenance links, and near-duplicate review can find re-encodes or extracts with different filenames. Group separation does not prove every semantic duplicate is absent, so state what identities and similarity checks were actually covered.

For a chronological holdout, inspect the full feature-support interval, not only the target or decision timestamp. A validation clip with twenty seconds of lookback can overlap training evidence even when its decision occurs after the split boundary. Purge or otherwise handle that overlap under the declared task. Some deployment tasks legitimately use earlier observed history, but their evaluation must explicitly reproduce that allowed operational context. Reusing hidden training state or fitting preprocessing on held-out inputs is a different information policy.

Strain∩Stest=∅S_{\rm train}\cap S_{\rm test}=\varnothing
S_train and S_test are declared source-time evidence supports when the evaluation contract requires disjoint support. Endpoints use one source coordinate system and a stated half-open convention. This condition is not by itself statistical independence, source-group disjointness, or proof of no semantic duplication; other deployment contracts may deliberately allow historical context.↔ Scroll wide equations horizontally.

Check temporal integrity and the metric's actual question

Before scoring a model, test timestamp/timebase conversion, clip endpoints, dropped-frame handling, image orientation, and label-coordinate mapping on known fixtures. Include an irregularly timed source so a frame-count shortcut fails visibly. Compare predicted event intervals with the declared overlap and matching rules; a correct class name does not guarantee correct localization. ActivityNet's official evaluator combines temporal overlap, confidence ordering, and instance matching, so a bare overlap value should not be called a complete average-precision result.

Class imbalance also changes what a high accuracy means. Report the class counts and suitable per-class recall in addition to any aggregate. Balanced accuracy averages class recall over the declared nonempty classes, giving rare and common classes equal weight under that convention. It does not automatically address label noise, temporal dependence, or deployment prevalence. Declare threshold selection and matching before looking at final held-out outcomes, then keep the same cohort and denominators when comparing model versions.

BA=1K∑k=1KTPkNk{\rm BA}=\frac1K\sum_{k=1}^{K}\frac{{\rm TP}_k}{N_k}
For K declared classes with N_k>0 ground-truth examples, TP_k/N_k is per-class recall and BA is dimensionless balanced accuracy in the unadjusted multiclass convention. Empty-class handling and temporal detection matching require separate policies; ordinary accuracy weights classes by their observed counts instead.↔ Scroll wide equations horizontally.

Make acceptance fixtures and uncertainty match the unit of evidence

A release gate can combine provenance checks, a source-group split audit, timestamp/label fixtures, and task metrics with predeclared tolerances. Investigate failures by category instead of hiding them behind an average: temporal shifts, missing events, minority classes, and encoder/index mismatches have different mechanisms. Retain the exact split and preprocessing manifests so a later improvement can be reproduced. Reusing the held-out set repeatedly for selection also changes the interpretation of an untouched-test claim.

The sampling lab shows why an independence assumption matters, without verifying it for videos. Reset, set both p=0.5,n=20, predict mean-proportion variance 0.0125, then Play or Step. Reset and set both p=0.5,n=100 predicts variance 0.0025. Its masses describe independent Bernoulli trials; playback highlights outcomes rather than drawing samples. Correlated frames are not thereby independent observations, and the displayed standardized-CDF bound does not certify individual bars or a real video's uncertainty. Group-aware uncertainty needs an appropriate sampling design.

Expose a majority-class score and a localization miss

A fictional labeled cohort has ninety background clips and ten action clips. A classifier gets all background clips and five action clips correct. Separately, one correctly classified action has predicted interval [5,7) s and true interval [4,6) s. Evaluate the stated counts and a temporal-IoU threshold of 0.5.

  1. There are 90+5=95 correct clip classes out of one hundred, so ordinary accuracy is 95%. Action recall is 5/10=0.5, despite that high aggregate.

  2. Background recall is 90/90=1. The unadjusted two-class balanced accuracy is (1+0.5)/2=0.75, or 75%, revealing a different weighting of the same fixed outcomes.

  3. For the separate event, intersection duration is one second and union duration three seconds, giving temporal IoU 1/3. It fails the stated 0.5 overlap threshold even though its action class is correct. This one comparison is not a complete detection-AP calculation.

The result

Accuracy, balanced recall, and temporal localization reveal different limitations. Acceptance should name the task metric and verify the cohort's evidence boundaries.

Explore the model

Interactive lab

Interactive lab · sampling

Compare independent-trial variance without inventing independent frames

Reset → set both p=0.5,n=20 predicts variance 0.0125 for the sample proportion; Reset → set both p=0.5,n=100 predicts 0.0025. Play/Step highlights exact binomial outcomes, not random trials. Independence is assumed, not tested for video; the CDF bound does not certify individual normal-comparison bars.

Compare independent-trial variance without inventing independent framesExact binomial masses for the mean of n independent Bernoulli trials, compared with normal mass between adjacent half-count boundaries; normal tails outside the finite support remain outside the bars. Playback highlights outcomes, not random samples. The Berry–Esseen bound applies to standardized CDFs, not individual bars or continuity-corrected errors. At p = 0 or 1, normal comparison and that bound are disabled. Normal-CDF evaluation uses a numerical approximation with absolute error below 7.5×10⁻⁸ (at most 1.5×10⁻⁷ per interval, before rounding). Current readings: Mean sample proportion: 0.5; Sample-mean variance: 0.0125; Uniform CDF error bound: ≤ 0.1062. All parameters are adjustable with the labeled controls below.Exact distribution of the mean of 20 independent Bernoulli variables with success probability 0.5; playback highlights outcome 0.00.250.50.75100.0580.1150.1730.23Sample mean · k / nProbability massNormal bin masses are an approximationk = 0 · exact probability = 9.54e-7
Exact binomial massNormal interval massHighlighted outcome / mean
Mean sample proportion
0.5
Sample-mean variance
0.0125
Uniform CDF error bound
≤ 0.1062
t = 0 s

Exact binomial masses for the mean of n independent Bernoulli trials, compared with normal mass between adjacent half-count boundaries; normal tails outside the finite support remain outside the bars. Playback highlights outcomes, not random samples. The Berry–Esseen bound applies to standardized CDFs, not individual bars or continuity-corrected errors. At p = 0 or 1, normal comparison and that bound are disabled. Normal-CDF evaluation uses a numerical approximation with absolute error below 7.5×10⁻⁸ (at most 1.5×10⁻⁷ per interval, before rounding). Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forMore correlated frames do not automatically provide the uncertainty reduction of more independent observations.

Check your understanding

Training evidence ends at source time 100 s. A validation decision at 110 s uses twenty seconds of lookback. Under a required disjoint half-open support policy, what is correct?

Try it yourself

Training evidence occupies [0,100) s. A chronological validation decision has t≥100 s and uses a twenty-second half-open lookback [t−20,t). What is the earliest t whose support is disjoint from training under this rule? Does that also prove source-group independence?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Require the start of validation support to be at least 100 s; distinguish interval separation from source identity.

Compare with the solution

The condition t−20≥100 gives t≥120 s, so the earliest boundary is 120 s with support [100,120). At t=110 the support [90,110) overlaps ten seconds of training evidence. This arithmetic proves only the specified support separation, not independent recordings or absence of duplicate content. A source-group policy and provenance/duplicate checks remain necessary for the intended generalization claim.

Take it with you

  • Split policies must reflect source identity and the entire permitted feature-support interval.
  • Class accuracy, balanced recall, temporal overlap, and detection AP have different denominators and matching rules.
  • Timestamp fixtures and group-aware uncertainty are necessary companions to reported quality.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.