Рет қаралды 6,212
This is the visualization of a machine learning algorithm generating the handwritten digits 0-9 twice each by optimizing the fitness level using gradient ascent.
The MNIST data set is a collection of 60,000 handwritten digits used to train an AI model together with 10,000 used to test the AI model. Each of these digits are represented as 28 by 28 matrices.
For our purposes, we only use the first 100 training data points.
Suppose that D_1,,...,D_{100} are our handwritten digits, and v_1,...,v_{100} are their numerical values one hot encoded as vectors of length 10.
Let F denote the 28 by 28 discrete Fourier transform matrix.
Let A be a 20 by 784 matrix. Let B_1,...,B_{784} be 10 by 20 matrices. The fitness level of (A,(B_1,...,B_{784})) is
\sum_{i=1}^{100}log(abs(dot((\sum_{j=1}^{784}B_j red(vec(F D_i F)_j]))*A*vec(D_i),v_i)))/100-log(norm(adjoint(A)*A))/2-log(norm(Z^2))/4 where Z=\sum_{i=1}^784 adjoint(B_j) B_j and where if v is a vector, then red(v) is the vector obtained by replacing the first entry in v with zero. The absolute value function is applied elementwise. There are many variations to this sort of fitness function.
We maximize this fitness using gradient ascent (with an initialization consisting of matrices with positive entries) to obtain a tuple (A,(B_1,...,B_{784})) which can be used to distinguish MNIST digits.
After maximizing the fitness level, consider functions g_0,...,g_9 by setting g_i(x)=abs(dot((\sum_{j=1}^{784}B_j red(vec(F D_i F)_j]))*A*vec(x),v_i))/norm(x)^3 where norm(x) refers to the Frobenius norm. The functions g_0,...,g_9 can be used to classify handwritten digits by declaring a matrix x to have value k if g_k(x)=\max_j g_j(x). The functions g_0,...,g_9 may even be used to determine whether an image is an image of a handwritten digit at all. If all of the values g_0(x),...,g_9(x) are low, then it is not likely that x is a handwritten digit at all.
For the visualization, we maximize the fitness function g_i(x) using gradient ascent twice for each digit i in {0,...,9}, and we show the two matrices during the course of training i. We observe that for each digit, in both instances, we obtain the same matrices after training.
The absolute value of the Fourier transform of the image will be the same if the image is rotated up down or left right. The absolute value of the Fourier transform also non-linearly expands our matrix with positive entries into two matrices with positive entries, and it seems easier to distinguish MNIST digits using two matrices with positive entries instead of just one. We need positivity in order for our algorithms to consistently produce the same results, so we had to take the absolute value of the Fourier transform.
The AI algorithm for producing MNIST digits is my own. This experiment has a few good interpretability characteristics. First of all, after training, the tuple (A,(B_1,...,B_{784})) will not have any random or pseudorandom information in the sense that if we train (A,(B_1,...,B_{784})) multiple times, then the resulting tuple (A,(B_1,...,B_{784})) will be the same thing up to floating point errors and symmetry. The values x where g_j(x) is maximized are also unique (up to a sign) even though g_j incorporates the absolute value function. Finally, the values x where g_j(x) is maximized are actual MNIST digits instead of adversarial examples. But with that being said, these machine learning models for distinguishing and generating MNIST digits, and the MNIST handwritten digit dataset is very simple any easy to analyze. These AI algorithms for distinguishing and producing MNIST digits do not use the grid structure of the 28 by 28 images nor can these algorithms generalized to algorithms where adding many layers improves performance that much. The model g_0,...,g_9 for distinguishing handwritten digits is barely a non-linear model, and g_0,...,g_9 does not seem to be particularly suited for image processing.
Unless otherwise stated, all algorithms featured on this channel are my own. You can go to github.com/spo... to support my research on machine learning algorithms. I am also available to consult on the use of safe and interpretable AI for your business. I am designing machine learning algorithms for AI safety such as LSRDRs. In particular, my algorithms are designed to be more predictable and understandable to humans than other machine learning algorithms, and my algorithms can be used to interpret more complex AI systems such as neural networks. With more understandable AI, we can ensure that AI systems will be used responsibly and that we will avoid catastrophic AI scenarios. There is currently nobody else who is working on LSRDRs, so your support will ensure a unique approach to AI safety.