Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.
| Date | Stars |
|---|---|
| 2026-07-31 | 945 |
| 2026-08-05 | 945 |
| 2026-08-06 | 945 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
robustness package
==================
Install via ``pip``: ``pip install robustness``
Read the docs: https://robustness.readthedocs.io/en/latest/index.html
``robustness`` is a package we (students in the `MadryLab <http://madry-lab.ml>`_) created
to make training, evaluating, and exploring neural networks flexible and easy.
We use it in almost all of our projects (whether they involve
adversarial training or not!) and it will be a dependency in many of our
upcoming code releases. A few projects using the library include:
- `Code for "Learning Perceptually-Aligned Representations via Adversarial Robustness" <https://github.com/MadryLab/robust_representations>`_ (https://arxiv.org/abs/1906.00945)
- `Code for
"Image Synthesis with a Single (Robust) Classifier" <https://github.com/MadryLab/robustness_applications>`_ (https://arxiv.org/abs/1906.09453)
- `Code for
"Do Adversarially Robust ImageNet Models Transfer Better?" <https://github.com/microsoft/robust-models-transfer>`_ (https://arxiv.org/abs/2007.08489)
- `Code for
"BREEDS: Benchmarks for Subpopulation Shift"
<https://github.com/MadryLab/BREEDS-Benchmarks>`_ (https://arxiv.org/abs/2008.04859)
- `Code for
"Certified Patch Robustness via Smoothed Vision Transformers." <https://github.com/MadryLab/smoothed-vit>`_ (https://arxiv.org/abs/2110.07719)
- `Code for
"Unadversarial Examples: Designing Objects for Robust Vision." <https://github.com/microsoft/unadversarial>`_ (https://arxiv.org/abs/2012.12235)
We
demonstrate how to use the library in a set of walkthroughs and our API
reference. Functionality provided by the library includes:
- Training and evaluating standard and robust models for a variety of
datasets/architectures using a `CLI interface
<https://robustness.readthedocs.io/en/latest/example_usage/cli_usage.html>`_. The library also provides support for adding
`custom datasets <https://robustness.readthedocs.io/en/latest/example_usage/training_lib_part_2.html#training-on-custom-datasets>`_ and `model architectures <https://robustness.readthedocs.io/en/latest/example_usage/training_lib_part_2.html#training-with-custom-architectures>`_.
.. code-block:: bash
python -m robustness.main --dataset cifar --data /path/to/cifar \
--adv-train 0 --arch resnet18 --out-dir /logs/checkpoints/dir/
- Performing `input manipulation
<https://robustness.readthedocs.io/en/latest/example_usage/input_space_manipulation.html>`_ using robust (or standard)
models---this includes making adversarial examples, inverting representations,
feature visualization, etc. The library offers a variety of optimization
options (e.g. choice between real/estimated gradients, Fourier/pixel basis,
custom loss functions etc.), and is easily extendable.
.. code-block:: python
import torch as ch
from robustness.datasets import CIFAR
from robustness.model_utils import make_and_restore_model
ds = CIFAR('/path/to/cifar')
model, _ = make_and_restore_model(arch='resnet50', dataset=ds,
resume_path='/path/to/model', state_dict_path='model')
model.eval()
attack_kwargs = {
'constraint': 'inf', # L-inf PGD
'eps': 0.05, # Epsilon constraint (L-inf norm)
'step_size': 0.01, # Learning rate for PGD
'iterations': 100, # Number of PGD steps
'targeted': True # Targeted attack
'custom_loss': None # Use default cross-entropy loss
}
_, test_loader = ds.make_loaders(workers=0, batch_size=10)
im, label = next(iter(test_loader))
target_label = (label + ch.randint_like(label, high=9)) % 10
adv_out, adv_im = model(im, target_label, make_adv, **attack_kwargs)
- Importing ``robustness`` as a package, which allows for easy training of
neural networks with support for custom loss functions, logging, data loading,
and more! A good introduction can be found in our two-part walkthrough
(`Part 1 <https://robustness.readthedocs.io/en/latest/example_usage/training_lib_part_1.html>`_,
`Part 2 <https://Excerpt of 12,732 characters
Read on GitHub60
27
Hadi Salman · OpenAI · United States
24
Dimitris Tsipras
7
Kristian Georgiev · OpenAI · United States
4
3
3
1
1
Joshua Adelman · United States
1
1
Jakub Kaczmarzyk · Stony Brook Medicine · United States
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:5e28d2b6d1d2c64b, llm:Repository description: 'A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.' (MadryLab/robustness)
matched fp:5e28d2b6d1d2c64b, llm:Repository description: 'A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.' (MadryLab/robustness)
matched fp:5e28d2b6d1d2c64b, llm:Repository description: 'A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.' (MadryLab/robustness)