Learning Perceptually-Aligned Representations via Adversarial Robustness

Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Brandon Tran, Aleksander MadryarXiv 2019

Abstract

An important goal in deep learning is to learn versatile, high-level feature representations of input data. However, standard networks' representations seem to possess shortcomings that prevent them from fully realizing this goal. In this work, we show that robust optimization can be re-cast as a tool for enforcing priors on the features learned by deep neural networks. It turns out that representations learned by robust models address the aforementioned shortcomings and make significant progress towards learning a high-level encoding of inputs. In particular, these representations are approximately invertible, while allowing for direct visualization and manipulation of salient input features. More broadly, our results indicate adversarial robustness as a promising avenue for improving learned representations.

The Misalignment of Standard Representations

A central ambition of deep learning is the extraction of "high-level" features—internal representations that correspond to human-understandable concepts like shapes, textures, or specific objects. Ideally, the distance between two images in a network's feature space should reflect their semantic similarity to a human observer.

However, standard neural networks trained via Empirical Risk Minimization (ERM) exhibit a profound misalignment. It is possible to take an image of a dog and, through minor gradient-based adjustments, create an image that looks like a truck to a human but is represented identically to the dog by the network. This suggests that standard models rely on "non-robust" features—high-frequency patterns that are highly predictive for classification but entirely alien to human perception.

Adversarial Robustness as a Feature Prior

This paper proposes that robust optimization (adversarial training) serves as a powerful prior for feature learning. By training a model to be invariant to small $L_2$-norm bounded perturbations, we effectively strip away its ability to utilize non-robust, high-frequency features. To maintain high accuracy, the model is forced to rely on macroscopic, robust features that are inherently more aligned with human vision.

We compare standard models against those trained using Projected Gradient Descent (PGD) to resist adversarial attacks. Our findings suggest that robustness is not merely a security property, but a fundamental shift in how the network perceives the world.

Invertibility and Semantic Alignment

One of the most striking properties of robust representations is their approximate invertibility. In a standard model, attempting to find an image that matches a specific internal representation typically results in uninterpretable noise. In contrast, robust models exhibit a strong link between feature proximity and semantic similarity.

Representation inversion: an image optimized to match the internal representation of a target dog image in a robust model.

When we optimize an input to match the representation of a target image in a robust model, the resulting image actually morphs to look like the target. This indicates that the robust representation space is structured around human-meaningful visual concepts.

Direct Feature Visualization and Manipulation

Because robust features are perceptually aligned, we can visualize and manipulate them directly. In standard models, maximizing the activation of a specific neuron requires complex regularization (like jittering or total variation penalties) to produce a legible image. In robust models, raw gradient ascent on a neuron—without any regularization—yields clear semantic concepts such as animal faces, limbs, or textures.

This capability extends to image manipulation. By identifying a neuron that encodes a specific feature (e.g., "stripes") and maximizing its activation within a real image, we can semantically alter that image in a controlled manner.

Semantic manipulation: adding tiger-like stripes to an image by maximizing a specific neuron in the robust representation space.

Conclusion

Adversarial robustness provides a promising framework for aligning machine representations with human perception. While there remains a trade-off between standard accuracy and robustness, the resulting models offer unprecedented interpretability and ease of manipulation. By viewing robust optimization as a tool for enforcing user-specified priors, we can develop AI systems that are fundamentally more compatible with human-centric tasks and interactions.

Summary updated

BibTeX
@misc{engstrom2019learning,
  author = {Logan Engstrom and Andrew Ilyas and Shibani Santurkar and Dimitris Tsipras and Brandon Tran and Aleksander Madry},
  title = {{Learning Perceptually-Aligned Representations via Adversarial Robustness}},
  year = {2019},
  eprint = {1906.00945},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.00945},
}
Figure