arXiv:2611.08271cs.CVNov 2026

Manuscript Offprint

arXiv:2611.08271

DART: Domain-Agnostic Residual Transfer for Generalist Anomaly Detection

Muhammad Aqeel, Maham Nazir, Marco Cristani, Francesco Setti

Abstract

Generalist Anomaly Detection (GAD) aims to detect anomalies in unseen domains using only a few reference samples. Recent normal-abnormal guided methods improve this setting by exploiting abnormal references, but their residuals often mix transferable anomaly cues with domain-specific appearance factors such as texture, geometry, and acquisition conditions. This residual domain entanglement limits cross-domain transfer and may produce spurious activations on novel domains. We propose DART, a plug-in framework for normal-abnormal guided GAD that learns to separate residuals into anomaly-relevant and domain-specific components. DART combines a Residual Disentanglement Module, which preserves anomaly-discriminative information while suppressing domain information, with Cross-Domain Meta-Training, which forms episodes across source domains to make the separation effective. The method is architecture-agnostic and can be inserted between residual computation and the detection head of existing GAD pipelines. Experiments on MVTec AD, VisA, and BraTS show consistent improvements over multiple base methods, with the largest gains under stronger domain shifts. DART

1 Introduction

Visual anomaly detection is central to industrial inspection [1, 2], medical diagnosis [3], and safety-critical monitoring [4]. Most existing methods [5–9] train separate models for individual domains, which becomes impractical when new categories appear frequently, labeled data is scarce, or target-domain training is restricted. Generalist Anomaly Detection (GAD) addresses this limitation by training a unified model on source domains and deploying it on unseen target domains without fine-tuning [10, 11]. At inference, the model detects anomalies in a query image by comparing it with a few target-domain references. Early GAD methods, such as InCTRL [10] and ResAD [11], rely only on normal references, assuming that anomalies induce larger residuals relative to normal prototypes.

Recent normal-abnormal guided GAD methods further exploit a small number of abnormal references, which are often available in practical settings. NAGL [12], for instance, uses residual mining and anomaly feature learning to transfer abnormal cues from references to queries, improving over normal-only prompting. However, we show that the residuals driving this transfer are often domain-entangled: they mix transferable anomaly cues with domain-specific factors such as texture, object geometry, and acquisition conditions. For example, a cracked-bottle residual encodes both the crack pattern and bottle-specific appearance; when transferred to leather or transistors, such domain-specific information can trigger false activations or suppress genuine anomalies. We call this phenomenon residual domain entanglement and identify it as a key bottleneck for cross-domain normal-abnormal guided GAD (see Figure 1).

*Corresponding authors: muhammad.aqeel@univr.it, maham@buaa.edu.cn

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

(a) SotA

(b) DART

Figure 1: t-SNE visualization of residual features before and after DART. Colors denote defect types, while marker shapes denote source domains. (a) In the SotA baseline, residuals are fragmented and strongly influenced by domain identity: samples with the same defect type appear in multiple separated regions, while different defect types often overlap. This indicates that residuals encode both anomaly information and domain-specific factors. (b) With DART, residuals form more compact and well-separated clusters by defect type, while different domains are mixed within each cluster. This shows that DART suppresses domain-specific variation and yields residual representations that are more aligned with transferable anomaly semantics.

This issue relates GAD to domain adaptation [13, 14], where domain-specific representations are known to generalize poorly under distribution shift. However, GAD requires more than feature alignment: normal-abnormal residuals must be disentangled, since anomaly cues and domain-specific factors are mixed within the same representation.

We view this objective through an information-theoretic lens: the anomaly component ra\mathbf{r}_a should retain information about the anomaly label YY, while minimizing information about the domain DD, with reconstruction preserving the original residual. This motivates DART (Domain-Agnostic Residual Transfer), a plug-in framework for normal-abnormal GAD. DART combines two components. First, a Residual Disentanglement Module (RDM) splits a residual into an anomaly-relevant component ra\mathbf{r}_a and a domain-specific component rd\mathbf{r}_d using sufficiency, adversarial invariance, and reconstruction losses. Second, Cross-Domain Meta-Training (CDMT) forms episodes with references and queries from different source domains to make this separation learnable. RDM provides the mechanism for suppressing domain information, while CDMT provides the cross-domain signal needed to learn it.

RDM operates between residual computation and the downstream detection head, making DART independent of a specific architecture. We apply it to NAGL [12], the current normal-abnormal guided GAD baseline, and to adapted versions of InCTRL [10] and ResAD [11].

Our contributions are threefold: (i) we identify residual domain entanglement as a bottleneck in normal-abnormal guided GAD; (ii) we propose DART, combining RDM and CDMT to learn anomaly-relevant, domain-agnostic residuals; and (iii) we evaluate it on MVTec AD, VisA, and BraTS across NAGL and two adapted residual-based GAD baselines, showing consistent image-level gains and competitive localization performance under cross-domain transfer.

References (37)