--- license: apache-2.0 tags: - anomaly-detection - tabular-data - in-context-learning - one-class-classification - unsupervised-learning - semi-supervised-learning --- # 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. 📄 **Paper:** [ICLAD: In-Context Learning for Unified Tabular Anomaly Detection Across Supervision Regimes](https://arxiv.org/abs/2603.19497) ## 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 ```python from iclad import ICLAD # Load default unified model (works for all settings) model = 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: ```python from iclad import ICLAD # ⭐ RECOMMENDED: Load default unified model model = ICLAD() # Uses iclad_mixedprior_unified by default model = ICLAD(model_name="ICLAD") # --- Paper Reproduction Only (below) --- # Load one-class variant model = ICLAD(model_name="ICLAD_OC") # Load unsupervised variant model = ICLAD(model_name="ICLAD_UNSUP") # Load SCM-only variant model = ICLAD(model_name="ICLAD_SCM") ``` ### Example: Anomaly Detection on Tabular Data ```python import numpy as np from iclad import ICLAD # Initialize model model = ICLAD(model_name="ICLAD") # Default unified model # Prepare training and test data X_train = np.random.randn(100, 10) # 100 samples, 10 features X_test = np.random.randn(50, 10) # Test data # Fit on training data (for unsupervised setting, no labels needed) model.fit(X_train) # Get anomaly scores scores = model.predict_score(X_test) ``` ### One-class Example ```python # Prepare training and test data X_train = np.random.randn(100, 10) # 100 samples, 10 features Y_train = np.zeros(X_train.shape[0]) # All normal X_test = np.random.randn(50, 10) # Test data # Fit on training data (for one-class setting, all labels should be zero) model.fit(X_train, Y_train) # Get anomaly scores scores = model.predict_score(X_test) ``` ### Semi-Supervised Example ```python # y_train: 1 for anomaly, -1 for unknown (no support for known normals yet) model.fit(X_train, Y_train) scores = model.predict_score(X_test) ``` ## Citation If you use these pretrained models in your research, please cite: ```bibtex @misc{wei2026icladincontextlearningunified, title={ICLAD: In-Context Learning for Unified Tabular Anomaly Detection Across Supervision Regimes}, author={Jack Yi Wei and Narges Armanfard}, year={2026}, eprint={2603.19497}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2603.19497}, } ``` ## 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 Jack Wei: yi.wei4@mail.mcgill.ca