A Manifold Learning Perspective on Representation Learning: Learning Decoder and Representations without an Encoder

Autoencoders are commonly used in representation learning. They consist of an encoder and a decoder, which provide a straightforward method to map n-dimensional data in input space to a lower m-dimensional representation space and back. The decoder itself defines an m-dimensional manifold in input space. Inspired by manifold learning, we showed that the decoder can be trained on its own by learning the representations of the training samples along with the decoder weights using gradient descent. A sum-of-squares loss then corresponds to optimizing the manifold to have the smallest Euclidean distance to the training samples, and similarly for other loss functions. We derived expressions for the number of samples needed to specify the encoder and decoder and showed that the decoder generally requires much fewer training samples to be well-specified compared to the encoder. We discuss the training of autoencoders in this perspective and relate it to previous work in the field that uses noisy training examples and other types of regularization. On the natural image data sets MNIST and CIFAR10, we demonstrated that the decoder is much better suited to learn a low-dimensional representation, especially when trained on small data sets. Using simulated gene regulatory data, we further showed that the decoder alone leads to better generalization and meaningful representations. Our approach of training the decoder alone facilitates representation learning even on small data sets and can lead to improved training of autoencoders. We hope that the simple analyses presented will also contribute to an improved conceptual understanding of representation learning.


INTRODUCTION
The original paper on backpropagation is called "Learning Internal Representations by Error Propagation" Rumelhart et al. (1986), and indeed, learning in neural networks can be viewed as learning of intermediate representations in the different layers.The neural network thus performs a transformation of the input through a series of these internal representations.In representation learning (reviewed in Bengio et al. (2013) and Tschannen et al. (2018)) the objective is to use these learned representations for other applications as they can for instance map discrete high-dimensional input samples like text to a Euclidian space of lower dimensionality and hopefully learn (or preserve) relatedness by assigning similar representations to related examples.Feed-forward autoencoders, whose objective is to reproduce the input on the output layer, are often used for unsupervised (or "self-supervised") representation learning, although one can of course learn representations even when inputs and targets differ.
In the related field of manifold learning, the objective is likewise to find a representation of samples.It is assumed that the high-dimensional data lie on a lower-dimensional manifold and the aim is to construct a map of the (training) data on such a manifold.Principal component analysis (PCA) is the simplest and most used method, in which the linear subspace explaining most of the variation in the data is found.The main difference between manifold learning and representation learning is that in the latter one obtains an encoder that maps from input space to representation space and a decoder that maps from representation space back to the input space.Additionally, the objective function in manifold learning often takes neighbourhood relations into account, whereas samples in standard neural network training are treated independently.The relationship between representation learning and manifold learning has been extensively discussed in works such as Bengio et al. (2014); Vincent et al. (2008); Jia et al. (2015).
Autoencoders were originally introduced in (Rumelhart et al., 1986), with image compression (Cottrell et al., 1987) and speech recognition (Elman & Zipser, 1988) as some of the first applications.In (Bourlard & Kamp, 1988) it was shown that simple auto-encoding feed-forward neural networks, with a single hidden layer and optimized to reproduce real-valued input on the output, will converge to the principle components subspace in the hidden layer.Since then there has been a lot of progress with respect to regularization and robustness of autoencoders, such as using noisy inputs to train denoising autoencoders Vincent et al. (2008) and making the contractive autoencoders aiming at more robust encoding Rifai et al. (2011).The relation between autoencoders and manifold learning has been discussed before, see e.g.Vincent et al. (2008); Jia et al. (2015).
Here, we take up a simple but not too well-known view on autoencoders and representation learning from a manifold learning perspective.We show that the decoder maps from the representation space to a manifold in the input space.We then show how a decoder can be trained without an encoder by optimizing the representations of the training data directly together with the weights of the decoder similar to manifold learning.In training we optimize towards a manifold that has the minimum distance between the training points and their projections onto the manifold.Learning of a representation along with an autoencoder has been introduced before as predictive sparse decompositions Kavukcuoglu et al. (2010), and others have even made the step of separating representation and decoder from the encoder Han et al. (2016).We wish to take up this view on representation learning and show its benefits in terms of simplicity, performance and data-efficiency.
We derive expressions for the number of samples needed to specify an encoder and a decoder, and show that in most situations, the decoder is much better specified than the encoder.The theoretical predictions are confirmed on three different data sets.We demonstrate how training of the decoder alone performs much better than a standard autoencoder on small data set sizes, while performance on larger data sets is still better, but very close to the autoencoder.We further show that the learned representation can be useful for downstream tasks and that specific solutions can potentially be derived better from the decoder than the autoencoder.This paper is basic and straightforward mathematically, and it is our hope that it will help readers build intuition about decoders, encoders and autoencoders in this manifold learning perspective.

THE LINEAR CASE
Assume the data are n-dimensional real vectors.In PCA, a linear subspace is obtained in which the first basis vector points in the direction of highest variance, the second points in the direction of highest variance of the subspace orthogonal to the first, and so on.When PCA is used for manifold learning and dimensionality reduction, the first m < n principal components are used and the data points are projected onto this linear subspace of dimension m, which we call the principal subspace.
If the basis vectors of the principal subspace are called w i , the projection of a point x can be written as m i=1 z i w i , where z is the m-dimensional representation of x and z i = x • w i .The z vectors are analogues of the representations in representation learning or manifold learning.
If we assume that data have mean zero, the linear subspace is also the one which has the smallest mean distance to the data.Therefore, the principal subspace can be found by minimizing the mean distance between the data points and their projections, Figure 1: The decoder maps from the low-dimensional representation space to a manifold in input space.Here the representation space is 2D and input space 3D.The representation of a point in input space is the point in representation space that maps to the nearest point on the manifold.Here illustrated in 3D, where the point in representation space to the left maps to the point on the manifold which is closest to the point at the cross.
where k indexes the data points.1This will not normally give an orthonormal basis, but vectors w will still span the principal subspace.We can recognize this as a linear "neural network" with weights w, corresponding to the decoder part of a linear autoencoder, mapping from a representation z to a point x in input space.It is a classic result that a linear autoencoder will learn the principal subspace Bourlard & Kamp (1988).
Note that (1) does not have a unique solution.The weights and representations can be scaled arbitrarily (wx = (w/s)(zs) for a constant s) and it is invariant to permutations of the order of vectors and rotations within the subspace in general.One could apply normalization or impose other constraints on the solution to limit the freedom.

NON-LINEAR DECODERS
Assume now that we have a non-linear mapping that maps a representation z to a point g w (z) in input space (we dropped the vector arrows for ease of notation).We assume also that g w is a continuous function that depends on some parameters w and possibly some form of regularization.Since we assume m < n, g w defines a manifold in input space of dimension m (or lower), onto which all points in the representation space are mapped.
Above, we saw how one can obtain the principal subspace by minimizing the distance between the data points and their projections.We can do the same for a non-linear decoder.The idea is then to find the manifold defined by g w that minimizes the mean distance (or the loss) between the training points and their projections onto the manifold, L(x, g w (z)), where L is the loss function and z and w are parameters.See Figure 1 for an illustration.(Here "projection" means the point on the manifold that we map a point to, so it is not used in a strict mathematical sense).
Usually, internal representations are learned implicitly by adapting the weights of the neural network, but there is nothing stopping us from treating them as parameters and learning them explicitly together with the weights (see e.g.Krogh et al. (1990)).A loss function L(x, x) used to train an autoencoder, where x is the autoencoder output, can be used with internal representations.The loss for input x would be L(x, g w (z)), where the representation z is unknown and found together with the weights by minimizing the total loss.So for each of N training examples, (x 1 . . .x N ), the representation is optimized during training, so the total loss would be minimized with respect to both w and the vectors z 1 . . .z N .This can be done by any optimization technique, such as gradient descent.Gradients with respect to z are simply the backpropagated errors that we are calculating anyways for weight optimization.As in the linear case described above there are scaling and symmetry invariances, so the solution is not unique.It is therefore advisable to constrain the weights (for example via a small weight decay).
If the decoder is a single layer, there is only one optimal solution (apart from scaling and symmetry operations), and the optimization problem is convex, i.e. it is very easy to learn and it would essentially recover the PCA if the layer is fully connected.With a multi-layer decoder, one could learn the internal representations layer-by-layer using convex optimization, but this is unlikely to lead to an over-all optimal solution and not considered further here.
Once the weights of the decoder and training set representations are determined by training, how can we use it for new samples, e.g. in a test set?One possibility is to do the same optimization by gradient descent with fixed weights to find the optimal representation for the new sample.This is our approach when reporting results of the decoder alone.A disadvantage of this approach is that there may be local minima trapping the optimization, and thus it may not give a globally optimal representation.In our experiments, we have not seen problems relating to this.An alternative is to train an encoder as we will discuss later.
One disadvantage of optimizing the representations directly within the decoder training loop is that each sample only receives one gradient update per epoch, whereas the weight updates are based on gradients from the whole data set.One could therefore suspect a large number of epochs is needed for the representations, but this has not been a major issue in our experiments.If the training set is very large, one could train the decoder on a sub-sample and afterwards train an autoencoder on the whole dataset (see below).

THE NUMBER OF SAMPLES NEEDED TO TRAIN THE DECODER
In an idealized noise-free case, the decoder should fulfil x = g w (z) for all N training examples.If g is a linear function, there exists an exact solution for w and z if the number of weights C d plus the number of parameters for the representation, N m, is larger than the number of constraints N n: one equation per example (k) per output unit (i), x k i = g w (z k ).We define the load as the number of constraints per parameter, If the load is below 1, the system is under-determined, and if it is above 1, it is over-determined (if the training vectors are linearly independent).
For non-linear decoders, such as multi-layer perceptrons, we expect the above to be approximately true, although C d should be replaced by an "effective" number of parameters, which we call the network complexity.Formally, we define this complexity as the number of training examples needed to train a unique model apart from scaling and symmetry operations.There is currently no theory to calculate this complexity and we will approximate it by the number of weights.The number of weights is an upper bound for the effective number of parameters, and therefore the load, as defined above, will generally be underestimated, and we are thus less likely to apply too large a model to given data.
In most realistic situations, we would want the system to be over-determined, i.e., α d > 1, because otherwise the representations and the decoder would adapt to the noise (alternatively, the system can be regularized).When the number of weights is less than N m, the load is essentially the input dimension divided by the representation dimension, the compression rate n/m, which is normally much larger than 1 when the objective is to find a low-dimensional representation of highdimensional data.When n >> m it is generally quite easy to obtain high loads.(For m > n the load is always below 1 and is only relevant with sparsity constraints or other regularization.)Another way to interpret this is that you would be wise to either construct your neural network decoder to have a relatively large α d or use some form of regularization.
We have seen that one can learn a manifold in input space using a neural network decoder and it is therefore a form of manifold learning.The mathematical properties of the manifold are determined entirely by the neural network decoder and the learned manifold may be further constrained by regularization.If the decoder is over-determined (α > 1) the training data cannot normally be contained in the manifold exactly, and minimization of the loss will find the manifold that is closest to the training data (closest in the sense of having minimum loss).

THE ENCODER AND AUTOENCODER
We see that in theory the encoder is not really needed for learning low-dimensional representations.However, finding the representation of a new data point x requires a minimization of L(x, g w (z)) in z with fixed weights in the decoder.Although this can easily be done, it is often desired to have an encoder instead that maps directly from input space to representation space.In an autoencoder, the encoder puts additional constraints on the representations, meaning that it will not necessarily learn the same representations as the decoder would recover on its own.
In the framework of manifold learning, the encoder can only make things worse, because with the chosen parametrization of our manifold (the decoder) and the chosen distance metric (the loss function), the representations found using only the decoder are optimal -they minimize the loss and the distance to the manifold.In representation learning, one could instead view the encoder as a possibility to impose constraints on the representations as a sort of regularization.But regardless of the encoder, reconstructions will lie on a manifold defined by the decoder.
In principle, the encoder could be of such high complexity that it could learn almost exactly the "true" decoder representations.If it had high enough complexity, we know that the "true" representations would be found, because they minimize the loss.However, when the encoder complexity is very high, it is again likely that we will not have enough data.Instead, once the representations are estimated (along with the decoder), the encoder can principally be trained using the learned representations as targets.For an encoder, the load is therefore when the representations of the training examples are fixed (N m equations/constraints on the weights).Interestingly, there is no simple relation between this load and the decoder load.If the encoder and decoder have the same complexity C e = C d and m < n, we will have from ( 3) and ( 4) For small α e , α d is n/m times larger and when α e is large, α d is essentially equal to n/m.Often, the compression factor n/m is in the hundreds and the decoder would thus be "hundreds of times more well-specified" than the encoder and in many situations one would have plenty of examples to learn the decoder, but not enough for the encoder.
The above analysis is a little simplified.Since the assumption is that the training data lie close to an m-dimensional manifold in input space, the data are not scattered randomly and it is likely that the encoder can be trained on a smaller number of samples in this region of sample space.In other words, it may be possible to train the encoder with small load for points in or close to the manifold.However, for outliers, an encoder trained with a small load is likely to give arbitrary results and thus the autoencoder reconstruction will be far from the projection on the manifold.We thus expect that out-of-distribution samples will be poorly reconstructed by an autoencoder compared to a decoder.
Several methods have been proposed that increase robustness of autoencoders regarding over-fitting.One such method is the denoising autoencoder Vincent et al. (2008) in which noise is added to the input samples and the autoencoder is trained to reconstruct the noiseless version.In the present perspective this seems like an excellent approach, because this will minimize the distance between noisy points and their projections.The Contractive Autoencoder Rifai et al. (2011) imposes regularization on the encoder that favours similar inputs to have similar representations.This is done by adding a regularizer term with the squared derivatives of the encoder with respect to the x (the Frobenius norm of the Jacobian).Zero gradients imply orthogonality with the manifold and this approach therefore favours an orthogonal projection of points onto the manifold.
Both denoising and contractive autoencoders have the desired effect of making the encoder more robust, but they have the less desirable side-effect of also trying to minimize variation within the manifold.Therefore, we would suggest a variant of the denoising autoencoder in which the decoder is trained as above and the encoder is trained on noisy examples with its "true" representation as target, that is, the representation defined by the decoder.This is essentially equivalent to training the autoencoder with fixed decoder and using the noisy examples both as input and output.This approach will train the decoder to give the correct projection of the out-of-distribution input onto the manifold learned by the decoder on the training set.It should thus be possible to use much higher noise levels than in denoising autoencoders and in principle, one can train on completely random data, once the decoder is fixed.Care must be taken, however, to ensure that the encoder still encodes the training data well.

HYPOTHESIS TESTING ON REAL AND SIMULATED DATA
In this section we aim to answer the following questions: Can a decoder on its own generalize well on small data set sizes, whereas an autoencoder overfits as hypothesized?Is the resulting representation meaningful/ useful for downstream tasks?Does the decoder work on larger data sets?
We demonstrate that a representation can be learned by a decoder alone using three different data sets.The first two are popularly used image data sets MNISTLecun et al. (1998) and CI-FAR10Krizhevsky (2009), and the last one is a simulated data set as an example of regulatory data with a known and desired representation.In Figure 2 we show the training and test error for a decoder and an autoencoder trained on subsamples of the MNIST dataset.We see that the training errors are very similar for the two models, although smallest for the decoder, as would be expected, because the autoencoder is further constrained by the encoder.For small data set sizes, both models over-fit, but the autoencoder is significantly worse than the decoder alone, which supports our hypothesis.From the other graph, we can observe that the decoder load is above 1 for almost all data set sizes, and from a load around 9 (4000 examples) the test error is stable.The load of the decoder is below 1 for all sizes except the last (15000) and we see that the test error is still decreasing.
This example shows that although the training errors are comparable, the full autoencoder over-fits the data to a larger extend than the decoder, especially for small sample sizes.The decoder test error is almost constant from around 4000 samples.
In this experiment, we also trained an autoencoder with the trained decoder fixed.This performed much worse than the decoder and the autoencoder (results available in the supplementary notebook DecoderTraining MNIST.ipynb).Although unexpected at first, we interpret it in the following way: The full autoencoder can find a good solution that satisfies the constraints of both the decoder and the encoder -a compromise between them.When the decoder is fixed, however, the encoder is forced to learn the representations dictated by the decoder.For small data sets, the encoder can learn with a small training error, but has a high test error.For larger sets, when the load of the encoder approaches 1, both the training and test error increase due to the constraints imposed by the decoder.

CIFAR10
After initial promising results from the simple task of learning a representation for MNIST, we aimed to more systematically demonstrate the efficiency and validity of our proposed approach using the more complex CIFAR10 data setKrizhevsky (2009).Our aim is to compare the performance of a simple decoder to an autoencoder with identical decoder and symmetric encoder on natural image data.We trained both single decoder and autoencoder and compared the reconstruction capabilities of these models for different size training set sizes.
The architectures of our models are based on work from Radford et al. (2016).In order to find a good decoder architecture, we ran a model search whose search space we restricted based on prior knowledge derived from Radosavovic et al. (2020) and Radford et al. (2016).In Radosavovic et al. (2020), a thorough investigation of convolutional architectures based on residual bottleneck blocks introduced by Xie et al. ( 2017) is conducted, resulting in guiding principles for a limited design space of convolutional networks for image classification.The initial architecture taken from DCGANRadford et al. ( 2016) represents the generator.Supplementary notebook DecoderTraining CIFAR10 modelSearch.ipynbprovides a report of our model optimization and a description of how we arrived at using an altered version of the DCGAN generator as our decoder.
The decoder consists of five 2D transposed convolutional layers with kernel size 4, stride 1 and an output layer with kernel size 1 and stride 1.The first and last transposed convolutional layers have padding 0, while all others have padding 1.For constructing channel sizes, we use a basis of 64 which we call the capacity.The representation (the input of the decoder) is a 1D vector of length 256, which is four times the capacity.This is reshaped as the decoder input to a tensor of 256×1×1.The channel sizes are reduced to capacity×2 (128) in the first layer, capacity (64) in the third and 3 (output channel size) in the last layer.Batch normalization is applied between all layers, as well as ReLU activation.After the last convolutional layer follows a sigmoid activation due to the normalization of the data.The corresponding autoencoder consists of the decoder architecture and a mirrored encoder with convolutional layers instead of transposed convolutional layers.We will refer to this decoder and autoencoder as decoder 1x1 and autoencoder 1x1 (or AE 1x1 in images due to limited space) to highlight the decoder's input pixel dimension.
In order to demonstrate that a decoder on its own outperforms a comparable autoencoder on small data sets, we train decoder 1x1 and autoencoder 1x1 In Figure 3a,c we can see that the train sample size has a much lower effect on the test reconstruction error in decoder 1x1 compared to autoencoder 1x1.While both models' errors converge for the full training set size, autoencoder 1x1's test loss is approximately three times higher than that of the decoder for the smallest train sample size of 50 images per class.Figure Figure 3a shows that this difference in test loss is not a result of insufficient training time.More precisely, this figure further supports our hypothesis of the relationship between decoder and encoder load.As shown in the supplementaries (DecoderTraining CIFAR10.ipynb), the decoder load is above 1 for all training subsets, while the encoder load achieves values above 1 only for the full train sets.Since mere reconstruction loss alone is not a satisfactory evaluation of a model's performance, we also trained decoder 1x1 and autoencoder 1x1 for 400 epochs each on the full train set and evaluating on the full test set with random seed 0, saving model parameters every 50 epochs.Figure 3e shows reconstructions of the first eight test images (originals shown in Figure 3d) of both models after 50, 200 and 400 epochs.While the decoder 1x1's MSE loss for the test set is above that of autoencoder 1x1 until roughly epoch 200 and the reconstructed images are blurry, they are much more recognizable than those of autoencoder 1x1 at any of the selected epochs.These results show that this convolutional decoder is superior to its equivalent autoencoder in reconstructing images from a low-dimensional representation for small data sets and can more than keep up with the autoencoder for larger data sets where the encoder load is sufficient.
However, we are aware that designing and optimizing a decoder mapping from a low-dimensional representation and then comparing its performance to its equivalent autoencoder could be biased in favour of the decoder.We thus conducted a second experiment for which we optimize an autoencoder architecture and training parameters completely disregarding the decoder performance in the optimization step.The model development is included in supplementary notebook DecoderTraining CIFAR10 modelSearch.ipynb.The architecture of the best performing autoencoder is similar to the previous architecture of autoencoder 1x1, but the last encoder and first decoder convolutional layers are removed, resulting in a representation of dimension channel × 4 × 4. We will refer to these architectures as autoencoder 4x4 and decoder 4x4.The other change to the previous architecture are the number of channels in the convolutional layers.With a capacity of 16, the decoder (and symmetrically the encoder) takes the representation vector of length 1024 as input of dimension 64 × 4 × 4. Each layer's output channels are of size 64, 32, 16 and 3, respectively.
We train autoencoder 4x4 and decoder 4x4 on the full train set for 400 epochs with (coincidentally) the same hyperparameters as for training 1x1 models.The test learning curves for both models is shown in Figure 3b along with those of the 1x1 models for comparison.The 4x4 learning curves show a similar, but elongated behaviour to those of the 1x1 models.Test losses for decoder 4x4 and autoencoder 4x4 converge to much lower levels, and converge to similar losses at the end of the 400 epoch training period.This indicates an accelerated learning of autoencoder 4x4.We again reconstruct images after 50, 200 and 400 epochs, which are depicted in Figure 3f.These show an extensive improvement in the autoencoder reconstruction capabilities from autoencoder 1x1 to autoencoder 4x4.Images appear quite sharp, but show inferior color reconstruction compared to images from decoder 4x4.
Even though the convergences for decoders trained on the full data set for 400 epochs compared to the autoencoders are slower, Figure 3d,e shows that the decoders achieve qualitatively better reconstructions, especially for lower-dimensional representations.When comparing a decoder with learned representation and an autoencoder with equivalent architecture, this clearly demonstrates that the decoder alone with learned representation poses a better solution than the autoencoder.

SIMULATED DATA
Our last test is using simple simulated, almost linear, data.They are inspired by a simplified model of a biological regulatory network we study in another project.The regulatory network is built of proteins Z which interact with genes X and govern their expression.These proteins are called transcription factors and present one of the main actors in gene regulation.They are sequence-specific DNA-binding proteins which modulate expression by binding close to specific genes.We assume for simplicity that the regulation is direct and that transcription factors operate independently.We  thus assume that the expression data is governed by the transcription factor levels, Z. Since Z are sequence-specific, they do not interact with all genes and with those they do interact they do not do so equally.We therefore view the regulatory network as a weighted bipartite graph, directed from Z to X.All this can be expressed in where a i,j is a sparse connectivity matrix and w i,j the strength (and sign) of regulation.To generate the expression vectors x of length n, regulator level vectors z of length m (m ¡ n) are initialized from random samples of a gamma distribution.The weighted bipartite graph is expressed by the product of an adjacency matrix A (random binary values assigned based on a defined fraction of connections) and a weight matrix W (randomly sampled from a uniform distribution).Noise is added from a normal distribution with mean 0 and sd 0.2.X is ensured to be R ( >= 0) through the Rectified Linear Unit (ReLU) Fukushima (1980); Nair & Hinton (2010).
We approximate the linear relationship between the regulatory representation Z and expression R ≥0 input space X via a single-layer decoder.Since part of the objective is to learn input space and representation as an assignable bipartite graph, it is necessary to apply constraints enabling the hidden units in the representation to be identified as specific regulatory factors and we therefore assume a sparsely connected network defined by the adjacency matrix A.
Given this assignability of the representation, we are able to restrict the space of possible valid representations towards one close to the regulatory space used to generate the data.Hence, we enable ourselves to judge whether a meaningful representation is learned that represents a unique feature of the data.As a measure, we use the Pearson Correlation Coefficient (PCC) between true regulatory vectors and learned representations.We investigate data reconstruction and representation correlation for different decoder loads on three models.These are the decoder, and encoder trained on the pre-trained decoder, and an autoencoder (AE) consisting of the architectures of the single models.
Decoder and encoder both consist of a single linear layer (sparse in case of the decoder as described above) with ReLU and leaky ReLU (slope 0.1) as activation functions, respectively.The autoencoder is comprised of combined encoder and decoder.Different loads are achieved by varying number of training samples N for a constant input space of dimension n = 1000 and hidden dimension m = 100.Used values for N can be found in supplementary notebook DecoderTraining SimulatedData.ipynb section 2. Experiment 1.The data in this experiment are simulated with zero noise, a connectivity of 0.1 (90% of values in A are zero).Training parameters include a mini-batch size of 32, weight decay of 1.e −5 and a set of learning rates which are obtained from a small-scale grid search experiment included in DecoderTraining SimulatedData.ipynb section 1. Learning Rate Optimization.Decoder and representation receive learning rates of 0.001 and 0.01 (with momentum 0.9), respectively.Encoder and autoencoder receive a learning rate of 0.0001.Weights are optimized with the Adam optimizer Kingma & Ba (2014), representations with stochastic gradient descent Robbins & Monro (1951).All metrics are reported on the test set of sample size 100.For each new training set, a new test set is created.Models are trained and evaluated on the same data sets.The encoder refers to an autoencoder using the pre-trained decoder whose weights have been frozen and autoencoder refers to an identical autoencoder, but without pre-training the decoder.Decoder and encoder are trained for 500 epochs each, the autoencoder is trained for 1000 epochs.
Figure 4 shows test reconstruction loss and representation correlation of decoder, encoder (trained on pre-trained decoder) and autoencoder (AE) for different decoder loads α d .We see that the load α d must be > 1 for the decoder to be consistently well-determined and thus for achieving an exact solution for the representations (a correlation of 1) and good input reconstruction.The encoder with fixed and pre-trained decoder in this experiment takes a slightly higher α d of at least 3.3 in order to achieve correlations ≥ 0.99.This may be explained by the higher necessary load of the encoder which is mostly mitigated here by pre-training the decoder.One reason for a successful training of an encoder on a pre-trained decoder here unlike in the MNIST experiment could be that the encoder in this experiment is more complex than the decoder.The naive (not pre-trained) autoencoder in this experiment is unable to find the exact solution for z as can be seen by the generally lower and more variable representation correlations.Additionally, it takes a load of roughly 9 for the autoencoder to achieve similar reconstruction losses as decoder and encoder, which here is equivalent to training sample sizes of above 10000.These observations support the hypothesis that the encoder is the limiting factor in learning a precise mapping from the representation z to the input space x and that the decoder on its own can learn a meaningful representation.

CONCLUSION
In this paper we have introduced a new manifold learning perspective on autoencoders.We argued that it is useful to view the decoder as defining a low-dimensional manifold in input space.Training of a decoder alone amounts to optimizing the weights of the decoder and the representations of the training data so as to minimize the average distance between the training samples and their projections onto the manifold, which are the decoder reconstructions.
We showed that it is possible (and probably common) to have an over-determined decoder and an under-determined encoder.Our tests confirmed that a decoder trained alone generally performs better on the test data than an autoencoder trained from scratch.However, in one test, we saw that an autoencoder trained with a fixed optimized decoder performs almost as well as the decoder alone.We further demonstrated that this approach can lead to meaningful representations that may be useful for downstream tasks.Albeit only covering the task of reconstruction in this demonstration, we believe that this approach can easily be extended to other tasks in need of a useful representation.One such example is time series forecasting, based on building blocks such as LSTMs and Transformers.
The similarity between representation learning, autoencoders and manifold learning has often been pointed out.In most work on autoencoders, the focus has been on the encoder and various types of regularization have been proposed to limit over-fitting of data, such as Rifai et al. (2011);Jia et al. (2015).In our view, a better understanding can be obtained when first focusing on the decoder, which constrains the autoencoder, because it is generally much better specified by the training data than the encoder.
In this work we have focused on reconstruction error as a measure of performance.Often learned representations are used for classification or other tasks.We will extend these ideas to such other tasks in the future to see if the good performance of decoder training extends to these.
The results and observations presented in this paper are additionally of high relevance for generative models.We are currently working on the advancement of the ideas in this context.

Figure 2 :
Figure 2: Left: Training and test error for a decoder and an autoencoder trained on subsamples of different sizes (x-axis) of the MNIST data.Details of the networks are given in the text.Right: The load of the encoder and decoder vs. the training set size.
All networks are implemented in Python usingPyTorchPaszke et al. (2019)  and Jupyter notebooks are available with the code.Most runs were done on Google Colaboratory.Details about model architectures for all experiments covered in the following sections can be found in the Appendix.3.1 MNISTIn our first experiment, we use the standard MNIST data setLecun et al. (1998) and train on random subsets of varying sizes from 500 to 15000 examples using a decoder on its own and a naive autoencoder.The encoder of the autoencoder consists of two convolutional layers followed by a fully connected representation layer.The convolution layers both have 2D kernels of size 4, stride 2 and 64 channels.The decoder is the reverse with the representation layer fully connected to two layers of transpose convolutions.The representation layer has size 20 with linear output.The output layer uses a sigmoid transfer function and the other layers use Recified Linear Unit (ReLU)Fukushima (1980);Nair & Hinton (2010) activation.The loss function is the binary cross entropy and network weights are trained with the Adam optimizerKingma & Ba (2014) using a learning rate of 0.001 and a weight decay of 1.e −5 .When training without the encoder, the representations are optimized with stochastic gradient descentRobbins & Monro (1951) with a learning rate of 0.02 and a momentum of 0.9.All networks are trained for 200 epochs.Networks are tested on the same random subset of 1000 examples from the MNIST test set.For the decoder alone, representations of test data are found using the same gradient descent as in training (but with fixed decoder weights, of course).

Figure 3 :
Figure 3: Results on CIFAR10.(a) Learning curves of decoder 1x1 and autoencoder 1x1 for different training sample sizes (indicated by color).The y axis reports test reconstruction losses as mean squared errors.All models were trained for 100 epochs and initialized with random seed 0. (b) Learning curves of decoder and autoencoder with different representation sizes.(c) Reconstruction error for decoder 1x1 and autoencoder 1x1 trained on class-balanced subsets of CIFAR10 plotted against the per-class sample size of the train set.Means and standard deviation error bars are derived from 5-fold replication with different random seeds.Dotted lines with asterisk markers refer to train loss, full lines and round markers to the loss on the full test set.(d) The first 8 images of the CIFAR10 test set.(e) Reconstructed test images of models with representation 256 × 1 × 1. Numbers above the image grids indicate the training time in epochs.The first three grids show reconstructions from decoder and representation, the last three those from the autoencoder.(f) Same as E for models with larger bottlenecks (64 × 4 × 4).

Figure 4 :
Figure 4: Performance metrics of decoder, encoder and autoencoder for different decoder loads.Points and error bars present average losses and standard deviations over 5 replicates, respectively.Colors indicate the model type.Metrics are derived from the test data.Left: Mean squared error (MSE) loss of the simulated data for different decoder loads.Right: Pearson correlation coefficients (PCCs) of true regulation dimension and model representation dimension for different decoder loads.
The test error is reported on a tenth of the test set (class-balanced, same set for all runs).
on three class-balanced subsets as well as the full training set (train-test split provided by the data) 5 times with different random seeds (see DecoderTraining CIFAR10.ipynb).The resulting number of train images per class are 50, 100, 500 and 5000.Other training parameters include AdamKingma & Ba (2014) optimization with weight decay 1e −5 , learning rate 1e −4 , representation learning rate 1e −1 (representation are optimized with stochastic gradient descent Robbins & Monro (1951)), mean squared error (MSE) loss and training time of 100 epochs.
CONTRIBUTIONSConceptualization, A.K.; methodology, A.K.; software, A.K. and V.S.; validation, A.K., and V.S.; formal analysis, A.K. and V.S.; investigation, A.K. and V.S.; resources, A.K.; writing-original draft preparation, A.K.; writing-review and editing, A.K. and V.S.; visualization, A.K. and V.S.; supervision, A.K.; project administration, A.K.; funding acquisition, A.K. All authors have read and agreed to the published version of the manuscript.FUNDING AK is supported by a grant from the Novo Nordisk Foundation to the Center for Basic Machine Learning Research in Life Science, MLLS (PI: Ole Winther).