Conservativeness of Untied Auto-Encoders

Daniel Jiwoong Im, Mohamed Ishmael Diwan Belghazi, Roland Memisevic

Abstract

We discuss necessary and sufficient conditions for an auto-encoder to define a conservative vector field, in which case it is associated with an energy function akin to the unnormalized log-probability of the data. We show that the conditions for conservativeness are more general than for encoder and decoder weights to be the same ("tied weights"), and that they also depend on the form of the hidden unit activation functions. Moreover, we show that contractive training criteria, such as denoising, enforces these conditions locally. Based on these observations, we show how we can use auto-encoders to extract the conservative component of a vector field.

Introduction

Auto-encoders (AEs) are fundamental tools in unsupervised learning, typically used to learn low-dimensional representations of data. A common architectural choice is "weight tying," where the decoder weights are the transpose of the encoder weights. This constraint ensures that the reconstruction function is the gradient of an energy function, allowing the AE to be interpreted as a probabilistic model. However, many practical applications utilize untied weights for increased representational capacity. This paper investigates whether untied AEs can still define a valid energy landscape and identifies the conditions under which they become "conservative."

Theoretical Framework: The Symmetry Condition

A vector field is conservative if it can be expressed as the gradient of a scalar potential (energy) function. In the context of auto-encoders, the reconstruction function $r(x)$ defines a vector field. We prove that this field is conservative if and only if its Jacobian matrix—the matrix of partial derivatives $\frac{\partial r_i}{\partial x_j}$—is symmetric.

For a single-layer auto-encoder with encoder weights $W$, decoder weights $R$, and activation function $s$, the reconstruction is $r(x) = R s(W^T x + b)$. The symmetry condition requires the product $R D_h W^T$ to be symmetric, where $D_h$ is the diagonal matrix of activation derivatives. While tied weights ($R=W$) satisfy this condition, they are not strictly necessary.

Training as a Conservative Force

A key insight of this work is that standard training procedures naturally push untied auto-encoders toward a conservative state. We analyze how training criteria, such as the Contractive Auto-Encoder (CAE) loss, explicitly penalize the non-conservative components of the learned field near the data manifold.

Symmetry scores for ReLU auto-encoders on MNIST.

Empirical results on the MNIST dataset demonstrate that as training progresses, the symmetry score of the Jacobian increases significantly. For ReLU-based models, symmetry scores reach approximately 95%.

Symmetry scores for sigmoid auto-encoders on MNIST.

The choice of activation function plays a critical role. Sigmoid-based auto-encoders converge to a conservative state much faster and reach higher symmetry scores (up to 99%) compared to their ReLU counterparts. This suggests that the smoothness of the activation function facilitates the alignment of encoder and decoder weights into a symmetric configuration.

Vector Field Decomposition and Results

Beyond standard datasets, we tested the theory on synthetic 2D manifolds (spirals, circles). We observed a sharp reduction in the "curl" of the vector field during training, confirming that the model settles into a gradient-based representation.

Furthermore, we proposed using AEs as filters to perform a learned Helmholtz-Hodge decomposition. By training an AE on a noisy, non-conservative vector field, we can extract the underlying conservative component. In high-dimensional synthetic tests, we successfully recovered the conservative part with 93% accuracy, even in the presence of 40% non-conservative noise.

Conclusion

This paper demonstrates that weight tying is a sufficient but not necessary condition for an auto-encoder to define an energy function. The natural dynamics of training, especially under contractive constraints, encourage untied models to satisfy the symmetry conditions required for conservativeness. This allows untied auto-encoders to be reliably used for density estimation and energy-based modeling, providing a theoretical bridge between flexible neural architectures and classical probabilistic frameworks.

Summary updated

BibTeX
@inproceedings{im2016conservativeness,
  author = {Daniel Jiwoong Im and Mohamed Ishmael Diwan Belghazi and Roland Memisevic},
  title = {{Conservativeness of Untied Auto-Encoders}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2016},
  url = {https://openreview.net/forum?id=ryWSdCgO-S},
}
Figure