TL;DR
MUSTARD is a training-free framework that equips Multimodal Large Language Models (MLLMs) with "motion vision" to detect dynamic industrial defects, such as mechanical jams or abnormal vibrations. By using optical flow to guide keyframe selection and generating motion-aware textual descriptions, it achieves state-of-the-art performance in identifying and explaining anomalies that static image-based methods completely miss.
What Problem Does This Paper Address?
Industrial Anomaly Detection (IAD) has traditionally focused on "static" defects—think of a crack in a bottle or a missing component on a circuit board. These can be identified from a single image. However, real-world manufacturing is full of dynamics-based anomalies: a fan that looks perfect but vibrates excessively, a gear that rotates at the wrong speed, or a component that fails to rebound after being pressed.
Current Multimodal Large Language Models (MLLMs) are surprisingly bad at this. They typically use "uniform sampling" (picking frames at equal intervals), which often skips the exact moment a subtle motion anomaly occurs. Furthermore, they lack an explicit mechanism to understand pixel-level motion over time, leading to "appearance-centric" reasoning that ignores the physics of the scene.
Methods
The authors introduce MUSTARD (MUltimodal SpatioTemporal Anomaly Reasoning and Detection), a framework that translates implicit motion into explicit textual representations for MLLMs to reason over.
The pipeline consists of three main stages:
- Spatiotemporal Dynamics Awareness: Instead of uniform sampling, MUSTARD uses the Dual TV-L1 optical flow algorithm to calculate motion between frames. It selects keyframes based on the "Flow Magnitude Curve"—picking moments of peak motion, minimum motion, and transitions. It then creates three modalities for the MLLM to "see":
- Raw Frames: For standard visual context.
- Trajectory Frames: Keyframes overlaid with directional arrows and motion paths.
- Flow Magnitude Curve: A "temporal fingerprint" of the video's global speed.
- Normal Pattern Extraction: This is a few-normal-shot approach. The system looks at a small set (e.g., 30) of normal videos, generates descriptions for them, and uses an LLM to consolidate these into a "shared normal pattern." No model weights are updated, making it highly adaptable to new production lines.
- Pattern Reasoning (Inference): When a test video arrives, MUSTARD generates its own descriptions and compares them against the stored normal patterns. An LLM then fuses evidence from all three modalities to provide a final anomaly score and a natural language explanation.
Datasets
The researchers evaluated MUSTARD on two primary benchmarks:
- Phys-AD: A large-scale, physics-grounded dataset containing over 6,400 videos across 22 object categories (like gears and rubber bands). It focuses on anomalies revealed through physical interaction and dynamics.
- IPAD: An industrial process dataset that emphasizes the periodicity of equipment operations across 16 different devices.
Key Insights and Ideas
- Optical Flow as a "Bridge": The core "aha moment" is that MLLMs don't need to "see" motion natively if you can describe it to them. By converting optical flow into trajectory arrows and magnitude curves, the authors turn a difficult temporal problem into a descriptive one that LLMs excel at.
- Keyframes > All Frames: Uniform sampling is a bottleneck. By letting the motion itself dictate which frames are important (via the flow magnitude curve), the model captures critical transitions (like a magnet falling) that are otherwise lost.
- Complementary Modalities: As shown in Figure 3, different anomalies require different "eyes." A foreign object in a liquid is best seen in Raw Frames, a stuck wheel is obvious in Trajectory Frames, and abnormal vibration is most clearly visible in the Flow Magnitude Curve.
Key Results
MUSTARD sets a new state-of-the-art for dynamics-based IAD:
- Detection Performance: On the Phys-AD dataset, MUSTARD achieved an AUROC of 68.1%, outperforming the previous best MLLM-based methods by nearly 8% and even beating specialized non-LLM models that require full-shot training.
- Reasoning Quality: Using the PAEval metric (which measures how well the model's explanation matches ground truth), MUSTARD scored 0.456, nearly doubling the scores of general-purpose MLLMs like Video-LLaVA.
- Interpretability: In "LLM-as-a-Judge" tests, GPT-4o preferred MUSTARD's explanations over baselines in the vast majority of cases, citing its ability to pinpoint specific motion irregularities.
Limitations and Future Work
The authors identify two main hurdles:
- Backbone Dependency: MUSTARD's performance is capped by the underlying MLLM (e.g., Qwen2.5-VL-7B). If the base model can't describe fine-grained details, MUSTARD struggles.
- Subtle Static Anomalies: In cases where the anomaly is a tiny visual change with no associated motion (like a very small toothpaste leak), the motion-aware modules provide no extra help, and the system reverts to the base model's (sometimes limited) visual perception.
Future work involves integrating stronger VLM backbones and exploring ways to incorporate raw visual features directly as complementary evidence alongside textual descriptions.
Summary updated