2 ms·
Fundamentally, artificial neural networks boil down to some code that can be written, mathematically, as σ(C*σ(B*σ(A*x)))... = y repeated matrix-vector multip
by OkayPhysicist 3y ago
Fundamentally, artificial neural networks boil down to some code that can be written, mathematically, as
σ(C*σ(B*σ(A*x)))... = y
repeated matrix-vector multiplication, separated by nonlinear functions, σ(). A,B,C etc here are your weights, x is your input vector, y is your output vector. Any nonlinear function will work, some behave better than others, but they must be present, otherwise you could simplify the problem by apply the associative property to the weights side of things, and you'd effectively have a single layer that can only simulate linear functions. A hidden layer is just any vector that is intermediate to that calculation, for example the result of σ(A*x) would be the first hidden layer.
So right off the bat, you obviously have a problem: "Examining the code" means examining the weights, which are just gigabyte/terabyte sized matrices. Opaque is putting it mildly. The only sane approach is to start from one of our known-meaningful vectors (the input or output), and work our way inwards from there, either seeing what elements of hidden layer vectors have the most significant value when a certain input is applied, or determining what hidden layer vector values produce values closest resembling a desired output.
Then you start running into the problems described in the article.
- janalsncm 3y agoThis is a really good explanation for a fully connected network. Most models will have more complex architectures so are even more complicated than this.
- OkayPhysicist 3y agoI haven't been great about keeping up with advances in the field, but to my understanding most if not all architectures in effect merely enforce symmetries upon the network. That is, they can be represented by a fully connected network but in that representation not all weights are free, in that some are fixed (0 or 1) or some are dependent (A(1,1) will also be equal to C(1,1)).
- janalsncm 3y agoI don’t blame you, things are pretty diversified so I’m white knuckling it through my own subfield. But as a simple example, convolution would be a little tedious to describe in the general notation you wrote above without getting into the image dimensions, stride, padding etc., not to mention residual layers or norm layers that are commonly used. Then there are things like stop gradient, dropout or even other training targets which are only used during training but not inference.
- OkayPhysicist 3y agoConvolution actually can be pretty elegantly translated into multiplication by a matrix with symmetries. It's been a few years, but that was an example we had to work out by hand in my Deep Learning course at university. It's pretty much the quintessential example of an enforced symmetry, in that it introduces a symmetry against translation.