Patent Publication Number: US-2023141655-A1

Title: System and Method For Loss Function Metalearning For Faster, More Accurate Training, and Smaller Datasets

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application claims benefit of priority to U.S. Provisional Application No. 62/851,766 entitled “SYSTEM AND METHOD FOR LOSS FUNCTION METALEARNING FOR FASTER, MORE ACCURATE TRAINING, AND SMALLER DATASETS” filed May 23, 2019 which is incorporated herein by reference in its entirety. 
    
    
     Additionally, the article by Gonzalez and Miikkulainen entitled Improved Training Speed, Accuracy, and Data Utilization Through Loss Function Optimization including Version 1 (arXiv:1905.11528v1, May 27, 2019), Version 2 (arXiv:1905.11528v2, Feb. 10, 2020), and Version 3 (arXiv:1905.11528v3, Apr. 27, 2020) is incorporated herein by reference in its entirety. The article lists overlapping authors with the inventors and provides additional description and support for the embodiment set forth herein. 
     COMPUTER PROGRAM LISTING 
     A Computer Program Listing is included in an Appendix to the present specification. The Appendix is provided on a compact disc and the Computer Program Listing thereon is incorporated herein by reference in its entirety. The Computer Program Listing includes the following files which were created on Apr. 30, 2020 and included on compact disc: 
     
       
         
           
               
               
               
             
               
                   
               
             
            
               
                 1,486 
                 kb 
                 .gitignore 
               
               
                 2,127 
                 kb 
                 CheckpointingTests.swift 
               
               
                 10,669 
                 kb 
                 CMAES.swift 
               
               
                 3,533 
                 kb 
                 CMAESIntegrationTests.swift 
               
               
                 2,380 
                 kb 
                 DecomposingPositiveDefiniteMatrix.swift 
               
               
                 1,013 
                 kb 
                 Double+ProbabilityDistributions.swift 
               
               
                 4,257 
                 kb 
                 EigenDecomposition.swift 
               
               
                 3,217 
                 kb 
                 EigenDecompositionTests.swift 
               
               
                 1,074 
                 kb 
                 LICENSE 
               
               
                 2,901 
                 kb 
                 LinearAlgebraTests.swift 
               
               
                 248 
                 kb 
                 LinuxMain.swift 
               
               
                 2,052 
                 kb 
                 Matrix.swift 
               
               
                 2,271 
                 kb 
                 ObjectiveEvaluator.swift 
               
               
                 335 
                 kb 
                 Package.resolved 
               
               
                 1,059 
                 kb 
                 Package.swift 
               
               
                 5,772 
                 kb 
                 README.md 
               
               
                 417 
                 kb 
                 Utilities.swift 
               
               
                 1,457 
                 kb 
                 Vector.swift 
               
               
                 287 
                 kb 
                 XCTestManifests.swift 
               
               
                   
               
            
           
         
       
     
     FIELD OF THE TECHNOLOGY 
     The field of the technology is neural network design optimization through metalearning. More specifically, metalearning applied to loss function discovery and optimization is described. 
     BACKGROUND 
     Machine learning (ML) has provided some significant breakthroughs in diverse fields including financial services, healthcare, retail, transportation, and of course, basic research. The traditional ML process is human-dependent, usually requiring an experienced data science team, to set-up and tune many aspects of the ML process. This makes the power of ML inaccessible to many fields and institutions. 
     Accordingly, there is on-going development to automate the process of applying machine learning to real-world problems. Hereafter referred to generally as AutoML, such automation would ideally reflect automation of each aspect of the ML pipeline from the raw dataset to the deployable models. With AutoML, it is anticipated that laymen would be able to take advantage of the power of ML to address real world problems by efficiently producing simpler solutions models that would potentially outperform human-engineered designs. 
     Much of the power of modern neural networks originates from their complexity, i.e., number of parameters, hyperparameters, and topology. This complexity is often beyond human ability to optimize, and automated methods are needed. An entire field of metalearning has emerged recently to address this issue, based on various methods such as gradient descent, simulated annealing, reinforcement learning, Bayesian optimization, and evolutionary computation (EC). Metalearning can generally be described as a subfield of machine learning where automatic learning algorithms are applied on metadata about machine learning experiments and is also referred to as learning to learn. 
     In addition to hyperparameter optimization and neural architecture search, new opportunities for metalearning have recently emerged. In particular, learning rate scheduling and adaptation can have a significant impact on a model&#39;s performance. Learning rate schedules determine how the learning rate changes as training progresses. This functionality tends to be encapsulated away in practice by different gradient-descent optimizers, such as AdaGrad and Adam which are known to those skilled in the art. While the general consensus has been that monotonically decreasing learning rates yield good results, new ideas, such as cyclical learning rates, have shown promise in learning better models in fewer epochs. 
     Metalearning methods have also been recently developed for data augmentation, such as AutoAugment, a reinforcement learning based approach to find new data augmentation policies. In reinforcement learning tasks, EC has proven a successful approach. For instance, in evolving policy gradients, the policy loss is not represented symbolically, but rather as a neural network that convolves over a temporal sequence of context vectors. In reward function search, the task is framed as a genetic programming problem, leveraging PushGP. 
     In terms of loss functions, a generalization of the L 2  loss was proposed with an adaptive loss parameter in J. T. Barron, “A general and adaptive robust loss function,” arXiv:1701.03077 (2017) which is incorporated herein by reference in its entirety. This loss function is shown to be effective in domains with multivariate output spaces, where robustness might vary across between dimensions. Specifically, the authors found improvements in Variational Autoencoder (VAE) models, unsupervised monocular depth estimation, geometric registration, and clustering. 
     Additionally, as described in K. Janocha and W. M. Czarnecki, “On loss functions for deep neural networks in classification,” arXiv:1702.05659 (2017) which is incorporated herein by reference in its entirety, recent work has found promise in moving beyond the standard cross-entropy loss for classification. L 1  and L 2  losses were found to have useful probabilistic properties. The authors found certain loss functions to be more resilient to noise than the cross-entropy loss. 
     For specific types of tasks, certain variations of the cross-entropy loss have yielded performance improvements. For example, for dense object detection, the inclusion of a new hand-designed coefficient in the cross-entropy loss aimed to increase the importance of challenging objects in scenes with many other easy objects. These types of explorations are somewhat limited in scope, both in terms of the tasks where they apply, and the space of loss functions that are considered. 
     Accordingly, while a wide repertoire of work now exists for optimizing many aspects of neural networks, the dynamics of training are still usually set manually without concrete, scientific methods. Notably, no existing work in the metalearning literature automatically optimizes loss functions for neural networks. Thus, a need exists in the art for an automated process for the optimization of loss functions. 
     SUMMARY OF CERTAIN EMBODIMENTS 
     In first exemplary embodiment, a process for partially training a neural network to discover and optimize a candidate loss function includes: initiating by a genetic algorithm running on at least one processor a random population of candidate loss functions, wherein each candidate loss function includes a set of optimizable coefficients; i. training by the genetic algorithm the random population of candidate loss functions on training data; ii. evaluating by the genetic algorithm a fitness of each candidate loss function based on a performance thereof on the training data in accordance with a fitness function; iii. selecting by the genetic algorithm one or more select candidate loss functions in accordance with the fitness evaluations; iv. reproducing by the genetic algorithm new candidate loss functions using the select candidate loss functions in accordance with reproduction processes to establish a next population of candidate loss functions; v. repeating steps i. to iv. for n th  generations; selecting by the genetic algorithm one or more best candidate loss functions in accordance with the fitness evaluations from an n th  generation population of candidate functions; optimizing by an optimization process running on at least one processor the set of coefficients of each of the one or more best candidate loss functions; and implementing an optimized best candidate loss function to train one or more predictive models. 
     In a second exemplary embodiment, a computer-readable medium storing instructions that, when executed by a computer, perform a process for partially training a neural network to discover and optimize a candidate loss function includes: initiating a random population of candidate loss functions, wherein each candidate loss function includes a set of optimizable coefficients; i. training the random population of candidate loss functions on training data; ii. evaluating a fitness of each candidate loss function based on a performance thereof on the training data in accordance with a fitness function; iii. selecting one or more select candidate loss functions in accordance with the fitness evaluations; iv. reproducing using the select candidate loss functions in accordance with reproduction processes to establish a next population of candidate loss functions; v. repeating steps i. to iv. for n th  generations; selecting one or more best candidate loss functions in accordance with the fitness evaluations from an n th  generation population of candidate functions; optimizing the set of coefficients of each of the one or more best candidate loss functions using an optimization process; and implementing an optimized best candidate loss function to train one or more predictive models. 
     In a third exemplary embodiment, an automated machine learning process includes: evolving candidate loss functions by a genetic algorithm running on at least one processor and selecting one or more best candidate loss functions in accordance with a fitness evaluation, wherein the candidate loss function is a tree having multiple nodes; optimizing by an optimization process running on at least one processor a set of coefficients of each of the one or more best candidate loss functions, wherein the set of coefficients is represented by a vector with dimensionality equal to the number of nodes in the best candidate loss function&#39;s tree; and implementing an optimized best candidate loss function to train one or more predictive models. 
     In a fourth exemplary embodiment, an automated machine learning system includes: a first subsystem including at least one processor programmed to perform a process of evolving candidate loss functions and selecting one or more best candidate loss functions in accordance with a fitness evaluation, wherein the candidate loss function is a tree having multiple nodes; a second subsystem including at least one processor programmed to perform a process of optimizing a set of coefficients of each of the one or more best candidate loss functions, wherein the set of coefficients is represented by a vector with dimensionality equal to the number of nodes in the best candidate loss function&#39;s tree; and a third subsystem including at least one processor programmed to perform a process of implementing an optimized best candidate loss function to train one or more predictive models. 
    
    
     
       BRIEF SUMMARY OF FIGURES 
         FIGS.  1   a  and  1   b    are schematics illustrating steps and system components and flow in accordance with one or more embodiments herein; 
         FIG.  2    compares mean testing accuracy on a first representative dataset between prior art loss functions and loss functions discovered in accordance with one or more embodiments herein; 
         FIG.  3    compares training curves on a first representative dataset between prior art loss functions and loss functions discovered in accordance with one or more embodiments herein; 
         FIG.  4    compares sensitivity to different dataset sizes on a first representative dataset between prior art loss functions and loss functions discovered in accordance with one or more embodiments herein; 
         FIG.  5    compares testing accuracy on a second representative dataset between prior art loss functions and loss functions discovered in accordance with one or more embodiments herein; 
         FIG.  6    compares binary classification loss functions on a first representative dataset between prior art loss functions and loss functions discovered in accordance with one or more embodiments herein; 
         FIGS.  7   a  and  7   b    shows output probabilities of networks trained prior art loss function ( FIG.  7   a   ) and loss function discovered in accordance with one or more embodiments herein ( FIG.  7   b   ); and 
         FIG.  8    shows training curves for multiple loss functions discovered in accordance with one or more embodiments herein; 
     
    
    
     DETAILED DESCRIPTION 
     The process described herein and exemplified through the descriptive embodiments is referred to as genetic loss function optimization (hereafter “GLO”). At a high level, GLO uses a genetic algorithm to construct candidate loss functions as trees. The process takes the best candidate loss functions from this set and optimizes the coefficients thereof using covariance-matrix adaptation evolutionary strategy (hereafter “CMA-ES”). Evolutionary computation (hereafter “EC”) methods were chosen because EC is arguably the most versatile of the metalearning approaches. EC, being a type of population-based search method, allows for extensive exploration, which often results in creative, novel solutions as described in, for example, commonly owned U.S. patent application Ser. No. 15/794,905 entitled Evolution of Deep Neural Network Structures and U.S. patent application Ser. No. 16/212,830 entitled Evolutionary Architectures for Evolution of Deep Neural Networks, the entire contents of which are incorporated herein by reference. For example, EC has been successful in hyperparameter optimization and architecture design, as well as discovering mathematical formulas to explain experimental data. The inventors recognized that EC methods might be able to discover creative solutions in the loss-function optimization domain as well. As discussed further herein, using meta-learned GLO loss functions, models are trained more quickly and more accurately. 
     The task of finding and optimizing loss functions can be framed as a functional regression problem. Per  FIG.  1   a   , GLO accomplishes this through the following high-level steps including the step of loss function discovery S 1  which uses approaches from genetic programming to build new candidate loss functions, and the step of coefficient optimization S 2  which further optimizes a specific, “best,” loss function, by leveraging CMA-ES to optimize coefficients. 
     Specifically, with regard to the step of loss function discovery S 1 , GLO uses a population-based search approach, inspired by genetic programming, to discover new optimized loss function candidates.  FIG.  1   b    is an exemplary schematic showing major components and flow of the framework. Under this framework, loss functions are represented as trees within a genetic algorithm. Trees are a logical choice to represent functions due to their hierarchical nature. The loss function search space is defined by the following tree nodes: 
     Unary Operators: log(∘), ∘ 2 , √{square root over (∘)} 
     Binary Operators: +, *, −, ÷ 
     Leaf Nodes: x, y, 1, −1, where x represents a true label, and y represents a predicted label. One skilled in the art recognizes that the specific operators used in this example are only a exemplary, more complex functions, such as the error function, can be included in the search space as well. 
     The search space is further refined by automatically assigning a fitness of 0 to trees that do not contain both at least one x and one y. Generally, a loss function&#39;s fitness within the genetic algorithm is the validation performance of a network trained with that loss function. To expedite the discovery process, and encourage the invention of loss functions that make learning faster, training does not proceed to convergence. Unstable training sessions that result in NaN values are assigned a fitness of 0. Fitness values are cached to avoid needing to retrain the same network twice. These cached values are each associated with a canonicalized version of their corresponding tree, resulting in fewer required evaluations. 
     Referring to  FIG.  1   b   , a candidate loss function discovery training system  10  includes a population initialization module  15  which generates an initial population of candidate loss functions composed of randomly generated trees with a maximum depth of two. Recursively starting from the root, nodes are randomly chosen from the allowable operator and leaf nodes using a weighting (where log(0), x, y are three times as likely and √{square root over (∘)} is two times as likely as +, *, −, ÷, 1, −1). This weighting can impart a bias and prevent, for example, the integer 1 from occurring too frequently. The initial randomly generated population is trained on training data from database  20 , validated on validated data from database  25  and subjected to fitness evaluation by fitness evaluation module  35  applying fitness function criteria  30 . Using fitness function determinations, a selection module  40  identifies elite candidates and applies roulette sampling to select candidates for reproduction. The genetic algorithm used in the embodiments herein has a population size of 80 and incorporates elitism with six elites per generation. Elite candidates, as well as cached candidates, are stored in the candidate genome database  50 . 
     The selected candidates are provided to the reproduction module  45  for recombination (crossover) and mutation. Recombination is accomplished by randomly splicing two trees together. For a given pair of parent trees (P 1  and P 2 ), a random element is chosen in each as a crossover point (CP 1  and CP 2 ). The two subtrees, whose roots are the two crossover points, are then swapped with each other.  FIG.  1   a    presents an example of this method of recombination. Both resultant child trees (C 1  and C 2 ) become part of the next generation. Recombination occurs with a probability of 80%. 
     To introduce variation into the population, the genetic algorithm has the following mutations, applied in a bottom-up fashion: integer scalar nodes are incremented or decremented with a 5% probability; nodes are replaced with a weighted-random node with the same number of children with a 5% probability; nodes (and their children) are deleted and replaced with a weighted-random leaf node with a 5%*50%=2.5% probability; leaf nodes are deleted and replaced with a weighted-random element (and weighted-random leaf children if necessary) with a 5%*50%=2.5% probability. Mutations, as well as recombination, allow for trees of arbitrary depth to be evolved. Combined, the iterative sampling, recombination, and mutation of trees within the population leads to the discovery of new loss functions which maximize fitness. 
     Next, the best candidates are selected for loss function coefficient optimization S 2  by module  55 . Loss functions found by the above genetic algorithm can all be thought of as having unit coefficients for each node in the tree. This set of coefficients can be represented as a vector with dimensionality equal to the number of nodes in a loss function&#39;s tree. The number of coefficients can be reduced by pruning away coefficients that can be absorbed by others (e.g., 3 (5x+2y)=15x+6y). The coefficient vector is optimized independently and iteratively using CMA-ES. The specific variant of CMA-ES that GLO uses is (μ/μ, λ)-CMA-ES, which incorporates weighted rank-μ updates to reduce the number of objective function evaluations that are needed. The following references are descriptive of the CMA-ES configurations utilized in the present embodiments and are incorporated herein by reference in their entireties: N. Hansen and A. Ostermeier, “Adapting arbitrary normal mutation distributions in evolution strategies: The covariance matrix adaptation,” in Proceedings of IEEE international conference on evolutionary computation, IEEE, 1996, pp. 312-317; Hansen et al., “Completely derandomized self-adaptation in evolution strategies,” Evolutionary computation, vol. 9, no. 2, pp. 159-195, 2001 and N. Hansen et al., “Evaluating the CMA evolution strategy on multimodal test functions,” in International Conference on Parallel Problem Solving from Nature. Springer, 2004, pp. 282-291. The Computer Program Listing Appendix hereto, which is incorporated herein in its entirety, provides a specific implementation. 
     The implementation of GLO presented in the embodiments herein uses an initial step size σ=1.5. As in the candidate loss function discovery phase, the objective function is the network&#39;s performance on a validation dataset after a shortened training period. 
     To highlight the usefulness and efficacy of the GLO process described in the above embodiments, GLO was evaluated on two well-known image classification task datasets: the MNIST and CIFAR-10. As discussed further below, GLO loss functions discovered on MNIST, are presented and evaluated in terms of resulting testing accuracy, training speed, training data requirements, and transferability to CIFAR-10. The initially discovered and evaluated GLO loss function is referred to herein as Baikal 
     The MNIST Handwritten Digits and CIFAR-10 datasets are well-understood and relatively quick to train image classification datasets as is known to those skilled in the art. These datasets were selected for the initial discovery and evaluation of GLO to allow rapid iteration in the development of GLO and allow time for more thorough experimentation. The selected model architectures are simple, since achieving state-of-the-art accuracy on MNIST and CIFAR-10 is not the focus of the embodiments, rather the improvements brought about by using a discovered GLO loss function is at issue. 
     Both of these tasks, being classification problems, are traditionally framed with the standard cross-entropy loss (sometimes referred to as the log loss): 
     
       
         
           
             
               
                 ℒ 
                 Log 
               
               = 
               
                 
                   - 
                   
                     1 
                     n 
                   
                 
                 ⁢ 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       0 
                     
                     
                       n 
                       - 
                       1 
                     
                   
                   
                     
                       x 
                       i 
                     
                     ⁢ 
                     
                       log 
                       ⁡ 
                       ( 
                       
                         y 
                         i 
                       
                       ) 
                     
                   
                 
               
             
             , 
           
         
       
     
     where x is sampled from the true distribution, y is from the predicted distribution, and n is the number of classes. The cross-entropy loss is used as a baseline in the following examples. 
     The first target task used for evaluation was the MNIST Handwritten Digits dataset, a widely used dataset where the goal is to classify 28×28 pixel images as one of ten digits. The MNIST dataset has 55,000 training samples, 5,000 validation samples, and 10,000 testing samples. 
     A simple Convolutional Neural Network (hereafter “CNN”) architecture with the following layers is used: (1) 5×5 convolution with 32 filters, (2) 2×2 stride-2 max-pooling, (3) 5×5 convolution with 64 filters, (4) 2×2 stride-2 max-pooling, (5) 1024-unit fully-connected layer, (6) a dropout layer with 40% dropout probability, and (7) a softmax layer. ReLU activations are used. Training uses stochastic gradient descent (hereafter “SGD”) with a batch size of 100, a learning rate of 0.01, and, unless otherwise specified, for 20,000 steps. 
     To further validate GLO, the more challenging CIFAR-10 dataset (a popular dataset of small, color photographs in ten classes) was used as a medium to test the transferability of loss functions found on a different domain (e.g., MNIST). CIFAR-10 consists of 50,000 training samples, and 10,000 testing samples. 
     A simple CNN architecture, inspired by AlexNet and described in A. Krizhevsky, et al., “ImageNet classification with deep convolutional neural networks,” NIPS′12: Proceedings of the 25th International Conference on Neural Information Processing Systems, Volume 1 Dec. 2012, Pages 1097-1105 incorporated herein by reference in its entirety, with the following layers is used: (1) 5×5 convolution with 64 filters and ReLU activations, (2) 3×3 max-pooling with a stride of 2, (3) local response normalization with k=1, α=0.001/9, β=0.75, (4) 5×5 convolution with 64 filters and ReLU activations, (5) local response normalization with k=1, α=0.001/9, β=0.75, (6) 3×3 max-pooling with a stride of 2, (7) 384-unit fully-connected layer with ReLU activations, (8) 192-unit fully-connected, linear layer, and (9) a softmax layer. 
     Inputs to the network are sized 24×24×3, rather than 32×32×3 as provided in the dataset; this enables more sophisticated data augmentation. To force the network to better learn spatial invariance, random 24×24 croppings are selected from each full-size image, which are randomly flipped longitudinally, randomly lightened or darkened, and their contrast is randomly perturbed. Furthermore, to attain quicker convergence, an image&#39;s mean pixel value and variance are subtracted and divided, respectively, from the whole image during training and evaluation. CIFAR-10 networks were trained with SGD, L 2  regularization with a weight decay of 0.004, a batch size of 1024, and an initial learning rate of 0.05 that decays by a factor of 0.1 every 350 epochs. 
     The most notable loss function that GLO discovered against the MNIST dataset (with 2,000-step training for candidate evaluation) is named the Baikal loss (named as such due to its similarity to the bathymetry of Lake Baikal when its binary variant is plotted in 3D): 
     
       
         
           
             
               
                 
                   
                     
                       ℒ 
                       
                         B 
                         ⁢ 
                         a 
                         ⁢ 
                         ikal 
                       
                     
                     = 
                     
                       
                         
                           - 
                           
                             1 
                             n 
                           
                         
                         ⁢ 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               0 
                             
                             n 
                           
                           
                             log 
                             ⁡ 
                             ( 
                             
                               y 
                               i 
                             
                             ) 
                           
                         
                       
                       - 
                       
                         
                           x 
                           i 
                         
                         
                           y 
                           i 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     where x is a sample from the true distribution, y is a sample from the predicted distribution, and n is the number of classes. Baikal was discovered from a single run of GLO. Additionally, after coefficient optimization using CMA-ES, GLO arrived at the following version of the Baikal loss: 
     
       
         
           
             
               
                 
                   
                     
                       ℒ 
                       BaikalCMA 
                     
                     ⁢ 
                     
                       = 
                       
                         
                           - 
                           
                             1 
                             n 
                           
                         
                         ⁢ 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               0 
                             
                             n 
                           
                           
                             
                               c 
                               0 
                             
                             ( 
                             
                               
                                 
                                   c 
                                   1 
                                 
                                 * 
                                 log 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     
                                       c 
                                       2 
                                     
                                     * 
                                     
                                       y 
                                       i 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 
                                   c 
                                   3 
                                 
                                 ⁢ 
                                 
                                   
                                     
                                       c 
                                       4 
                                     
                                     * 
                                     
                                       x 
                                       i 
                                     
                                   
                                   
                                     
                                       c 
                                       5 
                                     
                                     * 
                                     
                                       y 
                                       i 
                                     
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     where c 0 =2.7279, c 1 =0.9863, c 2 =1.5352, c 3 =−1.1135, c 4 =1.3716, c 5 =−0.8411. This loss function, BaikalCMA, was selected for having the highest validation accuracy out of the population. The Baikal and BaikalCMA loss functions had validation accuracies at 2,000 steps equal to 0.9838 and 0.9902, respectively. For comparison, the cross-entropy loss had a validation accuracy at 2,000 steps of 0.9700. Models trained with the Baikal loss on MNIST and CIFAR-10 (to test transfer) are the primary vehicle to validate GLO&#39;s efficacy, as discussed further herein. 
     With regard to testing accuracy,  FIG.  2    shows the increase in testing accuracy that Baikal and BaikalCMA provide on MNIST over models trained with the prior art cross-entropy loss. Over 10 trained models each, the mean testing accuracies for cross-entropy loss, Baikal, and BaikalCMA were 0.9899, 0.9933, and 0.9947, respectively. This increase in accuracy from Baikal over cross-entropy loss is found to be statistically significant, with a p-value of 2.4×10 −11 , in a heteroscedastic, two-tailed T-test, with 10 samples from each distribution. With the same significance test, the increase in accuracy from BaikalCMA over Baikal was found to be statistically significant, with a p-value of 8.5045×10 −6 . 
     With regard to training speed,  FIG.  3    shows training curves for different loss functions on MNIST. Baikal and BaikalCMA result in faster and smoother training compared to the cross-entropy loss. Each curve represents 80 testing dataset evaluations spread evenly (i.e., every 250 steps) throughout 20,000 steps of training on MNIST. Networks trained with Baikal and BaikalCMA both learn significantly faster than the cross-entropy loss. These phenomena make Baikal a compelling loss function for fixed time-budget training, where the improvement in resultant accuracy over the cross-entropy loss becomes most evident. 
     Regarding training data requirements,  FIG.  4    provides an overview of the effects of dataset size on networks trained with cross-entropy loss, Baikal, and BaikalCMA. For each training dataset portion size, five individual networks were trained for each loss function. Due to frequent numerical instability exhibited by the cross-entropy loss on the 0.05 dataset portion, these specific experiments had to be run many times to yield five fully-trained networks; no other dataset portions exhibited instability. As in previous experiments, MNIST networks were trained for 20,000 steps. 
     The degree by which Baikal and BaikalCMA outperform cross-entropy loss increases as the training dataset becomes smaller. This provides evidence of less overfitting when training a network with Baikal or BaikalCMA. As expected, BaikalCMA outperforms Baikal at all tested dataset sizes. The size of this improvement in accuracy does not grow as significantly as the improvement over cross-entropy loss, leading to the belief that the overfitting characteristics of Baikal and BaikalCMA are very similar. Ostensibly, one could run the optimization phase of GLO on a reduced dataset specifically to yield a loss function with better performance than BaikalCMA on small datasets. 
       FIG.  5    illustrates testing accuracy across varying training steps on CIFAR-10. The Baikal loss, which has been transferred from MNIST, outperforms the cross-entropy loss on all training durations. Specifically,  FIG.  5    presents a collection of 18 separate tests of the cross-entropy loss and Baikal applied to CIFAR-10. Baikal is found to outperform cross-entropy across all training durations, with the difference becoming more prominent for shorter training periods. These results present an interesting use case for GLO, where a loss function that is found on a simpler dataset can be transferred to a more complex dataset while still maintaining performance improvements. This faster training provides a particularly persuasive argument for using GLO loss functions in fixed time-budget scenarios. 
     It is likely that Baikal&#39;s improvement over cross-entropy result from implicit regularization, which reduces overfitting. Loss functions used on the MNIST dataset, a 10-dimensional classification problem, are difficult to plot and visualize graphically. To simplify, loss functions are analyzed in the context of binary classification, with n=2, the Baikal loss expands to 
     
       
         
           
             
               
                 
                   
                     ℒ 
                     
                       Baikal 
                       ⁢ 
                       2 
                       ⁢ 
                       D 
                     
                   
                   = 
                   
                     
                       - 
                       
                         1 
                         2 
                       
                     
                     ⁢ 
                     
                       
                         ( 
                         
                           
                             log 
                             ⁡ 
                             ( 
                             
                               y 
                               0 
                             
                             ) 
                           
                           - 
                           
                             
                               x 
                               0 
                             
                             
                               y 
                               0 
                             
                           
                           + 
                           
                             log 
                             ⁡ 
                             ( 
                             
                               y 
                               1 
                             
                             ) 
                           
                           - 
                           
                             
                               x 
                               1 
                             
                             
                               y 
                               1 
                             
                           
                         
                         ) 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     Since vectors x and y sum to 1, by consequence of being passed through a softmax function, for binary classification x=&lt;x 0 , 1−x 0 &gt; and y=&lt;y 0 , 1−y 0 &gt;. This constraint simplifies the binary Baikal loss to the following function of two variables (x 0  and y 0 ): 
     
       
         
           
             
               
                 
                   
                     ℒ 
                     
                       Baikal 
                       ⁢ 
                       2 
                       ⁢ 
                       D 
                     
                   
                      
                   ∝ 
                   
                     
                       - 
                       
                         log 
                         ⁡ 
                         ( 
                         
                           y 
                           0 
                         
                         ) 
                       
                     
                     + 
                     
                       
                         x 
                         0 
                       
                       
                         y 
                         0 
                       
                     
                     - 
                     
                       log 
                       ⁡ 
                       ( 
                       
                         1 
                         - 
                         
                           y 
                           0 
                         
                       
                       ) 
                     
                     + 
                     
                       
                         
                           1 
                           - 
                           
                             x 
                             0 
                           
                         
                         
                           1 
                           - 
                           
                             y 
                             0 
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
     This same methodology can be applied to the cross-entropy loss and BaikalCMA. 
     In practice, true labels are assumed to be correct with certainty, thus, x 0  is equal to either 0 or 1. The specific case where x 0 =1 is plotted in  FIG.  6    for the cross-entropy loss, Baikal, and BaikalCMA. Correct predictions lie on the right side of the graph, and incorrect ones on the left. The cross-entropy loss is shown to be monotonically decreasing, while Baikal and BaikalCMA counterintuitively show an increase in the loss value as the predicted label, y 0 , approaches the true label x 0 . This unexpected increase allows the loss functions to prevent the model from becoming too confident in its output predictions, thus providing a form of regularization. Further to  FIG.  6   , the minimum for the Baikal loss where x 0 =1 lies near 0.71, while the minimum for the BaikalCMA loss where x 0 =1 lies near 0.77. This minimum, along with the more pronounced slope around x 0 =0.5 is likely a reason why BaikalCMA performs better than Baikal. 
     The Baikal and BaikalCMA loss functions are surprising in that they incur a high loss when the output is very close to the correct value (as illustrated in  FIG.  6   ). Although at first glance this behavior is counterintuitive, it may provide an important advantage. The outputs of a trained network will not be exactly correct, although they are close, and therefore the network is less likely to overfit. Thus, these loss functions provide an implicit form of regularization, enabling better generalization. 
     This effect is similar to that of the confidence regularizer, which penalizes low-entropy prediction distributions. The bimodal distribution of outputs that results from confidence regularization is nearly identical to that of a network trained with BaikalCMA. Note that while these outputs are typically referred to as probabilities in the literature, this is often an erroneous interpretation. Histograms of these distributions on the test dataset for cross-entropy and BaikalCMA networks, after 15,000 steps of training on MNIST, are shown in  FIGS.  7   a  and  7   b   . The abscissae in  FIGS.  7   a  and  7   b    match, making clear how the distribution for BaikalCMA has shifted away from the extreme values. The improved behavior under small-dataset conditions described above further supports implicit regularization; less overfitting was observed when using Baikal and BaikalCMA compared to the cross-entropy loss. Notably, the implicit regularization provided by Baikal and BaikalCMA complements the different types of regularization already present in the trained networks. As detailed above, MNIST networks are trained with dropout, and CIFAR-10 networks are trained with L 2  weight decay and local response normalization, yet Baikal is able to further improve performance. 
     In a further embodiment of the GLO process, the loss function discovery search space can be extended to include a network&#39;s unscaled logits (i.e., the output of a classification neural network before the softmax layer) as a potential leaf node. The addition of unscaled logits extends the base implementation of GLO discussed above to support loss functions that take three variables, rather than two. Conceptually, the availability of more information should allow the training process to learn in a more intelligent manner. It is well known to those skilled in the art that lifting information deep in a network closer to the output can yield significant improvements in training. Unscaled logits in particular can provide information on the network&#39;s raw, unnormalized outputs. 
     When running GLO with this expanded search space on MNIST, a new loss function, referred to as the FastLogit loss, that outperformed the Baikal loss was discovered: 
     
       
         
           
             
               
                 
                   
                     
                       ℒ 
                       FastLogit 
                     
                     = 
                     
                       
                         - 
                         
                           1 
                           n 
                         
                       
                       ⁢ 
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             0 
                           
                           n 
                         
                         
                           
                             ( 
                             
                               
                                 
                                   y 
                                   ˜ 
                                 
                                 i 
                               
                               - 
                               
                                 x 
                                 i 
                               
                             
                             ) 
                           
                           * 
                           
                             ( 
                             
                               
                                 
                                   x 
                                   i 
                                 
                                 
                                   y 
                                   i 
                                 
                               
                                 
                               - 
                                 
                               
                                 ( 
                                 
                                   
                                     
                                       y 
                                       ˜ 
                                     
                                     i 
                                   
                                     
                                   - 
                                     
                                   
                                     ( 
                                     
                                       - 
                                       2 
                                     
                                     ) 
                                   
                                 
                                 ) 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     where {tilde over (y)} are the network&#39;s unscaled logits. Notably, this loss function is more complex than Baikal or the log loss, showing how evolution can use complexification to find better solutions. 
     The FastLogit loss is able to learn more quickly than Baikal, while converging to a comparable accuracy.  FIG.  8    shows training curves for the FastLogit and Baikal loss functions on MNIST. FastLogit results in faster training compared to Baikal, with a comparable final accuracy. This improvement over Baikal provides compelling evidence for having search spaces that include more types of data. Additional improvements may result from inclusion of preexisting regularization terms, such as an L 2  weight decay term, as optional leaf nodes. An alternative embodiment to this idea may be to forgo including regularization terms in GLO trees, and instead include them by default, with a coefficient of 0, in all loss functions, letting their importance be determined during the coefficient optimization step. Forgoing more freeform optimization of regularization terms as tree nodes would reduce the difficulties associated with larger search spaces in evolution. 
     The following hardware and software experiment implementation configurations are exemplary. One skilled in the art will recognize variations thereto while remaining fully within the scope of the embodiments. 
     Due to the large number of partial training sessions that are needed for both the discovery and optimization phases, training was distributed across the network to a cluster of dedicated machines that use HTCondor for scheduling. Each machine in this cluster has one NVIDIA GeForce GTX Titan Black GPU and two Intel Xeon E5-2603 (4 core) CPUs running at 1.80 GHz with 8 GB of memory. Training itself is implemented with TensorFlow in Python. The primary components of GLO (i.e., the genetic algorithm and CMA-ES) are implemented in Swift. These components run centrally on one machine and asynchronously dispatch work to the Condor cluster over SSH. Code for the Swift CMA-ES implementation is found in the Computer Program Listing Appendix hereto. One skilled in the art will recognize that processing performed on a singular machines may instead be performed across multiple machines. Similarly, data storage is not limited to any particular number of databases. 
     The present embodiments describe loss function discovery and optimization as a new form of metalearning, introducing an evolutionary computation approach. As described herein, evaluating GLO in the image classification domain, discovered new loss functions, Baikal and FastLogit. Baikal and FastLogit showed substantial improvements in accuracy, convergence speed, and data requirements over traditional loss functions. 
     GLO can be applied to other machine learning datasets and tasks. The approach is general, and can result in discovery of customized loss functions for different domains and/or specific datasets. For example, in the generative adversarial networks (GANs) domain, significant manual tuning is necessary to ensure that the generator and discriminator networks learn harmoniously. GLO could find co-optimal loss functions for the generator and discriminator networks in tandem, thus making GANs more powerful, robust, and easier to implement. GAN optimization is an example of co-evolution, where multiple interacting solutions are developed simultaneously. GLO could leverage co-evolution more generally: for instance, it could be combined with techniques like CoDeepNEAT to learn jointly-optimal network structures, hyperparameters, learning rate schedules, data augmentation, and loss functions simultaneously. Descriptions of exemplary co-evolution processes are described in co-owned U.S. patent application Ser. No. 15/794,913 entitled Cooperative Evolution of Deep Neural Network Structures which is incorporated herein by reference in its entirety. Though requiring significant computing power, GLO may discover and utilize interactions between the design elements that result in higher complexity and better performance than is currently possible. GLO can be combined with other aspects of metalearning in the future, paving the way to robust and powerful AutoML. 
     The applications for AutoML and the improved loss function discovery and optimization described herein are virtually unlimited. Such processes can solve real-world problems in nearly any domain and industry including, but not limited to: financial services, e.g., fraud detection, trading strategies, portfolio profiling; Government agencies, e.g., public safety (contraband detection, facial recognition), utilities (e.g., service disruption, theft, routing); health care, e.g., wearable devices and sensors for health assessment in real time, pattern recognition/data trends to identify red flags and improved diagnoses and treatment; Websites, e.g., analysis of consumer buying history for offer/marketing customization through social media, e-mail, etc.; Oil and gas, e.g., identification of new sources, protection of plants and refineries, distribution refinement; transportation, e.g., route efficiency; cybersecurity; imaging and sensing data analysis; language processing. 
     One skilled in the art recognizes that variations may be made to many aspects of the overall implementation discussed herein, such as, but not limited to, variations to training aspects and that such variations fall within the scope of the present invention.