A collection of fragments of understanding in the pursuit of deeper questions.
Content of the Lecture
Motivation Geoffrey Hinton ("Learning Representations by Back-Propagating Errors") suggest networks should be able to become intelligent on their own, unsupervised, without backprop.
The difference between a supervised regression task where the data points are separated by some function that represents a bound in between different classes and an unsupervised clustering where the algorithm highlights the intrinsic structure of the data.
Unsupervised Learning
Unsupervised Learning in the Brain Papers: "Unsupervised Yearning", "Complementary Roles of Basal Ganglia and Cerebellum in Learning and Motor Control", "Development of the Brain Depends on the Visual Environment".
We are aware of the fact that the brain as well uses unsupervised learning. Several examples were collected for the lecture. In 1970 an experiment was conducted on cats. The kittens were housed from birth in a completely dark room, but from the age of 2 weeks they were put in a special apparatus for an average of about 5 hours a day. The kitten stood on a clear glass platform inside a tall cylinder of which the entire surface was covered in black and white stripes (in different experiments they used horizontal and vertical stripes). Those poor cats then were virtually blind for contours perpendicular to the orientation they had experienced. They recorded single neurons from primary visual cortex and found that almost all cats had their neurons trained to be most selective in direction of the stripes presented in the experiment. Interpretation: the neurons are the cluster centers and they move around during learning (growing up). When presented one stimulus only, then all cluster centers group in the same optimum.
In the picture we have a spike rate curve of a single neuron with respect to the neurons orientation. Experiments show that this distribution changes in adolescent subjects and becomes more rigid with increasing age.
Another group analyzed visual cortical activity of awake ferrets during development (2007). They provide a one-sentence summary: The relation between spontaneous activity and activity evoked by natural stimuli in the primary visual cortex reveals that the cortical circuit progressively adapts its internal model to the statistical structure of the environment. Paper: "Spontaneous Cortical Activity Reveals Hallmarks of an Optimal Internal Model of the Environment".
![]() |
![]() |
![]() |
|---|
In the figures: Notation: Evoked and spontaneous (dark) neural activity (EA and SA). Multi-neural EA (aEA). In the top-left figure, the posterior distribution represented by EA is increasingly dominated by the prior distribution as brightness or contrast is decreased. In the right figure, ferrets either receiving no stimulus (middle) or viewing natural (top) or artificial stimuli (bottom) is used to construct neural activity distributions in young and adult animals. It reveals the level of statistical adaptation of the internal model to the stimulus ensemble. The internal model of young animals (left) is expected to show little adaptation to the natural environment and thus aEA for natural (and also for artificial) scenes should be different from SA. Adult animals (right) are expected to have adapted to natural scenes and thus to exhibit a high degree of similarity between SA and natural stimuli aEA, but not between SA and artificial stimuli aEA.
We now know that these distributions adapt, but from the presented experiments it is unclear what the conditions are to trigger an adaptation. Another experiment ("Stimuling Timing-Dependent Plasticity in Cortical processing of Orientation") shows that the relative timing of presynaptic and postsynaptic spikes plays a critical role in activity-induced synaptic orientation 9single unit recording in cat V1). Induction of a significant shift required that the interval between the pair fall within +- 40ms otherwise nothing changed. Another path to understand the learning in neural circuits leads to the recent advances in Deep Neural Networks (DNN). Several groups tried to map layers (as in DNN layers) to cortical regions. Several mapping strategies were found. We can show that dissimilarity matrices of regions in both systems look similar, especially in higher cortical regions vs deeper layers of neural networks. Interestingly, the animals we recorded from never knew any labels that were used to train the DNNs.
1st Experiment: The statistics of the neuronal activity has adapted to represent the input data statistics (spatial). 2nd Experiment: The statistics of the neuronal activity has adapted to represent the input temporal data statistics.
In the picture we have the confusion matrix of V4 neural units and units in artificial networks from a comparable depth.
Sparse Coding The sparse code is found when each sample of a given data set is encoded by the strong activation of a relatively small set of neurons. For each item to be encoded, this is a different subset of all available neurons. Each image can be represented by a set of basis functions: .
We define an energy function which is essentially the true image I minus approximation + regularizer S:
Presented in the lectures was a set of known regularizers :
For each image presentation E is minimized with respect to . Thus, for a given image, the are determined from the equilibrium solution to the differential equation:
The then evolve by gradient descent on E averaged over many image presentations. The learning rule for updating is then:
Comments on Parameters and Operations:
In the figure we have representative training images are shown at the left and the resulting basis functions that were learned from these examples are shown at the right. In a, images were composed of sparse pixels: each pixel was activated independently according to an exponential distribution. In b, images were composed similarly to a, except with gratings instead of pixels (i.e., sparse pixels in the Fourier domain). In c, images were composed of spare, non-orthogonal Gabor functions with the methods described by Field. In all cases, the basis functions were initialized to random initial conditions. The learned basis functions successfully recover the sparse components from which the images were composed.
Relation to Neuroscience Paper: "Spatial Structure of Neuronal Receptive Field in Awake Monkey Secondary Visual Cortex (V2)".
This paper shows that cells of sub-units in V1 have receptive fields that apply signal filtering that is very similar to sparse coding. In V2 they identified sub-units with spatial feature selectivity.
Infomax (ICA) Paper: "An Information-Maximisation Approach to Blind Separation and Blind Deconvolution".
Infomax is an optimization principle for artificial neural networks and other information processing systems. It prescribes that a function that maps a set of input values I to a set of output values O should be chosen or learned so as to maximize the average Shannon mutual information between I and O. One of the applications of Infomax has been to an independent component analysis (ICA) that finds independent signals by maximizing entropy. ICA via mutual information is one way to find independent components. The independence criterion is stronger than uncorrelatedness which is defined as:
Or
Remember: If two variables are uncorrelated, there is no linear relationship between them. However, this does not mean that they are independent. The other way works: if and are independent (with finite second moments), then they are uncorrelated.
For ICA we want statistical independence:
To measure the degree of dependence we look at the pairwise mutual information of two random variables X, Y. Mutual information is non-negative and symmetric:
We use the entropy:
Idea: X, Y independent if:
For the discrete case we can then see best that last part of eq. is log(1) = 0:
In the picture below we have a Venn diagram of the Infomax objective: We want to maximize the entropy and minimize the mutual information. Entropy maximization forces the network to generalize.
We want to ensure that the outputs are maximally independent. This is identical to requiring that the mutual information be small or alternatively that the joint entropy is large. Gradient ascent in this objective function is called INFOMAX (maximize the enclosed area representing both information quantities).
How do we actually implement Infomax? We can think of Infomax as a one layer linear neural network that produces: such that outputs that are maximally independent:
but keep in mind we also maximize I(X;Y).
In the picture below we can see that the PCA features are very different from what we know that the brain uses for feature representation. However the ICA representation looks like the (Gabor-like) filters from the previous chapter.
Autoencoders
The autoencoder is trained by gradient descent.
Semi-Supervised Autoencoder Paper: "Supervised Autoencoders: Improving Generalization Performance with Unsupervised Regularizers".
The supervised AE uses the latent space to define a second decoding pathway. This path is added as another term to the loss and one calculates the gradients from two different ends. In the shared part, these gradients then merge. This is called multi-task learning (having a shared pathway for different objectives).
where:
De-Noising Autoencoder (DEA) Paper: "Extracting and Composing Robust Features with Denoising Autoencoders"
Since the autoencoder learns the identity function, we are facing the risk of "overfitting" when there are more network parameters than the number of data points. To avoid overfitting and improve the robustness, Denoising Autoencoder (Vincent et al. 2008) proposed a modification to the basic autoencoder. The input is partially corrupted by adding noises to or masking some values of the input vector in a stochastic manner. To "repair" the partially destroyed input, the denoising autoencoder has to discover and capture relationship between dimensions of input in order to infer missing pieces. Similar to dropout. Note: In the experiment of the original DAE paper, the noise is applied in that a fixed portion of input dimensions are selected at random and their values are forced to 0. This is very similar to Dropout but the denoising autoencoder was proposed in 2008, 4 years before the dropout paper (Hinton, et al. 2012).
Sparse Autoencoder The Sparse Autoencoder applies a sparsity constraint on the hidden unit activation to avoid overfitting and improve robustness. It forces the model to only have a small number of hidden units being activated at the same time.
Let's say there are neurons in the l-th hidden layer and the activation function for the j-th neuron in this layer is labelled as . The fraction of activation of this neuron is expected to be a small number , kowns as sparsity parameter; a common config is .
Keep in mind that we specify our desired target distribution that is . Common activation functions include sigmoid, tanh, relu, leaky relu, etc. A neuron is activated when the value is close to 1 and inactive with a value close to 0.
Contracting Autoencoder Similar to sparse autoencoder, Contractive Autoencoder (Rifai, et al., 2011) encourages the learned representation to stay in a contractive space for better robustness. It adds a term in the loss function to penalize the representation being too sensitive to the input, and thus improve the robustness to small perturbations around the training data points. The sensitivity is measured by the Frobenius norm of the Jacobian matrix of the encoder activations with respect to the input:
Where is one unit output in the compressed code .
This penalty term is the sum of squares of all partial derivatives of the learned encoding with respect to input dimensions. The authors claimed that empirically this penalty was found to carve a representation that corresponds to a lower-dimensional non-linear manifold, while staying more invariant to majority directions orthogonal to the manifold.
Homomorphism Autoencoder (HomoAE) Paper: "Homomorphism Autoencoder - Learning Group Structured Representations from Observed Transitions".
A Homomorphism Autoencoder (HomoAE) is a type of autoencoder that is trained to preserve the homomorphism (structure-preserving) properties of the input data in its encoded representation. This is achieved by adding a homomorphism constraint to the standard autoencoder loss function. The constraint ensures that the encoded representation preserves certain properties of the input, such as symmetry or commutativity. The decoder then tries to reconstruct the original input based on the encoded representation, which should also possess the same homomorphism properties. The result is a neural network that can learn to preserve structural information in the data and can be used for tasks such as dimensionality reduction, data generation, and anomaly detection.
From the paper: "How can we acquire world models that vertically represent the outside world both in terms of what is there and in terms of how our actions affect it? Can we acquire such models by interacting with the world, and can we state mathematical desiderata for their relationship with a hypothetical reality existing outside our heads? As machine learning is moving towards representations containing not just observation but also interventional knowledge, we study these problems using tools from representation learning and group theory. Under the assumption that our actuators act upon the world, we propose methods to learn internal representations of not just sensory information but also of actions that modify our sensory representations in a way that is consistent with the actions and transitions in the world. We use an autoencoder equipped with a group representation linearly acting on its latent space, trained on 2-step reconstruction such as to enforce a suitable homomorphism property on the group representation. Compared to existing work, our approach makes fewer assumption on the group representation and on which transformations the agent can sample from the group. We motivate our method theoretically, and demonstrate empirically that it can learn the correct representation of the groups and the topology of the environment. We also compare its performance in trajectory prediction with previous methods."
![]() |
![]() |
|---|
Competitive Learning Paper: "Feature Discovery by Competitive Learning"
Competitive learning is a form of unsupervised learning in artificial neural networks, in which nodes compete for the right to respond to a subset of the input data. A variant of Hebbian learning, competitive learning works by increasing the specialization of each node in the network. It is well suited to finding clusters within data. Imagine that we move our neuron around that space by adjusting the weights.
The CL Algorithm The competitive learning algorithm (two clusters):
In the figure we have an illustration of how the barrier would move if the blue neuron would move upwards in direction of the cluster center and the red one downwards (3 iterations are shown). However, after revisiting this example I think the blue one would occupy the lower cluster.
CL with Neural Networks We ask for the neuron with the closest weight vector:
We update our weights accordingly:
![]() |
![]() |
![]() |
|---|
The figure above shows Competitive NN: the position of the two neurons after convergence (left). A new datapoint and the data points equidistance line to the cluster-center neurons (center). The network structure (right).
Self-Organizing Maps
When a training example is fed to the network, its Euclidean distance to all weight vectors is computed. The neuron whose weight vector is most similar to the input is called the Best Matching Unit (BMU). The weights of the BMU and neurons close to it in the SOM grid are adjusted towards the input vector. The magnitude of the change decreases with time and with the grid-distance from the BMU.
Summary Plots
![]() |
![]() |
![]() |
|---|
Probabilistic Generative Models "When one understands the causes, all vanished images can easily be found again in the brain through the impression of the cause. This is the true art of memory..."- Rene Descartes
We know that our data has some causes v, but it is hard to specify. We do not know the underlying distribution. We can see the real world as a generative model that produced our (observable) data u. Now, we want to mimic this process. We model the causes as prior p(v,G) and our generative model specifies the artificial data distribution p(u|v,G). We have a recognition model that maps the samples gathered in the "real" world somehow to our generative model (not clear from the slides how). Goal: Learn a good generative model that mimics the statistics of the data generation process. Approach: Given data, solve two problems:
A very basic example is a mixture of Gaussians:
I assume these parameters are means, variances and mixture scaling factors. There are several ways how one could use a neural network for these challenges. Also known as "Maximum Likelihood Learning":
![]() |
![]() |
|---|
In the figure we have the difference between a traditional embedding algorithm on the left where we have huge gaps in embedding space and a generative embedding method on the right that densely covers the space. This allows us to sample. Indeed, interpolation between the classes is possible with a generative model.
The (restricted) Boltzmann Machine (RBM) A restricted Boltzmann Machine (RBM) is a generative stochastic artificial neural network that can learn a probability distribution over its set of inputs. As their name implies, RBMs are a variant of Boltzmann machines, with the restriction that their neurons must form a bipartite graph. This means that in restricted Boltzmann machines there are only connections (dependencies) between hidden and visible units, and non between units of the same type (no hidden-hidden, nor visible-visible connections). Although learning is impracticable in general Boltzmann machines, it can be made quite efficient for RBMs. A deep Boltzmann machine (DBM) is a type of binary pairwise Markov random field (undirected probabilistic graphical model) with multiple layers of hidden random variables. Practical details:
In the figure we have the difference between a general and a restricted Boltzmann machine. The weights (orange arrow) are probabilistic units with activation 0. Or 1. In Boltzmann machines, information flows forward and backwards.
![]() |
![]() |
|---|
In the (right) figure RBMs are similar to (reverse) autoencoders but use stochastic units with particular distribution instead of deterministic distribution. The task of training is to find out how these two sets of variables are connected to each other. (left) The difference between the hidden nodes which are probabilistic and the input nodes.
Training the Restricted Boltzmann Machine (Contrastive Divergence) Paper: "Training Products of Experts by Minimizing Contrastive Divergence", "Reducing the Dimensionality of Data with Neural Networks".
Is not used anymore because back-propagation works so well. Attempts were made to use RBMs as dimensionality reduction algorithm. Results were okay, compared to PCA, the clusters seem more dense and separated.
Training algorithm:
Pixel-RNNs Paper: "Pixel Recurrent Neural Networks". The PixelRNN is a generative model for images. The network models conditional distribution of every individual pixel given previous pixels (to the left and to the top).
![]() |
![]() |
|---|
In the figures we have the distribution over color space of a single pixel in the generative process of the PixelRNN.
Alternative GM approaches not covered in this lecture: