The following generally relates to training neural networks, and more particularly to training neural networks with factorised layers.
Recent developments in training very large vision and language models (alternatively referred to as neural networks), such as described in Brown et al., 2020; Fedus et al., and 2021; Dosovitskiy et al., 2020, have led to an increasing need for efficient training paradigms.
While low rank matrix factorisation of layers in a deep neural network may offer significant training speedups (up to 2×) and consume less memory when compared to unfactorized counterparts, matrix factorisation studies so far focused predominantly on linear networks and their applications to matrix sensing and matrix completion problems. Prior work in this space focuses on low-rank training in conjunction with additional training objectives or focuses on computing factorised approximations post-training. There has been limited prior work that focused on training dynamics for low rank deep neural networks.
For example, most works in the low rank space that focus on efficiency and speedups looked at post-hoc approximation of trained networks. (Yu et al., 2017) took an SVD free approach to reconstruct feature maps by minimising an objective that imposes sparse low rank structure. (Jaderberg et al., 2014) also considered a trained network upon which a low rank structure is imposed through filter and data reconstruction objectives. (Tai et al., 2016) focused on low rank training of CNNs from scratch; they proposed a horizontal and vertical filter decomposition of a convolutional kernel and reprojecting the same into orthogonal vectors at every step.
One of the reasons why prior work has focused on post-training low rank approximations is that training dynamics of neural networks are found to be poorly understood.
Naively training in the low rank space from scratch suffers a gap in performance. To resolve this, many recent attempts have been made to understand the implicit bias of gradient descent (GD) in matrix factorisation in both linear and non-linear networks. (Arora et al., 2019) investigated the behavior of GD in deep linear networks and found that as the depth of factorisation increases, GD tends to find low rank solutions Arora et al. also present evidence for the hypothesis that the language of norms such as nuclear norm, Frobenius norm, etc., may not be enough to describe the behavior of GD.
Martin & Mahoney, 2018 (Martin), presented an empirical analysis of commonly used architectures and characterised the dynamics of GD in deep non-linear networks in terms of Empirical Spectral Distributions (ESD) and phases of training. Martin defines a set of rank measures. Wang et al., 2021 used low rank training with unfactorized pre-training in the context of efficient communication in a distributed setting. Khodak et al., 2021 (Khodak) proposed a low rank training procedure by investigating initialisation and regularisation in factorised layers. Khodak analysed SVD based initialisation (Spectral Initialisation) and properties of L2 regularisation. Khodak conjectures that there is an interplay between normalisation and weight decay and formalise this behavior through factorised update equations.
Despite the work to date, training dynamics of neural networks are found to be poorly understood. A problem associated with poorly understood training dynamics is that training performance is difficult to optimize in view of the difficulty to identify appropriate methods to optimize training.
In training very large vision and language models, the effects of factorised layers on optimisation may be non-trivial.
Disclosed herein are devices, methods and systems which disclose exemplary formulations for factorising layers of a neural network which may increase training speeds and reduce memory requirements associated with the neural network and/or address shortcomings of current low rank training methodologies.
This disclosure questions existing beliefs about why techniques like singular value decomposition (SVD) based initialisation and modified L2 regularisation are effective. Starting with SVD based initialisation techniques which have been found to be effective in both low-rank and sparsity literature (Lee et al., 2019), random matrix theory is referred to in order to formally define the distribution of singular values at initialisation in modern neural networks and challenge prior assumptions on their importance. Empirical insights about the dynamics of singular values during training of an L2 regularised network and a hypothesis about why L2 regularisation on the re-composed matrix works better than L2 regularisation on its factors is presented in this application. This application presents results contrary to currently held beliefs about effective step size and its correlation with performance. This application also presents results from empirical testing and analysis of existing methodologies of pre-training as a strategy to train better performing low rank networks. This application presents experiments which demonstrate the effectiveness and practicality of training low rank neural networks.
Embodiments will now be described with reference to the appended drawings wherein:
Training deep neural networks in low rank, i.e., with factorised layers, is of particular interest to the machine learning and artificial intelligence community: it offers efficiency over unfactorized training in terms of both memory consumption and training time. Prior work has focused on low rank approximations of pre-trained networks and training in low rank space with additional objectives, offering various ad hoc explanations for chosen practice. Techniques are analyzed that work well in practice, and through extensive ablations on models such as GPT2 evidence falsifying common beliefs in the field is provided hinting in the process at exciting research opportunities that still need answering.
The following describes a training system that programmatically factorises target deep neural networks to maximise efficiency while keeping performance loss minimal. The disclosed factorisation methodologies enable training low rank factorised neural networks to process, for example, very large vision and language models.
The proposed methodologies are based on selecting, controlling, or measuring directions of the singular values in SVD based initialisation for low rank training frameworks, and not, and previously stipulated, based solely on the values of the singular values. In experimental testing, models trained with SVD based initialisation with the singular values set to one exhibited superior performance to past models.
In addition to selecting, controlling, or measuring the directions of the singular values, this application proposes an at least two-phase training technique: a first phase which trains in the unfactorised space for a fraction of the total training, and (2) a subsequent phase which trains the model based on the low rank formulation methodologies set out herein. The proposed training technique, based on the low rank formulation methodologies, may allow for training large language models efficiently while keeping performance loss due to low-rank compression minimal.
In one aspect, a method of training a neural network model including a first plurality of nodes is disclosed. The method includes providing a training data set comprising a plurality of inputs and a corresponding plurality of expected results, and training the neural network model. The model is trained by factorising, based on a singular value decomposition scheme, the first plurality of nodes into a low rank neural network model comprising a second plurality of nodes such that each node of the second plurality of nodes is defined at least in part by at least one weight matrix. The factorisation is based on a matrix decomposition scheme constrained by one or more directionality criteria. The training includes iteratively updating a respective value of weight matrices of the second plurality of nodes based on an error determined by comparing a prediction of the low rank neural network model based on the input to the expected result corresponding to the input upon which the prediction is based. The method includes storing the trained low rank neural network model.
In example embodiments, the at least one weight matrix has a lower effective rank compared to the respective node of the first plurality of nodes.
In example embodiments, the method further includes constraining the factorising to a desired depth constraining a number of matrices to at least one matrix. In example embodiments, the desired depth is two.
In example embodiments, the one or more directionality criteria requires all values of the dimensional matrix to have a single value. In example embodiments, the single value of the dimensional matrix is one.
In example embodiments, the method further includes pre-training the neural network model for a subset of a number of desired training iterations.
In example embodiments, the method further includes, in response to determining an effective rank of the low rank neural network model is too low, increasing a rank of the at least one of the weight matrices in subsequent iterations.
In example embodiments, the method further includes transmitting the trained low rank neural network model to a third party.
In example embodiments, the method further includes receiving the training data from the third party.
In example embodiments, the method further includes processing one or more new data points with the trained low rank neural network model to generate a new prediction.
In another aspect, a computer readable medium comprising computer executable instructions for performing the method of any one of the precedingly described method aspects is disclosed.
In another aspect, a training system comprising a processor and memory is disclosed. The memory includes computer executable instructions for generating a trained model according to any one of the precedingly described training method aspects.
In another aspect, method of training a neural network model is disclosed. The method includes providing a first training data set, and training the neural network model by factorising the neural network model into a low rank neural network model comprising a plurality of nodes based on a singular value decomposition scheme. The method includes storing the trained low rank neural network model as the neural network model.
In another aspect, a predictive system comprising a processor and memory is disclosed. The memory includes computer executable instructions for processing one or more new data points with a low rank neural network model, wherein the low rank neural network model. The low rank neural network model trained by factorising a first plurality of nodes of a neural network model into a low rank neural network model comprising a second plurality of nodes based on a singular value decomposition scheme such that each node of the second plurality of nodes is defined at least in part by at least one weight matrix. The factorisation is based on a matrix decomposition scheme constrained by one or more directionality criteria.
Turning now to the figures,
The factoriser 12 uses a set of factorisation parameters 16, as described further below (e.g., sections 3.1 to 5), to generate a trained model 18. As discussed below, the factoriser 12 may include multiple subcomponents to factorise a desired input neural network. In the example embodiment shown, the factoriser 12 includes a factorisation engine 20 which factorises layers of the deep neural network. Alternatively stated, the factorisation engine 20 may decompose the input neural network into one or more matrix representations which have a lower rank as compared to the input neural network. A recomposition module 22 can be used to recompose the decomposed matrix representations generated by the input neural network. The recomposition module 22 can be configured to only operate at the end of a training phase, recomposing the decompositions into the desired input neural network and incorporating weights learned by the decomposed matrix representations. The trained model 18 may be the decomposed matrix representation after the training phase, or the trained model 18 may be the recomposed desired input neural network after the training phase.
In example embodiments, the trained model 18 can be adopted or applied in a language processing application. The predicter 32 is configured to use the trained model 18 to transform input textual data 34, into an output dataset 36 of semantically related text. In the example shown in
It will be appreciated that the trained model 18 may be stored in an environment separate from the application computing environment. For example, the application computing environment may be a retail environment, such as a ticket seller chatbot, an enterprise computing environment, or any third-party environment. The trained model 18 may be trained, updated, and stored on a separate computing environment, such as a Cohere.AI platform computing environment for serving to the third-party environments. In example embodiments, the trained model 18 stored on the separate computing environment receives inputs from the third-party application computing environment and outputs the prediction to the third party application computing environment for display. The trained model 18 may be trained by data provided by the third-party computing environment. For example, the third party may provide a set of common employee or customer queries for training.
In the foregoing, this application discusses the assumptions and conjectures associated with the low rank formulation in the context of SVD initialisation and L2 regularisation.
In the disclosed experiments and analyses, a weight matrix W (e.g., the plurality of nodes of a neural network model) is factorised at each layer into two components U and V such that W=UVT(where U and V are a plurality of nodes of a second, low rank neural node network). The focus of the experiments was on a factorisation depth of 2, taking into consideration memory speedup tradeoffs: As the depth of factorisation at each layer increases, more activations need to be stored in memory for back propagation. A depth of two provides speedups across all the experiments while ensuring minimal activation memory overhead. Consider the difference between the vanilla gradient descent update (unfactorised) Wt+1=Wt−α∇W and the update performed in the factorised setting:
Khodak extend the update equation above to normalised layers. Most modern architectures rely on normalisation layers to train networks that generalise well.
This includes batch normalisation (Ioffe & Szegedy, 2015) in ResNets and layer normalisation (Baet al., 2016) in Transformers. One can refer to Khodak for a more detailed discussion on the type and role of normalisation in factorised layers and use their formulation of the normalised update equation, which is given by:
Where {circumflex over (∇)}t is ∇t with gradients taken with respect to the normalised weight matrix
The gradient descent in the factorised setting does not perfectly align with the vanilla gradient descent update. In the subsequent sections, the disclosure empirically explores and works to overcome the implicit biases of this factorised update so that one can make low rank training an effective and efficient training method.
Let W∈Rm×n be the weight matrix of a fully connected layer. One can factorise W as W=UVT with U∈Rm×r and VT∈Rr×n, where 0<r<min(m, n). At inference, when
factorising the fully connected weight matrix leads to a reduced memory footprint as well as floating point operations (flops from O(mn) to O(mr+rn). For training, the memory requirements change from O(mn+n) to O(mr+rn+n+r) to store the intermediate activations for backpropagation.
The disclosed experiments factorise convolution kernels in a way that supports rewriting the single convolution as two convolutions. The convolutional kernel W∈Rh×w×cin×cout was factorized as W=UVT with U∈Rh×w×cin×r and VT ∈R1×1×r×cout where h, w represent the kernel height and width respectively, cin and cout represent the number of input and output channels respectively and r represents the rank of the decomposition. In the low rank decomposition, r≤min(h×w×cin,cout). This leads to a reduction in flops from O(hwcincout) to O(hwcinr+rcout).
Khodak investigated the usefulness of spectral initialisation in low rank formulations of deep learning architectures and proposed a few hypotheses for why it works. This disclosure utilizes the same truncated SVD initialisation scheme, which is defined as follows:
Where W is a matrix of shape N×M, U of shape N×r, V of shape M×r, Σ is the diagonal matrix of singular values and r is the rank chosen for the factorisation. Note that U and V are rectangular matrices unless specified otherwise.
Khodak analysed SVD based initialisation in the context of the update Equation 1 and provide two hypotheses forwhy this technique works, both of which are disproved via the experiments set out herein.
U
0
U
0
T
=V
0
V
0
T
=Σr.
In the low rank context, U and V are rectangular matrices obtained from truncated SVD which makes U and V column-wise orthogonal matrices. Therefore, UUT and VVT cannot be equal Σr and ∇WtVtVtT+UtUtT ΣWt terms in the Equation 1 cannot be simplified.
The singular values of a Gaussian ensemble of scale1/√n are roughly distributed around 1. Marchenko-Pastur theory (described in Appendix A.1) is used to understand the distribution of singular values of a Gaussian ensemble matrix of size N×M, which states that the distribution of singular values is dependent on the scale of the random initialisation σ2 and the size ratio N/M of the layer.
The disclosed experiments show that spectral initialisation works for reasons other than the ones stated in prior work. In Section 4.1, an ablation experiment is presented that hints at why this initialisation scheme performs better.
Many architectures rely on L2 regularisation for better generalisation. The straightforward approach to impose L2 regularisation in a factorised network is to apply the Frobenius norm penalty to the factors U and V—that is,
(Srebro & Shraibman, 2005) showed that this penalty minimises the nuclear norm of the recomposed matrix UVT.
To address this, Khodak proposes penalising the Frobenius norm of the recomposed matrix UVT, which they refer to as, Frobenius decay. They argue that Frobenius decay helps in keeping the effective step size high throughout training where effective step size is the term η/ ∥W∥2F in Equation 2. It is shown, through an ablations study, that effective step size is an inadequate argument to justify the effectiveness of Frobenius decay over L2 regularisation. It is pointed out that the dynamics of low-rank training with L2 regularisation cannot be understood by only considering the normalised update Equation 2. This ignores the ηλ≈O(η2) terms arising from Frobenius norm penalty which have a non-trivial impact on the optimisation. It is found that the effectiveness of Frobenius decay over L2 regularisation can be better explained by examining the effective rank of the network. The rank measure proposed in (Martin& Mahoney, 2018)is used, which defines effective rank of a matrix W to be:
That is, the ratio between nuclear norm and the operator norm. In the present case, the effective rank of UVT is interesting.
The initial stages of training are widely believed to be important for good performance in neural networks (Achille et al., 2017) (Frankle et al., 2019a). This motivates us to explore training for a fraction of the total training steps in the unfactorised space before switching to low rank substitutions of these unfactorised layers. One can apply the truncated SVD scheme described in Equation 3 to the partially trained weights to obtain the factors of the layer. Section 4.3 describes the impact of pre-training on performance across the vision and language experiments and analyses the nature of the solutions found with pre-training when compared to solutions found by low rank networks trained from scratch (Evci et al., 2019) (Frankle et al., 2019b).
An example algorithm 1 of training the neural network in accordance with this disclosure is set out below:
= {W1, W2, ..., WN}, total training epochs
pre-training epochs
learning rate schedule
optimizer O and loss function
← False
do
then
)
do
= SVD(
)
)
indicates data missing or illegible when filed
As shown in Algorithm 1, in a first phase, denoted by the loop including Ipre, the weights of the neural network model are trained according to traditional techniques.
In a second phase, the weights (i.e., nodes) of the neural network model are factorised or decomposed with a singular value decomposition scheme (denoted by SVD). The weights of the low rank neural network model (e.g., ={U1, V1, U2, V2, . . . , UN, VN}), include at least one weight matrix for each node of the originally input neural network model. As set out herein, the weights of the low rank neural network model are determined based on factorisation of a respective node of the first plurality of nodes wherein the factorisation at least in part is based on the directional matrix Σn (alternatively referred to as directionality criteria). Σn in this example embodiment is shown as set to have all singular values set to one (1).
Once the neural network model has been factorised into the low rank neural network model (e.g., ={U1, V1, U2, V2, . . . , UN, VN}), the low rank neural network model is trained for the remaining desired iterations (i.e., from i>Ipre to i=I).
In example embodiments, after the first two training phases, if the effective rank of the low rank neural network model is too low, training may either be restarted, or resumed with the at least one of the weight matrices being configured with a higher rank. In this way, iteratively, a low rank model with a sufficiently high effective rank may be achieved.
Extensive experiments were conducted on both vision and language models. For vision models, a Wide-ResNet-28 (Zagoruyko & Komodakis, 2016) on CIFAR-100 and a ResNet-50 (He et al., 2015) on the ImageNet dataset were used. For the language modelling task, experiments were conducted on one million word benchmark dataset (LM1B) (Chelba et al., 2013) and use the GPT-2 (Radford et al., 2019) architecture. Details on the complete experimental setup can be found in Appendix A.2. In the following sections, different initialisation schemes are compared and the effects of L2 regularisation and Frobenius decay is studied. Finally, it is demonstrated that the effectiveness of and analyse the nature of solutions found by—pre-training.
One can show that spectral initialisation offers equivalent performance when compared to traditional initialisation schemes.
Then, one can show empirically that the singular values do not play a major role in improving performance and that it is the direction of the singular vectors that matters. This finding is in contrast with prior beliefs (Khodak et al., 2021) about the role of singular values in retaining the scale of initialisation. One can establish this by setting the singular values to ones in Equation 3. Tables 2, 3, 4 compare the results across initialisation schemes on CIFAR100, ImageNet and LM1B respectively. It is observed that spectral ones leads to a better accuracy on CIFAR-100, lower perplexity on LM1B and a commensurate performance on ImageNet.
The effective step size hypothesis can be investigated by training two networks, one with learning rate η and the other with
So, the effective step size of these networks is
respectively, based on Equation 2. If the hypothesis that a higher effective step size leads to better performance were true, it should be that halving the effective step size should lead to a lower performance, but it is found that
leads to models that are at least as good as models trained with learning rate η.
Tables 5, 6 and 7 compare the impact of effective step size on performance across CIFAR-100, ImageNet and LM1B respectively. Analysing the evolution of singular values in networks trained with L2 regularisation and Frobenius decay revealed that singular values are disproportionately affected in the case of L2 regularisation. It is observed that a “rich get richer, poor get poorer” phenomenon in L2 regularised networks causes the effective rank
of the network to drop because of the disproportionate increase in the operator norm of each layer. The averaged (across layers) effective rank at the end of training for the experiments are shown in Table 1.
Pre-training networks for a fraction of the total training steps were investigated and it is observed that this leads to a significantly improved performance in the language model experiments as shown in
One can then pre-train in the unfactorised space for 40,000 steps and continue training in the factorised space for 200,000 steps. Pre-training can be combined with the techniques aforementioned viz Frobenius decay and resuming with decompositions obtained from Spectral and Spectral ones as described in 3.4. In the vision experiments, it is found that pretraining does not offer improved performance compared to a low-rank network trained from scratch as shown in Tables 8 and 9. Furthermore, it is noticed that the solutions found with pre-training are closer in the parameter space to their corresponding baseline (unfactorised) models. This can be demonstrated by performing linear interpolation, shown in
It has been demonstrated empirically that Spectral initialisation and L2 regularisation on UVT improve low-rank training but are poorly understood. Singular value analyses and ablation studies have been presented that act as counter-examples to prior beliefs about why these techniques work. Additionally, it has been demonstrated that pretraining can be an effective strategy to improve low-rank performance and presented insights on the nature of solutions found by networks with pretraining.
Achille, A., Rovere, M., and Soatto, S. Critical learning periods in deep neural networks. CoRR, abs/1711.08856, 2017. URL http://arxiv.org/abs/1711.08856.
Arora, S., Cohen, N., Hu, W., and Luo, Y. Implicit regularization in deep matrix factorization, 2019.
Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization, 2016.
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M.,Wu, J.,Winter, C., Hesse, C., Chen,M., Sigler, E., Litwin,M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners, 2020.
Chelba, C., Mikolov, T., Schuster, M., Ge, Q., Brants, T., and Koehn, P. One billion word benchmark for measuring progress in statistical language modeling. CoRR, abs/1312.3005, 2013. URL http://arxiv.org/abs/1312.3005.
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. An image is worth 16×16 words: Transformers for image recognition at scale. CoRR, abs/2010.11929, 2020. URL https://arxiv.org/abs/2010.11929.
Evci, U., Pedregosa, F., Gomez, A. N., andElsen, E. The difficulty oft raining sparse neural networks CoRR, abs/1906.10732, 2019. URL http://arxiv.org/abs/1906.10732.
Fedus, W., Zoph, B., and Shazeer, N. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity CoRR, abs/2101.03961, 2021. URL https://arxiv.org/abs/2101.03961.
Frankle, J., Dziugaite, G. K., Roy, D. M., and Carbin, M. The lottery ticket hypothesis at scale. CoRR, abs/1903.01611, 2019a. URL http://arxiv.org/abs/1903.01611.
Frankle, J., Dziugaite, G. K., Roy, D.M., and Carbin, M. Linear mode connectivity and the lottery ticket hypothesis. CoRR, abs/1912.05671, 2019b. URL http://arxiv.org/abs/1912.05671.
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. URL http://arxiv.org/abs/1512.03385
Ioffe, S. and Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift, 2015.
Jaderberg, M., Vedaldi, A., and Zisserman, A. Speeding up convolutional neural networks with low rank expansions, 2014.
Khodak, M., Tenenholtz, N. A., Mackey, L., and Fusi, N. Initialization and regularization of factorized neural layers. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=KTIJT1nof6d.
Lee, N., Ajanthan, T., Gould, S., and Torr, P. H. S. A signal propagation perspective for pruning neural networks at initialization. CoRR, abs/1906.06307, 2019. URL http://arxiv.org/abs/1906.06307.
Martin, C. H. and Mahoney, M. W. Implicit self-regularization in deep neural networks: Evidence from random matrix theory and implications for learning, 2018.
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. Language models are unsupervised multitask learners. 2019.
Srebro, N. and Shraibman, A. Rank, trace-norm and max norm. In Auer, P. and Meir, R. (eds.), Learning Theory, pp. 545-560, Berlin, Heidelberg, 2005. SpringerBerlin Heidelberg. ISBN978-3-540-31892-7.
Tai, C., Xiao, T., Zhang, Y., Wang, X., and E, W. Convolutional neural networks with low-rank regularization, 2016.
Wang, H., Agarwal, S., and Papailiopoulos, D. Pufferfish Communication-efficient models at no extra cost 2021.
Yu, X., Liu, T., Wang, X., and Tao, D. On compressing deep models by low rank and sparse decomposition. pp. 67-76, 2017. doi: 10.1109/CVPR.2017.15.
Zagoruyko, S. and Komodakis, N. Wide residual networks. CoRR, abs/1605.07146, 2016. URL http://arxiv.org/abs/1605.07146.
Marchenko-Pastur (MP) theory defines the distribution of singular values of Gaussian random matrices in the infinite limit but is applicable to finite matrices with very reasonable error bounds. MP theory defines the distribution as:
For the language modelling task, the experiments were conducted on the one million word benchmark dataset (LM1B) (Chelba et al., 2013) and with the following set up: input sequence length is fixed at 25 and 1152 tokens for training and evaluation respectively and the vocab size is limited to 32K subwords and train all the models to 240K steps. A transformer language model was implemented on Tensorflow and run all the experiments on cloud TPUs. To have better savings on compute and memory the query, key value generation are combined into one weight matrix. For each transformer layer, three matrix operations: Q, K, V generation and the two fully connected layers are decomposed. Factorising the output projection layer is skipped and the combiner layer that combines the outputs of attention (this is a square matrix, and memory and compute benefit only for very small ranks). For all transformer runs, a rank of 62.5% is chosen, and half its baseline learning rate. For pre-training, 40K steps are trained unfactored, and then switched to low rank factorised training for the remaining 200K steps and halving the learning rate.
For the image classification task, experiments are conducted with CIFAR-100 and ImageNet. For CIFAR-100 the standard training/test split was used with a simple augmentation scheme—RandomCrop and Horizontal Flips. A WideResNet-28 (Zagoruyko & Komodakis, 2016) was trained for 200 epochs with SGD with momentum (0.9) and a batch size of 128. For regularisation, a weight decay coefficient of 5e-4 and no dropout was set. For the low rank training runs, every convolutional layer was factorized other than the first according to the factorisation scheme described above and the chosen rank. For ImageNet experiments, a standard ResNet-50 architecture was used and train on aTPUv2-8 with a per-core batch size of 128 and follow the same hyperparameters and learning rate schedule described in (He et al., 2015).
For simplicity and clarity of illustration, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the examples described herein. However, it will be understood by those of ordinary skill in the art that the examples described herein may be practiced without these specific details. In other instances, well-known methods, procedures and components have not been described in detail so as not to obscure the examples described herein. Also, the description is not to be considered as limiting the scope of the examples described herein.
It will be appreciated that the examples and corresponding diagrams used herein are for illustrative purposes only. Different configurations and terminology can be used without departing from the principles expressed herein. For instance, components and modules can be added, deleted, modified, or arranged with differing connections without departing from these principles.
It will also be appreciated that any module or component exemplified herein that executes instructions may include or otherwise have access to computer readable media such as storage media, computer storage media, or data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. Examples of computer storage media include RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information, and which can be accessed by an application, module, or both. Any such computer storage media may be part of the factoriser 12, application environment or other environment, any component of or related thereto, etc., or accessible or connectable thereto. Any application or module herein described may be implemented using computer readable/executable instructions that may be stored or otherwise held by such computer readable media.
The steps or operations in the flow charts and diagrams described herein are just for example. There may be many variations to these steps or operations without departing from the principles discussed above. For instance, the steps may be performed in a differing order, or steps may be added, deleted, or modified.
Although the above principles have been described with reference to certain specific examples, various modifications thereof will be apparent to those skilled in the art as outlined in the appended claims.
This application claims priority to U.S. Provisional Patent Application No. 63/203,454 filed on Jul. 23, 2021, the entire contents of which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
63203454 | Jul 2021 | US |