Image Classification
Transformers
Safetensors
nula
computer-vision
cnn
cifar10
adversarial-robustness
stress-test
downsampling
anti-aliasing
custom_code
Instructions to use MamaPearl/nula-cifar10-robust-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MamaPearl/nula-cifar10-robust-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="MamaPearl/nula-cifar10-robust-v0", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("MamaPearl/nula-cifar10-robust-v0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -36,26 +36,8 @@ NULA explicitly targets robustness to operators that change the sampling structu
|
|
| 36 |
|
| 37 |
## Problem
|
| 38 |
|
| 39 |
-
Downsampling operations are linear maps
|
| 40 |
-
|
| 41 |
-
By the Rank-Nullity theorem, this matrix has a massive NULL space.
|
| 42 |
-
|
| 43 |
-
An attacker can exploit this: they utilize the discarded samples of these downsampling operations as extra degrees of freedom.
|
| 44 |
-
|
| 45 |
-
By sculpting perturbations with components in the null space of the downsampling operator, they spread energy across frequencies that are discarded during striding.
|
| 46 |
-
|
| 47 |
-
The result is an image perceptually identical to the original, with a manipulated activation pattern.
|
| 48 |
-
|
| 49 |
-
We introduce three augmentations.
|
| 50 |
-
|
| 51 |
-
<div align="center">
|
| 52 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6921e98c32171f09bfa0329a/ALG2BPCYeXIxeTjYfcIsl.png" alt="perturbation examples" width="800">
|
| 53 |
-
<p style="max-width: 600px; margin: 10px auto 0; line-height: 1.6;">
|
| 54 |
-
<em><b>Fig 1. STOCHASTIC RESOLUTION-DEGRADING TRANSFORMATIONS</b><br>
|
| 55 |
-
From left to right: <b>Clean</b> (32x32), <b>Bilinear Resize</b> (8x8), <b>Hard Decimation</b> (stride-2), and <b>Checkerboard Aliasing</b> (high-freq injection).<br>
|
| 56 |
-
These operations expose the vulnerabilities in standard feature extractors.</em>
|
| 57 |
-
</p>
|
| 58 |
-
</div>
|
| 59 |
|
| 60 |
<div align="center">
|
| 61 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6921e98c32171f09bfa0329a/yd6VfVPW9e1Hqj7LRWTwU.png" alt="nula adversarial analysis" width="800">
|
|
@@ -65,6 +47,20 @@ We introduce three augmentations.
|
|
| 65 |
</p>
|
| 66 |
</div>
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
## Approach
|
| 69 |
|
| 70 |
### Anti-aliased Downsampling (BlurPool)
|
|
|
|
| 36 |
|
| 37 |
## Problem
|
| 38 |
|
| 39 |
+
Downsampling operations are linear maps that perform a many-to-one mapping. Information is destroyed, and the
|
| 40 |
+
### Checkerboard Attack
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
<div align="center">
|
| 43 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6921e98c32171f09bfa0329a/yd6VfVPW9e1Hqj7LRWTwU.png" alt="nula adversarial analysis" width="800">
|
|
|
|
| 47 |
</p>
|
| 48 |
</div>
|
| 49 |
|
| 50 |
+
δ[i, j] = ε · (-1)^(i+j)
|
| 51 |
+
|
| 52 |
+
This is a Nyquist injection — the highest spatial frequency representable on a discrete grid. Under stride-2 subsampling S_2:
|
| 53 |
+
|
| 54 |
+
(S₂ δ)[i, j] = δ[2i, 2j] = ε · (-1)^(2i+2j) = ε · 1 = ε
|
| 55 |
+
|
| 56 |
+
The subsampled result is a constant.
|
| 57 |
+
|
| 58 |
+
the checkerboard pattern is completely collapsed to a DC offset and loses all adversarial structure.
|
| 59 |
+
This proves δ ∈ ker(S₂ - εI), meaning the perturbation lies in the null space of the centered stride-2 operator.
|
| 60 |
+
Modern convolutional networks would never even see the attack.
|
| 61 |
+
|
| 62 |
+
The result is an image perceptually identical to the original, with a manipulated activation pattern upstream of the first downsampling operation.
|
| 63 |
+
|
| 64 |
## Approach
|
| 65 |
|
| 66 |
### Anti-aliased Downsampling (BlurPool)
|