Train on a four-frame security clip
Course · Data modalities · Notebook
Learn from four ordered grayscale frames. Play the clips, poison accepted labels and move the loop start while retaining every frame.
Optional self-paced practice; not used in the lectures. Predict first, change one thing, compare, then explain. No account, installation or API key.
Enable JavaScript for local training. The paper route below preserves the reasoning if the worker is unavailable.
Ten-minute route
Use 2 minutes to inspect and predict; 2 to train and inspect weights; 2 to poison and retrain; 2 to change the input with frozen models; 2 to restore and explain. R means needs review; N means no review in this supplied case. Use the same threshold throughout. Stop playback before switching views.
Teaching steps: predict, do, observe, explain
-
Reset; keep 0 label edits and threshold 0.50. Play clips. Read the four 8×8 frames in order; predict which pixel positions distinguish the two cases.
-
Train both 500 updates. Each model receives 256 ordered pixel values. Compare the matching clean/poisoned copies before editing labels.
-
Open Weights & loss. The four small maps belong to frame positions 0–3. Training labels shows actual frame strips and accepted R/N labels.
-
Change 9 review labels to no review, inspect R→N, then retrain both. Evaluation labels stay fixed; compare misses, not just training loss.
-
Input & scores: set rotation to 1, press Shift clip start, then Play clips and Next frame. Compare scores; all four frames and the 500 updates remain.
-
Restore input; set label edits to 0 and retrain. Explain the fixed-alignment shortcut and request independent export/approval evidence.
Next/Back changes the instruction only. Train both performs actual gradient updates in a local Web Worker. Playback changes neither weights nor labels. Changing accepted labels resets both copies for a matched retraining; changing a threshold only changes routing.
What reaches the model?
Four 8×8 grayscale frames, flattened in time order into 256 values. A marker moves across a generated security-screen animation: a known outbound export pattern versus an approved inbound pattern. At 4 fps the four-frame loop lasts one second. Use Next frame to inspect a position without playback or training. The reference review label is supplied by the supplied source-case context. No camera, real person, uploaded video or codec is used.
One learned weight belongs to each pixel at each frame position. A right rotation of one changes source order from 0→1→2→3 to 3→0→1→2. The top labels identify source frames; the filmstrip positions remain 0–3. Rotating the clip start by one frame preserves all four source frames but changes their position in the input vector. The fixed classifier can miss the review case after that timing edit; the source-case label stays fixed. This positional logistic classifier is not a video foundation model, temporal convolution or recurrent network. It does not prove actual data theft or authority from motion.
Record one comparison
| Run | Label edits | Updates each | Clean review catches /8 | Poisoned catches /8 | Original/current clean score | Invariant checked |
|---|---|---|---|---|---|---|
| Matched clean training | 0 | 500 | ||||
| Label poisoning | 9 | 500 | ||||
| Input evasion with frozen models | 9 | 500 | ||||
| Trusted labels restored | 0 | 500 |
Keep threshold 0.50 for the reference comparison. Write which surface changed: accepted learning labels, presented input, or routing threshold. Explain one security observation still missing before an action.
Each learner uses 24 training and 16 separately seeded development examples from two authored families. Both models start at zero and use the same 500-update budget; evaluation labels never train them. Scores are not calibrated attack probabilities. These small development cases cannot establish real-world detection performance.
If training or media playback is unavailable
Draw the four tiny frames in a strip; number positions 0–3. Start the loop at its last frame and carry every frame forward. Compare the same pixels at different weight positions. Record numerical training as incomplete if the worker failed.
Explain it to your partner
Question: The same four frames score differently when the loop begins later. What would you evaluate before relying on this detector?
Take 30 seconds each: point to the input, name the one change, then cite an observation from your run. A useful explanation: Evaluate unseen start times and schedules using independently assigned case labels. Keeping every frame does not keep every position fixed.
Read next: Concept and research connection. The reading is optional; you do not need its mathematics for this exercise.