ICLAD Pretrained Checkpoints
ICLAD: In-Context Learning for Unified Tabular Anomaly Detection
This repository contains pretrained model checkpoints for ICLAD, an in-context learning framework for tabular anomaly detection that supports one-class, unsupervised, and semi-supervised settings.
Model Variants
1. [ICLAD] iclad_mixedprior_unified.pth (Default)
General use across all anomaly detection scenarios
- Trained on mixed prior (structural causal models (SCMs) and perturbation noises)
- Supports all three settings: one-class, unsupervised, and semi-supervised
- Recommended as the default choice for most use cases
2. [ICLAD_OC] iclad_mixedprior_oneclass.pth
Used for ablation studies.
- Trained on mixed prior optimized for one-class setting only
- Note: Use
iclad_mixedprior_unified.pth for general one-class applications
3. [ICLAD_UNSUP] iclad_mixedprior_unsup.pth
Used for ablation studies.
- Trained on mixed prior optimized for unsupervised setting only
- Note: Use
iclad_mixedprior_unified.pth for general unsupervised applications
4. [ICLAD_SCM] iclad_scm_unified.pth
Used for ablation studies.
- Trained on SCM-only prior (no perturbation-based noise)
- Supports all three settings: one-class, unsupervised, and semi-supervised
- Note: Use
iclad_mixedprior_unified.pth for general applications
Usage
⭐ Recommended: Use the Unified Model
For most applications, use iclad_mixedprior_unified.pth (the default). The other variants are provided for research and paper reproduction purposes.
Option 1: Load from Hugging Face Hub
1from iclad import ICLAD
2
3# Load default unified model (works for all settings)
4model = ICLAD.from_checkpoint("jyiwei/iclad-checkpoints/iclad_mixedprior_unified.pth")
Option 2: Load from Local Checkpoints
If you have the checkpoint files in src/iclad/checkpoints/, use the built-in names:
1from iclad import ICLAD
2
3# ⭐ RECOMMENDED: Load default unified model
4model = ICLAD() # Uses iclad_mixedprior_unified by default
5model = ICLAD(model_name="ICLAD")
6
7# --- Paper Reproduction Only (below) ---
8
9# Load one-class variant
10model = ICLAD(model_name="ICLAD_OC")
11
12# Load unsupervised variant
13model = ICLAD(model_name="ICLAD_UNSUP")
14
15# Load SCM-only variant
16model = ICLAD(model_name="ICLAD_SCM")
Example: Anomaly Detection on Tabular Data
1import numpy as np
2from iclad import ICLAD
3
4# Initialize model
5model = ICLAD(model_name="ICLAD") # Default unified model
6
7# Prepare training and test data
8X_train = np.random.randn(100, 10) # 100 samples, 10 features
9X_test = np.random.randn(50, 10) # Test data
10
11# Fit on training data (for unsupervised setting, no labels needed)
12model.fit(X_train)
13
14# Get anomaly scores
15scores = model.predict_score(X_test)
One-class Example
1# Prepare training and test data
2X_train = np.random.randn(100, 10) # 100 samples, 10 features
3Y_train = np.zeros(X_train.shape[0]) # All normal
4X_test = np.random.randn(50, 10) # Test data
5
6# Fit on training data (for one-class setting, all labels should be zero)
7model.fit(X_train, Y_train)
8
9# Get anomaly scores
10scores = model.predict_score(X_test)
Semi-Supervised Example
1# y_train: 1 for anomaly, -1 for unknown (no support for known normals yet)
2model.fit(X_train, Y_train)
3scores = model.predict_score(X_test)
Citation
If you use these pretrained models in your research, please cite:
1@misc{wei2026icladincontextlearningunified,
2 title={ICLAD: In-Context Learning for Unified Tabular Anomaly Detection Across Supervision Regimes},
3 author={Jack Yi Wei and Narges Armanfard},
4 year={2026},
5 eprint={2603.19497},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2603.19497},
9}
License
The model code is licensed under the Apache License 2.0.
Repository
For issues, discussions, and more information, please visit the main ICLAD repository.
Contact