TL;DR
Existing decision-based adversarial attacks measure cost by the total number of queries made to a black-box model, ignoring the fact that real security systems heavily penalize “flagged” (malicious) inputs with rate limits or account bans. By reframing boundary search as an "egg-dropping problem," this paper develops stealthy attacks that trade off cheap benign queries to reduce costly flagged queries by 1.5× to 7.3×.
What Problem Does This Paper Address?
Decision-based black-box attacks craft adversarial examples by querying a classifier and observing only the final discrete label. Historically, attacks like Boundary Attack, HopSkipJump, OPT, and RayS have competed on a single metric: total query count.
However, in real-world security applications (such as malware detection, copyright filtering, or NSFW content moderation), query costs are asymmetric:
- Non-flagged queries (benign inputs) carry virtually zero marginal cost (e.g., social networks allow users to upload thousands of photos without restriction).
- Flagged queries (inputs identified as bad or prohibited) trigger severe penalties, including CAPTCHAs, account throttling, or permanent bans.
The authors show that standard attacks issue over 50% flagged queries. If an online platform bans an account after 5–10 flagged violations, traditional decision-based attacks will be terminated long before discovering an adversarial example.
Methods
The authors formalize an asymmetric cost objective: $$\text{minimize cost} := Q_{\text{total}} \cdot c_0 + Q_{\text{flagged}} \cdot c_{\text{flagged}} \quad (c_{\text{flagged}} \gg c_0)$$
To minimize $Q_{\text{flagged}}$, they analyze how decision-based attacks spend queries across two subroutines: checkAdv (checking if a single perturbation crosses the boundary) and getDist (measuring distance to the boundary along a direction):
- The Egg-Dropping Analogy: Finding the decision boundary along a ray with tolerance $\eta$ is equivalent to finding the highest floor from which an egg can be dropped without breaking. Standard binary search drops eggs in the middle of intervals, breaking them frequently (~50% flagged queries). Instead:
- A 1-stage line search (stepping gradually from safe/benign space toward the boundary) identifies the boundary with exactly one broken egg (one flagged query), at the expense of $1/\eta$ benign queries.
- A $k$-stage line search (coarse steps followed by fine steps) balances the tradeoff, requiring $k$ flagged queries and $\mathcal{O}(k \cdot (1/\eta)^{1/k})$ total queries.
- Early Stopping: In greedy search directions (e.g., RayS), if a new direction reduces distance by a threshold factor $\gamma$ (e.g., $\gamma = 0.9$), the attack halts the line search before hitting the boundary, often incurring zero flagged queries.
- Stealthy Gradient Estimation: While prior work favored sign-based gradient estimators (
checkAdv) because they use fewer total queries, the authors prove theoretically that OPT’s distance-based gradient estimator (getDist) with line searches achieves a factor of $d^2$ fewer flagged queries asymptotically.
Using these insights, they construct Stealthy RayS ($\ell_\infty$), Stealthy OPT ($\ell_2$), Stealthy Sign-OPT ($\ell_2$), and a hybrid Stealthy HSJA ($\ell_2$) that plugs OPT's gradient estimator into HopSkipJump.
Datasets
- ImageNet: Standard 1,000-class benchmark evaluated on a pre-trained ResNet-50.
- ImageNet-Dogs: A binary classification task created by grouping 118 ImageNet dog breeds as "flagged" and other classes as "non-flagged," evaluated on a fine-tuned ResNet-50.
- ImageNet-NSFW: A subset of 1,000 ImageNet validation images identified as NSFW with high confidence by a CLIP-based safety filter (used in LAION-5B).
- Commercial Black-Box NSFW Detector: A deployed commercial API evaluating 200 samples from ImageNet-NSFW, which outputs likelihood scores from 1 to 5 (scores 4–5 treated as flagged).
Key Insights and Ideas
- Older, "inefficient" attacks can be stealthier: OPT was widely superseded by Sign-OPT and HopSkipJump because it requires far more total queries. However, because OPT uses
getDistrather thancheckAdv, its boundary calls can be converted into line searches where almost all queries are benign. As a result, Stealthy OPT requires significantly fewer flagged queries than standard HopSkipJump. checkAdvis inherently unstealthy: Sampling random directions around the decision boundary leaks only ~2 bits of information per flagged query. In contrast, a line-searchgetDistextracts $\log(1/\eta)$ bits of boundary information for just one flagged query.- Real-world image quantization hurts boundary attacks: Commercial APIs expect 8-bit RGB integers, meaning step sizes cannot be arbitrarily small ($\eta \ge 1/255$). Stealthy black-box attacks must account for this discretization.
Key Results
- $\ell_\infty$ Evasion (Stealthy RayS): Achieved a target perturbation $\epsilon = 8/255$ on ImageNet with 2.1–2.4× fewer flagged queries than RayS and 7–17× fewer than HopSkipJump, incurring only a 2.1–3.4× increase in total queries.
- Commercial NSFW API: Evaded a commercial detector at $\epsilon = 32/255$ with 2.2× fewer flagged queries (79 vs. 172). Under moderation policies similar to Meta's (~7 violations before major restrictions), a non-stealthy attacker would need ~25 accounts, whereas Stealthy RayS required only ~12.
- $\ell_2$ Evasion: Stealthy OPT reduced flagged queries by 7.3× over standard OPT and 1.4× over HopSkipJump on ImageNet. Stealthy HSJA achieved the fewest flagged queries overall (1.47–1.82× reduction vs. HopSkipJump).
Limitations and Future Work
- High Benign Query Overhead in $\ell_2$: Achieving state-of-the-art stealth in $\ell_2$ required a 350× to 1,400× increase in benign queries. This is cost-effective only when $c_{\text{flagged}} / c_0 \ge 10^3$.
- Stateful Query Detection: The proposed threat model evades content-based flags, but does not defend against systems that detect attacks by monitoring anomaly patterns in query sequences or overall API call volume.
- Open Problem: The authors retrofit existing attacks; designing decision-based attacks from scratch tailored explicitly to asymmetric query costs remains an open challenge.
Summary updated