Abstract
Finding an interpretable non-redundant representation of real-world data is one of the key problems in Machine Learning. Biological neural networks are known to solve this problem quite well in unsupervised manner, yet unsupervised artificial neural networks either struggle to do it or require fine tuning for each task individually. We associate this with the fact that a biological brain learns in the context of the relationships between observations, while an artificial network does not. We also notice that, though a naive data augmentation technique can be very useful for supervised learning problems, autoencoders typically fail to generalize transformations from data augmentations. Thus, we believe that providing additional knowledge about relationships between data samples will improve model's capability of finding useful inner data representation. More formally, we consider a dataset not as a manifold, but as a category, where the examples are objects. Two these objects are connected by a morphism, if they actually represent different transformations of the same entity. Following this formalism, we propose a novel method of using data augmentations when training autoencoders. We train a Variational Autoencoder in such a way, that it makes transformation outcome predictable by auxiliary network in terms of the hidden representation. We believe that the classification accuracy of a linear classifier on the learned representation is a good metric to measure its interpretability. In our experiments, present approach outperforms $\beta$-VAE and is comparable with Gaussian-mixture VAE.
1. Introduction
In unsupervised machine learning, the primary objective is to discover "disentangled" representations—latent spaces where the model automatically separates an object's identity from its extrinsic properties, such as orientation or scale. While biological systems achieve this effortlessly, artificial neural networks often struggle. Standard autoencoders are typically trained on independent and identically distributed (i.i.d.) samples, processing images in isolation. This approach lacks context; for instance, a pixel-wise loss function may find a digit '3' more similar to a '9' than to a rotated version of itself. By failing to understand the underlying transformations, models fail to group related entities in the latent space, reducing interpretability and performance in downstream tasks.
2. Theoretical Framework: From Sets to Categories
To address this, we propose shifting the conceptualization of a dataset from a static Set to a mathematical Category. In this framework, individual data samples are viewed as Objects, while the transformations connecting them (rotations, shifts, scaling) are viewed as Morphisms.
By treating the dataset as a category, we provide the model with relational knowledge. If two images represent the same entity under different transformations, they should be connected in the latent representation. This approach mimics biological development, such as the famous 1963 "active kitten" experiment, where kittens allowed to move freely (active) developed superior depth perception compared to those moved mechanically (passive). Our model similarly learns through "action" by predicting the results of transformations.
3. Proposed Method: Context-Augmented Autoencoder
We introduce a "Context-Augmented Autoencoder" that incorporates an auxiliary network to learn these morphisms. The architecture utilizes dual encoders to process pairs of images: an original ($x_1$) and a transformed version ($x_2$). The objective is to ensure the latent space is "commutative." Specifically, if the model applies a predicted transformation to the latent representation of $x_1$, the result should align with the latent representation of $x_2$. We modify the standard Variational Autoencoder (VAE) Evidence Lower Bound (ELBO) loss to penalize unpredictability in these transformation outcomes.
4. Evaluation and Results
The model was evaluated using the MNIST dataset with various augmentations, including shifts, scaling, and rotations. We measured the linear separability of the latent space—the accuracy of a simple linear classifier in identifying digits based on compressed representations.
4.1. Latent Space Geometry
One notable qualitative result is the formation of "orbits" in the latent space. When an object undergoes a continuous transformation (like a 360-degree rotation), it traces a path. In our model, these orbits are smoother and more stable than those in standard VAEs, indicating that the model has successfully captured the underlying geometry of the data.
4.2. Quantitative Performance
In a highly compressed 2D latent space, our model achieved 65.7% linear separability, outperforming the standard VAE (63.0%) and PCA (44.7%). In a 64D latent space, the model reached 98.4% accuracy, surpassing both the standard VAE (96.2%) and UMAP (96.0%). These results suggest that forcing the model to predict transformation outcomes naturally leads to better disentanglement of identity and pose.
5. Conclusion
By augmenting autoencoders with contextual relationships defined through category theory, we significantly improve the interpretability and separability of learned representations. While current experiments focus on deterministic geometric transformations, future work will explore stochastic changes and video sequences. Integrating this approach with Generative Adversarial Networks (GANs) could lead to models that possess a deeper understanding of the "physics" of visual environments.
Summary updated