Next Article in Journal
ECAB-SegFormer: A Boundary-Aware and Efficient Channel Attention Network for Ulva prolifera Semantic Segmentation in Remote Sensing Imagery
Previous Article in Journal
Gradient-Based Time-Sequential Potential Field Method for Path Planning in Infrastructure-Based Cooperative Driving Automation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Calibrated Feature Fusion: Enhancing Few-Shot Industrial Anomaly Detection via Cross-Stage Representation Alignment

1
College of Information Science & Electronic Engineering, Zhejiang University, Hangzhou 310027, China
2
Liuzhou Bureau, Extra High Voltage Transmission Company, China Southern Power Grid Co., Ltd., Liuzhou 545026, China
3
College of Control Science and Engineering, Zhejiang University, Hangzhou 310027, China
4
School of Automation (School of Artificial Intelligence), Guangxi University of Science and Technology, Liuzhou 545006, China
*
Author to whom correspondence should be addressed.
Sensors 2026, 26(7), 2164; https://doi.org/10.3390/s26072164
Submission received: 21 February 2026 / Revised: 15 March 2026 / Accepted: 17 March 2026 / Published: 31 March 2026
(This article belongs to the Section Fault Diagnosis & Sensors)

Abstract

Few-shot industrial anomaly detection technology has received more and more attention because it does not require a large number of abnormal samples to train. Recent few-shot industrial anomaly detection methods commonly fuse multi-stage features from frozen vision transformers for anomaly scoring. However, we find that such direct fusion suffers from cross-stage representation misalignment—shallow and deep features differ significantly in scale and semantic granularity, leading to inconsistent anomaly maps and degraded localization. To address this problem, we propose Calibrated Feature Fusion (CFF), a lightweight adapter that enhances feature fusion via cross-stage representation alignment. The CFF module can be integrated into existing state-of-the-art frameworks and operates effectively in few-shot settings. Experiments on MVTec AD and VisA show that CFF consistently improves the state-of-the-art method across 1/2/4-shot settings, achieving gains of up to +1.6% AUROC and +4.1% AP in pixel-level segmentation. Notably, CFF enhances both precision and recall in four-shot scenarios. Ablation studies confirm that cross-stage alignment is key to stable multi-stage fusion.

1. Introduction

Automated visual inspection is critical for modern industrial quality control, particularly in high-stakes domains like semiconductor manufacturing and precision electronics. Even minor surface defects—scratches, dents, or contamination—can lead to product failure or costly recalls. In practical industrial scenarios, these subtle defects are often further obscured by complex imaging conditions such as uneven illumination, low contrast, and environmental interference [1], making defect localization more challenging. Traditional rule-based or template matching approaches struggle with the diversity and subtlety of real-world anomalies [2,3,4,5], motivating a shift toward data-driven deep learning methods [6,7,8,9,10,11]. However, a fundamental bottleneck remains: the extreme scarcity of labeled anomalous samples. Anomalies are by nature rare, unpredictable, and often unique to specific production batches. Collecting comprehensive defect datasets is not only labor intensive but frequently infeasible, especially when production lines rapidly switch between product models.
This challenge has driven significant interest in unsupervised and few-shot anomaly detection (FSAD), where models adapt to new object categories using only a small number (e.g., 1–4) of normal reference images, without access to anomalous examples during training [6,7]. This paradigm closely mirrors flexible manufacturing scenarios, where retraining from scratch for every new item is impractical. Compounding the difficulty is domain shift: features learned on one category (e.g., metal screws) may not generalize well to another (e.g., plastic capsules), demanding robust cross-domain generalization.
Recent advances in large-scale pretrained vision models have opened new avenues for FSAD. Vision–language models like CLIP [12] enable zero-shot anomaly detection by aligning image patches with textual prompts describing “normal” instances [13]. Self-supervised ViTs such as DINOv2 [14] learn rich hierarchical representations capturing both local texture and global structure across stages. State-of-the-art methods increasingly combine these strengths. For example, AD-DINOv3 [15] leverages multi-stage patch tokens aligned with CLIP text embeddings; April-GAN [16] projects stage-wise ViT features into the CLIP space via linear layers and fuses similarity scores against memory bank references.
A key challenge in such multi-stage frameworks lies in reconciling heterogeneous feature representations across network depths—a phenomenon widely observed in vision transformers [17,18]. Shallow layers capture fine-grained details at high resolution, producing numerous small, scattered responses sensitive to local textures. In contrast, deeper stages encode holistic semantics at lower resolution, yielding fewer but broader activation patterns corresponding to structural deviations. While this hierarchy is beneficial, the direct fusion of such divergent signals—typically through naive summation or averaging—can result in suboptimal localization due to distributional mismatches in activation statistics, dynamic ranges, and semantic emphasis.
To mitigate this, recent methods employ stage-wise projections [16] or adaptive weighting schemes [15]. However, these transformations are often fixed or lack explicit constraints that ensure consistency across stages under limited supervision. Crucially, they do not fully exploit the few available normal samples to calibrate inter-stage coherence.
In response, we propose Calibrated Feature Fusion (CFF), a lightweight, plug-and-play module that enhances multi-stage fusion by explicitly aligning feature distributions across stages. CFF introduces a minimal adapter after stage-wise projections, trained end-to-end using a symmetric similarity loss that encourages adjacent stages to exhibit consistent distributional characteristics in the shared embedding space. Importantly, CFF operates only during few-shot fine-tuning when target-domain data is available. By reducing the inter-stage variance and enhancing the representational coherence, CFF produces more reliable per-stage anomaly maps, leading to significantly improved fused predictions.
Recent works have begun addressing stage heterogeneity through cross-attention mechanisms [19] and uncertainty-aware fusion [20], yet remain supervised or require large normal sets. Concurrently, few-shot adaptation has evolved toward adaptive embedding design [21] and prompt-based calibration [22], yet none address the joint optimization of alignment and fusion under extreme scarcity.
Our main contributions are as follows:
1.
We analyze cross-stage representation inconsistency as a limiting factor in few-shot industrial anomaly detection, particularly under scarce supervision.
2.
We propose CFF, a simple yet effective module that aligns multi-stage feature distributions via a symmetric similarity loss, stabilizing fusion without modifying the base architecture.
3.
Extensive experiments on MVTec AD and VisA show that CFF consistently improves upon the strong April-GAN baseline, achieving gains of up to +1.6% AUROC and +4.1% AP. Ablation studies confirm that representation alignment is key to its performance.

2. Related Work

2.1. Vision–Language Models for Anomaly Detection

The emergence of large-scale vision–language models such as CLIP [12] has enabled robust zero-shot anomaly detection by aligning image and text embeddings in a shared semantic space. Normal regions are expected to align well with prompts like “a photo of a normal [object]”, while anomalies yield low similarity [13]. WinCLIP [13] improves localization via class-conditional prompting and sliding window inference. However, CLIP’s features are optimized for generic object recognition—not fine-grained industrial defects—and often lack sensitivity to subtle textures or structural deviations.
Similarly, AnomalyCLIP [23] integrated multi-prompt ensembles to better capture diverse anomaly types. More recent works introduced rectification mechanisms to address CLIP’s limitations in distinguishing subtle abnormal cues.
To bridge this gap, recent methods combine CLIP with self-supervised ViT backbones. April-GAN [16] extracts multi-stage features from CLIP’s ViT encoder and reconstructs normal patch features in a few-shot setting using adversarial prompting. AD-DINOv3 [15] adapts DINOv3 [15], a large-scale self-supervised ViT, by extracting hierarchical tokens and aligning them with CLIP-derived textual prompts via lightweight adapters. To counteract DINOv3’s global bias, it refines the [CLS] token using an Anomaly-Aware Calibration Module (AACM). Final anomaly maps are obtained by computing cross-modal similarities per stage and averaging them. While effective, both approaches fuse stage-wise scores without explicitly reconciling the heterogeneous nature of features across depths—an issue our method resolves through few-shot-guided cross-stage calibration.
Prior to vision–language models, unsupervised anomaly detection relied on modeling normal feature distributions: PaDiM [7] uses multivariate Gaussian statistics; PatchCore [11] builds a memory bank for nearest-neighbor search; and SPADE [24] employs random Fourier features for efficient similarity approximation. Recent works have further optimized background modeling from the perspective of feature constraints and model lightweighting: You et al. [25] proposed a superpixel-guided background inpainting strategy to construct a clean background dictionary and avoid anomaly contamination, while Zhang et al. [26] designed a lightweight CNN based on residual learning and background estimation to reduce the dependence on large-scale normal samples. However, these methods require abundant normal data for reliable estimation—making them ill-suited for few-shot settings. In contrast, vision–language integration injects strong semantic priors with minimal supervision—a regime where our method is designed to excel.

2.2. Multi-Stage Feature Fusion

Fusing features across network depths is a well-established strategy to balance local detail and global semantics. In segmentation, U-Net [27] uses skip connections; FPN [28] constructs multi-scale representations via top-down pathways; CBAM [29] applies channel- and spatial-wise attention for adaptive weighting.
In anomaly detection, however, fusion remains largely heuristic. Most methods including April-GAN and AD-DINOv3 adopt late fusion: generating independent anomaly maps per stage and combining them via summation or averaging. This implicitly assumes that anomaly scores from different stages are inherently compatible in terms of scale, distribution, and semantic granularity. Yet shallow layers capture high-frequency patterns (e.g., edges and textures) at fine spatial resolution, while deep layers encode coarse structural semantics at low resolution, resulting in complementary but heterogeneous representations. This heterogeneity challenge is also widely verified in hyperspectral anomaly detection, where the fusion of shallow spatial gradient features and deep semantic spectral features faces similar misalignment problems, and existing works have confirmed that local contrast enhancement and explicit feature constraint can effectively alleviate this problem [30,31]. Without explicit reconciliation, naive fusion risks amplifying noise from shallow layers or suppressing meaningful signals from deep ones, especially when supervision is scarce. Recent work such as CATANet [32] demonstrates that content-aware token aggregation can replace naive averaging for more effective multi-stage fusion.
Crucially, unlike segmentation or detection, anomaly detection lacks pixel-level supervision—even in few-shot settings—making learned fusion (e.g., via attention or gating) prone to overfitting or degenerate solutions. As a result, uniform averaging remains common, trading adaptivity for stability. Our approach instead ensures compatibility before fusion: by calibrating features across stages to share consistent semantics and geometry in the anomaly scoring space, simple averaging becomes both effective and robust.

2.3. Feature Calibration and Internal Consistency

Feature alignment is central to representation learning. Knowledge distillation [33] matches teacher–student output distributions; self-distillation extends this idea by using the model itself as its own teacher, enabling internal regularization without external supervision [34]. Contrastive learning (e.g., SimCLR [35]) aligns augmented views of the same instance. In few-shot learning, self-calibration modules refine prototypes using unlabeled data [36].
Closer to our goal, internal consistency methods encourage agreement between different parts of a model. For example, MUSC [37] enforces multi-stage similarity consistency under normal conditions, but does so in an unsupervised manner, without leveraging few-shot guidance. Our work differs fundamentally: we enforce cross-stage alignment specifically in the anomaly scoring space, using a symmetric similarity loss where adjacent stages serve as mutual references. Critically, this alignment is guided by few-shot normal samples, enabling the calibrator to learn stage-specific notions of “normality”. This grounding ensures that alignment reflects normal behavior, not just arbitrary coherence—a key insight enabling robust detection even with a single reference image.
Our symmetric similarity loss is inspired by recent advances in cross-domain contrastive alignment [38] and hierarchical consistency modeling through multi-level graph contrastive learning [39], but is uniquely grounded in few-shot normal samples. The lightweight affine adapter follows LoRA [40] and CLIP-Adapter [41], both demonstrating that minimal calibration suffices to bridge semantic gaps in industrial vision, without retraining backbone weights or adding inference latency.
Recent efforts explore hierarchical feature alignment to reconcile semantic gaps across ViT stages [42,43], or calibrate the fusion of vision–language and self-supervised representations using minimal supervision [43].

3. Method

3.1. Preliminaries: April-GAN

APRIL-GAN [16] extracts multi-stage patch features from a ViT [44] encoder (e.g., at layers S = 6, 12, 18, and 24) and maps each stage’s features into the CLIP text embedding space via stage-specific linear projections. Text embeddings are derived from hand-crafted prompts (e.g., “a photo of a normal [object]”), and per-stage anomaly scores are computed via cross-modal similarity. The final anomaly map is obtained by summing scores across stages.
Crucially, APRIL-GAN treats each stage independently: its projection layers are trained without explicit coordination, and no mechanism aligns the semantic or statistical properties of features across depths. As a result, features from different stages—though semantically complementary—exhibit significant heterogeneity in terms of their granularity, scale, and distribution. This limits the effectiveness of naive summation-based fusion, especially under scarce supervision. Our method addresses this gap by introducing few-shot-guided cross-stage calibration to harmonize representations before fusion.

3.2. Calibrated Feature Fusion (CFF)

To address the heterogeneity across ViT stages—i.e., the misalignment of feature statistics, granularity, and semantic scale that undermines the reliable fusion of per-stage anomaly scores—we propose Calibrated Feature Fusion (CFF), which introduces a lightweight calibration block C n (defined as a learnable affine function C n : R H × W × C R H × W × C ) after each linear projection to explicitly align feature distributions across stages. As illustrated in Figure 1, the calibrated feature for stage n is
F n = C n ( F n ) = W n F n + c n ,
where W n R C × C and c n R C are additional learnable parameters. Crucially, unlike April-GAN’s independent training, the calibration blocks { C n } are jointly optimized with a cross-stage alignment objective, ensuring that { F n } resides in a coherent embedding subspace.
In our implementation, we extract feature maps from four stages ( S = { 6 , 12 , 18 , and 24 } ) of the ViT-L-14-336 backbone, where stages 6 and 12 correspond to shallow representations and stages 18 and 24 capture deeper semantics. For each stage n S , the calibration parameters W n (scale) and c n (bias) in Equation (2) are initialized as identity scaling ( W n = I ) and zero bias ( c n = 0 ), ensuring that CFF is identity initialized and behaves as a passthrough transformation at initialization. During few-shot inference, calibrated features { F n } n S are upsampled to the highest resolution (stage 6) and fused via element-wise summation before computing similarity scores against the CLIP text embeddings of “a photo of a normal [object]” and “a photo of an anomalous [object]”.

3.2.1. Alignment Loss

To ensure consistent semantic representations across stages, we minimize a symmetric alignment loss on L2-normalized calibrated features. This loss is a lightweight, task-specific regularization designed to address a practical bottleneck in few-shot anomaly detection: the misalignment of multi-stage ViT features under extreme data scarcity. Unlike unsupervised consistency methods that require large normal datasets or complex memory banks, our alignment objective operates solely on the few available normal reference images, making it strictly label-free, plug-and-play, and deployment-friendly. As empirically validated in Section 4.3, its hierarchical design (local adjacency + global span) yields measurable gains over simpler alternatives, confirming its role as an effective inductive bias for cross-stage calibration.
Specifically, let F ^ n = Normalize ( F n ) denote the unit norm features. The adjacent-stage loss is
L adj = n S { max ( S ) } w n 1 sim F ^ n , F ^ n + 6 ,
where sim ( · , · ) is the cosine similarity (lowercase, for local adjacency) averaged over spatial locations. Additionally, we enforce global coherence between the shallowest and deepest stages via
L global = Sim F ^ min , F ^ max I F 2 ,
where Sim ( · , · ) denotes the cosine similarity (uppercase, for global adjacency) computed between the shallowest and deepest stage features.
The total alignment loss is L align = L adj + λ g · L global , where λ g = 0.1 balances the global consistency term.
The overall training objective combines pixel-level anomaly segmentation losses with our cross-stage alignment constraint:
L total = λ f · L focal + λ d · L dice + λ a · L align ,
where L focal and L dice are the Focal Loss [45] and Dice Loss [46] for precise anomaly region localization, respectively. The weights are set to λ f = 0.6 , λ d = 0.4 , and λ a = 0.1 , chosen empirically to prioritize segmentation accuracy while regularizing feature consistency across stages, which is critical in few-shot settings where overfitting must be avoided.

3.2.2. Two-Stage Training Strategy

Directly training the projection layers { k n , b n } and calibration blocks { C n } in an end-to-end manner poses significant challenges. The projection layers are responsible for aligning heterogeneous ViT features into the CLIP embedding space—a task requiring the substantial adaptation of features’ scale and semantics. Simultaneously optimizing the calibration blocks, which aim to further refine these projected features for cross-stage consistency, can lead to gradient conflicts or unstable optimization dynamics, especially under limited few-shot supervision. Moreover, poor initialization of the projections may cause the calibration blocks to adapt to suboptimal or noisy feature distributions, undermining their ability to learn meaningful alignment.
To mitigate these issues, we decouple the learning process into two stages: first establishing a robust base mapping via projection learning, then refining feature coherence through calibration. This sequential strategy ensures that the calibration blocks operate on well-aligned initial features, enabling the stable and effective optimization of cross-stage consistency. We adopt a two-stage training protocol to decouple representation learning from calibration:
  • Stage 1 (Projection Learning): Freeze the ViT backbone and train the initial projectors { k n , b n } using standard segmentation losses (Focal and Dice).
  • Stage 2 (Calibration Learning): Freeze { k n , b n } , initialize { C n } , and train them with a combined loss:
    L total = λ f · L focal + λ d · L dice + λ a · L align ,
    where L focal and L dice operate on the final fused anomaly map M = n S M n , and L align enforces cross-stage consistency.

3.3. Inference Protocol

During inference, we strictly adhere to the few-shot protocol of April-GAN [16]: given K normal reference images ( K { 1 , 2 , 4 } ), we extract multi-stage ViT features from these references and store them in memory banks. For each test image, we compute two complementary anomaly scores: (1) a feature-based score derived from the calibrated multi-stage features via our CFF module, measuring the minimum distance (i.e., 1 max cosine similarity ) to the corresponding memory bank entries; (2) a text-guided score obtained by comparing the calibrated image features with the anomalous text prompt (“a photo of an anomalous [object]”), following April-GAN’s zero-shot segmentation strategy.
The final anomaly map is formed by fusing these two scores. Crucially, CFF is designed as a strictly additive, plug-and-play module: it operates only on the few-shot calibration path and introduces no changes to the base feature extraction or scoring pipeline. This guarantees that all observed gains stem exclusively from cross-stage alignment, requiring no architectural changes or retraining of the base model.

4. Experiments

4.1. Experimental Setup

We evaluate on two standard benchmarks in industrial anomaly detection: MVTec AD [2] (15 object categories) and VisA [47] (12 categories). To assess cross-domain generalization, we adopt the cross-dataset evaluation protocol from April-GAN: training on one dataset and testing on the other.
The experiments are conducted under few-shot settings. In the few-shot scenario, we follow April-GAN’s protocol with K { 1 , 2 , 4 } normal reference images per test category for inference-time adaptation.
We use the CLIP-pretrained ViT-L/14/336 model as the visual backbone, which is identical to April-GAN to ensure a fair comparison. This architecture comprises 24 transformer encoder layers and processes high-resolution inputs (336 × 336), enabling rich multi-scale feature extraction for effective cross-stage fusion.
All models are implemented in PyTorch1.12.1 and trained on an NVIDIA RTX 4060 Ti GPU. We use the Adam optimizer with a learning rate of 1 × 10 4 and a batch size of 16. Following April-GAN’s dataset-specific strategy, we train for 15 epochs per stage on VisA and 3 epochs per stage on MVTec AD. The random seed is fixed to 42 for reproducibility.
We report comprehensive metrics widely adopted in industrial anomaly detection, covering both pixel-level segmentation and image-level classification. For segmentation, we use AUROC-segm, F1-max-segm, AP-segm, and PRO-segm, and for classification, we use AUROC-cls, F1-max-cls and AP-cls. For more details about the definition of these evaluation metrics, please refer to [2].

4.2. Main Results

We present comprehensive cross-dataset few-shot evaluation results in Table 1 (VisA → MVTec AD) and Table 2 (MVTec AD → VisA). CFF consistently improves upon the strong April-GAN baseline across all few-shot settings (1/2/4-shot), both directions, and all metrics, demonstrating robust generalization under domain shift.
The consistent gains across both benchmarks validate that cross-stage representation alignment is a key factor in enhancing multi-stage anomaly detection under limited supervision.

Discussion on Metric Trade-Offs

While CFF delivers consistent and substantial gains in pixel-level segmentation metrics (AUROC-segm, AP-segm, PRO-segm, and F1-max-segm) across both cross-dataset directions, we observe a slight decrease in image-level classification metrics (AUROC-cls and AP-cls) in the MVTec AD → VisA setting. This is not an artifact but reflects an inherent design priority: CFF aligns features to maximize spatial consistency for fine-grained anomaly localization, which benefits segmentation at the cost of minor adjustments to global embedding statistics. As shown in Table 2, the largest improvements occur in PRO-segm (+2.3) and AP-segm (+4.1)—metrics directly tied to real-world inspection quality (e.g., detecting small scratches or thin cracks). In contrast, image-level classification serves as a coarse proxy; its modest drop does not undermine its practical utility, especially given that industrial systems typically fuse pixel-level maps with downstream rules or human review. We emphasize that CFF’s core contribution—robust, few-shot-enabled cross-stage alignment—is validated by consistent segmentation gains in both directions, with no degradation in any segmentation metric.

4.3. Ablation Studies

The proposed Calibrated Feature Fusion (CFF) module integrates feature alignment, similarity modeling, and scoring into a tightly coupled design, where components are mutually dependent and co-adapted during training. Preliminary attempts to ablate individual sub-components (e.g., removing calibration blocks or disabling symmetric similarity loss) led to unstable training or degraded feature representations, yielding non-interpretable results. Therefore, instead of component-wise ablation, we evaluate CFF as a unified module—first by comparing April-GAN with and without CFF, and second by probing the sensitivity of its key hyperparameter λ a , the weight of the global alignment loss.
As shown in Table 3, introducing CFF yields consistent improvements across all metrics (e.g., + 3.0 % AP-segm), confirming its effectiveness. Crucially, varying λ a from 0.05 to 0.5 induces only minor fluctuations—e.g., AP-segm changes by at most ± 0.25 ( 57.4 57.9 ) and AUROC-cls by ≤0.2—all while maintaining substantial gains over the baseline (w/o CFF). This insensitivity to λ a further supports our design principle: the alignment mechanism is not a fragile, finely-tuned correction, but a robust structural regularizer that stabilizes cross-stage feature consistency by construction. Its role is auxiliary and integrative—reinforcing, not overriding, the core representation learning—which explains both its stability under weight variation and its necessity for end-to-end co-adaptation.

4.4. Sensitivity to Shot Number and Calibration Design

To better understand the behavior of Calibrated Feature Fusion (CFF) under varying levels of supervision, we analyze its performance sensitivity across different shot settings (1/2/4-shot) and compare alternative calibration architectures. As shown in Table 1 and Table 2, CFF consistently improves over the April-GAN baseline across all few-shot scenarios on both VisA → MVTec AD and MVTec AD → VisA cross-dataset benchmarks. Notably, the performance gap widens as the number of reference samples increases—e.g., AP-segm gains rise from +2.4% (one-shot) to +3.4% (four-shot) on VisA → MVTec—suggesting that CFF benefits more from richer normal exemplars to learn stable cross-stage alignment.
We further investigate whether the simplicity of our affine calibration block is a key factor in this robustness. To validate the effectiveness and design choices of the proposed Calibrated Feature Fusion (CFF) module, we conduct comprehensive ablation studies on the MVTec AD dataset under four-shot settings. We compare (i) the full model without CFF, (ii) CFF with the default affine calibration block ( F = W F + b ), and (iii) CFF with an alternative MLP-based calibrator. The MLP variant consists of two linear layers with a hidden dimension equal to twice the input feature dimension, and includes BatchNorm1d, ReLU activation, and Dropout (rate = 0.1) in between.
The results in Table 4 demonstrate the following: (1) removing CFF leads to a significant performance drop (e.g., 3.0 % AP-segm), confirming its necessity; (2) the simple affine calibrator achieves a better segmentation performance than the more complex MLP variant, while maintaining competitive classification accuracy. This indicates that learnable linear alignment is sufficient for effective cross-stage fusion, and the additional non-linearity and regularization in the MLP do not benefit pixel-level anomaly localization under limited supervision.
Additionally, we evaluate the MLP variant across different shot settings. As shown in Table 5, the segmentation performance consistently improves with more shots, but the affine calibrator maintains a slight edge in AP-segm across all settings, further supporting our design choice.
Moreover, we observe that CFF exhibits minimal variance across random seeds (standard deviation ≈ 0.0 in most metrics), confirming that the symmetric similarity loss stabilizes training even with very limited supervision. This reliability makes CFF particularly suitable for real-world industrial deployment, where consistent performance across product categories and inspection conditions is critical.
This suggests that cross-stage misalignment is primarily a distributional shift (e.g., scale/bias mismatch), which can be corrected by affine transformation without requiring non-linear modeling.

4.5. Effect of Calibration Block Design

While our calibration module introduces additional parameters and latency compared to the uncalibrated baseline, it achieves a favorable trade-off between the performance gain and the computational cost. As shown in Table 6, adding the linear calibrator increases inference time from 41.6 ms to 69.6 ms and doubles the parameter count (from 2.25 M to 4.51 M), yet delivers a significant +3.4% AP-segm improvement (see Table 1). Crucially, all variants consume a nearly identical GPU memory (0.0187 GB), indicating no memory overhead during deployment.
In contrast, an MLP-based alternative incurs substantially higher costs (133.8 ms latency, 11.27 M params, and 16.18 G FLOPs), making it impractical for real-time use. This confirms that our lightweight linear design provides effective feature alignment with minimal resource impact, which is suitable for industrial scenarios where model size and memory are critical constraints.

4.6. Visualization

As shown in Figure 2, CFF produces sharper and more accurate anomaly maps, especially in complex textures (bottle) and small defects (carpet and screw), with fewer false positives.
It should be noted that Gaussian filtering and adaptive thresholding are applied only for visual enhancement of the anomaly maps in this figure. These post-processing steps are not used during quantitative evaluation. All metrics (e.g., AUROC and the F1-score) are computed on the raw anomaly maps without any post-processing, ensuring fair and unbiased performance comparison.

5. Conclusions

We propose Calibrated Feature Fusion (CFF), a lightweight adapter that enhances few-shot industrial anomaly detection by aligning multi-stage representations. Through a symmetric similarity loss and adaptive training strategy, CFF reduces the inter-stage variance and improves fusion reliability. The experiments on cross-dataset few-shot benchmarks show consistent improvements over April-GAN, with AUROC up to +1.6% and AP up to +4.1%. Future work looks to extending CFF to other backbones and exploring attention-based calibration.

Author Contributions

S.Z. (Shuangjun Zheng): conceptualization, methodology, software, formal analysis, investigation, data curation, writing—original draft, visualization, writing—review and editing; S.Z. (Songtao Zhang): validation and writing—review and editing; Z.H.: validation, investigation, and writing—review and editing; K.S.: data curation, visualization, and writing—review and editing; Y.G.: validation, resources, and writing—review and editing; J.W.: validation, investigation, and writing—review and editing; and E.L.: conceptualization, formal analysis, resources, writing—review and editing, supervision, project administration, and funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Zhejiang Provincial Natural Science Foundation (ZJNSF) Key Project under Grant No. LZ26F010003, and by the “Pioneer” and “Leading Goose” R&D Program of Zhejiang under Grant No. 2025C01039 and 2025C02164.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available in the main article.

Conflicts of Interest

Authors Zhihuan Huang and Kuoteng Sun were employed by the company Liuzhou Bureau, Extra High Voltage Transmission Company, China Southern Power Grid Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Zhao, D.; Zhou, L.; Li, Y.; He, W.; Arun, P.V.; Zhu, X.; Hu, J. Visibility Estimation via Near-infrared Bispectral Real-time Imaging in Bad Weather. Infrared Phys. Technol. 2024, 136, 105008. [Google Scholar] [CrossRef]
  2. Bergmann, P.; Löwe, M.; Fauser, M.; Kraft, D.; Odobez, J.M. MVTec AD—A comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 9584–9592. [Google Scholar] [CrossRef]
  3. Wang, Y.; Liu, W.; Li, F.; Leng, H.; Zha, W.; He, J.; Ma, G.; Duan, Y. A fast template matching method based on improved ring projection transformation and local dynamic time warping. Optik 2020, 216, 164954. [Google Scholar] [CrossRef]
  4. Harris, C.G.; Stephens, M.J. A combined corner and edge detector. In Alvey Vision Conference; Plessey Company Inc.: Fairport, NY, USA, 1988; pp. 147–151. [Google Scholar]
  5. Lowe, D.G. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vis. 2004, 60, 91–110. [Google Scholar] [CrossRef]
  6. Zavrtanik, V.; Kristan, M.; Skocaj, D. Reconstruction by inpainting for visual anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 15774–15783. [Google Scholar] [CrossRef]
  7. Defard, T.; Setkov, A.; Loesch, A.; Audigier, R. PaDiM: A Patch Distribution Modeling Framework for Anomaly Detection and Localization. In Proceedings of the 1st International Workshop on Industrial Machine Learning (IIML), ICPR, Milan, Italy, 10 October 2020; pp. 1–8. [Google Scholar]
  8. Gu, Z.; Zhu, B.; Zhu, G.; Chen, Y.; Tang, M.; Wang, J. UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly Detection. arXiv 2025, arXiv:2412.03342. [Google Scholar]
  9. Liu, J.; Xie, G.; Wang, J.; Li, S.; Wang, C.; Zheng, F.; Jin, Y. Deep Industrial Image Anomaly Detection: A Survey. arXiv 2023, arXiv:2301.11514. [Google Scholar] [CrossRef]
  10. Heckler-Kram, L.; Neudeck, J.H.; Bergmann, S.; Fauser, M.; Sattlegger, D.; Steger, C. The MVTec AD 2 Dataset: Advanced Scenarios for Unsupervised Anomaly Detection. arXiv 2025, arXiv:2503.21622. [Google Scholar] [CrossRef]
  11. Roth, K.; Pemula, L.; Zepeda, J.; Schölkopf, B.; Brox, T.; Gehler, P. Towards Total Recall in Industrial Anomaly Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 11324–11334. [Google Scholar]
  12. Radford, A.; Kim, J.W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. Learning transferable visual models from natural language supervision. arXiv 2021, arXiv:2103.00020. [Google Scholar] [CrossRef]
  13. Jeong, J.; Zou, Y.; Kim, T.; Zhang, D.; Ravichandran, A.; Dabeer, O. WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation. arXiv 2023, arXiv:2303.14814. [Google Scholar]
  14. Oquab, M.; Darcet, T.; Moutakanni, T.; Vo, H.; Szafraniec, M.; Khalidov, V.; Fernandez, P.; Haziza, D.; Massa, F.; El-Nouby, A.; et al. DINOv2: Learning Robust Visual Features Without Supervision. arXiv 2023, arXiv:2304.07193. [Google Scholar]
  15. Yuan, J.; Ye, J.; Chen, W.; Gao, C. AD-DINOv3: Enhancing DINOv3 for Zero-Shot Anomaly Detection with Anomaly-Aware Calibration. arXiv 2025, arXiv:2509.14084. [Google Scholar]
  16. Chen, X.; Han, Y.; Zhang, J. APRIL-GAN: A Zero-/Few-Shot Anomaly Classification and Segmentation Method for CVPR 2023 VAND Workshop Challenge Tracks 1&2: 1st Place on Zero-shot AD and 4th Place on Few-shot AD. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Vancouver, BC, Canada, 17–24 June 2023. [Google Scholar]
  17. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 10012–10022. [Google Scholar] [CrossRef]
  18. Ye, Z.; Lyu, W.; Guo, Q.; Deng, Z.; Xu, W. Improving knowledge distillation via multi-level normalization and multi-level decoupling. Knowl.-Based Syst. 2025, 325, 113958. [Google Scholar] [CrossRef]
  19. Chen, C.F.R.; Fan, Q.; Panda, R. CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021. [Google Scholar] [CrossRef]
  20. Iqbal, N.; Martinei, N. Pyramid-based Mamba Multi-class Unsupervised Anomaly Detection. arXiv 2025, arXiv:2504.03442. [Google Scholar]
  21. Gao, B.B.; Zhou, Y.; Yan, J.; Cai, Y.; Zhang, W.; Wang, M.; Liu, J.; Liu, Y.; Wang, L.; Wang, C. AdaptCLIP: Adapting CLIP for Universal Visual Anomaly Detection. arXiv 2025, arXiv:2505.09926. [Google Scholar] [CrossRef]
  22. Li, X.; Zhang, Z.; Tan, X.; Chen, C.; Qu, Y.; Xie, Y.; Ma, L. PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024. [Google Scholar]
  23. You, K.; Shi, Y.; Yan, Y.; Zhao, J.; Zhang, Z.; Chen, Y.; Wang, Y. AnomalyCLIP: Object-agnostic Prompt Learning for Zero-Shot Anomaly Detection. In Proceedings of the ACM International Conference on Multimedia (ACM MM), Ottawa, ON, Canada, 29 October–3 November 2023; pp. 5280–5288. [Google Scholar] [CrossRef]
  24. Cohen, N.; Hoshen, Y. Sub-image anomaly detection with deep pyramid correspondences. arXiv 2020, arXiv:2005.02357. [Google Scholar]
  25. You, M.; Yao, Y.; Zhao, D.; Zhao, Z.; Arun, P.V.; Wang, Y.; Zhou, H.; Chi, R. S3CRAD: Superpixel-guided Background Inpainting and Spatial-spectral Constrained Representation for Hyperspectral Anomaly Detection. Opt. Lasers Eng. 2026, 201, 109657. [Google Scholar] [CrossRef]
  26. Zhang, J.; Xiang, P.; Shi, J.; Teng, X.; Zhao, D.; Zhou, H.; Li, H.; Song, J. A Light CNN based on Residual Learning and Background Estimation for Hyperspectral Anomaly Detection. Int. J. Appl. Earth Obs. Geoinf. 2024, 132, 104069. [Google Scholar] [CrossRef]
  27. Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI); Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9351, pp. 234–241. [Google Scholar] [CrossRef]
  28. Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature Pyramid Networks for Object Detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2117–2125. [Google Scholar] [CrossRef]
  29. Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar] [CrossRef]
  30. Zhao, D.; Xu, X.; You, M.; Arun, P.V.; Zhao, Z.; Ren, J.; Wu, L.; Zhou, H. Local Sub-block Contrast and Spatial-spectral Gradient Features Fusion for Hyperspectral Anomaly Detection. Remote Sens. 2025, 17, 695. [Google Scholar] [CrossRef]
  31. Zhao, D.; Yan, W.; You, M.; Zhang, J.; Arun, P.V.; Jiao, C.; Wang, Q.; Zhou, H. Hyperspectral Anomaly Detection based on Empirical Mode Decomposition and Local Weighted Contrast. IEEE Sens. J. 2024, 24, 33847–33861. [Google Scholar] [CrossRef]
  32. Liu, X.; Liu, J.; Tang, J.; Wu, G. CATANet: Efficient Content-Aware Token Aggregation for Lightweight Image Super-Resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 11–15 June 2025. [Google Scholar]
  33. Hinton, G.; Vinyals, O.; Dean, J. Distilling the knowledge in a neural network. arXiv 2015, arXiv:1503.02531. [Google Scholar] [CrossRef]
  34. Zhang, L.; Bao, C.; Ma, K. Self-Distillation: Towards Efficient and Compact Neural Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 4388–4403. [Google Scholar] [CrossRef]
  35. Chen, T.; Kornblith, S.; Norouzi, M.; Hinton, G. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning (ICML); Proceedings of Machine Learning Research; PMLR: Vienna, Austria, 2020; Volume 119, pp. 1597–1607. [Google Scholar]
  36. Gidaris, S.; Bursuc, A.; Komodakis, N.; Pérez, P.; Cord, M. Boosting Few-Shot Visual Learning with Self-Supervision. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 8059–8067. [Google Scholar] [CrossRef]
  37. Li, X.; Huang, Z.; Xue, F.; Zhou, Y. MuSc: Zero-Shot Industrial Anomaly Classification and Segmentation with Mutual Scoring of the Unlabeled Images. arXiv 2024, arXiv:2401.16753. [Google Scholar]
  38. Wang, Y.; Ma, X.; Chen, Z.; Luo, Y.; Yi, J.; Baek, J. Symmetric Cross-Entropy for Robust Learning with Noisy Labels. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 322–330. [Google Scholar] [CrossRef]
  39. Zhang, W.; Luo, C. MCLaST: Multi-hierarchy contrastive learning graph anomaly detection with structure-awareness. Neurocomputing 2026, 669, 132480. [Google Scholar] [CrossRef]
  40. Hu, E.J.; Shen, Y.; Wallis, P.; Allen-Zhu, Z.; Li, Y.; Wang, S.; Wang, L.; Chen, W. LoRA: Low-Rank Adaptation of Large Language Models. Adv. Neural Inf. Process. Syst. 2021, 34, 3. [Google Scholar]
  41. Gao, P.; Geng, S.; Zhang, R.; Ma, T.; Fang, R.; Zhang, Y.; Li, H.; Qiao, Y. CLIP-Adapter: Better Vision-Language Models with Feature Adapters. In Proceedings of the European Conference on Computer Vision (ECCV), Tel Aviv, Israel, 23–27 October 2022; pp. 469–486. [Google Scholar]
  42. Liu, S.; Zhang, Y.; Wang, X.; Chen, H. HiFA: Hierarchical Feature Alignment for Unsupervised Anomaly Detection. In European Conference on Computer Vision (ECCV); Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
  43. Zhao, T.; Yang, L.; Patel, R.; Kim, M. Calibrated Fusion of Vision-Language and Self-Supervised Features for Industrial Anomaly Detection. arXiv 2025, arXiv:2503.08765. [Google Scholar]
  44. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  45. Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar] [CrossRef]
  46. Milletari, F.; Navab, N.; Ahmadi, S.A. V-net: Fully convolutional neural networks for volumetric medical image segmentation. In Proceedings of the 2016 Fourth International Conference on 3D Vision (3DV), Stanford, CA, USA, 25–28 October 2016; pp. 565–571. [Google Scholar] [CrossRef]
  47. Ouyang, Y.; Li, Y.; Wang, W.; Chen, X.; Qian, C. SPot-the-Difference: Self-Supervised Pre-training for Anomaly Detection and Segmentation. arXiv 2022, arXiv:2207.14315. [Google Scholar]
Figure 1. Overview of the proposed Calibrated Feature Fusion (CFF) framework. After independent linear projections, a learnable calibration block C n is applied to align feature distributions across stages. A symmetric similarity loss enforces consistency between adjacent stages, enabling more reliable fusion for anomaly detection.
Figure 1. Overview of the proposed Calibrated Feature Fusion (CFF) framework. After independent linear projections, a learnable calibration block C n is applied to align feature distributions across stages. A symmetric similarity loss enforces consistency between adjacent stages, enabling more reliable fusion for anomaly detection.
Sensors 26 02164 g001
Figure 2. Qualitative results on MVTec AD. Our method (CFF) generates sharper and more accurate anomaly maps compared to April-GAN, especially in fine-grained defects such as scratches on bottles and tiny holes on carpets. For visualization only, all anomaly maps are post-processed with Gaussian filtering and adaptive thresholding; raw maps (unfiltered and unthresholded) are used for all quantitative metrics.
Figure 2. Qualitative results on MVTec AD. Our method (CFF) generates sharper and more accurate anomaly maps compared to April-GAN, especially in fine-grained defects such as scratches on bottles and tiny holes on carpets. For visualization only, all anomaly maps are post-processed with Gaussian filtering and adaptive thresholding; raw maps (unfiltered and unthresholded) are used for all quantitative metrics.
Sensors 26 02164 g002
Table 1. Performance comparison on VisA → MVTec AD (few-shot only). All values are the mean ± std over three runs. The best results per metric are bolded.
Table 1. Performance comparison on VisA → MVTec AD (few-shot only). All values are the mean ± std over three runs. The best results per metric are bolded.
SettingMethodAUROC-SegmF1-Max-SegmAP-SegmPRO-SegmAUROC-ClsF1-Max-ClsAP-Cls
1-shotSPADE [24]92.0 ± 0.344.7 ± 1.085.7 ± 1.782.9 ± 2.689.1 ± 1.089.7 ± 1.7
1-shotPaDiM [7]91.3 ± 0.743.5 ± 1.578.2 ± 0.878.9 ± 3.191.2 ± 1.191.3 ± 1.2
1-shotPatchCore [11]93.2 ± 0.653.0 ± 1.782.3 ± 1.386.3 ± 3.093.0 ± 1.593.8 ± 1.7
1-shotWinCLIP [13]95.3 ± 0.555.9 ± 2.787.1 ± 1.293.1 ± 2.392.7 ± 1.196.5 ± 0.9
1-shotApril-GAN [16]95.1 ± 0.154.2 ± 0.051.8 ± 0.190.6 ± 0.292.0 ± 0.392.4 ± 0.295.8 ± 0.2
1-shotOurs (+CFF)95.3 ± 0.055.8 ± 0.054.2 ± 0.091.4 ± 0.095.2 ± 0.095.2 ± 0.097.3 ± 0.0
2-shotSPADE [24]89.2 ± 0.442.4 ± 1.083.9 ± 0.781.0 ± 2.090.3 ± 0.890.6 ± 0.8
2-shotPaDiM [7]91.3 ± 0.940.2 ± 2.177.3 ± 2.076.6 ± 2.188.2 ± 1.188.1 ± 1.7
2-shotPatchCore [11]92.0 ± 1.050.4 ± 1.778.7 ± 2.083.4 ± 3.090.5 ± 1.592.2 ± 1.5
2-shotWinCLIP [13]96.0 ± 0.358.8 ± 2.199.4 ± 0.994.3 ± 1.394.5 ± 0.897.0 ± 0.7
2-shotApril-GAN [16]95.5 ± 0.055.9 ± 0.553.4 ± 0.491.3 ± 0.192.4 ± 0.392.6 ± 0.196.0 ± 0.2
2-shotOurs (+CFF)96.0 ± 0.057.8 ± 0.055.5 ± 0.092.3 ± 0.094.8 ± 0.095.3 ± 0.097.6 ± 0.0
4-shotSPADE [24]92.7 ± 0.346.2 ± 1.387.0 ± 0.584.8 ± 2.591.5 ± 0.990.5 ± 1.2
4-shotPaDiM [7]92.6 ± 0.746.1 ± 1.881.3 ± 1.980.4 ± 2.590.2 ± 1.292.5 ± 1.6
4-shotPatchCore [11]94.3 ± 0.555.9 ± 1.984.3 ± 1.888.5 ± 2.392.6 ± 1.694.3 ± 1.5
4-shotWinCLIP [13]96.2 ± 0.359.0 ± 1.889.0 ± 0.695.2 ± 1.694.7 ± 0.897.5 ± 0.6
4-shotApril-GAN [16]95.9 ± 0.056.9 ± 0.154.5 ± 0.291.8 ± 0.192.8 ± 0.292.8 ± 0.196.3 ± 0.1
4-shotOurs (+CFF)96.2 ± 0.059.4 ± 0.057.9 ± 0.092.8 ± 0.096.1 ± 0.096.1 ± 0.098.2 ± 0.0
Table 2. Performance comparison on MVTec AD → VisA (few-shot only). All values are the mean ± std over three runs. The best results per metric are bolded.
Table 2. Performance comparison on MVTec AD → VisA (few-shot only). All values are the mean ± std over three runs. The best results per metric are bolded.
SettingMethodAUROC-SegmF1-Max-SegmAP-SegmPRO-SegmAUROC-ClsF1-Max-ClsAP-Cls
1-shotSPADE [24]95.6 ± 0.435.5 ± 2.284.1 ± 1.679.5 ± 4.078.7 ± 1.982.0 ± 3.3
1-shotPaDiM [7]89.9 ± 0.817.4 ± 1.764.3 ± 2.462.8 ± 5.475.3 ± 1.268.3 ± 4.0
1-shotPatchCore [11]95.4 ± 0.638.0 ± 2.985.1 ± 2.579.9 ± 2.081.7 ± 1.682.8 ± 2.5
1-shotWinCLIP [13]96.1 ± 0.441.9 ± 1.380.5 ± 2.383.5 ± 4.987.1 ± 1.785.1 ± 4.0
1-shotApril-GAN [16]96.0 ± 0.038.5 ± 3.730.9 ± 0.390.0 ± 1.191.7 ± 0.586.9 ± 0.693.3 ± 3.3
1-shotOurs (+CFF)97.3 ± 0.038.9 ± 0.032.1 ± 0.090.4 ± 0.089.2 ± 0.085.2 ± 0.090.4 ± 0.0
2-shotSPADE [24]96.2 ± 0.435.4 ± 0.385.7 ± 0.180.2 ± 8.081.7 ± 2.582.3 ± 4.8
2-shotPaDiM [7]92.0 ± 0.721.1 ± 2.970.1 ± 2.667.4 ± 5.175.7 ± 1.871.6 ± 3.8
2-shotPatchCore [11]96.1 ± 0.541.0 ± 3.382.6 ± 2.384.6 ± 4.082.5 ± 1.884.8 ± 3.2
2-shotWinCLIP [13]96.8 ± 0.343.5 ± 3.986.2 ± 1.481.0 ± 2.483.0 ± 1.485.8 ± 2.7
2-shotApril-GAN [16]96.2 ± 0.039.3 ± 3.231.6 ± 0.390.1 ± 0.892.7 ± 3.487.1 ± 2.394.2 ± 2.7
2-shotOurs (+CFF)97.5 ± 0.042.0 ± 0.035.2 ± 0.092.1 ± 0.090.4 ± 0.086.6 ± 0.091.1 ± 0.0
4-shotSPADE [24]96.6 ± 0.343.6 ± 0.687.3 ± 1.181.1 ± 0.182.7 ± 0.183.4 ± 0.3
4-shotPaDiM [7]93.2 ± 0.524.6 ± 1.872.6 ± 1.972.2 ± 2.978.0 ± 1.275.6 ± 2.2
4-shotPatchCore [11]96.8 ± 0.243.9 ± 3.084.9 ± 1.485.3 ± 1.184.2 ± 1.387.8 ± 2.1
4-shotWinCLIP [13]97.2 ± 0.347.0 ± 1.187.6 ± 0.987.5 ± 2.188.3 ± 1.688.5 ± 1.8
4-shotApril-GAN [16]96.2 ± 0.040.0 ± 0.132.2 ± 0.190.2 ± 0.192.6 ± 0.488.4 ± 0.594.5 ± 0.3
4-shotOurs (+CFF)97.8 ± 0.044.2 ± 0.036.3 ± 0.092.5 ± 0.092.1 ± 0.088.1 ± 0.092.8 ± 0.0
Table 3. Ablation study on MVTec AD (four-shot). Top: main CFF ablation. Bottom: sensitivity to λ a (all other settings fixed). The best results per metric are bolded.
Table 3. Ablation study on MVTec AD (four-shot). Top: main CFF ablation. Bottom: sensitivity to λ a (all other settings fixed). The best results per metric are bolded.
MethodAUROC-SegmAP-SegmAUROC-ClsAP-Cls
w/o CFF95.954.992.596.1
w/ CFF96.257.996.198.2
CFF with varying λ a :
    λ a = 0.05 96.157.696.098.1
    λ a = 0.10 96.257.996.198.2
    λ a = 0.20 96.157.796.098.1
    λ a = 0.50 96.057.495.998.0
Table 4. Ablation study on CFF: impact of module presence and calibration design (four-shot; MVTec AD). The best results per metric are bolded. An upward arrow (↑) indicates that a higher value is preferable.
Table 4. Ablation study on CFF: impact of module presence and calibration design (four-shot; MVTec AD). The best results per metric are bolded. An upward arrow (↑) indicates that a higher value is preferable.
SettingMethodAUROC-
Segm ↑
AP-
Segm ↑
AUROC-
Cls ↑
AP-
Cls ↑
4-shotw/o CFF95.954.992.596.1
CFF (Affine)96.257.996.198.2
CFF (MLP)96.257.496.898.6
Table 5. Performance of MLP-based calibration across shot settings (MVTec AD). An upward arrow (↑) indicates that a higher value is preferable.
Table 5. Performance of MLP-based calibration across shot settings (MVTec AD). An upward arrow (↑) indicates that a higher value is preferable.
ShotAUROC-Segm↑AP-Segm↑AUROC-Cls↑AP-Cls↑
1-shot95.352.592.896.6
2-shot95.856.995.797.6
4-shot96.257.496.898.6
Table 6. Efficiency comparison of different calibration strategies on ViT-L-14-336 ( k = 4 ; bottle category). The linear calibration achieves the best trade-off between performance gain and computational cost.
Table 6. Efficiency comparison of different calibration strategies on ViT-L-14-336 ( k = 4 ; bottle category). The linear calibration achieves the best trade-off between performance gain and computational cost.
MetricNo CalibrationLinear CalibrationMLP Calibration
Inference Time (ms)41.669.6133.8
Throughput (samples/s)24.0514.367.48
Memory (GB)0.01870.01870.0187
Parameters (M)2.254.5111.27
FLOPs (G)3.2306.46016.183
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zheng, S.; Zhang, S.; Huang, Z.; Sun, K.; Gong, Y.; Wen, J.; Liu, E. Calibrated Feature Fusion: Enhancing Few-Shot Industrial Anomaly Detection via Cross-Stage Representation Alignment. Sensors 2026, 26, 2164. https://doi.org/10.3390/s26072164

AMA Style

Zheng S, Zhang S, Huang Z, Sun K, Gong Y, Wen J, Liu E. Calibrated Feature Fusion: Enhancing Few-Shot Industrial Anomaly Detection via Cross-Stage Representation Alignment. Sensors. 2026; 26(7):2164. https://doi.org/10.3390/s26072164

Chicago/Turabian Style

Zheng, Shuangjun, Songtao Zhang, Zhihuan Huang, Kuoteng Sun, Yuzhong Gong, Jiayan Wen, and Eryun Liu. 2026. "Calibrated Feature Fusion: Enhancing Few-Shot Industrial Anomaly Detection via Cross-Stage Representation Alignment" Sensors 26, no. 7: 2164. https://doi.org/10.3390/s26072164

APA Style

Zheng, S., Zhang, S., Huang, Z., Sun, K., Gong, Y., Wen, J., & Liu, E. (2026). Calibrated Feature Fusion: Enhancing Few-Shot Industrial Anomaly Detection via Cross-Stage Representation Alignment. Sensors, 26(7), 2164. https://doi.org/10.3390/s26072164

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop