Tabular anomaly detection (TAD) aims to identify samples that deviate from the majority in tabular data and is critical in many real-world applications. However, existing methods follow a ``one model for one dataset (OFO)'' paradigm, which relies on dataset-specific training and thus incurs high computational cost and yields limited generalization to unseen domains. To address these limitations, we propose OFA-TAD, a generalist one-for-all (OFA) TAD framework that only requires one-time training on multiple source datasets and can generalize to unseen datasets from diverse domains on-the-fly. To realize one-for-all tabular anomaly detection, OFA-TAD extracts neighbor-distance patterns as transferable cues, and introduces multi-view neighbor-distance representations from multiple transformation-induced metric spaces to mitigate the transformation sensitivity of distance profiles. To adaptively combine multi-view distance evidence, a Mixture-of-Experts (MoE) scoring network is employed for view-specific anomaly scoring and entropy-regularized gated fusion, with a multi-strategy anomaly synthesis mechanism to support training under the one-class constraint. Extensive experiments on 34 datasets from 14 domains demonstrate that OFA-TAD achieves superior anomaly detection performance and strong cross-domain generalizability under the strict OFA setting. The source code is available at https://github.com/Shiy-Li/OFA-TAD.
Figures & tables
Figure 1: The difference between OFO and OFA paradigm.
Figure 2: The distance varies in different transformations, where R: Raw, S: Standardized, and Q: Quantile.
Figure 3: The pipeline of OFA-TAD. First, the multi-view distance encoding module extracts normalized neighbor-distance profiles from multiple transformation-induced metric spaces to obtain transferable representations. Then, the Mixture-of-Experts (MoE) scoring network leverages view-specific experts and an entropy-regularized gating mechanism to adaptively fuse distance-based anomaly evidence. A multi-strategy anomaly synthesis module is employed to generate diverse pseudo-anomalies for model training.
Dataset
LOF
KNN
iForest
DSVDD
AE
MCM
LUNAR
DRL
DisentAD
OFA-TAD
In-Domain Target Datasets
abalone
0.7284
0.7997
0.7371
0.6756
0.8014
0.7450
0.8084
0.8071
0.7789
0.8178
arrhythmia
0.8075
0.8014
0.7931
0.7566
0.7260
0.7848
0.7623
0.7467
0.7567
0.8095
breastw
0.9776
0.9764
0.9975
0.9913
0.9778
0.9977
0.9836
0.9949
0.9960
0.9791
cardio
0.9374
0.9062
0.9352
0.9571
0.9500
0.8710
0.9121
0.9431
0.9480
0.9322
census
0.5451
0.6751
0.6364
0.6916
0.6916
0.6696
0.6565
0.5914
0.8345
0.6955
Table 1: AUROC comparison between baselines and OFA-TAD. The best results are highlighted in bold .
Figure 4: Average rank of different methods across 34 datasets.
Variant
AUROC
AUPRC
F1
OFA-TAD
0.8345
0.6629
0.6352
w/o Gating
0.8218
0.6498
0.6211
w/o MoE
0.8204
0.6448
0.6177
w/o Attention
0.8187
0.6383
0.6029
w/o Position
0.8281
0.6404
0.6124
w/o Noise Inject
0.8203
0.6011
0.5788
Table 2: Ablation results w.r.t. average AUROC, AUPRC, and F1.
Figure 5: Performance with varying context nodes.
Figure 6: Gating weight heatmaps across datasets.
Figure 7: model scaling laws on data size.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Category
Train
Test
# Samples
# Features
# Anomaly
% Anomaly
In-domain datasets
satellite
Astronautics
✓
-
6435
36
2036
31.64
satimage-2
Astronautics
-
✓
5803
36
71
1.22
shuttle
Astronautics
-
✓
49097
9
3511
7.15
vertebral
Biology
✓
-
240
6
30
12.50
yeast
Biology
-
✓
1484
8
507
34.16
Appendix
Table 3: The statistics of in-domain datasets.
Dataset
Category
Train
Test
# Samples
# Features
# Anomaly
% Anomaly
Out-of-domain datasets
cover
Botany
-
✓
286048
10
2747
0.96
Wilt
Botany
-
✓
4819
5
257
5.33
SpamBase
Document
-
✓
4207
57
1679
39.91
campaign
Finance
-
✓
41188
62
4640
11.27
fraud
Finance
-
✓
284807
29
492
0.17
Appendix
Table 4: The statistics of out-of-domain datasets.
Dataset
LOF
KNN
iForest
DSVDD
AE
MCM
LUNAR
DRL
DisentAD
OFA-TAD
In-Domain Target Datasets
abalone
0.8273
0.8799
0.8496
0.8056
0.8856
0.8602
0.8839
0.8862
0.8700
0.8903
arrhythmia
0.6114
0.6034
0.5769
0.5091
0.3999
0.5832
0.5677
0.5676
0.5396
0.6212
breastw
0.9532
0.9962
0.9973
0.9894
0.9670
0.9977
0.9689
0.9945
0.9961
0.9740
cardio
0.7599
0.7663
0.7886
0.8425
0.8194
0.5593
0.7826
0.8117
0.8085
0.8058
census
0.1175
0.1626
0.1451
0.1905
0.2074
0.1650
0.1654
0.1500
0.4003
0.1748
Appendix
Table 5: AUPRC comparison between baselines and OFA-TAD. The best results are highlighted in bold .
Dataset
LOF
KNN
iForest
DSVDD
AE
MCM
LUNAR
DRL
DisentAD
OFA-TAD
In-Domain Target Datasets
abalone
0.7785
0.8107
0.7710
0.7395
0.8140
0.7720
0.8154
0.8131
0.7957
0.8229
arrhythmia
0.5758
0.5909
0.5909
0.5121
0.4848
0.5758
0.5780
0.5061
0.5152
0.6061
breastw
0.9456
0.9749
0.9816
0.9682
0.9414
0.9749
0.9526
0.9782
0.9707
0.9439
cardio
0.6705
0.6818
0.6708
0.7477
0.7273
0.5254
0.6955
0.7375
0.7364
0.7205
census
0.0592
0.1447
0.1112
0.2025
0.2228
0.1576
0.1620
0.1542
0.4044
0.1593
Appendix
Table 6: F1 comparison between baselines and OFA-TAD. The best results are highlighted in bold .
Figure 8: Average rank under F1 across target datasets (the lower the better).
Source Size
Valid Trials
Mean AUROC
Std
2
21
82.44
0.10
3
30
82.74
0.17
4
30
82.85
0.15
5
21
82.98
0.15
Appendix
Table 7: Source-combination robustness over random trials (measured by AVG AUROC %).
Dataset
OFA-TAD
w/o G
w/o MoE
w/o A
w/o P
w/o N
w/o E
w/o I
w/o M
In-Domain Target Datasets
abalone
0.8178
0.8165
0.8103
0.8144
0.8065
0.8028
0.8055
0.8078
0.8008
arrhythmia
0.8095
0.8114
0.8092
0.8038
0.8059
0.7980
0.7997
0.8078
0.7979
breastw
0.9791
0.9959
0.9964
0.9955
0.9950
0.9736
0.9627
0.9785
0.9827
cardio
0.9322
0.9536
0.9559
0.9548
0.9247
0.9152
0.9225
0.9358
0.9314
census
0.6955
0.6895
0.6923
0.6858
0.6964
0.6907
0.6892
0.6932
0.6993
Appendix
Table 8: Ablation results w.r.t. per-dataset AUROC. The best results are highlighted in bold , where G: gating, A: attention, P: position, N: noise injection, E: extrapolation, I: interpolation, M: masking.
Dataset
OFA-TAD
w/o G
w/o MoE
w/o A
w/o P
w/o N
w/o E
w/o I
w/o M
In-Domain Target Datasets
abalone
0.8903
0.8905
0.8879
0.8895
0.8822
0.8763
0.8760
0.8827
0.8791
arrhythmia
0.6212
0.6298
0.6294
0.5856
0.6088
0.5712
0.5706
0.6153
0.5846
breastw
0.9740
0.9958
0.9964
0.9951
0.9941
0.9480
0.9346
0.9743
0.9774
cardio
0.8058
0.8358
0.8436
0.8413
0.7950
0.7006
0.7151
0.8097
0.8075
census
0.1748
0.1703
0.1724
0.1688
0.1757
0.1696
0.1694
0.1731
0.1808
Appendix
Table 9: Ablation results w.r.t. per-dataset AUPRC. The best results are highlighted in bold , where G: gating, A: attention, P: position, N: noise injection, E: extrapolation, I: interpolation, M: masking.
Dataset
OFA-TAD
w/o G
w/o MoE
w/o A
w/o P
w/o N
w/o E
w/o I
w/o M
In-Domain Target Datasets
abalone
0.8229
0.8214
0.8155
0.8188
0.8111
0.8085
0.8128
0.8136
0.8082
arrhythmia
0.6061
0.6263
0.6212
0.6061
0.5788
0.5606
0.5788
0.5879
0.5697
breastw
0.9439
0.9749
0.9749
0.9735
0.9741
0.9540
0.9372
0.9397
0.9573
cardio
0.7205
0.7424
0.7443
0.7462
0.7080
0.6875
0.7034
0.7284
0.7239
census
0.1593
0.1509
0.1545
0.1506
0.1591
0.1445
0.1453
0.1564
0.1722
Appendix
Table 10: Ablation results w.r.t. per-dataset F1. The best results are highlighted in bold , where G: gating, A: attention, P: position, N: noise injection, E: extrapolation, I: interpolation, M: masking.
Figure 9: Performance with varying context size on the rest of target datasets.
Figure 10: Gating weights on additional target datasets.