Introduction
In deep learning, optimization typically focuses on the weights of a neural network. However, a significant class of problems requires optimizing the input itself. This process, known as input optimization, is fundamental to generating adversarial examples, searching latent spaces in generative models, and refining actions in Reinforcement Learning (RL).
For networks utilizing Rectified Linear Unit (ReLU) activations, input optimization is notoriously difficult. This paper introduces Activation-Descent Regularization (ADR), a novel framework designed to overcome the "polytope barrier" that often traps standard gradient-based methods in suboptimal regions of the input space.
The Problem: The Polytope Barrier
A ReLU network effectively partitions the input space into a massive collection of convex regions called polytopes. Within each polytope, the network behaves as a simple linear function. Standard Gradient Descent (GD) only utilizes the gradient of the current region; it lacks the foresight to determine if crossing a boundary into a neighboring polytope would yield a better global solution.
Consequently, GD often gets stuck in local optima or exhibits unpredictable "jumps" when an input change flips a neuron's state from off to on. This piecewise-linear landscape makes finding the true global optimum for inputs a significant challenge for traditional first-order methods.
Methods: Activation-Descent Regularization (ADR)
The authors propose a dual-optimization strategy that treats the discrete activation patterns of the network as continuous, differentiable variables. Instead of solely updating the input $x$, ADR introduces a set of continuous variables $\eta$ representing the "activation pattern" (the state of each neuron).
1. Sigmoid Surrogate
To make the discrete nature of ReLUs tractable for optimization, the authors replace the hard on/off switch with a differentiable sigmoid surrogate. This allows the calculation of gradients with respect to the activation pattern itself, enabling the optimizer to "look ahead" at potential state changes.
2. The ADR Objective
The method formulates a new objective function, $L^*$, which balances the original task (e.g., maximizing classification loss for an adversarial attack) with a feasibility constraint. This constraint penalizes any inconsistency between the input $x$ and the targeted activation pattern $\eta$, ensuring that the final solution remains a valid input for the network.
3. ADR-GD Algorithm
The optimization is performed using ADR-GD, a primal-dual descent algorithm that updates both $x$ and $\eta$ simultaneously. To prevent the system from getting stuck in saddle points within the activation space, the authors employ Perturbed Gradient Descent on the $\eta$ variables.
4. Layer-wise Normalization
A critical component of the framework is the normalization of constraints based on the hyperplane normal vectors of the neurons. Without this normalization, gradients from deeper layers—which can vary wildly in magnitude—tend to either vanish or explode, causing the optimization to fail on deep architectures.
Experimental Evaluation
The authors evaluated ADR-GD across several diverse domains to demonstrate its versatility and effectiveness:
- Adversarial Attacks: Tested on MNIST, CIFAR-10, and ImageNet against "robust" models specifically trained to resist attacks.
- Reinforcement Learning (Action Refinement): Applied to MuJoCo environments (Ant-v3, HalfCheetah-v3, Walker2d-v2) to refine agent actions during training.
- Policy Attacks: Evaluated on Procgen environments (FruitBot and CoinRun).
Key Results
- Superior Attack Success: On robust models, ADR-GD significantly outperformed standard methods. For instance, on a robust MNIST model, the standard Projected Gradient Descent (PGD) attack achieved only a 4.92% success rate, whereas ADR-GD reached 27.93%.
- Enhanced RL Performance: In the Ant-v3 environment, where DDPG agents typically plateau at a reward of 1,000, ADR-based action refinement pushed the reward to nearly 2,000.
- Scalability: Although ADR-GD is approximately 10x slower per iteration than standard GD due to the additional variables, its computational cost scales linearly with network size. This makes it practical for large-scale models such as Wide ResNet-50.
Discussion and Insights
The core innovation of ADR is the shift from asking "how should I change $x$?" to "which neurons should be active to reach the goal?" By optimizing the "intent" (the activation pattern) directly, the algorithm can discover promising regions of the input space that are invisible to standard gradients.
ADR-GD effectively "tunnels" through the boundaries of ReLU polytopes by temporarily allowing the input and the activation pattern to be slightly inconsistent during the search process. This flexibility allows the optimizer to traverse the complex landscape more effectively than methods constrained to the current local linear region.
Limitations and Future Work
While ADR-GD provides a powerful tool for input optimization, it comes with a higher per-iteration computational overhead compared to standard PGD. Additionally, while empirical results are robust, further formal theoretical analysis of convergence complexity is required. Finally, while the current framework is tailored for ReLU-like piecewise linear activations, extending these principles to other non-linearities like GeLU or Swish remains a promising avenue for future research.
Summary updated