Shallow neural networks as Wasserstein gradient flows: Difference between revisions
Paigehillen (talk | contribs) No edit summary |
Paigehillen (talk | contribs) No edit summary |
||
Line 50: | Line 50: | ||
==Wasserstein Gradient Flow== | ==Wasserstein Gradient Flow== | ||
<ref name="Schiebinger"> | <ref name="Schiebinger"/> | ||
Before computing the Wasserstein gradient flow for our minimization problem, we need to define a few terms. | Before computing the Wasserstein gradient flow for our minimization problem, we need to define a few terms. |
Revision as of 19:48, 11 February 2022
Motivation
Artificial neural networks (ANNs) consist of layers of artificial "neurons" which take in information from the previous layer and output information to neurons in the next layer. Gradient descent is a common method for updating the weights of each neuron based on training data. While in practice every layer of a neural network has only finitely many neurons, it is beneficial to consider a neural network layer with infinitely many neurons, for the sake of developing a theory that explains how ANNs work. In particular, from this viewpoint the process of updating the neuron weights for a shallow neural network can be described by a Wasserstein gradient flow.
Single Layer Neural Networks
{{See also Mathematics of Artificial Neural Networks}}
explain, add figure
Discrete Formulation
Let us introduce the mathematical framework and notation for a neural network with a single hidden layer.[1] Let be open . The set represents the space of inputs into the network. There is some unknown function which we would like to approximate. Let be the number of neurons in the hidden layer. Define
be given by
where is a fixed activation function and is a space of possible parameters . The goal is to use training data to repeatedly update the weights and based on how close is to the function . More concretely, we want to find that minimizes the loss function:
A standard way to choose and update the weights is to start with a random choice of weights and perform gradient descent on these parameters. Unfortunately, this problem is non-convex, so the minimizer may not be achieved. It turns out in practice, neural networks are surprisingly good at finding the minimizer. A nicer minimization problem that may provide insight into how neural networks work is a neural network model with infinitely many neurons.
Continuous Formulation
For the continuous formulation (i.e. when ), we rephrase the above mathematical framework. In this case, it no longer makes sense to look for weights that minimize the loss function. We instead look for a probability measure such that
minimizes the loss function:
- .
Here is an activation function with parameter .
Note that by restricting choices of to probability measures of the form , the above minimization problem generalizes to case with finitely many neurons as well.
To avoid overfitting the network to the training data, a potential term is added the loss function. For the remainder of this article, we define the loss function to be:
for a convex potential function . Often we choose . In fact, is convex, in contrast to the minimization function in the finite neuron case.
Wasserstein Gradient Flow
Before computing the Wasserstein gradient flow for our minimization problem, we need to define a few terms.
Wasserstein Distance
Let us first define the (pth) Wasserstein distance between two probability measures. [3] This can be defined for probability measures in any separable metric space. Let and let denote the space of transport plans from to . Define the pth Wasserstein distance from to to be:
where is the distance between and in the metric space . In this context, is just a subset of for some with the euclidean metric. Often .
First Variation
The first variation of a functional is the unique