A Sublinear Adversarial Training Algorithm

Yeqi Gao, Lianke Qin, Zhao Song, Yitan Wang

Adversarial training (AT) is a cornerstone strategy for fortifying neural networks against adversarial perturbations—small, intentional input changes designed to induce misclassification. However, the computational overhead of AT is a significant bottleneck. This paper introduces a "Fast Adversarial Training" algorithm that reduces the per-iteration time complexity from the standard $\Omega(mnd)$ to a sublinear $o(mnd)$ for wide neural networks. By combining a modified ReLU activation function with high-dimensional geometric data structures, the authors provide a rigorous theoretical foundation for achieving robust convergence in sublinear time.

The Computational Bottleneck

Standard adversarial training operates as a min-max game: an adversary maximizes the loss by perturbing inputs, while the model minimizes that loss by updating its weights. For a network of width $m$, trained on $n$ samples in $d$ dimensions, each iteration requires full forward and backward passes, incurring an $\Omega(mnd)$ time cost. As models scale in width to improve performance, this linear dependence becomes prohibitive.

While techniques like Locality-Sensitive Hashing (LSH) have accelerated standard training, adapting them to the worst-case demands of adversarial training without losing convergence guarantees has remained a major theoretical hurdle.

Methodology: Achieving Sublinear Complexity

The authors overcome this bottleneck through three key technical innovations:

  1. Shifted ReLU Activation: Instead of the standard ReLU function ($\max(0, x)$), the network employs a shifted variant: $\sigma_\tau(x) = \mathbb{1}[x > \tau] \cdot x$. By strategically setting the threshold $\tau$, the authors ensure that only a sublinear fraction of neurons ($o(m)$) activates for any given input. This "sparsity by design" forms the basis of the computational speedup.
  2. Half-Space Reporting (HSR): Identifying active neurons is framed as a geometric problem: finding weight vectors $w$ that satisfy the linear inequality $\langle w, x \rangle + b > \tau$. Rather than evaluating every neuron via brute force, the algorithm utilizes a Half-Space Reporting data structure to query and retrieve only the active neurons in $o(m)$ time.
  3. Pseudo-Network Analysis: To establish convergence guarantees, the authors utilize a "pseudo-network" framework. They demonstrate that in the over-parameterized regime, the training dynamics of this sparse, shifted-ReLU network closely track a linear approximation (rooted in Neural Tangent Kernel theory), ensuring a robust solution.

Key Insights and Theoretical Framework

As a primarily theoretical work, the paper focuses on proving time complexity bounds and convergence guarantees rather than empirical benchmarking on standard datasets like CIFAR-10 or ImageNet. The analysis yields several critical insights:

  • Sparsity is Sufficient: The findings prove that updating only a small fraction of neurons in a wide network during an adversarial training step is sufficient for convergence.
  • Geometric Efficiency: Framing neuron activation as a half-space query successfully bridges deep learning theory and computational geometry.
  • Stability of the Active Set: A crucial component of the proof shows that the set of active neurons remains relatively stable between iterations. This stability allows the HSR data structure to be updated efficiently rather than rebuilt from scratch.
  • Leveraging Over-parameterization: Wide networks behave predictably at initialization, allowing the threshold $\tau$ to guarantee sparsity without compromising the model's capacity to learn the target function.

Main Results

The theoretical analysis culminates in three primary results:

  • Sublinear Time Complexity: The proposed algorithm achieves an expected time cost per iteration of $\tilde{O}(m^{1-\Theta(1/d)}nd)$, strictly improving upon the standard linear dependence on network width $m$.
  • Convergence Guarantee: The authors provide a formal proof that the algorithm converges to a small robust training loss, assuming sufficient network width ($m \ge \text{poly}(n)$).
  • Activation Bound: The paper rigorously proves that only $o(m)$ neurons are activated per input per iteration, validating the efficiency of the HSR data structure.

Limitations and Future Directions

While theoretically robust, the framework has several limitations that present opportunities for future research:

  • Architectural Constraints: The current proofs apply exclusively to two-layer fully connected networks. Extending these guarantees to deep architectures, such as CNNs or Transformers, remains an open challenge.
  • Dimensionality Dependence: The speedup factor includes $1/d$ in the exponent, meaning the efficiency gains of the HSR data structure may diminish as the input dimension $d$ grows exceptionally large.
  • Extreme Over-parameterization: The theoretical guarantees require the network width $m$ to be a large polynomial of $n$, which often exceeds the widths used in practical engineering.
  • Empirical Validation: The paper does not provide wall-clock speedup measurements on modern hardware (e.g., GPUs), where the overhead of maintaining complex data structures might compete with the highly optimized throughput of dense matrix multiplications.

Summary updated

BibTeX
@inproceedings{gao2024sublinear,
  author = {Yeqi Gao and Lianke Qin and Zhao Song and Yitan Wang},
  title = {{A Sublinear Adversarial Training Algorithm}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=N2WchST43h},
}
Figure