Using metamodeling for fast and accurate hyperparameter optimization of machine learning and deep learning models

Herein are techniques that train regressor(s) to predict how effective would a machine learning model (MLM) be if trained with new hyperparameters and/or dataset. In an embodiment, for each training dataset, a computer derives, from the dataset, values for dataset metafeatures. The computer performs, for each hyperparameters configuration (HC) of a MLM, including landmark HCs: configuring the MLM based on the HC, training the MLM based on the dataset, and obtaining an empirical quality score that indicates how effective was said training the MLM when configured with the HC. A performance tuple is generated that contains: the HC, the values for the dataset metafeatures, the empirical quality score and, for each landmark configuration, the empirical quality score of the landmark configuration and/or the landmark configuration itself. Based on the performance tuples, a regressor is trained to predict an estimated quality score based on a given dataset and a given HC.

FIELD OF THE INVENTION

The present invention relates to hyperparameters optimization for machine learning (ML) models. Herein are techniques that train regressor(s) to predict how effective would a machine learning (ML) model be if configured with new values of hyperparameters and/or trained on a new dataset.

BACKGROUND

Use of machine learning (ML), such as deep learning (DL), is rapidly spreading through industries and business units and is becoming a ubiquitous tool within some corporations. A way to optimize an ML model entails tuning its hyperparameters, which are configuration settings. During hyperparameter tuning, an ML model is repeatedly trained with different (e.g. improving) hyperparameter values to explore a multidimensional configuration hyperspace. That exploration may be resource intensive of time and/or space. Hyperparameter settings have strong impact on model performance (e.g., accuracy, f1 score, etc.). Tuning a model's hyperparameters is exponentially hard and can be extremely time consuming especially for larger datasets.

Hyperparameter optimization of ML models is essential for many applications. This is because in most cases the default values of hyperparameters do not result in best performing models. During hyperparameter optimization, for an optimizer to explore the hyperparameter space, the ML model is trained and validated on a dataset many times using different hyperparameters values. Such exploration is time-consuming.

Unlike classical convex optimization problems, hyperparameter optimization of ML models is a unique and challenging problem due to at least the following three reasons:Black-box optimization: Often there is no known analytical formula to express an ML model's performance as a function of its hyperparameters. That means one cannot rely on classical (e.g. convex) optimization methods to find the optimum value, and the only way to explore a configuration hyperspace is through a trial that entails training and evaluation using a set of hyperparameters values.Training is slow: Training time of a single model is expensive and tuning requires re-training models and evaluating them several times per tuning session.Large number of hyperparameters: This is especially the case in Deep Neural Network models that usually have large number of hyperparameters such as number of layers, number of neurons, dropout, L2 regularization, etc., in each layer, as well as activation and optimizer parameters.

DETAILED DESCRIPTION

General Overview

To prepare a metamodel (i.e. metalearning hyperparameters optimizer) for a cold start (i.e. untrained metamodel or unfamiliar dataset), several initial points are used to roughly survey a multidimensional hyperparameters space for configuring a machine learning (ML) model, before exploring regions with more promising sets of hyperparameters values. To obtain each point, the ML model needs to be trained/evaluated on datasets, which is usually time consuming. Large number of hyperparameters results in a high dimensionality of optimizer's search space, which in turn may intensify the cold-start problem: the optimizer needs more points to better cover the high dimensional search space.

The process of metalearning-based hyperparameters optimization consists of the following three stages:1. Model training: generating a metadataset by repeatedly training a model with datasets;2. Metamodel training: using the metadataset to train a metamodel;3. Inference: hyperparameters optimization of the model by the metamodel for a new dataset.

All of those stages entail training the model. The second stage entails training a general metamodel. In an embodiment, the online third stage entails training an additional metamodel that is dedicated to the new dataset.

In the offline training stages 1-2, a metadataset needs to be collected across a corpus of datasets. To gather the metadata, an ML model is trained by varying hyperparameters across a range of values for each dataset and recording the obtained scores for each distinct pairing of a dataset and a hyperparameters configuration. That includes generating a set of configuration hyperstars (i.e. landmarks), which are performance reference points that may be reused across multiple datasets. Hyperstars may be used to quickly and concisely reveal some contours of a mysterious configuration hyperspace and/or dataset. Hyperstars are used herein to make quality score prediction flexible and more accurate for a metalearning regressor.

Dataset metafeatures are obtained for each dataset and combined with hyperstars, a current hyperparameters configuration, and a corresponding performance score. A regressor (i.e. metamodel) is tuned and trained on the metadataset to predict performance scores for the model. The trained regressor is used in the online third stage to bootstrap hyperparameter tuning. This is done by first extracting the metafeatures from the new metadataset and combining them with a set of (e.g. randomly generated) hyperparameters. The trained regressor can predict the scores for each generated hyperparameter configuration for a new dataset and train the model on those with highest predicted scores.

The online third stage entails inferencing by the general metamodel for hyperparameters optimization of the ML model given a new dataset. Metafeatures about the new dataset are used with the trained metamodel to warm start a hyperparameters optimization algorithm. The general metamodel predicts the performance score of the ML model for each of the randomly generated set of hyperparameter configurations. Specifically, static and dynamic metafeatures are obtained (e.g. extracted from) for the new dataset. Many hyperparameters configurations are generated and each one is combined with the metafeatures. A few top predicted hyperparameters configurations may be selected to evaluate the ML model with them. The runtime overhead of the prediction phase is usually insignificant compared to actual model evaluation (i.e. training and validation).

In an embodiment, for each training dataset, a computer derives, from the training dataset, values for dataset metafeatures. The computer performs, for each hyperparameters configuration, of a machine learning (ML) model, including landmark hyperparameters configurations: configuring the ML model based on the hyperparameters configuration, training the ML model based on the training dataset, and obtaining an empirical quality score that indicates how effective was said training the ML model when configured with the hyperparameters configuration. A performance tuple is generated that contains: the hyperparameters configuration, the values for the dataset metafeatures, the empirical quality score and, for each landmark configuration, the empirical quality score of the landmark configuration. Based on the performance tuples, a regressor is trained to predict an estimated quality score based on a given dataset and a given hyperparameters configuration.

The regressor is general, in the sense that it is trained with multiple datasets for eventual reuse with many new datasets. In an embodiment, an additional regressor is dedicated to learning and inferencing a new (i.e. unfamiliar) dataset and is not exposed to other datasets. In an embodiment, the general regressor may operate as “training wheels” for the dedicated regressor, such that the general regressor is used instead of or along with the dedicated regressor, at least until the dedicated regressor has had enough training to outperform the general regressor with the new dataset. In an embodiment, collaboration of both regressors entails confidence weighting them to reflect how well trained is the dedicated regressor so far, with training of the dedicated regressor still ongoing. In an embodiment, confidence weights are repeatedly adjusted in favor of the dedicated regressor to reflect monotonic improvements in the performance quality of the dedicated regressor in training.

1.0 Example Computer

FIGS.1A-Bare block diagrams that alternately depict a same example computer100, in an embodiment. InFIG.1A, computer100trains a regressor to predict how effective would a machine learning (ML) model be if configured with new values of hyperparameters and/or trained on a new dataset. Computer100may be one or more of a rack server such as a blade, a personal computer, a mainframe, a virtual computer, a smart phone, or other computing device.

Computer100may store within its memory two ML models130and150. Depending on the embodiment, ML model130is designed for clustering, classification, regression, anomaly detection, prediction, or dimensionality reduction (i.e. simplification). Examples of ML algorithms include decision trees, support vector machines (SVM), Bayesian networks, stochastic algorithms such as genetic algorithms (GA), and connectionist topologies such as artificial neural networks (ANN). Implementations of ML may rely on matrices, symbolic models, and hierarchical and/or associative data structures. Parameterized (i.e. configurable) implementations of best of breed ML model types may be found in open source libraries such as scikit-learn (sklearn), Google's TensorFlow for Python and C++ or Georgia Institute of Technology's MLPack for C++. Shogun is an open source C++ ML library with adapters for several programing languages including C#, Ruby, Lua, Java, MatLab, R, and Python.

ML model130may have one of many model types. Each model type may have adjustable attributes (i.e. hyperparameters such as X-Y) that can be optimized to improve performance in various ways such as increased inference accuracy and/or reduced consumption of resource(s), such as time and/or space, during training and/or inferencing. Different model types have different amounts and different kinds of hyperparameters.

Before training, ML model130should be assigned a configuration, such as121-122of distinct configurations180. Each configuration consists of a respective value for each of hyperparameters X-Y. For example, the value of hyperparameter X is 5.5 for configuration121.

Each of hyperparameters X-Y has a range of multiple (e.g. infinitely many) values. Combinatorics of hyperparameters X-Y presents a hyperdimensional configuration space, with each of hyperparameters X-Y being one dimension of the configuration space.

The lifecycle of ML model130has two phases. The first phase is preparatory and entails training as shown, such as in a laboratory. The second phase entails inferencing (not shown) in a production environment, such as with live and/or streaming data.

During inferencing, ML model130is applied to a (e.g. unfamiliar) sample, which may be injected as input into ML model130. That causes ML model130to process the sample according to the internal mechanics of ML model130, which are specially configured according to reinforcement learning by ML model130during previous training. For example if ML model130is a classifier, then ML model130may select one of multiple mutually exclusive labels (i.e. classifications) for the sample, such as hot and cold.

During training, exploration of the configuration space may alter performance of ML model130, which may achieve improvement(s) and/or degradation(s). For example, changing value(s) of hyperparameter(s) may simultaneously cause both training acceleration and decreased accuracy.

Supervised training of ML model130may entail processing training corpus170for reinforcement learning. Training corpus170contains at least training datasets111-112that may each contain files, records, or other data objects from which ML model130may form impressions that achieve generalizations.

Datasets111-112each have more or less distinct content. For example, dataset111may contain color photographs, and dataset112may contain monochrome photographs. In an embodiment, training corpus170is itself a monolithic dataset from which datasets111-112may be severed as non-overlapping cross-validation folds (i.e. portions) of the monolithic dataset. Freely available benchmark datasets for proofs of concept include OpenML's binary classification datasets.

No matter how similar or not are datasets111-112, some generalization is possible, such that all datasets within training corpus170have their own (e.g. different) values for a same set of metafeatures that describe a dataset as a whole, more or less without regard for any particular item in the dataset. For example, one metafeature may count how many colors are in a palette needed to render all photos in a dataset, which may have a smaller integer value if the dataset is monochromatic.

For example, metafeature A may be an average luminosity of all photos in a dataset. For example, the value of metafeature A is 1.1 for dataset111. Values of a metafeature may conform to a same datatype, such as integer, real number, or categorical, such as a photo orientation having a range of values such as portrait and landscape.

Derivation of metafeatures A-B from datasets such as111-112depends on the embodiment. Examples of metafeature derivation include a count of items (i.e. examples, samples) in the training dataset, a count of features of items in the training dataset, or a statistical moment (e.g. first, second, third, mean, or variance) of values of a feature in the training dataset. Other metafeatures may have more involved derivations, such as a mutual information between: a first feature in a training dataset, and a classification label or a second feature in the training dataset.

During training, ML model130is (e.g. concurrently) repeatedly reconfigured and retrained, each time with a distinct pairing of a training dataset of111-112and a configuration of121-122. Because the training performance of ML model130depends on which configuration and which dataset, each training run achieves its own (e.g. different) performance measurement, shown as quality score. Quality score may be an accuracy, an error, a precision, a recall, a combination of those, or other metric that indicates how well trained is ML model130.

With different scores for different datasets and for different hyperparameters values, performance tuples140may be generated based on training corpus170and configurations180. When ignoring shown demonstrative header rows, for example, first data row of corpus170and first data row of configurations180are combined with the quality score that they achieved together, which forms first data row of performance tuples140.

One way to detect a possible quality score for new hyperparameter values is to actually configure ML model130with those values and actually measure quality achieved from training ML model130. However, training time for ML model130may be substantial and accompanied by central processing unit (CPU) consumption of electricity. As follows herein, that time and energy may be saved by instead having regressor150predict a quality score for ML model130, without actually configuring and training ML model130based on the new hyperparameter values. For example when inferencing with a new dataset and/or a new hyperparameter configuration, regressor150may predict that ML model130would achieve estimated quality score160.

Computer100metalearns because predictive regressor150learns by observing the performance of ML model130. Performance tuples140may be used as a training dataset for regressor150to learn to predict quality scores for other datasets and/or other hyperparameter configurations. For example, each row of performance tuples140may be encoded as (e.g. part of) a feature vector to which regressor150may be applied during training.

In an embodiment, regressor150is, or is accompanied by, a random forest that learns correlations between quality scores, model hyperparameters, and/or dataset metafeatures. The random forest may naturally provide ML explainability (MLX) for the model and/or the dataset. For example, a random forest may reveal which hyperparameters and/or metafeatures are most or least significant for affecting quality scores.

In an embodiment, for a given dataset, computer100may, by exploring the configuration hyperspace of ML model130, discover a promising hyperparameter configuration that potentially or actually achieves a best quality score. For example after regressor150is trained, a stochastic descent (not shown) or other multidimensional optimization may repeatedly invoke regressor150with (e.g. increasingly better) distinct hyperparameter configurations to eventually reach a best configuration. For example, an open source tool such as hyperopt may provide a harness that optimizes by repeatedly invoking regressor150. In an embodiment, the hyperparameter configuration(s) of a best or best few (i.e. fixed amount) prediction(s) are used to actually train ML model130to validate the prediction and/or to select which configuration is empirically best.

Termination (i.e. convergence) criteria for such an exploration depends on the embodiment. For example, regressor150may be invoked a few times to quickly find a good configuration, or may be invoked many times to laboriously find a much better configuration. Any quality score predicted by regressor150and/or any hyperparameter configuration proposed by an optimizing exploration may or may not be subsequently empirically validated by actually training ML model130.

The following example pseudocode may implement an example hyperparameter optimization.

InFIG.1B, same computer100uses hyperstars to quickly and concisely reveal some contours of a mysterious configuration hyperspace. In the various tabular data structures shown inFIG.1B, cells shown as empty actually contain realistic values that are not shown.

While a training performance tuple having a quality score, dataset meta-features, and a hyperparameter configuration provides good information, the tuple insufficiently describe a natural spectrum of possible operational performance, such as quality scores possible with other hyperparameter configurations and/or other datasets for a same ML model. Herein, hyperstars are points within a configuration hyperspace that serve as landmarks, such as185, and are introduced to make quality score prediction flexible and more accurate for a regressor such as150.

Training of ML model130may initially use landmark configurations185, which are a small subset of configurations180used during training. Landmark configurations185is shown as a table having some empty cells. Each empty cell actually contains a respective identifier of a training dataset or of hyperparameter X or Y of ML model130, with each of landmarks I-L having a unique combination of such values.

Example heuristics for generating individual landmarks I-L of landmark configurations185are as follows. In an embodiment, landmark(s) are generated separately for each hyperparameter X-Y, with remaining hyperparameters held constant. In an embodiment, the remaining hyperparameters are set to their respective default values or the respective midpoints of their respective value ranges. In an embodiment, the hyperparameter not held constant is varied according to a heuristic.

For example, minimum, maximum, midpoint, default, and/or regular grid intervals may occur in a landmark for a hyperparameter not held constant. For example if hyperparameter X has an integer range of 4-10, and hyperparameter Y defaults to 5, then some landmark configurations, expressed as (hyperparameter X, hyperparameter Y), may be (4,5), (4+10/2=7,5), and (10,5). Other landmark configurations may instead vary Y. Default values may be handcrafted, such as by experimentation or vendor recommendation.

Generation of non-landmark configurations may use random values, default values, grid intervals, or values discovered by stateful activities such as with gradients, binary search, neighborhood, or other explorations (e.g. optimization). Here, stateful generation means that subsequent configurations may be (e.g. greedily or stochastically) based on previous configurations, such as by interpolation, extrapolation, or refinement such as by stochastic descent.

Initially, training actually uses landmark configurations185with ML model130and captures quality scores, shown as a rightmost column of landmark configurations185. After landmark configurations185have quality scores, training of ML model130may continue with other hyperparameter configurations and/or datasets, and generation of performance tuples140may begin.

Performance tuples140may be generated as discussed above, with some additional data population. Each row (i.e. tuple) of performance tuples140stores the respective quality score of each landmark, shown as landmark scores I-L in performance tuples140.

After training of regressor150, regressor150may make predictions for a new dataset, such as113, and/or new hyperparameter configurations. Input tuples for inferencing may include metafeatures of new dataset113, hyperparameters of ML model130, and landmarks scores as shown. For example while in a production environment, processing of new production dataset113may begin by actually training ML model130with new dataset113and landmark configurations I-L to generate the landmarks scores shown in the production input table.

In an embodiment, these configuration landmarks and/or their achieved quality scores are encoded as features into a feature vector with which regressor150may be trained or otherwise applied. Thus, a (e.g. very) low resolution sketch of a configuration hyperspace's performance landscape for a new dataset may be provided to regressor150to increase accuracy of the regressor's prediction.

Computer100may generate at least landmark configurations I-L that have distinct sets of values and are well (e.g. evenly and widely) spaced within the configuration hyperspace of at least hyperparameters X-Y. Landmark configurations X-Y should be representative samples that provide at least a glimpse of the landscape (i.e. gradients) within the configuration hyperspace. For example, some extrapolation and/or interpolation might be possible (i.e. somewhat valid) once the performance metrics of landmark configurations I-L are known. In an embodiment, a fixed amount of landmark configurations are generated. In an embodiment, the amount of landmark configurations depends on how many hyperparameters (i.e. dimensions) are involved. Techniques for generating landmark configurations are discussed later herein.

The following example pseudocode obtains a metadataset for training a predictive regressor.

FIG.2is a flow diagram that depicts computer100training a regressor to predict how effective would a machine learning (ML) model be if configured with given values of hyperparameters and trained on a given dataset, in an embodiment.FIG.2is discussed with reference toFIGS.1A-B.

The process ofFIG.2trains both of ML models130and150. In steps201-205, target ML model130is repeatedly trained with various hyperparameter configurations to collect target performance data. Step206trains predictive regressor150based on the performance data.

In an embodiment, step206may have pipeline parallelism with the other steps. For example, whenever the other steps generate an individual performance tuple or batch of tuples, that tuple or batch may be processed by step206with or without waiting for the other steps to generate all performance tuples.

Steps201-205are repeated for each training dataset in a training corpus. Step201is preparatory and obtains values of metafeatures of a current training dataset as discussed above forFIGS.1A-B. In an embodiment, step201concurrently occurs for different training datasets.

Steps202-205are repeated for each of many distinct hyperparameters configurations of ML model130. Actual training of ML model130occurs during steps202-204with a current dataset and a current hyperparameters configuration. Within hyperparameter configurations180are landmark configurations185, which are the first to processed by steps202-204.

Step202configures ML model130with the current hyperparameters configuration, and step203trains ML model130with the current dataset. Thus, step204is able to measure a respective quality score that captures how effective (e.g. accurate) is ML model130with the current hyperparameters and dataset. In an embodiment, steps202-205may be concurrently repeated for each hyperparameters configuration, such as by separate computers and/or processor cores.

Step205generates a performance tuple based on the quality score, current hyperparameters and dataset, and landmarks scores as discussed above. For example, performance tuples140are individually generated by respective individual occurrences of step205.

After repeatedly retraining ML model130in steps202-204, ML model130may be later retrained in still more training runs, such as when predictive regressor150is eventually used (e.g. by hyperopt) to further explore the configuration hyperspace of ML model130to find more, likely improving, hyperparameter configurations and hopefully a new best configuration.

Step206achieves metalearning by training regressor150to make performance predictions about ML model130. As discussed herein, landmarks scores within performance tuples140accelerate training of and increase accuracy of regressor150.

FIG.3is a block diagram that depicts an example computer300, in an embodiment. Computer300uses dual regressors to accommodate a (e.g. extraordinary) dataset. Computer300may be an implementation of computer100. In the tabular data structure shown inFIG.3, cells shown as empty actually contain realistic values that are not shown.

Shared regressor351is deployed in production inferencing mode and may be an implementation of regressors discussed earlier. Thus, shared regressor351is already trained on many datasets and is intended for reuse to make predictions of multiple new datasets, such as310, with or without retraining.

Due to numerosity of items within the performance training corpus (not shown) of shared regressor351, statistics may have central tendencies (e.g. mode) that cause reinforcement learning for shared regressor351. After reinforcement training, shared regressor351is well prepared to recognize the performance landscape of a target ML model (not shown) that processed common examples, which may more or less fill an ordinary dataset that is processed by the target ML model. However, an uncommon dataset of the target ML model may (e.g. incidentally) have much abnormal data, which may reduce accuracies of the target ML model and of the shared regressor351as follows.

An uncommon target dataset may need uncommon (e.g. undiscovered) hyperparameters values for the target ML model. Hyperparameters values that previously performed well, may perform poorly with an unusual target dataset. Thus, shared regressor351may be trained to make predictions that are somewhat inaccurate for an unusual dataset, such as310. Computer300has the following three strategies for accommodating a new (e.g. unusual dataset).

First, it may be better to have a dedicated regressor, such as352, that is trained solely with new dataset310to make special predictions for dataset310. For example after training solely with dataset310, dedicated regressor352may be used (e.g. by hyperopt) to discover a better target hyperparameter configuration for dataset310than shared regressor351can.

Second and although dedicated regressor352is potentially (i.e. eventually) better than shared regressor351, dedicated regressor352is initially untrained upon arrival of new dataset310. Whereas, shared regressor351is already fully trained. Thus at least initially, it may be better to use shared regressor351to make predictions about new dataset310.

In an embodiment, the predictions by regressors351-352are confidence weighted. Shared regressor351may initially have moderate or somewhat high confidence. Whereas untrained dedicated regressor352may initially have low or no confidence.

As training of dedicated regressor352proceeds, confidence in dedicated regressor352monotonically increases, such as by schedule, such as according to time, iterations, performance tuples trained with so far, error, and/or other convergence criteria. In an embodiment, whichever regressor351-352currently has more weight has more impact in choosing hyperparameter configuration values. In a multidimensionally optimizing (e.g. hyperopt) embodiment, each of regressors351-352ranks the proposed hyperparameter configuration as ranks R1and R2(not shown), respectively. Then the rankings are rescaled according to the weight W1for regressor351, and W2for regressor352. The final rank of the hyperparameter configuration is R, which is R1*W1+R2*W2. After rescaling the rankings for all other hyperparameter configurations, top configurations that have the highest ranking as selected. In an embodiment, when the confidence of dedicated regressor352exceeds a threshold or exceeds that of shared regressor351by some threshold amount, then regressor351is no longer used to make predictions for new dataset310.

A third way that computer300accommodates new dataset310involves landmark scores M-N. Even though shared regressor351has no training experience with new dataset310, landmark scores M-N more or less immediately provide a crude overview of the performance landscape of new dataset310. Thus, landmark scores M-N increase the accuracy of regressors351-352and accelerate the training of dedicated regressor352.

In the shown embodiment, both regressors351-352reuse same landmark configurations to achieve different landmark scores. In an embodiment not shown, landmark configurations for training regressor352may include a fixed amount of best (e.g. non-landmark) configurations that were used for regressor351.

A consequence of dedicated regressor352to new dataset310lis that values of metafeatures E-F are constant throughout the life (i.e. training and inferencing) of dedicated regressor352, which means that metafeatures E-F have no effect upon the operation of dedicated regressor352. Thus, all metafeatures E-F are irrelevant to dedicated regressor352and need not ever be provided to dedicated regressor352.

In the shown embodiment, dashed arrows pointing into regressors351-352indicate which subset of performance features (i.e. columns) are provided to which regressor. As shown, shared regressor351expects all columns. As shown, metafeatures E-F are not provided to dedicated regressor352.

In the shown embodiment, landmark scores M-N are not provided to dedicated regressor352. Instead and although not shown, landmark scores may be transposed for dedicated regressor352such that landmarks are provided to dedicated regressor352as individual performance tuples with a respective landmark score stored in the quality score column.

In those ways and as shown, dedicated regressor352may be applied to performance feature vectors that are narrower (i.e. less bytes) than the performance feature vectors of shared regressor352.

The following example pseudocode achieves metalearning by a dedicated regressor R2that is accompanied by a general regressor R1that is already trained.

Software Overview

FIG.5is a block diagram of a basic software system500that may be employed for controlling the operation of computing system400. Software system500and its components, including their connections, relationships, and functions, is meant to be exemplary only, and not meant to limit implementations of the example embodiment(s). Other software systems suitable for implementing the example embodiment(s) may have different components, including components with different connections, relationships, and functions.

Software system500is provided for directing the operation of computing system400. Software system500, which may be stored in system memory (RAM)406and on fixed storage (e.g., hard disk or flash memory)410, includes a kernel or operating system (OS)510.

The OS510manages low-level aspects of computer operation, including managing execution of processes, memory allocation, file input and output (I/O), and device I/O. One or more application programs, represented as502A,502B,502C . . .502N, may be “loaded” (e.g., transferred from fixed storage410into memory406) for execution by the system500. The applications or other software intended for use on computer system400may also be stored as a set of downloadable computer-executable instructions, for example, for downloading and installation from an Internet location (e.g., a Web server, an app store, or other online service).

Software system500includes a graphical user interface (GUI)515, for receiving user commands and data in a graphical (e.g., “point-and-click” or “touch gesture”) fashion. These inputs, in turn, may be acted upon by the system500in accordance with instructions from operating system510and/or application(s)502. The GUI515also serves to display the results of operation from the OS510and application(s)502, whereupon the user may supply additional inputs or terminate the session (e.g., log off).

OS510can execute directly on the bare hardware520(e.g., processor(s)404) of computer system400. Alternatively, a hypervisor or virtual machine monitor (VMM)530may be interposed between the bare hardware520and the OS510. In this configuration, VMM530acts as a software “cushion” or virtualization layer between the OS510and the bare hardware520of the computer system400.

VMM530instantiates and runs one or more virtual machine instances (“guest machines”). Each guest machine comprises a “guest” operating system, such as OS510, and one or more applications, such as application(s)502, designed to execute on the guest operating system. The VMM530presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems.

In some instances, the VMM530may allow a guest operating system to run as if it is running on the bare hardware520of computer system500directly. In these instances, the same version of the guest operating system configured to execute on the bare hardware520directly may also execute on VMM530without modification or reconfiguration. In other words, VMM530may provide full hardware and CPU virtualization to a guest operating system in some instances.

In other instances, a guest operating system may be specially designed or configured to execute on VMM530for efficiency. In these instances, the guest operating system is “aware” that it executes on a virtual machine monitor. In other words, VMM530may provide para-virtualization to a guest operating system in some instances.

Cloud Computing

Machine Learning Models

A machine learning model is trained using a particular machine learning algorithm. Once trained, input is applied to the machine learning model to make a prediction, which may also be referred to herein as a predicated output or output. Attributes of the input may be referred to as features and the values of the features may be referred to herein as feature values.

A machine learning model includes a model data representation or model artifact. A model artifact comprises parameters values, which may be referred to herein as theta values, and which are applied by a machine learning algorithm to the input to generate a predicted output. Training a machine learning model entails determining the theta values of the model artifact. The structure and organization of the theta values depends on the machine learning algorithm.

In supervised training, training data is used by a supervised training algorithm to train a machine learning model. The training data includes input and a “known” output. In an embodiment, the supervised training algorithm is an iterative procedure. In each iteration, the machine learning algorithm applies the model artifact and the input to generate a predicated output. An error or variance between the predicated output and the known output is calculated using an objective function. In effect, the output of the objective function indicates the accuracy of the machine learning model based on the particular state of the model artifact in the iteration. By applying an optimization algorithm based on the objective function, the theta values of the model artifact are adjusted. An example of an optimization algorithm is gradient descent. The iterations may be repeated until a desired accuracy is achieved or some other criteria is met.

In a software implementation, when a machine learning model is referred to as receiving an input, executed, and/or as generating an output or predication, a computer system process executing a machine learning algorithm applies the model artifact against the input to generate a predicted output. A computer system process executes a machine learning algorithm by executing software configured to cause execution of the algorithm.

Classes of problems that machine learning (ML) excels at include clustering, classification, regression, anomaly detection, prediction, and dimensionality reduction (i.e. simplification). Examples of machine learning algorithms include decision trees, support vector machines (SVM), Bayesian networks, stochastic algorithms such as genetic algorithms (GA), and connectionist topologies such as artificial neural networks (ANN). Implementations of machine learning may rely on matrices, symbolic models, and hierarchical and/or associative data structures. Parameterized (i.e. configurable) implementations of best of breed machine learning algorithms may be found in open source libraries such as Google's TensorFlow for Python and C++ or Georgia Institute of Technology's MLPack for C++. Shogun is an open source C++ ML library with adapters for several programing languages including C#, Ruby, Lua, Java, MatLab, R, and Python.

Artificial Neural Networks

An artificial neural network (ANN) is a machine learning model that at a high level models a system of neurons interconnected by directed edges. An overview of neural networks is described within the context of a layered feedforward neural network. Other types of neural networks share characteristics of neural networks described below.

In a layered feed forward network, such as a multilayer perceptron (MLP), each layer comprises a group of neurons. A layered neural network comprises an input layer, an output layer, and one or more intermediate layers referred to hidden layers.

Neurons in the input layer and output layer are referred to as input neurons and output neurons, respectively. A neuron in a hidden layer or output layer may be referred to herein as an activation neuron. An activation neuron is associated with an activation function. The input layer does not contain any activation neuron.

From each neuron in the input layer and a hidden layer, there may be one or more directed edges to an activation neuron in the subsequent hidden layer or output layer. Each edge is associated with a weight. An edge from a neuron to an activation neuron represents input from the neuron to the activation neuron, as adjusted by the weight.

For a given input to a neural network, each neuron in the neural network has an activation value. For an input neuron, the activation value is simply an input value for the input. For an activation neuron, the activation value is the output of the respective activation function of the activation neuron.

Each edge from a particular neuron to an activation neuron represents that the activation value of the particular neuron is an input to the activation neuron, that is, an input to the activation function of the activation neuron, as adjusted by the weight of the edge. Thus, an activation neuron in the subsequent layer represents that the particular neuron's activation value is an input to the activation neuron's activation function, as adjusted by the weight of the edge. An activation neuron can have multiple edges directed to the activation neuron, each edge representing that the activation value from the originating neuron, as adjusted by the weight of the edge, is an input to the activation function of the activation neuron.

Each activation neuron is associated with a bias. To generate the activation value of an activation neuron, the activation function of the neuron is applied to the weighted activation values and the bias.

Illustrative Data Structures for Neural Network

The artifact of a neural network may comprise matrices of weights and biases. Training a neural network may iteratively adjust the matrices of weights and biases.

For a layered feedforward network, as well as other types of neural networks, the artifact may comprise one or more matrices of edges W. A matrix W represents edges from a layer L−1 to a layer L. Given the number of neurons in layer L−1 and L is N[L−1] and N[L], respectively, the dimensions of matrix W is N[L−1] columns and N[L] rows.

Biases for a particular layer L may also be stored in matrix B having one column with N[L] rows.

The matrices W and B may be stored as a vector or an array in RAM memory, or comma separated set of values in memory. When an artifact is persisted in persistent storage, the matrices W and B may be stored as comma separated values, in compressed and/serialized form, or other suitable persistent form.

A particular input applied to a neural network comprises a value for each input neuron. The particular input may be stored as vector. Training data comprises multiple inputs, each being referred to as sample in a set of samples. Each sample includes a value for each input neuron. A sample may be stored as a vector of input values, while multiple samples may be stored as a matrix, each row in the matrix being a sample.

When an input is applied to a neural network, activation values are generated for the hidden layers and output layer. For each layer, the activation values for may be stored in one column of a matrix A having a row for every neuron in the layer. In a vectorized approach for training, activation values may be stored in a matrix, having a column for every sample in the training data.

Training a neural network requires storing and processing additional matrices. Optimization algorithms generate matrices of derivative values which are used to adjust matrices of weights W and biases B. Generating derivative values may use and require storing matrices of intermediate values generated when computing activation values for each layer.

The number of neurons and/or edges determines the size of matrices needed to implement a neural network. The smaller the number of neurons and edges in a neural network, the smaller matrices and amount of memory needed to store matrices. In addition, a smaller number of neurons and edges reduces the amount of computation needed to apply or train a neural network. Less neurons means less activation values need be computed, and/or less derivative values need be computed during training.

Properties of matrices used to implement a neural network correspond neurons and edges. A cell in a matrix W represents a particular edge from a neuron in layer L−1 to L. An activation neuron represents an activation function for the layer that includes the activation function. An activation neuron in layer L corresponds to a row of weights in a matrix W for the edges between layer L and L−1 and a column of weights in matrix W for edges between layer L and L+1. During execution of a neural network, a neuron also corresponds to one or more activation values stored in matrix A for the layer and generated by an activation function.

An ANN is amenable to vectorization for data parallelism, which may exploit vector hardware such as single instruction multiple data (SIMD), such as with a graphical processing unit (GPU). Matrix partitioning may achieve horizontal scaling such as with symmetric multiprocessing (SMP) such as with a multicore central processing unit (CPU) and or multiple coprocessors such as GPUs. Feed forward computation within an ANN may occur with one step per neural layer. Activation values in one layer are calculated based on weighted propagations of activation values of the previous layer, such that values are calculated for each subsequent layer in sequence, such as with respective iterations of a for loop. Layering imposes sequencing of calculations that is not parallelizable. Thus, network depth (i.e. amount of layers) may cause computational latency. Deep learning entails endowing a multilayer perceptron (MLP) with many layers. Each layer achieves data abstraction, with complicated (i.e. multidimensional as with several inputs) abstractions needing multiple layers that achieve cascaded processing. Reusable matrix based implementations of an ANN and matrix operations for feed forward processing are readily available and parallelizable in neural network libraries such as Google's TensorFlow for Python and C++, OpenNN for C++, and University of Copenhagen's fast artificial neural network (FANN). These libraries also provide model training algorithms such as backpropagation.

An ANN's output may be more or less correct. For example, an ANN that recognizes letters may mistake an I as an L because those letters have similar features. Correct output may have particular value(s), while actual output may have somewhat different values. The arithmetic or geometric difference between correct and actual outputs may be measured as error according to a loss function, such that zero represents error free (i.e. completely accurate) behavior. For any edge in any layer, the difference between correct and actual outputs is a delta value.

Backpropagation entails distributing the error backward through the layers of the ANN in varying amounts to all of the connection edges within the ANN. Propagation of error causes adjustments to edge weights, which depends on the gradient of the error at each edge. Gradient of an edge is calculated by multiplying the edge's error delta times the activation value of the upstream neuron. When the gradient is negative, the greater the magnitude of error contributed to the network by an edge, the more the edge's weight should be reduced, which is negative reinforcement. When the gradient is positive, then positive reinforcement entails increasing the weight of an edge whose activation reduced the error. An edge weight is adjusted according to a percentage of the edge's gradient. The steeper is the gradient, the bigger is adjustment. Not all edge weights are adjusted by a same amount. As model training continues with additional input samples, the error of the ANN should decline. Training may cease when the error stabilizes (i.e. ceases to reduce) or vanishes beneath a threshold (i.e. approaches zero). Example mathematical formulae and techniques for feedforward multilayer perceptron (MLP), including matrix operations and backpropagation, are taught in related reference “EXACT CALCULATION OF THE HESSIAN MATRIX FOR THE MULTI-LAYER PERCEPTRON,” by Christopher M. Bishop.

Model training may be supervised or unsupervised. For supervised training, the desired (i.e. correct) output is already known for each example in a training set. The training set is configured in advance by (e.g. a human expert) assigning a categorization label to each example. For example, the training set for optical character recognition may have blurry photographs of individual letters, and an expert may label each photo in advance according to which letter is shown. Error calculation and backpropagation occurs as explained above.

Unsupervised model training is more involved because desired outputs need to be discovered during training. Unsupervised training may be easier to adopt because a human expert is not needed to label training examples in advance. Thus, unsupervised training saves human labor. A natural way to achieve unsupervised training is with an autoencoder, which is a kind of ANN. An autoencoder functions as an encoder/decoder (codec) that has two sets of layers. The first set of layers encodes an input example into a condensed code that needs to be learned during model training. The second set of layers decodes the condensed code to regenerate the original input example. Both sets of layers are trained together as one combined ANN. Error is defined as the difference between the original input and the regenerated input as decoded. After sufficient training, the decoder outputs more or less exactly whatever is the original input.

An autoencoder relies on the condensed code as an intermediate format for each input example. It may be counter-intuitive that the intermediate condensed codes do not initially exist and instead emerge only through model training. Unsupervised training may achieve a vocabulary of intermediate encodings based on features and distinctions of unexpected relevance. For example, which examples and which labels are used during supervised training may depend on somewhat unscientific (e.g. anecdotal) or otherwise incomplete understanding of a problem space by a human expert. Whereas, unsupervised training discovers an apt intermediate vocabulary based more or less entirely on statistical tendencies that reliably converge upon optimality with sufficient training due to the internal feedback by regenerated decodings. Autoencoder implementation and integration techniques are taught in related U.S. patent application Ser. No. 14/558,700, entitled “AUTO-ENCODER ENHANCED SELF-DIAGNOSTIC COMPONENTS FOR MODEL MONITORING”. That patent application elevates a supervised or unsupervised ANN model as a first class object that is amenable to management techniques such as monitoring and governance during model development such as during training.

Random Forest

A random forest or random decision forest is an ensemble of learning approaches that construct a collection of randomly generated nodes and decision trees during a training phase. Different decision trees of a forest are constructed to be each randomly restricted to only particular subsets of feature dimensions of the data set, such as with feature bootstrap aggregating (bagging). Therefore, the decision trees gain accuracy as the decision trees grow without being forced to over fit training data as would happen if the decision trees were forced to learn all feature dimensions of the data set. A prediction may be calculated based on a mean (or other integration such as soft max) of the predictions from the different decision trees.