Catalog PyPI
Back to packageRELEASE DETAILS

1.0.0

PyPI

aderh

ADERH: Anomaly Detection by an Ensemble of Random Pairs of Hyperspheres (NeurIPS 2025)

anomaly-detectionensembleisolationoutlier-detectionunsupervised-learning
Published20 Aug 2026
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 1.0.0 documentation

ADERH — Anomaly Detection by an Ensemble of Random Pairs of Hyperspheres

NeurIPS 2025 License: MIT tests

Official implementation of the NeurIPS 2025 paper "Anomaly Detection by an Ensemble of Random Pairs of Hyperspheres" (Walid Durani, Collin Leiber, Khalid Durani, Claudia Plant, Christian Böhm).

ADERH is a fast, hyperparameter-robust, isolation-based unsupervised anomaly detector for tabular data. Guided by a δ-separation argument, it covers normal regions with an ensemble of small hyperspheres built from randomly paired points; each sphere's isolation signal is refined by Pitch (a boundary-proximity ratio) and NDensity (a sparsity-aware density weight), and signals are averaged over the ensemble.

Install

pip install aderh

or from source:

git clone https://github.com/Walid10010/ADERH.git && cd ADERH
pip install -e .

Runtime dependencies: numpy, scikit-learn only.

Quickstart

from aderh import ADERH

det = ADERH(random_state=0).fit(X_train)      # unsupervised
scores = det.decision_function(X_test)        # higher = more anomalous
labels = det.predict(X_test)                  # 1 = anomaly, 0 = normal

Key parameters: n_estimators=256 (ensemble size), n=18 (hyperspheres per member), contamination=0.1 (sets the label threshold). Defaults reproduce the paper.

Reproducing the paper

Experiments are based on the ADBench benchmark:

pip install -r requirements-experiments.txt
git clone https://github.com/Minqi824/ADBench.git && mv ADBench data
python experiments/run_experiment.py

Protocol: MinMax scaling to [0, 1], 3 stratified 70/30 splits (StratifiedShuffleSplit, random_state=0), seeds 0, 1, 2, 1000, 10000 for stochastic methods, AUC-ROC and AUC-PR averaged over splits × seeds, results appended to results.csv.

Implementation notes

The packaged detector is verified score-identical to the original reference script (tests/test_equivalence.py). Scoring convention follows PyOD: higher decision_function values indicate anomalies (score_samples provides the scikit-learn sign convention). Hypersphere radii are defined in squared-distance space; see IMPLEMENTATION_NOTES.md for the precise reference semantics.

Citation

@inproceedings{durani2025aderh,
  title     = {Anomaly Detection by an Ensemble of Random Pairs of Hyperspheres},
  author    = {Durani, Walid and Leiber, Collin and Durani, Khalid and
               Plant, Claudia and B{\"o}hm, Christian},
  booktitle = {Advances in Neural Information Processing Systems 38 (NeurIPS)},
  year      = {2025}
}

License

Released under the MIT License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
numpy>=1.21runtime
scikit-learn
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
scikit-learn>=1.1runtime

Distribution files

2 collected
aderh-1.0.0-py3-none-any.whl

bdist_wheel · 6.79 KB · Python py3

Source file
aderh-1.0.0.tar.gz

sdist · 7.09 KB · Python source

Source file

Repository

ACCESSIBLE
walid10010/aderh

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
main
Last push
20 Aug 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

1count
Gauge · observed snapshots23 Oct 2026
10.50
2026-10-23: 1 · observed 2026-10-23T09:09:45.4668429Z
23 Oct23 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2312026-10-23T09:09:45.4668429Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ae424d151de97d0eefd43b6c9c982c93a6edca7615a770154fedac372bceab5b

Other collected versions

View all collected versions →