Optimizing machine learning models using binarized parameter matrices and iterative re-randomization
A learning model optimization device includes a binarization matrix setting unit configured to set a binarization matrix m in which each element is a numerical value of “0” or “1” and a transformed matrix setting unit configured to set a transformed matrix M having, as an element, a product of each element of the parameter matrix and each element of the binarization matrix in the same row and the same column. The learning model optimization device further includes a learning unit configured to perform machine learning using the transformed matrix M and change a numerical value of each element of the binarization matrix m such that a result of the machine learning approaches teacher data, thereby optimizing the binarization matrix m, and a re-randomization processing unit configured to change again a parameter of the parameter matrix w.
1 . A learning model optimization device comprising:
a processor and memory storing instructions, wherein execution of the instructions causes the processor to perform operations comprising
providing a machine learning model comprising a first layer having a plurality of first nodes and a second layer having a plurality of second nodes, wherein the plurality of first nodes and the plurality of second nodes are connected by a plurality of branches associated with a parameter matrix, each branch corresponding to a respective parameter in the parameter matrix;
setting a binarization matrix having same rows and same columns as rows and columns of the parameter matrix and each element of the binarization matrix is a numerical value of “0” or “1”;
setting a transformed matrix having, as an element, a product of each element of the parameter matrix and each element of the binarization matrix in a same row and a same column;
performing machine learning for training the machine learning model using the transformed matrix and changing a numerical value of each element of the binarization matrix such that a result of the machine learning approaches preset training data, thereby optimizing the binarization matrix; and
changing an element among elements of the parameter matrix corresponding to an element having a numerical value of “0” among the elements of the transformed matrix, to a numerical value other than “0”,
recalculating the transformed matrix using the changed parameter matrix, and
performing the machine learning for training the machine learning model using the recalculated transformed matrix and changing the numerical value of each element of the binarization matrix such that the result of the machine learning approaches the preset training data, thereby optimizing the binarization matrix.
2 . The learning model optimization device according to claim 1 , wherein changing the element of the parameter matrix to the numerical value other than “0” comprises
adding a random number according to Gaussian distribution.
3 . The learning model optimization device according to claim 1 , wherein changing the element of the parameter matrix to the numerical value other than “0” is based on a random number according to arbitrary probability distribution.
4 . The learning model optimization device according to claim 1 , wherein setting the binarization matrix comprising
setting a ratio of “0” and “1” included in the binarization matrix to a constant ratio.
5 . A learning model optimization method comprising:
providing a machine learning model comprising a first layer having a plurality of first nodes and a second layer having a plurality of second nodes, wherein the plurality of first nodes and the plurality of second nodes are connected by a plurality of branches associated with a parameter matrix, each branch corresponding to a respective parameter in the parameter matrix;
setting a binarization matrix having same rows and same columns as rows and columns of the parameter matrix and each element of the binarization matrix is a numerical value of “0” or “1”;
setting a transformed matrix having, as an element, a product of each element of the parameter matrix and each element of the binarization matrix in a same row and a same column;
performing machine learning for training the machine learning model using the transformed matrix and changing a numerical value of each element of the binarization matrix such that a result of the machine learning approaches preset training data, thereby optimizing the binarization matrix;
changing an element among elements of the parameter matrix corresponding to an element having a numerical value of “0” among the elements of the transformed matrix, to a numerical value other than “0”;
recalculating the transformed matrix using the changed parameter matrix; and
performing the machine learning for training the machine learning model using the recalculated transformed matrix and changing the numerical value of each element of the binarization matrix such that the result of the machine learning approaches the preset training data, thereby optimizing the binarization matrix.
6 . A non-transitory computer-readable storage medium storing a program, wherein executing of the program causes a computer to function as the learning model optimization device according to claim 1 .