A collection of fragments of understanding in the pursuit of deeper questions.
Lecturer: Matthew Cook
Feed-Forward Networks (FFNs) are not like the networks in the brain. In the feed-forward networks, the information moves in only one direction (forward) from the input nodes, through the hidden nodes (if they exist), and to the output nodes. There are no cycles in this network. Usually, people are referring to feed-forward networks when they talk about Artificial Neural Networks (ANNs). General structure:
A single unit, like a perceptron, can be seen as a feed-forward network. We can write down the connections of a FNN as a matrix of weights, so is the weight from i to j. Why FNN are nice? Because we can think about functions that receive inputs and generate outputs. When we use FNN we know what we want to compute. We need to set the weights of the network in order to compute the function we want. The process of defining the weights is called learning or training. In feed-forward networks it is easy to evaluate each unit. The outputs are continuous functions of the input, which facilitates the optimization in case of wrong outputs. The training can be done using "training data": input/output pairs . Where is the input value and is the desired output. Then, we can define the error , where is the output of the network. Differently of Hopfield Networks, we don't need continuous updates and we do not reevaluate units. FNN have the idea of a pipeline (unlike the brain). If a node on layer n in a FNN is connected to layer n + i with i > 1, this is still a FNN, however the most common structure is to connect nodes on layer n to nodes on layer n + 1. How can we change the weights to reduce the error? We can use gradient descent. We calculate all the in the network, easily, by starting at the end and then walking backwards. This is known as Backpropagation. Training Process
Backpropagation and Error Function Backpropagation is the process of calculating the derivatives, using the chain rule, from the last layer (directly connected with the output, thus, with the loss function) to the first layer (connected with the inputs). This process can be seen as walking through the network in a backward manner.
Gradient Descent Consider , we want to adjust (weights of the network) to minimize E. Gradient descent is the process of descending through the gradients (using the derivatives calculated with backpropagation), in this algorithm we try to reach the minimum of the loss function. This is an iterative process.
Generally, the iterative process is given by , where .
In the above picture: the left-most figure: is not a good threshold function. To know in what direction we should move to find out minima, we need to use a threshold function that is continuous and differentiable, like the one in the center figure. Right figure: .
We haven't yet found biological mechanisms that would be similar to gradient descent in the brain.
Boltzmann Machines Boltzmann Machines were invented in 1985 but not by Boltzmann. The name is given because these units use a Boltzmann distribution in their sampling function. These units are similar to Hopfield Networks, however, they have a probability of being active. When updating a unit, we set its value to zero or one probabilistically, following a sampling function (see figure below). Boltzmann machines do not converge, they do not reach a stable state. It can be seen as a system for sampling. It's a way to do a random walking in the state space.
Sampling There are many types of distributions. When we want to get examples of these distributions, we need to sample from it. And giving some samples we can recover the distribution of the data.
Figure: Representations of activation function for Hopfield Networks (HN) and Boltzmann Machines.
We want the units to forget previous states so the sampling is not biased, i.e., not similar to previous ones, thus really "random". While this sampling is nice, it is not useful as a memory, i.e., we don't want to sample things randomly from our memory.
We can define a network where the units have a real-valued activity level , and also we can make time continuous, so . Using units like this, we can make a feed-forward network.