TI-PREGO: Chain of Thought and In-Context Learning for online mistake detection in PRocedural EGOcentric videos

Leonardo Plini, Luca Scofano, Edoardo De Matteis, Guido Maria D'Amely di Melendugno, Alessandro Flaborea, Andrea Sanchietti, Giovanni Maria Farinella, Fabio Galasso, Antonino Furnari

TL;DR

TI-PREGO is a dual-branch framework that detects procedural errors in first-person (egocentric) videos as they happen. By pairing a vision-based action recognizer with a Large Language Model (LLM) that "anticipates" the next correct step using Chain-of-Thought reasoning, the system can identify unforeseen mistakes without ever having seen examples of failure during training.

What Problem Does This Paper Address?

Imagine wearing an Augmented Reality (AR) headset while assembling a complex piece of machinery. To be truly helpful, the headset needs to tell you immediately if you’ve missed a screw or installed a part out of order.

Current AI models struggle with this for two reasons:

  1. The "Open-Set" Problem: There are infinite ways to make a mistake. Most models are trained to recognize specific, pre-defined errors. If you make a "novel" mistake the model hasn't seen before, it fails.
  2. The "Online" Constraint: Many high-performing video models are "offline," meaning they look at the whole video (including the future) to decide what happened. For real-time feedback, a model must work "online," using only the past and present.

The authors address these gaps by framing mistake detection as a One-Class Classification (OCC) problem: the model learns what "correct" looks like and flags any deviation as an error.

Methods

The authors propose a dual-branch architecture that separates "seeing" from "reasoning":

  • The Recognition Branch: This uses a state-of-the-art model (MiniROAD) to process incoming video frames and identify the current action (e.g., "attach-wheel"). Because per-frame predictions are often noisy, they introduced Non-Overlapping Mode Aggregation (NOMA). This technique takes a window of frames, finds the most frequent label, and cleans up the sequence into stable "action tokens."
  • The Anticipation Branch: This is the "brain" of the system, powered by an LLM (specifically Llama 3.1 8B). Instead of just predicting the next token, it uses Automatic Chain of Thought (ACoT). When prompted, the LLM first analyzes the immediate and long-term consequences of previous actions before predicting what should happen next.
  • Mistake Detection: The system compares the action actually "seen" by the recognition branch with the action "expected" by the anticipation branch. If they don't match, a mistake is flagged.

Datasets

The researchers introduced two new benchmarks based on existing datasets, specifically tailored for online, one-class mistake detection:

  • Assembly101-O: Derived from Assembly101 (toy vehicle assembly). It features a new split where the model trains only on error-free sequences and is tested on sequences that are trimmed at the exact moment the first mistake occurs.
  • Epic-tent-O: Derived from the Epic-tent dataset (outdoor tent assembly). It focuses on procedural errors like "order," "omit," and "repeat."

Key Insights and Ideas

  • LLMs as Symbolic Reasoners: The paper demonstrates that LLMs are excellent at procedural logic. By converting video actions into text (e.g., "attach-cabin"), the LLM can leverage its vast pre-trained knowledge of how things are built to predict the next logical step.
  • The Power of ACoT: Simply asking an LLM "what's next?" is less effective than asking it to "analyze each action in detail" first. This intermediate reasoning step significantly boosts the accuracy of the anticipation branch.
  • Text over Numbers: LLMs perform better when actions are represented by natural language names rather than numerical IDs. The semantic meaning of "attach-wheel" helps the model reason about the physical world.
  • Latency is the Real Enemy: Interestingly, the LLM inference is quite fast (~0.3s). The primary source of delay in the system is the 6.67-second windowing required to stabilize the noisy vision-based action recognition.

Key Results

The TI-PREGO framework significantly outperformed existing baselines:

  • Superior Accuracy: On the Assembly101-O dataset, TI-PREGO achieved a 74.7% Balanced F1 Score, compared to just 26.7% for the previous state-of-the-art (OadTR).
  • Robustness: Even when using predicted actions (which are imperfect) instead of "ground truth" labels, the system maintained high performance (67.4% F1), proving it can handle the "noise" of real-world computer vision.
  • Prompting Efficiency: ACoT reasoning improved the F1 score by nearly 20% compared to standard "Zero-Shot" prompting.

Limitations and Future Work

  • Processing Delay: The current 6.67-second delay (due to the 200-frame aggregation window) is too slow for high-stakes real-time interventions (like surgery). Future work will focus on reducing this window as recognition models improve.
  • Symbolic Simplicity: The model relies on text labels. It might miss subtle physical errors—like a screw being turned the wrong way—that don't change the overall "action label" but still constitute a mistake.
  • Ambiguity: In complex tasks where multiple steps can be done in any order, the "mismatch" logic might trigger false positives. The authors suggest that future versions could incorporate formal uncertainty quantification to handle these "branching" procedures.

Summary updated

BibTeX
@article{plini2026ti,
  author = {Leonardo Plini and Luca Scofano and Edoardo De Matteis and Guido Maria D'Amely di Melendugno and Alessandro Flaborea and Andrea Sanchietti and Giovanni Maria Farinella and Fabio Galasso and Antonino Furnari},
  title = {{TI-PREGO: Chain of Thought and In-Context Learning for online mistake detection in PRocedural EGOcentric videos}},
  journal = {Comput. Vis. Image Underst.},
  year = {2026},
  doi = {10.1016/j.cviu.2025.104613},
}
Figure