← Open Source
lukasruff

Deep-SVDD-PyTorch

A PyTorch implementation of the Deep SVDD anomaly detection method.

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
789
Stars
211
Forks
+1
This week
1
Contributors
Created 2018-10-15 · Updated 2026-10-12 · #13808 today
Top developers

lukasruff/Deep-SVDD-PyTorch is ranked 13,808 with 789 stars.

Same-category comparison

lukasruff/Deep-SVDD-PyTorch is ranked 13,808 among these 8 peers; lucidrains/phenaki-pytorch is ranked 13,807.

Same-category comparison
NameRankMetrics
ntucllab/libact13,790
Language:
Python
Stars:
791
Forks:
172
Description:
Pool-based active learning in Python.
NeuroDiffGym/neurodiffeq13,795
Language:
Python
Stars:
790
Forks:
105
Description:
A library for solving differential equations using neural networks based on PyTorch, used by multiple research groups around the world, including at Harvard IACS.
ChihebTrabelsi/deep_complex_networks13,802
Language:
Python
Stars:
789
Forks:
284
Description:
Implementation related to the Deep Complex Networks.
lucidrains/phenaki-pytorch13,807
Language:
Python
Stars:
789
Forks:
80
Description:
Implementation of Phenaki Video, which uses Mask GIT to produce text guided videos of up to 2 minutes in length, in Pytorch.
tensorflow/deepmath13,812
Language:
C++
Stars:
789
Forks:
137
Description:
Experiments towards neural network theorem proving.
zhoubolei/TRN-pytorch13,813
Language:
Python
Stars:
789
Forks:
188
Description:
Temporal Relation Networks.
jiyuanwang-afk/Explainable-AI-in-Financial-Fraud-and-Anomaly-Detection13,817
Language:
Python
Stars:
788
Forks:
15
Description:
This repository explores explainable deep learning models for financial fraud detection and anomaly analysis. It integrates Graph Neural Networks (GNNs), Autoencoders, and SHAP-based explainability to identify and interpret fraudulent behaviors in transactional data.
tensorflow/swift-apis13,820
Language:
Swift
Stars:
788
Forks:
135
Description:
Swift for TensorFlow Deep Learning Library.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
Stars789
Forks211
Contributors1
Created date2018-10-15
Updated date2026-10-12
Stars in 1 day0
Stars in 7 days1
Rank13,808
Previous rank13,703
Rank change-105
7-day stars rank10,688
Previous 7-day stars rank10,745
7-day stars rank change57
Total stars rank13,511
Previous total stars rank13,492
Total stars rank change-19
CountryGermany
README summary

PyTorch Implementation of Deep SVDD This repository provides a PyTorch implementation of the *Deep SVDD* method presented in our ICML 2018 paper ”Deep One-Class Classification”. Citation and Contact You find a PDF of the Deep One-Class Classification ICML 2018 paper at If you use our work, please also cite the paper: If you would like to get in touch, please contact contact@lukasruff. Abstract > Despite the great advances made by deep learning in many machine learning problems, there

is a relative dearth of > deep learning approaches for anomaly detection. Those approaches which do exist involve networks trained to perform > a task other than anomaly detection, namely generative models or compression, which are in turn adapted for use in > anomaly detection; they are not trained on an anomaly detection based objective. The adaptation to the deep regime necessitates that our neural network and training procedure satisfy > certain properties, which we demonstrate theoretically. We show the effectiveness of our method

on MNIST and > CIFAR-10 image benchmark datasets as well as on the detection of adversarial examples of GTSRB stop signs. Installation This code is written in and requires the packages listed in . Clone the repository to your local machine and directory of choice: To run the code, we recommend setting up a virtual environment, e. using or : Running experiments We currently have implemented the MNIST ( and CIFAR-10 ( datasets and simple LeNet-type networks. Have a look into for

all possible arguments and options. MNIST example This example trains a One-Class Deep SVDD model where digit 3 ( ) is considered to be the normal class. Autoencoder pretraining is used for parameter initialization. CIFAR-10 example This example trains a One-Class Deep SVDD model where cats ( ) is considered to be the normal class. Autoencoder pretraining is used for parameter initialization. Examples MNIST Example of the 32 most normal (left) and 32 most anomalous (right) test set examples per class

on MNIST according to Deep SVDD anomaly scores. CIFAR-10 Example of the 32 most normal (left) and 32 most anomalous (right) test set examples per class on CIFAR-10 according to Deep SVDD anomaly scores.

Frequently asked questions

How many stars and forks are recorded?

lukasruff/Deep-SVDD-PyTorch has 789 stars and 211 forks.

What is the repository rank?

lukasruff/Deep-SVDD-PyTorch is ranked 13,808.

What language and category are recorded?

lukasruff/Deep-SVDD-PyTorch has 789 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

lukasruff/Deep-SVDD-PyTorch is compared with lucidrains/phenaki-pytorch, ranked 13,807 with 789 stars.

README

PyTorch Implementation of Deep SVDD

This repository provides a PyTorch implementation of the Deep SVDD method presented in our ICML 2018 paper ”Deep One-Class Classification”.

Citation and Contact

You find a PDF of the Deep One-Class Classification ICML 2018 paper at http://proceedings.mlr.press/v80/ruff18a.html.

If you use our work, please also cite the paper:

@InProceedings{pmlr-v80-ruff18a,
  title     = {Deep One-Class Classification},
  author    = {Ruff, Lukas and Vandermeulen, Robert A. and G{\"o}rnitz, Nico and Deecke, Lucas and Siddiqui, Shoaib A. and Binder, Alexander and M{\"u}ller, Emmanuel and Kloft, Marius},
  booktitle = {Proceedings of the 35th International Conference on Machine Learning},
  pages     = {4393--4402},
  year      = {2018},
  volume    = {80},
}

If you would like to get in touch, please contact contact@lukasruff.com.

Abstract

Despite the great advances made by deep learning in many machine learning problems, there is a relative dearth of deep learning approaches for anomaly detection. Those approaches which do exist involve networks trained to perform a task other than anomaly detection, namely generative models or compression, which are in turn adapted for use in anomaly detection; they are not trained on an anomaly detection based objective. In this paper we introduce a new anomaly detection method—Deep Support Vector Data Description—, which is trained on an anomaly detection based objective. The adaptation to the deep regime necessitates that our neural network and training procedure satisfy certain properties, which we demonstrate theoretically. We show the effectiveness of our method on MNIST and CIFAR-10 image benchmark datasets as well as on the detection of adversarial examples of GTSRB stop signs.

Installation

This code is written in Python 3.7 and requires the packages listed in requirements.txt.

Clone the repository to your local machine and directory of choice:

git clone https://github.com/lukasruff/Deep-SVDD-PyTorch.git

To run the code, we recommend setting up a virtual environment, e.g. using virtualenv or conda:

virtualenv

# pip install virtualenv
cd 
virtualenv myenv
source myenv/bin/activate
pip install -r requirements.txt

conda

cd 
conda create --name myenv
source activate myenv
while read requirement; do conda install -n myenv --yes $requirement; done < requirements.txt

Running experiments

We currently have implemented the MNIST (http://yann.lecun.com/exdb/mnist/) and CIFAR-10 (https://www.cs.toronto.edu/~kriz/cifar.html) datasets and simple LeNet-type networks.

Have a look into main.py for all possible arguments and options.

MNIST example

cd 

# activate virtual environment
source myenv/bin/activate  # or 'source activate myenv' for conda

# create folder for experimental output
mkdir log/mnist_test

# change to source directory
cd src

# run experiment
python main.py mnist mnist_LeNet ../log/mnist_test ../data --objective one-class --lr 0.0001 --n_epochs 150 --lr_milestone 50 --batch_size 200 --weight_decay 0.5e-6 --pretrain True --ae_lr 0.0001 --ae_n_epochs 150 --ae_lr_milestone 50 --ae_batch_size 200 --ae_weight_decay 0.5e-3 --normal_class 3;

This example trains a One-Class Deep SVDD model where digit 3 (--normal_class 3) is considered to be the normal class. Autoencoder pretraining is used for parameter initialization.

CIFAR-10 example

cd 

# activate virtual environment
source myenv/bin/activate  # or 'source activate myenv' for conda

# create folder for experimental output
mkdir log/cifar10_test

# change to source directory
cd src

# run experiment
python main.py cifar10 cifar10_LeNet ../log/cifar10_test ../data --objective one-class --lr 0.0001 --n_epochs 150 --lr_milestone 50 --batch_size 200 --weight_decay 0.5e-6 --pretrain True --ae_lr 0.0001 --ae_n_epochs 350 --ae_lr_milestone 250 --ae_batch_size 200 --ae_weight_decay 0.5e-6 --normal_class 3;

This example trains a One-Class Deep SVDD model where cats (--normal_class 3) is considered to be the normal class. Autoencoder pretraining is used for parameter initialization.

Examples

MNIST

Example of the 32 most normal (left) and 32 most anomalous (right) test set examples per class on MNIST according to Deep SVDD anomaly scores.

CIFAR-10

Example of the 32 most normal (left) and 32 most anomalous (right) test set examples per class on CIFAR-10 according to Deep SVDD anomaly scores.

License

MIT

Nearby in the ranking
Similar items