NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Neighborhood Reconstructing Autoencoders

Yonghyeon Lee, Hyeokjun Kwon, Frank C. Park

Introduction

Autoencoders are foundational tools in unsupervised learning, designed to compress high-dimensional data into a lower-dimensional latent space and subsequently reconstruct it. Ideally, an autoencoder learns the underlying "manifold"—the smooth geometric structure—of the data. However, standard autoencoders frequently struggle to capture this geometry accurately.

The Neighborhood Reconstructing Autoencoder (NRAE) introduces a novel training method to prevent autoencoders from overfitting to noise or learning incorrect data connectivity. By replacing standard point-wise reconstruction with a loss based on local quadratic approximations of the decoder, NRAE learns smoother, more accurate manifolds that generalize significantly better than existing state-of-the-art methods.

The Problem with Vanilla Autoencoders

While previous research has heavily focused on regularizing the encoder (how data is mapped into the latent space), the authors of this paper argue that the decoder is often the primary culprit behind geometric errors. Vanilla autoencoders typically fail in two major ways:

  1. Overfitting to Noise: They tend to "memorize" noisy samples, resulting in a jagged, non-smooth manifold that fails to capture the true underlying data distribution.
  2. Incorrect Connectivity: They might bridge gaps between separate parts of the data or fail to capture how points are locally related, leading to a distorted and topologically incorrect geometry.
Vanilla autoencoders often overfit to noise (a) or learn incorrect local geometry (b).

Existing graph-based solutions attempt to solve these issues but are often computationally heavy and require complex preprocessing.

The NRAE Approach: Neighborhood Reconstruction

To address these geometric failures, the authors introduce the Neighborhood Reconstructing Autoencoder (NRAE). The core innovation is a shift from point-wise reconstruction to a neighborhood reconstruction loss.

Instead of asking the autoencoder to reconstruct a single point $x_i$ solely from its latent representation $z_i$, NRAE requires the decoder to reconstruct an entire neighborhood of points $\mathcal{N}(x_i)$ using a local approximation.

The technical implementation involves several key steps:

  • Graph Construction: A simple $k$-nearest neighbor ($k$-NN) graph is built once before training to capture the local connectivity of the dataset.
  • Local Approximation: The decoder function is locally approximated using a Taylor expansion (either linear or quadratic) around the latent point $z_i$.
  • Neighborhood Loss: The loss function measures how well this local approximation of the decoder can reconstruct all points in the neighborhood of $x_i$. This acts as a powerful geometric prior, forcing the decoder to be locally "flat" or "smooth" and naturally mitigating overfitting to outliers.
  • Computational Efficiency: To keep the algorithm scalable, the authors utilize Jacobian-vector and Hessian-vector products, avoiding the need to compute and store massive full matrices.

Key Insights and Results

NRAE proves that explicitly regularizing the decoder’s local geometry is highly effective for learning smooth manifolds. The neighborhood loss is significantly better at penalizing "bad" manifolds—such as those with shortcuts or jagged edges—even when the standard point-wise reconstruction error appears low.

The authors evaluated NRAE across a wide range of synthetic and real-world benchmarks, including 1D sine waves, the classic "Swiss Roll" manifold, and various image datasets (MNIST, CIFAR-10, CelebA, etc.). The experiments yielded several compelling results:

  • Superior Smoothing: On noisy 1D data, NRAE-L (linear) and NRAE-Q (quadratic) produced significantly smoother manifolds than Denoising Autoencoders (DAE) or Variational Autoencoders (VAE).
  • Denoising Performance: NRAE outperformed DAE in Peak Signal-to-Noise Ratio (PSNR) on MNIST and CIFAR-10, despite DAE being specifically designed for denoising tasks.
  • Generalization: In large-scale tests across image datasets, NRAE consistently achieved the lowest Mean Squared Error (MSE) on test data. For example, on CIFAR-10, NRAE-Q achieved a test MSE of 0.00587 compared to the vanilla AE's 0.00960.
Comparison of manifold smoothing on a noisy sine wave. NRAE-L and NRAE-Q successfully recover the smooth ground-truth structure compared to baseline methods.

Limitations and Future Directions

While highly effective, NRAE does have limitations. The method relies heavily on the initial $k$-NN graph; if the Euclidean distance metric is a poor fit for the raw data, the neighborhood information might be misleading. Additionally, the choice of $k$ and the weighting of neighborhood points ($\lambda$) introduce new hyperparameters that require tuning.

For future work, the authors suggest exploring more sophisticated graph construction methods, such as persistent homology, and extending the NRAE framework to probabilistic or energy-based models.

Summary updated

BibTeX
@inproceedings{lee2021neighborhood,
  author = {Yonghyeon Lee and Hyeokjun Kwon and Frank C. Park},
  title = {{Neighborhood Reconstructing Autoencoders}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure