Landscape Learning for Neural Network Inversion

Ruoshi Liu, Chengzhi Mao, Purva Tendulkar, Hao Wang, Carl VondrickICCV 2022

Abstract

Many machine learning methods operate by inverting a neural network at inference time, which has become a popular technique for solving inverse problems in computer vision, robotics, and graphics. However, these methods often involve gradient descent through a highly non-convex loss landscape, causing the optimization process to be unstable and slow. We introduce a method that learns a loss landscape where gradient descent is efficient, bringing massive improvement and acceleration to the inversion process. We demonstrate this advantage on a number of methods for both generative and discriminative tasks, including GAN inversion, adversarial defense, and 3D human pose reconstruction.

Introduction

Neural Network Inversion is a cornerstone of modern computer vision. Instead of a standard forward pass, inversion involves finding an input that produces a specific target output. This process, known as Optimization-Based Inference (OBI), is valued for its flexibility; it can adapt to new tasks or missing data without requiring a specialized, pre-trained encoder.

However, OBI faces a significant bottleneck: the loss landscapes of standard neural networks are often highly non-convex, characterized by sharp spikes and numerous local minima. Navigating this "messy" space typically requires hundreds of iterations of gradient descent, making it too slow for real-time applications and prone to instability. This paper proposes a novel framework to "re-engineer" these landscapes, transforming difficult search spaces into smooth, easily optimizable ones.

Methodology: Learning a Better Search Space

The core innovation lies in decoupling the optimization from the original input space. Instead of performing gradient descent directly in the input space ($X$), the authors introduce a lightweight mapping network ($ heta$) that translates points from a well-behaved latent space ($Z$) into $X$.

The Landscape Learning framework: A mapping network $\theta$ transforms latent codes $z$ into inputs $x$, which are then passed through a frozen forward model $F$ to produce outputs $\hat{y}$.

To ensure the mapping network creates a smooth landscape, the authors employ several key strategies:

  1. Rolling out Updates: The network is trained using an objective that "rolls out" several steps of gradient descent. By minimizing the loss achieved after multiple steps, the network learns to create paths that lead directly to the global minimum.
  2. Coordinate Descent: The training alternates between two phases: collecting optimization trajectories (how the search moves through $Z$) and updating the mapping network $\theta$ to optimize those trajectories.
  3. Experience Replay: Borrowing from reinforcement learning, the framework uses a buffer to store and reuse past optimization paths, which significantly stabilizes the training of the mapping network.

Experimental Evaluation

The researchers evaluated the framework across three distinct and challenging domains:

  • GAN Inversion: Testing on CelebA-HQ (faces) and LSUN-cat (out-of-distribution) to see how well the model can reconstruct images from latent codes.
  • 3D Human Pose Reconstruction: Using the GRAB and PROX datasets to reconstruct human interactions in 3D scenes.
  • Adversarial Defense: Testing on CIFAR-10 to determine if the smoothed landscape allows for faster, more robust identification of adversarial perturbations.

Key Insights: Smoothing and Generalization

The most striking result of this method is the visual transformation of the loss landscape. By projecting the high-dimensional space into a 3D visualization, the authors demonstrate that their method effectively removes the "spikes" of high loss that plague standard inversion, creating a bowl-like surface that is much easier for gradient descent to navigate.

Comparison of the original, highly non-convex loss landscape versus the smoothed landscape learned by the mapping network.

Beyond speed, the method offers superior generalization. Traditional Encoder-Based Inference (EBI) is fast but often fails on out-of-distribution (OOD) data. This framework retains the flexibility of OBI, outperforming standard encoders when encountering data types not seen during training (e.g., reconstructing a cat using a model trained on faces). Furthermore, the method often finds better solutions than the baseline because the smoothed landscape prevents the optimizer from getting trapped in poor local minima.

Key Results and Performance

  • Efficiency Gains: In GAN inversion, the method achieves higher quality reconstruction in just 2 steps than the baseline does in 20 steps, representing a 10x speedup.
  • Robust Defense: For adversarial defense, the method improved robust accuracy by up to 18% using only a single optimization step, enabling real-time defense capabilities.
  • Pose Accuracy: The framework achieved a 75% performance gain over the VPoser baseline in complex 3D reconstruction scenarios.

Conclusion and Future Work

While Landscape Learning significantly accelerates inversion, it currently requires a dedicated training phase for each specific forward model. Future research may focus on developing "universal" mapping networks or reducing the initial training overhead. Nonetheless, by proving that loss landscapes can be intentionally shaped for optimization, this work opens a new path for making flexible, optimization-based inference practical for real-world, real-time systems.

Summary updated

BibTeX
@inproceedings{liu2022landscape,
  author = {Ruoshi Liu and Chengzhi Mao and Purva Tendulkar and Hao Wang and Carl Vondrick},
  title = {{Landscape Learning for Neural Network Inversion}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=EdddyQWI9j},
}
Figure