arXiv:2611.08080cs.CVNov 2026

Manuscript Offprint

arXiv:2611.08080

Spatiotemporal Dynamics-Aware Industrial Anomaly Detection and Reasoning

S-Wei Chen, Siangyu Yang, Yi-Chen Jan, Chun-Yi Lee, Shao-Yuan Lo

Abstract

Industrial Anomaly Detection (IAD) is a long-established problem that aims to detect defects in industrial products during manufacturing for quality control. Most existing studies focus on static visual patterns as the basis for detection. However, in real manufacturing environments, many anomalies are dynamics-based, such as irregular movements that cannot be perceived from static cues alone. We observe that even recent Multimodal Large Language Model (MLLM)-based approaches fall short in identifying such dynamic anomalies due to limited temporal modeling capability. To address this, we introduce MUSTARD: Multimodal SpatioTemporal Anomaly Reasoning and Detection, a framework that equips MLLMs with fine-grained spatiotemporal dynamics awareness for detecting and reasoning about dynamics-based defects. MUSTARD introduces optical-flow-guided keyframe selection and augmented modalities to capture critical motion irregularities through local motion patterns and global dynamic evolution. Its normal pattern-based reasoning pipeline requires only a few normal reference samples as the detection basis, avoiding any model updates. This enables efficient adaptation across various products and provides high decision interpretability. MUSTARD is one of the first MLLM-based frameworks for dynamics-based IAD. Experiments demonstrate its superior performance in detecting spatiotemporal anomalies and providing plausible explanations. Our code is available at https://github.com/racercode/Mustard

1. Introduction

Industrial Anomaly Detection (IAD) is a crucial problem that aims to automatically inspect product defects in manufacturing environments. Most existing IAD benchmarks [3, 4, 11, 26, 42], and approaches [6, 13, 34, 38] focus on static visual defects, e.g., a missing chunk on a candle or a bulge on the side of a bowl. These static anomalies can be identified from a single image. However, in real pro-

Figure

Figure 1. Comparison between the direct use of an MLLM and the proposed method on an anomalous test video (a degaussing magnet). (1) Directly Use MLLM: fails to recognize that the magnet falls off the metal surface. (2) Our Method: leverages spatiotemporal information to correctly interpret the magnet's drop from the surface.

duction lines, many anomalies are driven by dynamic irregularities, such as irregular rotations, abnormal vibrations, and unexpected component interactions, which cannot be captured from static cues alone. Inspecting such dynamics-based anomalies requires physical operations. For example, a fan may appear visually flawless from a static observation, but we need to turn it on to see whether it rotates smoothly or gets stuck. Although modern smart factories have been able to leverage robot arms to automate these tests, we still lack an effective IAD algorithm capable of inspecting dynamic anomalies from the resulting test videos, which requires fine-grained spatiotemporal dynamic understanding. Advancing such robot perception capabilities is crucial for seamless integration with robotic arm operations, enabling

*Equal contribution.

a fully automated smart manufacturing process.

Existing IAD approaches face fundamental limitations. Traditional convolutional network-based methods employ self-supervised pretext tasks, such as image reconstruction, to model normal patterns [19, 34, 38]. CLIP-based frameworks [6, 13, 41] leverage vision-language semantic alignment to achieve few-shot or zero-shot IAD. Nevertheless, both streams consider only static defects and thus rely primarily on static visual attributes. In addition, they provide only anomaly scores, without interpretable rationales, to users. While recent advances in Multimodal Large Language Models (MLLMs) have shown remarkable capabilities across various vision tasks [1, 16], they still fall short in dynamics-based IAD [35]. We observe that a key reason stems from dynamic patterns unfolding over multiple video frames. For instance, determining whether a gear rotates correctly requires capturing motion across consecutive frames; a single snapshot cannot reveal whether the gear is stuck, rotating incorrectly, or moving at an improper speed. Similarly, detecting abnormal vibrations or timing misalignments necessitates capturing the temporal evolution of system behavior. However, current MLLMs tend to overlook or fail to prioritize critical anomalous dynamics. We reveal that even video-oriented MLLMs [15, 39] lack an effective mechanism to explicitly model frame-to-frame temporal changes (see Fig. 1-(1)), making it difficult to detect subtle variations such as gradual slowdowns or slight trajectory deviations. Moreover, most MLLMs employ uniform frame sampling to reduce computational cost. Although uniform sampling may be sufficient for general video understanding tasks, it fundamentally limits their ability to capture fine-grained temporal anomalies.

To address this challenge, we posit that optical flow, which encodes pixel-level motion between consecutive frames, provides a rich yet underutilized signal for dynamics-based IAD. Flow-based directional arrows reveal local movement trajectories, enabling the tracking of object positions and rotations over time. The flow magnitude represents global motion speed, and its variation highlights critical state transitions, such as when components start moving, stop, or change velocity. By converting optical flow into interpretable visual and statistical representations, we provide MLLMs with explicit temporal dynamics information that complements static frame content.

In this paper, we propose MUSTARD: Multimodal SpatioTemporal Anomaly Reasoning and Detection, a novel framework that equips MLLMs with optical flow-guided spatiotemporal dynamics awareness, enabling accurate detection and reasoning of dynamic anomalies (see Fig. 1(2)). MUSTARD features three key innovations: (1) an optical flow-guided keyframe selection strategy that precisely samples frames containing critical motion irregularities; (2) two auxiliary optical flow-augmented modalities, including trajectory-overlaid video frames annotated with local motion patterns using directional arrows and a flow magnitude curve representing global dynamic evolution; and (3) a normal pattern-based reasoning pipeline that extracts normal patterns from a small set of reference data as the decision basis, providing plausible anomaly explanations. The entire pipeline adheres to the one-class IAD (a.k.a. semi-supervised IAD) setting, in which only normal training samples are available, and no anomaly knowledge is leaked.

In addition, MUSTARD is a few-normal-shot [32] method that uses only a small number of normal samples from the training set as references to extract normal patterns for IAD. This eliminates the need for expensive full-shot training on the entire dataset and does not require any model weight updates, enabling efficient adaptation to various industrial product lines in real manufacturing scenarios. We evaluate our method on Phys-AD [14] and IPAD [17], the two pioneering dynamics-based IAD benchmarks available in the literature. Extensive experiments demonstrate MUSTARD's state-of-the-art detection performance and reasoning ability. The main contributions are threefold:

• We propose one of the first MLLM-based frameworks for dynamics-based IAD, addressing challenges beyond static IAD and augmenting automation in manufacturing.

• We introduce a novel optical-flow-guided spatiotemporal dynamics awareness method, enabling accurate detection and reasoning of dynamic anomalies.

  • The proposed normal pattern-based reasoning pipeline allows efficient adaptation to various industrial products, which is highly practical for real production lines.

References (41)