TL;DR
Practical machine learning systems don't operate in isolation; they rely on upstream preprocessing like image scaling to resize inputs. This paper reveals that attackers can jointly exploit vulnerabilities in both the image-scaling algorithm and the downstream ML model, significantly boosting the efficiency of decision-based black-box attacks while rendering four out of five state-of-the-art scaling defenses completely ineffective.
What Problem Does This Paper Address?
Most computer vision models accept images of a fixed size (e.g., $224 \times 224$ pixels for ResNet). Because real-world images come in all dimensions, production ML pipelines use an upstream scaling algorithm to downsample images before feeding them to the model.
Prior research treated the vulnerabilities of these two components separately:
- Adversarial Attacks: Focused purely on manipulating the standalone ML model.
- Image-Scaling Attacks: Focused on manipulating the scaling algorithm to hide a completely different target image inside a high-resolution image.
However, standard image-scaling attacks are easily blocked by simple preprocessing defenses (like median filtering). This paper looks at the system as a whole. The authors investigate a more dangerous, unified threat model: Can an attacker jointly exploit the scaling function and the ML model in a strict decision-based black-box setting (where the attacker can only see the final predicted label, without confidence scores)?
Methods
The authors introduce a novel, plug-and-play technique called Scaling-aware Noise Sampling (SNS).
In a typical decision-based black-box attack, the attacker iteratively samples random noise to estimate the model's gradient near the decision boundary. Doing this naively in the high-resolution (HR) space is highly inefficient because most random noise gets washed out or distorted during downscaling.
SNS flips this approach:
- Low-Resolution Sampling: Noise is sampled directly in the low-resolution (LR) post-scaling space.
- Backward Projection: The noise is projected back into the HR space using a mathematically efficient gradient approximation of the scaling function.
This ensures that the generated noise aligns perfectly with the subspace that survives the downscaling process, guiding the attack along the path of least resistance.
Circumventing Defenses
The authors also designed methods to bypass popular image-scaling defenses:
- Bypassing Median Filtering: Median filters are non-differentiable and robust to outliers, which normally stalls black-box line searches. The authors circumvented this by introducing a "trimmed and weighted average" function in the backward pass to provide smooth, useful gradient estimations.
- Evading Detection Defenses: Existing defenses detect scaling attacks by looking for high-frequency artifacts or measuring structural distortions (MSE/SSIM) after up-and-down scaling. Because SNS embeds tiny adversarial perturbations rather than an entire hidden image, the resulting high-resolution images show no anomalous frequency peaks or statistical distortions.
Datasets
The approach was evaluated using:
- ImageNet: 1,000 randomly selected images scaled down to $672 \times 672$ to attack a pre-trained ResNet-50 model.
- CelebA: 1,000 face images scaled to $672 \times 672$ to attack a ResNet-34 model predicting the "Mouth Slightly Open" attribute.
- Tencent Image Analysis API: A real-world commercial cloud API used to validate the practical threat of the attack.
Key Insights and Ideas
- System Vulnerabilities are Multiplicative: Defending a single component (the scaler) against a specific threat (image-hiding) does not secure the system. The interplay between a benign scaler and an ML model creates a brand-new vulnerability subspace.
- Subspace Alignment Beats Brute Force: By forcing the black-box attack's search noise to live within the post-scaling subspace, the query efficiency of the attack skyrockets.
- The Weakness of Median Filters: Median filters excel at removing the large pixel deviations required to hide an entire alternative image. However, they fail against adversarial perturbations because the required pixel shifts to alter an ML model's boundary decision are incredibly subtle.
Key Results
The scaling-aware approach drastically outperformed standard low-resolution primitives across the board:
- Higher Success Rates with Fewer Queries: On the CelebA dataset with a 10K query budget, the high-resolution HSJ attack achieved a 59.6% Attack Success Rate (ASR) at an $\ell_2$ threshold of 2.0, compared to just 10.8% ASR for the standard low-resolution attack.
- Defense Circumvention: The authors successfully bypassed 4 out of 5 state-of-the-art scaling defenses (Median filtering, Unscaling, Min-filtering, and Centered Spectrum detection). Only the Randomized Filtering defense remained robust, as it mathematically forces the scaling operation to be uniform in expectation.
- Real-World Impact: When tested against the commercial Tencent Cloud API, the scaling-aware HR-HSJ attack achieved a 51.7% ASR within 3K queries, compared to only 21.8% for the baseline attack.
Limitations and Future Work
The current formulation of SNS focuses strictly on attacks that estimate gradients to optimize for the $\ell_2$ norm. It is not directly applicable to $\ell_\infty$ norm attacks (like RayS), because the vulnerability of scaling algorithms primarily alters perceptual quality rather than bounding absolute pixel magnitudes.
The authors note that future work should explore how other common pipeline components (like JPEG compression or color space conversions) interact with model vulnerabilities, and call for the development of end-to-end, robust-by-design scaling algorithms rather than superficial add-on defenses.
Summary updated