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 function, but that contractive training criteria, such as denoising, will enforce 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
In machine learning, a fundamental question is whether a model's reconstruction behavior corresponds to the gradient of an underlying energy function, such as the log-probability of the data. While it is well-established that auto-encoders (AEs) with tied weights (where the decoder $R$ is the transpose of the encoder $W$) behave like energy-based models, practitioners often prefer untied weights for increased flexibility. This research investigates the mathematical conditions under which untied auto-encoders remain "conservative"—meaning they define a vector field that is the gradient of a scalar potential.
Theoretical Framework
Using exterior calculus and differential forms, we derive the necessary and sufficient conditions for an auto-encoder to be conservative. For a one-hidden-layer AE, the vector field is conservative if and only if the Jacobian matrix is symmetric. Specifically, the matrix $R D_h W^T$ must be symmetric, where $R$ is the decoder, $W$ is the encoder, and $D_h$ is the diagonal matrix of activation derivatives.
This condition reveals that tied weights ($R = W$) are a sufficient but not necessary condition for conservativeness. Untied weights offer a richer parametrization that can still satisfy the symmetry requirement. Furthermore, minimizing a contractive loss (penalizing the Frobenius norm of the Jacobian) naturally forces the model toward local conservativeness near the data manifold.
Experimental Validation
The theory was validated using MNIST and synthetic datasets. On MNIST, we observed the evolution of learned filters and measured the "symmetricity" of the weight products during training.
In 2D synthetic experiments (lines, circles, spirals), we monitored the "curl" or rotational component of the vector field. We found that the act of learning to reconstruct data acts as a "symmetrizer," effectively filtering out non-conservative (rotational) components to focus on the gradient of the data density.
Key Results
Empirical results on MNIST demonstrate that untied auto-encoders reach symmetricity scores between 95% and 99% after training. The choice of activation function (Sigmoid vs. ReLU) and the specific weight product analyzed ($R D_h W$ vs. $RW$) impact the convergence rate and final symmetry score.
At fixed points where the model perfectly reconstructs the data, the Jacobian $R D_h W^T$ becomes symmetric, aligning the model with the Hessian of the data's log-probability. In high-dimensional tests, auto-encoders successfully recovered the conservative component of mixed vector fields with over 93% accuracy.
Conclusion
This work bridges the gap between flexible untied auto-encoders and energy-based modeling. While the existence of an energy function is proven, global normalization remains a challenge, potentially requiring techniques like Annealed Importance Sampling. Future work may explore parameterizations that guarantee conservativeness by design without the constraints of simple weight tying, as well as extending this analysis to deeper architectures.
Summary updated