TokenCLIP: Token-wise Prompt Learning for Zero-shot Anomaly Detection
Qihang Zhou, Bin-Bin Gao, Guansong Pang, Xin Wang, Jiming Chen, Shibo He
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: Vision-Language Models › Fine-Grained Vision-Language Alignment · Type: new method · Keywords: zero-shot anomaly detection, token-wise alignment, optimal transport, textual subspaces, computer vision
Areas: Multimodal › Multimodal Alignment › Vision-Language Alignment; Continual Learning & Adaptation › Long-Tailed Incremental Recognition › Test-Time Adaptation
Summary
TokenCLIP introduces a token-wise dynamic framework that aligns visual tokens to multiple orthogonal textual subspaces via optimal transport, enabling fine-grained zero-shot anomaly detection.
Explained to a 5-year-old
The computer looks at pictures and tries to find weird things it hasn't seen before. Usually it uses one way to understand everything, but that can miss small details. The new idea splits the understanding into many small parts and matches each part of the picture to the right part of the words. It uses a special math method to decide how to match them. This helps the computer notice even tiny strange things in the picture.
Explained to a 5-year-old, longer
A computer program can look at many pictures and tell if something is strange, even if it has never seen that thing before. To do this, it needs to understand what normal pictures look like and what makes something unusual. The usual way is to use one big set of words to describe everything in a picture. But sometimes this big set is not enough to notice small differences, like a tiny crack or a slightly wrong color. The new idea breaks that big set of words into many smaller, special groups, each focusing on a different kind of detail. Each tiny piece of the picture is then matched to the most suitable word group based on how similar they are. To decide how to match everything, the program uses a clever math process that spreads out the matching evenly and makes sure every group gets some attention. This math process also makes sure that the groups learn different things, like one group learning about the front of objects and another about the background. After the matching, the computer can see fine details that were hidden before, which helps it spot anomalies more accurately. Experiments show that this new way works better than the old single-group method. It means the computer can be more reliable in real situations, like checking products on an assembly line or finding defects in images. Overall, the approach makes zero-shot anomaly detection more precise and useful.
For a technical reader
TokenCLIP addresses the limitation of standard CLIP-based zero-shot anomaly detection by moving from a single textual embedding space to multiple orthogonal subspaces. It formulates token-wise alignment as an optimal transport problem, assigning each visual token to a combination of subspaces based on semantic affinity. The marginal constraints and cost minimization of the transport plan ensure balanced learning across subspaces and encourage specialization (e.g., foreground vs. background). This dynamic assignment allows fine-grained anomaly detection without retraining the underlying vision-language model. Experiments demonstrate that TokenCLIP outperforms baseline methods on standard anomaly detection benchmarks.
Problem
Existing zero-shot anomaly detection methods align all visual tokens to a single textual space, which limits fine-grained capture of anomaly semantics across diverse objects.
Method
The approach expands the single textual space into orthogonal subspaces and uses optimal transport to assign each visual token to a combination of subspaces based on semantic affinity, ensuring balanced optimization and specialization.
Results
The approach demonstrates superior performance over baselines in zero-shot anomaly detection, with textual subspaces specializing in foreground and background semantics.
Contributions
It introduces a token-wise dynamic alignment framework that uses orthogonal textual subspaces and optimal transport to capture fine-grained anomaly semantics, and shows improved zero-shot detection performance.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction