The interview problem
A training-video library needs to jump to moments showing a particular procedure, such as tightening a bolt. Return action labels with start and end times.
Original practice, not a reported company interview. All scenarios and worked numbers are illustrative. Interview date: not applicable. Sources retrieved September 30, 2026.
1. Scope and assumptions
This is temporal localization in untrimmed video, not recommendation or a whole-video classifier. Repeated and overlapping actions are allowed, and some videos contain no requested action.
2. Worked approach
timestamped video → multiscale features → action intervals → duplicate reconciliation → index
Decode time-stamped clips, extract visual features and predict action scores plus temporal boundaries at multiple scales. Aggregate candidate intervals with class-aware suppression or another validated duplicate policy. Preserve source timestamps through variable frame rates and decoding.
Annotate action definitions and boundary conventions, including interrupted procedures. Build a no-action negative set and hold out source videos and near-duplicate edits. Serve indexed proposals with previews, allowing users to adjust boundaries and report missing events. Corrections should not silently become training truth without review.
3. Calculate the example
For a reference action from 10 to 20 seconds and a prediction from 12 to 22, intersection length is 8 seconds and union length is 12, so temporal IoU is 2/3 ≈ 0.667. The same prediction passes a 0.5 threshold and fails a 0.75 threshold. A model that labels an entire 100-second video for a 10-second action has IoU 0.1 even if it includes the correct moment.
4. Failure cases and trade-offs
Adjacent repetitions can be merged into one long interval. A coarse sampling rate misses a brief action. Training on edited tutorials may overfit scene cuts that are absent in continuous recordings. A correct class with poor boundaries is not successful navigation.
Dense high-rate features improve short-action recall but increase storage and inference. Coarse proposals followed by local refinement save cost but can never recover an action the proposal stage misses. Tune duplicate suppression per action rather than suppressing valid overlapping labels indiscriminately.
5. Validate the result
Report detection precision/recall or average precision across specified temporal IoU thresholds, with results by action duration. Evaluate latency and bytes indexed per video-hour. Include repeated actions, no-action videos and variable frame-rate clips.
6. Interview follow-ups and self-review
How do you score ambiguous boundaries? What changes for a live stream without future frames?
Reward interval-level metrics, correct IoU, time-coordinate preservation and a proposal-recall tradeoff.
Sources and related practice
Technical reference: arxiv.org — ActionFormer is a temporal-localization research reference; no benchmark performance is claimed here.
Submitted February 16, 2022; revised August 28, 2022. Retrieved September 30, 2026. This reference supports the named technical concept; the proposed workflow and examples are original, not a documented vendor implementation or interview report.
Continue with Design a video streaming service; Detect acoustic events in continuous audio.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.