Adaptive sampling for imbalance mitigation and data set size reduction in machine learning

文档序号:1957984 发布日期:2021-12-10 浏览:18次 中文

阅读说明:本技术 机器学习中用于不平衡缓解和数据集大小缩减的自适应采样 (Adaptive sampling for imbalance mitigation and data set size reduction in machine learning ) 是由 蔡竞霄 S·阿格尔沃 S·伊蒂库拉 V·瓦拉达拉珍 A·雅科夫列夫 N·阿格尔沃 于 2020-04-09 设计创作,主要内容包括:根据实施例,一种方法包括从数据集生成第一数据集样本,计算第一数据集样本和机器学习模型的第一验证分数,以及确定第一验证分数和第二验证分数之间验证分数的差异是否满足第一标准。如果验证分数的差异不满足第一标准,那么该方法包括从数据集生成第二数据集样本。如果验证分数的差异确实满足第一标准,那么该方法包括更新收敛值并确定更新后的收敛值是否满足第二标准。如果更新后的收敛值满足第二标准,那么该方法包括返回第一数据集样本。如果更新后的收敛值不满足第二标准,那么该方法包括从数据集生成第二数据集样本。(According to an embodiment, a method includes generating a first data set sample from a data set, calculating a first validation score for the first data set sample and a machine learning model, and determining whether a difference in validation scores between the first validation score and a second validation score satisfies a first criterion. If the difference in the verification scores does not satisfy the first criterion, the method includes generating a second data set sample from the data set. If the difference in the verification scores does meet the first criterion, the method includes updating the convergence value and determining whether the updated convergence value meets a second criterion. If the updated convergence value satisfies the second criterion, the method includes returning the first data set sample. If the updated convergence value does not satisfy the second criterion, the method includes generating a second data set sample from the data set.)

1. A method, comprising:

generating a first dataset sample from a dataset, wherein the first dataset sample is a subset of the dataset;

calculating a first verification score for the first data set sample and the machine learning model;

determining whether a difference in the verification score between the first verification score and the second verification score satisfies a first criterion;

generating a second dataset sample from the dataset if the difference in the validation scores does not satisfy the first criterion, wherein the second dataset sample is a subset of the dataset;

if the difference in the verification scores does meet the first criterion, then:

updating the convergence value;

determining whether the updated convergence value meets a second criterion;

returning the first data set sample if the updated convergence value meets a second criterion;

if the updated convergence value does not satisfy a second criterion, a second data set sample is generated from the data set.

2. The method of claim 1, further comprising:

computing a third validation score for a second data set sample and the machine learning model;

determining whether a difference in the verification score between the third verification score and the first verification score satisfies a first criterion;

generating a third data set sample from the data set if the difference in the validation scores between the third validation score and the first validation score does not satisfy the first criterion, wherein the third data set sample is a subset of the data set;

if the difference in the verification score between the third verification score and the first verification score does meet the first criterion, then:

updating the convergence value;

determining whether the updated convergence value meets a second criterion;

returning a second data set sample if the updated convergence value meets a second criterion;

if the updated convergence value does not satisfy the second criterion, a third data set sample is generated from the data set.

3. The method of claim 1, wherein the difference in the verification score satisfies a first criterion when the difference in the verification score between the first verification score and the second verification score is less than a first threshold.

4. The method of claim 3, wherein the updated convergence value satisfies a second criterion when the updated convergence value is greater than a second threshold.

5. The method of claim 1, wherein the data set comprises a plurality of classes, and wherein generating a first data set sample further comprises undersampling each class of the plurality of classes having a class size greater than a class size parameter.

6. The method of claim 5, further comprising:

if the difference in the validation scores does not satisfy a first criterion, increasing a class size parameter by a growth factor and generating a second data set sample from the data set by undersampling each of the plurality of classes having a class size greater than the increased class size parameter;

if the updated convergence value does not satisfy the second criterion, the class size parameter is increased by the growth factor and a second data set sample is generated from the data set by undersampling each of the plurality of classes having a class size greater than the increased class size parameter.

7. The method of claim 1, wherein the size of the second data set samples is larger than the size of the first data set samples.

8. The method of claim 1, wherein generating each of the first data set samples and generating the second data set samples comprises performing a random undersampling of the data set.

9. The method of claim 1, wherein each of the first and second validation scores is a cross-validation score calculated for the respective dataset sample and the machine learning model.

10. The method of claim 1, wherein the convergence value is reset if the difference in the verification scores does not satisfy a first criterion.

11. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising:

generating a first dataset sample from a dataset, wherein the first dataset sample is a subset of the dataset;

calculating a first verification score for the first data set sample and the machine learning model;

determining whether a difference in the verification score between the first verification score and the second verification score satisfies a first criterion;

generating a second dataset sample from the dataset if the difference in the validation scores does not satisfy a first criterion, wherein the second dataset sample is a subset of the dataset;

if the difference in the verification scores does meet a first criterion:

updating the convergence value;

determining whether the updated convergence value meets a second criterion;

returning the first data set sample if the updated convergence value meets a second criterion;

if the updated convergence value does not satisfy a second criterion, a second data set sample is generated from the data set.

12. The one or more non-transitory computer-readable storage media of claim 11, storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising:

computing a third validation score for a second data set sample and the machine learning model;

determining whether a difference in the verification score between the third verification score and the first verification score satisfies a first criterion;

generating a third data set sample from the data set if the difference in the validation scores between the third validation score and the first validation score does not satisfy the first criterion, wherein the third data set sample is a subset of the data set;

if the difference in the verification score between the third verification score and the first verification score does meet the first criterion, then:

updating the convergence value;

determining whether the updated convergence value meets a second criterion;

returning a second data set sample if the updated convergence value meets a second criterion;

if the updated convergence value does not satisfy the second criterion, a third data set sample is generated from the data set.

13. The one or more non-transitory computer-readable storage media of claim 11, wherein the difference in the validation scores satisfies a first criterion when the difference in the validation scores between the first validation score and the second validation score is less than a first threshold.

14. The one or more non-transitory computer-readable storage media of claim 13, wherein the updated convergence value satisfies a second criterion when the updated convergence value is greater than a second threshold.

15. The one or more non-transitory computer-readable storage media of claim 11,

wherein the data set comprises a plurality of classes;

the one or more non-transitory computer-readable storage media further store instructions that, when executed by one or more processors, cause the one or more processors to perform functions of generating a first dataset sample by undersampling each class of the plurality of classes having a class size greater than a class size parameter.

16. The one or more non-transitory computer-readable storage media of claim 15, storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising:

if the difference in the validation scores does not satisfy a first criterion, increasing a class size parameter by a growth factor and generating a second data set sample from the data set by undersampling each of the plurality of classes having a class size greater than the increased class size parameter;

if the updated convergence value does not satisfy the second criterion, the class size parameter is increased by the growth factor and a second data set sample is generated from the data set by undersampling each of the plurality of classes having a class size greater than the increased class size parameter.

17. The one or more non-transitory computer-readable storage media of claim 11, wherein a size of the second data set sample is larger than a size of the first data set sample.

18. The one or more non-transitory computer-readable storage media of claim 11, storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising:

generating first data set samples by performing random undersampling on the data set;

generating second data set samples by performing random undersampling on the data set.

19. The one or more non-transitory computer-readable storage media of claim 11, wherein each of the first and second validation scores is a cross-validation score calculated for the respective dataset sample and the machine learning model.

20. The one or more non-transitory computer-readable storage media of claim 11, storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising: if the difference in the verification scores does not satisfy the first criterion, the convergence value is reset.

Technical Field

The present disclosure relates to adaptive sampling of data sets for use in Machine Learning (ML) models. The use of adaptive sampling described herein helps to provide an efficient and scalable ML pipeline while achieving good ML model performance.

Background

With the ever-increasing rate of data generation, instantaneous analysis becomes increasingly useful for data-driven applications. Performing data modeling using machine learning such as Deep Learning (DL) is one technique that deals with this growing trend. While many existing ML pipelines provide high model performance, their scalability or efficiency may not be sufficient to support live analysis. For example, existing ML pipelines may not be designed to handle large data sets and unbalanced data sets in a timely manner without compromising model performance.

The large dataset size may result in a prolonged training, tuning, and verification process for the ML model, which may limit the efficiency, acceptance, and use of the model and dataset. Some approaches to solving the data set size problem focus on the data set itself, while implementing an undersampling strategy to reduce the data set size, thereby reducing the resource requirements of the training and tuning process. Disadvantages of these approaches include under-or over-sampling, which may result in sub-optimal efficiency and/or fractional performance. These methods may also have a narrow range of applications in their respective fields and may not be well suited for widespread use.

Unbalanced datasets can cause the ML model to favor over represented classes, which can lead to inaccurate predictions for the model. Generally, an unbalanced data set includes one or more classes that are much larger in size than one or more other classes. For example, an unbalanced data set may include class a and class B, where class a includes 100,000 samples and class B includes 1,000 samples. Applying an ML model to an unbalanced or biased dataset is not desirable for anomaly detection use cases, for example, where a less representative class may be more valuable for obtaining good results but the impact on the model may be negligible. There are some approaches that attempt to solve the problem of unbalanced data sets. However, these approaches tend to focus on either the dataset or the model only, and are not well suited to customizing dataset sampling to optimize the results of the unique combination of data characteristics and the model of interest.

The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Accordingly, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.

Drawings

In the drawings:

fig. 1 is a flow diagram of an adaptive data sampling technique according to an embodiment.

Fig. 2 is a diagram illustrating a relationship between a verification score and a sample size according to an embodiment.

Fig. 3 is a diagram illustrating a relationship between a verification score difference and a sample size according to an embodiment.

FIG. 4 is a block diagram that illustrates a computer system upon which an embodiment of the disclosure may be implemented;

FIG. 5 is a block diagram illustrating a basic software system that may be used to control the operation of a computing system.

Detailed Description

In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the example embodiment(s) of the present disclosure. It will be apparent, however, that the example embodiment(s) may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to avoid unnecessarily obscuring the example embodiment(s).

General overview

An Adaptive Data Sampling (ADS) technique is described herein that is performed to reduce resource requirements while maintaining good ML model performance. ADS techniques are widely applicable to different stages of ML applications or pipelines during training and tuning. Furthermore, ADS technology is useful because it addresses challenges from both data set oversize and imbalance.

ADS techniques sub-sample a data set while balancing the efficiency and model performance of a given ML model. In general, model performance refers to the quality or "goodness-of-fit" of the ML model. Model performance may be characterized by a validation score, such as a cross-validation score. Efficiency generally refers to the ability to achieve good model performance with fewer resources, such as computational time and hardware requirements.

ADS techniques provide flexibility by allowing tradeoffs between speed and fractional performance for a given data set and model. ADS techniques consider the model of interest when evaluating subsamples of a dataset, which helps to obtain more useful results from a given ML model.

More specifically, the ADS technique utilizes an iterative greedy approach to perform performance evaluation on the model of interest at each iteration. The ADS technique starts with smaller subsamples of a large dataset and greedily increases the number of samples to converge to a good verification score. This combination provides a quality prediction for each iteration as a reference to determine when to end the iteration based on whether a stopping criterion is met. Thus, the ADS technique is effective in maintaining high model performance by avoiding excessive or non-productive sub-sampling while reducing class redundancy in the data set. The joint evaluation of the model and dataset samples helps maintain good model performance and dataset information, which helps achieve an optimal balance between speed and fractional performance.

The stopping criteria for the ADS technique include a first threshold based on a change in the verification score between iterations, and a second threshold based on successive iterations that satisfy the first threshold. The stopping criteria and other ADS parameters may be customized for different situations or needs to allow the ADS technology to achieve a desired balance between speed and authentication score.

ADS techniques can be applied to many different algorithms, such as automated machine learning or AutoML pipelines, to obtain the benefits of reducing dataset size and minimizing fractional performance degradation. Reducing the data set size helps provide the benefit of allowing the hyperparametric exploration to track based on a representative smaller subset of the larger data set. In addition, reducing the data set size helps provide the benefit of reducing training and tuning time. Reducing training and tuning time tends to reduce the hardware requirements for implementing the ML model, which in turn allows less-resource users to employ and implement the ML model for their data processing applications. Furthermore, ADS techniques maintain good fractional performance for the dataset and model of interest, which amplifies the value of time saving work due to the minimal inherent tradeoff between better performance and faster speed. In summary, the ADS technique can be usefully applied to various data sets with any survey model due to its adaptability and versatility.

Example adaptive data sampling techniques

The use of ML models is being propagated in various industries as a ubiquitous tool for a variety of purposes. For example, ML models are used for object/object classification and regression tasks. In general, a classification task may involve determining which class a data item belongs to based on attributes of the data item in a data set. For example, given a list of animal attributes, such as head shape, nose length, tail length, and weight, the classification task may be to identify which animal class the attribute belongs to (e.g., dog, cat, horse, etc.). The regression task is similar to the classification task, but rather than identifying the discrete class to which the data entry belongs, the regression task infers a numerical value, such as predicting the market price of a house.

Fig. 1 is a flow diagram or process 100 of an ADS technique according to an embodiment. A computing system including one or more processors of a rack server, personal computer, mainframe, virtual computer, or other computing device may be configured to perform the ADS technique of fig. 1. At block 102, a computing system accesses a given dataset to be used in the ML model. The data set may include a plurality of classes, and the data samples in each class represent a feature or attribute. In an example, a given dataset includes three classes A, B and C, where class a has 200,000 samples, class B has 50,000 samples, and class C has 1,000 samples.

At block 104, the computing system begins an iteration of the ADS technique by undersampling the data set to generate data set samples or subsamples of the original data set. The computing system may perform random undersampling to generate the dataset samples. In the example of applying random undersampling to the three classes of data sets described above, the computing system generates data set samples having the same three classes A, B and C by randomly selecting a certain number of samples from each of the original classes A, B and C. In this example, the computing system determines the number of samples based on the customizable ADS parameter. For example, the ADS parameter may specify a minimum class size of 100 samples, so the computing system randomly selects 100 samples from each original class A, B and C to generate the dataset samples. Randomly selected 100 samples are included into the respective classes A, B and C of data set samples. At block 104, the computing system modifies the ADS parameter after generating the data set samples to increase the number of minimum samples per class by a customizable factor (e.g., 1.5). If there are subsequent iterations of block 104, the computing device is configured to generate new larger data set samples using the increased number of minimum samples per class.

The computing system may also use other sampling methods, such as hierarchical sampling or unbalanced sampling. Hierarchical sampling is a method of sampling classes proportionally to create sub-sampled datasets. Applying hierarchical sampling to the above-described dataset may result in a sub-sampled dataset that includes a certain number of samples from each class that is proportional to the size of each class relative to the dataset, e.g., 20,000 samples from class a, 5,000 samples from class B, and 100 samples from class C. For example, unbalanced sampling includes a method that uses a clustering algorithm that is applied to find the mean or center sample for each class and selects a certain number of samples that are closest to the mean or center.

At block 106, the computing system evaluates model performance for the model of interest and the sub-sampled data set. In an embodiment, a computing system evaluates model performance by calculating a Validation Score (VS), such as a cross-validation score, for a generated sub-sampled data set using a model of interest. In another embodiment, the computing system evaluates the model performance of the regression task by computing a validation score using, for example, mean square error.

According to process 100, the computing system determines whether to end the iteration based on whether a stopping criterion is satisfied. The stopping criteria includes two parts represented by blocks 108 and 114. At block 108, the computing system determines whether the model performance satisfies a first criterion. According to an example, the computing system determines whether a difference between the verification score calculated at block 106 of the current iteration and the verification score calculated at block 106 of the previous iteration satisfies a first threshold. In this example, the current and previous iterations may be consecutive iterations. If the difference in the verification scores falls within a first threshold, e.g., less than a given threshold (e.g., 0.01), then the computing system determines that the first criterion is satisfied.

If the first criterion is not satisfied, at block 110, the computing system updates the convergence value to decrement the convergence value or resets the convergence value to zero. The computing system then generates another data set sample at block 104. More particularly, in subsequent iterations of block 104, the computing system generates new, larger data set samples based on the increased number of samples from each class.

If the first criterion is satisfied, at block 112, the computing system updates the convergence value by incrementing the convergence value. Then, at block 114, the computing system determines whether a second criterion is satisfied. According to an example, the computing system uses the updated convergence value to determine whether a number of consecutive iterations that have met the first condition (the first threshold) exceeds a second threshold, which is a number of consecutive iterations required (e.g., 0, 1, 2, 3, etc.). The convergence value represents the number of consecutive iterations for which the first condition has been met.

If the second criterion is met, then at block 116 the computing system returns the current sample dataset, which is a sub-sample of the original dataset, which helps reduce resource requirements and also provides good performance of the ML model of interest.

If the second criterion is not satisfied, the computing system generates another data set sample at block 104. More particularly, in subsequent iterations of block 104, the computing system generates larger data set samples based on the modified ADS parameters and the increased number of samples from each class.

Table 1 provides example pseudo code or algorithms that may be executed by one or more processors of a computing system to perform the ADS technique of fig. 1.

TABLE 1

The ADS parameters are used to control and define the algorithm and include a class size parameter (msc), a class size growth factor (α), a fractional difference threshold parameter, and a number of successive convergence threshold. More particularly, the msc specifies the minimum number of samples in each class of a data set, where a given data set potentially contains multiple classes. In the example pseudo code of Table 1,ciRefers to the original number of samples in class i, andrefers to the number of samples selected from class i by a random undersampler (RandomUnderSampler) during an iteration j of sampling. In an embodiment, one or more processors of a computing system execute code to generate a dataset sample D comprising one or more classessBut ignoring most data sets with class sizes less than msc and data set classes with samples less than msc (| c)i|<msc). In another embodiment, rather than ignoring the dataset classes with fewer samples than msc, the ADS algorithm includes all the samples of these classes in the dataset samples.

According to the ADS algorithm, the msc is increased by a factor a in each iteration, which allows the algorithm to start with advantageously smaller sample sizes that help to result in negligible fractional loss. In one example, α ═ 1.5. Threshold parameter threshold1Is a number that specifies a minimum score change threshold and corresponds to the first threshold of block 108. The code of Table 1 specifies the score as the model M and current dataset D of interest by evaluationsA determined verification score (vs). Parameter threshold2A second threshold corresponding to block 114 and specifying that the change in score is below threshold1Is the smallest integer of consecutive iterations. A parameter threshold2And compared with the convergence value ("convergence" in table 1). The convergence value is initially set to zero and depends on whether a threshold-based condition is satisfied1Is decremented/reset or incremented (see also blocks 110, 112 of figure 1). If the convergence value is greater than threshold2Then the stop criteria ratio is met, at which point the ADS algorithm ends and returns to the final sampled dataset D for the current iterations. This final sampled data set has negligible loss of score on the selected model M being evaluated, while also providing significant improvement at runtime.

Technical benefits and applications

Fig. 2 and 3 further demonstrate the effectiveness of ADS processing and this technique. Fig. 2 is a diagram illustrating a relationship between a verification score and a sample size according to an embodiment. More specifically, fig. 2 shows a cross-validation (CV) score 202 from a linear SVC ML model compared to the number of samples per class. Fig. 3 is a diagram illustrating a relationship between a verification score difference and a sample size according to an embodiment. More particularly, fig. 3 shows the difference 302 between two consecutive verification scores of the linear SVC ML model during execution of the ADS technique compared to the number of samples per class.

In each of fig. 2 and 3, the intersection of the horizontal dashed line 204, 304 and the vertical dashed line 206, 306, respectively, represents the location where the ADS technique will stop and return to the dataset samples. Fig. 2 and 3 show that the CV scores plateau after an initial rapid increase, and then there is no significant change in CV scores despite the increase in dataset sample size (e.g., 500 to 21,197 samples per class). Thus, the stopping point of the ADS technique provides good model performance while keeping the dataset sample size relatively low, which improves efficiency.

Other benchmarking tests were also performed and the results show that the cross-validation score of the present ADS technique is consistently higher (0.02 to 0.06 higher) for various ML models, such as Ada boost classifier, decision tree classifier, extra tree classifier, gaussian NB, Keras MLP classifier, linear SVC, logistic regression, MLP classifier, random forest classifier, SVC and XGB classifier, compared to hierarchical sampling alone.

Tests have also shown that the present ADS technique consistently produces higher sample rates. For example, ADS techniques have been found to retain, on average, about 20% more data points than layered sampling using a fixed sample size setting alone. The reason for this is that ADS techniques tend to reduce the data set size while maintaining model score performance.

ADS techniques may also be beneficially integrated into an automatic ml (automl) pipeline to reduce the total computation time required without significant fractional performance loss. According to embodiments, ADS techniques are applied to the hyper-parameter adaptation phase of AutoML, which is typically the most time consuming of the AutoML phases (feature selection, hyper-parameter adaptation, and model selection). More specifically, ADS techniques may be used to generate fully represented subsamples of a data set, where the size of the subsamples is significantly reduced from the original data set. The use of such fully represented and smaller data set subsamples helps to greatly reduce the computational burden of hyper-parameter evaluation and adjustment, thereby bringing time-saving benefits to the hyper-parameter processing and the overall pipeline. As a further result, the use of ADS techniques in AutoML extends the use cases and makes the adoption of AutoML to various projects more attractive.

Tests have shown that integrating ADS technology into the AutoML pipeline reduces the total time to execute the AutoML pipeline by about half on average, compared to an AutoML pipeline that does not use ADS technology. Furthermore, tests have shown that integrating ADS technology in AutoML may result in a negligible fractional performance loss of approximately 0.003 of recalled macros. Furthermore, the versatility of the ADS technique allows the technique to be applied to other stages of the AutoML pipeline to provide further benefits.

Overview of hardware

According to one embodiment, the techniques described herein are implemented by one or more special-purpose computing devices. A special-purpose computing device may be hardwired to perform the techniques, or may include digital electronic devices such as one or more application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs) persistently programmed to perform the techniques, or may include one or more general-purpose hardware processors programmed to perform the techniques according to program instructions in firmware, memory, other storage, or a combination. Such special purpose computing devices may also incorporate custom hardwired logic, ASICs, or FPGAs with custom programming to implement these techniques. A special purpose computing device may be a desktop computer system, portable computer system, handheld device, networked device, or any other device that incorporates hardwired and/or program logic to implement the techniques.

For example, FIG. 4 is a block diagram that illustrates a computer system 400 upon which an embodiment of the invention may be implemented. Computer system 400 includes a bus 402 or other communication mechanism for communicating information, and a hardware processor 404 coupled with bus 402 for processing information. Hardware processor 404 may be, for example, a general purpose microprocessor.

Computer system 400 also includes a main memory 406, such as a Random Access Memory (RAM) or other dynamic storage device, coupled to bus 402 for storing information and instructions to be executed by processor 404. Memory 406 also may be used for storing temporary variables or other intermediate information during execution of instructions to be executed by processor 404. These instructions, when stored in a non-transitory storage medium accessible to processor 404, make computer system 400 a special-purpose machine that is customized to perform the operations specified in the instructions.

Computer system 400 further includes a Read Only Memory (ROM)408 or other static storage device coupled to bus 402 for storing static information and instructions for processor 404. A storage device 410, such as a magnetic disk, optical disk or solid state drive, is provided and coupled to bus 402 for storing information and instructions.

Computer system 400 may be coupled via bus 402 to an output device 412, such as a display, for displaying information to a computer user. An input device 414, including alphanumeric and other keys, is coupled to bus 402 for communicating information and command selections to processor 404. Another type of user input device is control device 416, such as a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to processor 404 and for controlling cursor movement on output device 412. Such control devices typically have two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), which allows the device to specify positions in a plane.

Computer system 400 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and/or program logic that, in conjunction with the computer system, causes computer system 400 to become or programs computer system 400 into a special purpose machine. According to one embodiment, computer system 400 performs the techniques described herein in response to processor 404 executing one or more sequences of one or more instructions contained in memory 406. Such instructions may be read into main memory 406 from another storage medium, such as storage device 410. Execution of the sequences of instructions contained in memory 406 causes processor 404 to perform the process steps described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions.

The term "storage medium" as used herein refers to any non-transitory medium that stores data and/or instructions that cause a machine to operate in a specific manner. Such storage media may include non-volatile media and/or volatile media. Non-volatile media includes, for example, optical, magnetic disks, or solid-state drives, such as storage device 410. Volatile media includes dynamic memory, such as memory 406. Common forms of storage media include, for example, a floppy disk, a flexible disk, hard disk, solid state drive, magnetic tape, or any other magnetic data storage medium, a CD-ROM, any other optical data storage medium, any physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip or cartridge.

Storage media is distinct from but may be used in conjunction with transmission media. Transmission media participate in the transfer of information between storage media. For example, transmission media includes coaxial cables, copper wire and fiber optics, including the wires that comprise bus 402. Transmission media can also take the form of acoustic or light waves, such as those generated during radio-wave and infrared data communications.

Various forms of media may be involved in carrying one or more sequences of one or more instructions to processor 404 for execution. For example, the instructions may initially be carried on a magnetic disk or solid state drive of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to computer system 400 can receive the data on the telephone line and use an infra-red transmitter to convert the data to an infra-red signal. An infra-red detector can receive the data carried in the infra-red signal and appropriate circuitry can place the data on bus 402. Bus 402 transfers data to main memory 406, and processor 404 retrieves and executes instructions from main memory 406. The instructions received by main memory 2406 may optionally be stored on storage device 410 either before or after execution by processor 404.

Computer system 400 also includes a communication interface 418 coupled to bus 402. Communication interface 418 provides a two-way data communication coupling to a network link 420, where network link 420 is connected to a network 422. For example, communication interface 418 may be an Integrated Services Digital Network (ISDN) card, cable modem, satellite modem, or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, communication interface 418 may be a Local Area Network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links may also be implemented. In any such implementation, communication interface 418 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.

Network link 420 typically provides data communication through one or more networks to other data devices. For example, network link 420 may provide a connection through local network 422 to a host computer 424 or to data equipment operated by an Internet Service Provider (ISP) 426. ISP 426 in turn provides data communication services through the world wide packet data communication network now commonly referred to as the "Internet" 428. Local network 422 and internet 428 both use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on network link 420 and through communication interface 418, which carry the digital data to computer system 400 and from computer system 400, are exemplary forms of transmission media.

Computer system 400 can send messages and receive data, including program code, through the network(s), network link 420 and communication interface 418. In the internet example, a server 430 might transmit a requested code for an application program through internet 428, ISP 426, local network 422 and communication interface 418.

The received code may be executed by processor 404 as it is received, and/or stored in storage device 410, or other non-volatile storage for later execution.

Overview of software

FIG. 5 is a block diagram of a basic software system 500 that may be used to control the operation of computing system 400. Software system 500 and its components, including their connections, relationships, and functions, are exemplary only, and are not meant to limit implementation of the exemplary embodiment(s). Other software systems suitable for implementing the exemplary embodiment(s) may have different components, including components with different connections, relationships, and functions.

Software system 500 is provided for directing the operation of computing system 400. Software system 500, which may be stored on system memory (RAM)406 and fixed storage (e.g., hard disk or flash memory) 410, includes a kernel or Operating System (OS) 510.

OS 510 manages 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 applications, denoted 502A, 502B, 502c.. 502N, may be "loaded" (e.g., transferred from fixed storage 410 into memory 406) for execution by system 500. Applications or other software intended for use on computer system 400 may also be stored as downloadable sets of computer-executable instructions, for example, for downloading and installation from an internet location (e.g., a Web server, app store, or other online service).

Software system 500 includes a Graphical User Interface (GUI)515 for receiving user commands and data in a graphical (e.g., "click" or "touch gesture") manner. In turn, these inputs can be operated on by system 500 according to instructions from operating system 510 and/or application(s) 502. GUI 515 is also used to display results of operations from OS 510 and application(s) 502, and the user can provide additional input or terminate the session (e.g., log out).

OS 510 may execute directly on bare hardware 520 (e.g., processor(s) 404) of computer system 400. Alternatively, a hypervisor or Virtual Machine Monitor (VMM)530 may be interposed between bare hardware 520 and OS 510. In this configuration, VMM 530 acts as a software "buffer" or virtualization layer between OS 510 and bare hardware 520 of computer system 400.

VMM 530 instantiates and runs one or more virtual machine instances ("guest machines"). Each guest machine includes a "guest" operating system, such as OS 510, and one or more applications, such as application(s) 502, designed to execute on the guest operating system. VMM 530 presents a virtual operating platform to the guest operating system and manages execution of the guest operating system.

In some instances, VMM 530 may allow a guest Operating System (OS) to run as if it were running directly on bare hardware 520 of computer system 500. In these instances, the same version of the guest operating system configured to execute directly on bare hardware 520 may also execute on VMM 530 without modification or reconfiguration. In other words, VMM 530 may provide full hardware and CPU virtualization to the guest operating system in some cases.

In other instances, the guest operating system may be specially designed or configured to execute on VMM 530 to improve efficiency. In these instances, the guest operating system "realizes" that it is executing on the virtual machine monitor. In other words, VMM 530 may provide para-virtualization to the guest operating system in some cases.

Computer system processes include an allocation of hardware processor time, and an allocation of memory (physical and/or virtual) for storing instructions for execution by the hardware processor, for storing data generated by the execution of the instructions by the hardware processor, and/or for storing hardware processor state (e.g., contents of registers) between allocations of hardware processor time when the computer system process is not running. Computer system processes run under the control of an operating system and may run under the control of other programs executing on the computer system.

Machine learning model

A machine learning model is trained using a particular machine learning algorithm. Once trained, the input (e.g., a data set) is applied to a machine learning model to make a prediction, which may also be referred to herein as a predicate output or output. The attributes of the input may be referred to as features, and the values of the features may be referred to herein as feature values.

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

In supervised training, training data is used by supervised training algorithms to train machine learning models. The training data includes inputs and "known" outputs. In an embodiment, the supervised training algorithm is an iterative process. In each iteration, the machine learning algorithm applies model artifacts and inputs to generate a prediction output. An error or variance between the predicted 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. The theta value of the model artifact is adjusted by applying an optimization algorithm based on an objective function. An example of an optimization algorithm is gradient descent. The iteration may be repeated until the desired accuracy is achieved or some other criterion is met.

In a software implementation, when a machine learning model is referred to as receiving input, executing, and/or generating output or predicates, a computer system process executing a machine learning algorithm applies model artifacts to the input to generate predicted output. The computer system process executes the machine learning algorithm by executing software configured to cause the algorithm to execute.

Machine Learning (ML) excels in problem categories including clustering, classification, regression, anomaly detection, prediction, and dimensionality reduction (i.e., simplification). Examples of machine learning algorithms include decision trees, Support Vector Machines (SVMs), bayesian networks, random algorithms such as Genetic Algorithms (GAs), and connection-oriented topologies such as Artificial Neural Networks (ANNs). Embodiments of machine learning may rely on matrices, symbolic models, and hierarchical and/or associated data structures. Parameterized (i.e., configurable) implementations of the best type of machine learning algorithm can be found in open source libraries, such as Google's tensfflow for Python and C + + or georgia's MLPack for C + +. Shogunn is an open source C + + ML library with adapters for several programming languages, including C #, Ruby, Lua, Java, Matlab, R, and Python.

Artificial neural network

Artificial Neural Networks (ANN) are machine learning models that model, at a high level, a system of neurons interconnected by directed edges. An overview of a neural network is described in the context of a hierarchical feedforward neural network. Other types of neural networks share the features of the neural network described below.

In a layered feed-forward network such as a multilayer perceptron (MLP), each layer includes a set of neurons. A hierarchical neural network includes an input layer, an output layer, and one or more intermediate layers called hidden layers.

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

Starting from each neuron in the input layer and the hidden layer, there are one or more directed edges pointing to the active neuron in the subsequent hidden layer or output layer. Each edge is associated with a weight. The edge from neuron to active neuron represents the input from neuron to active neuron, as adjusted by the weight.

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

Each edge from a particular neuron to an active neuron represents an activation value for the particular neuron that is an input to the active neuron, i.e., an input to an activation function of the active neuron, as adjusted by the weight of the edge. Thus, an activated neuron in a subsequent layer represents that the activation value of the particular neuron is an input to the activation function of the activated neuron, as adjusted by the weight of the edge. An active neuron may have a plurality of edges pointing to the active neuron, each edge representing that an activation value (as adjusted by the weight of the edge) from a source-originating neuron is an input to an activation function of the active neuron.

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

Illustrative data structures for neural networks

The artifacts of the neural network may include a matrix of weights and biases. Training the neural network may iteratively adjust the matrix of weights and biases.

For hierarchical feedforward networks, as well as other types of neural networks, an artifact may include one or more matrices of edges W. The matrix W represents the edge from layer L-1 to layer L. Assuming that the number of neurons in layers L-1 and L are N [ L-1] and N [ L ], respectively, the dimensions of matrix W are N [ L-1] columns and N [ L ] rows.

The bias for a particular layer L may also be stored in a matrix B having a column of N [ L ] rows.

The matrices W and B may be stored as vectors or arrays in RAM memory, or sets of values separated by commas in memory. When the artifact is persistently stored in persistent storage, matrices W and B may be stored as comma-separated values in compressed and/or serialized form or other suitable persistent form.

The specific inputs applied to the neural network include the value of each input neuron. The particular input may be stored as a vector. The training data includes a plurality of inputs, each input referred to as a sample in a set of samples. Each sample includes a value for each input neuron. The samples may be stored as a vector of input values and the samples may be stored as a matrix, one sample for each row in the matrix.

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

Training a neural network requires the storage and processing of additional matrices. The optimization algorithm generates a matrix of derivative values for adjusting the matrix of weights W and offsets B. Generating the derivative values may use and require storing a matrix of intermediate values generated in calculating the activation value for each layer.

The number of neurons and/or edges determines the size of the matrix required to implement the neural network. The fewer the number of neurons and edges in the neural network, the smaller the matrix and the memory required to store the matrix. Furthermore, the smaller number of neurons and edges reduces the amount of computation required to apply or train the neural network. Fewer neurons means fewer activation values need to be calculated during training and/or fewer derivatives need to be calculated.

The properties of the matrix used to implement the neural network correspond to the neurons and edges. The cells in the matrix W represent specific edges from layer L-1 to the neurons in layer L. An activation neuron represents an activation function of a layer that includes the activation function. The activated neurons in the L layer correspond to rows in the matrix W for the weights of the edges between the L layer and the L-1 layer and columns in the matrix W for the weights of the edges between the L layer and the L +1 layer. During execution of the neural network, the neurons also correspond to one or more activation values stored in matrix a for that layer and generated by the activation function.

The ANN is suitable for vectorization of data parallelism, which may utilize vector hardware, such as Single Instruction Multiple Data (SIMD), such as utilizing a Graphics Processing Unit (GPU). Matrix partitioning may enable horizontal scaling, for example, using Symmetric Multiprocessing (SMP), such as using a multi-core Central Processing Unit (CPU) and/or multiple coprocessors (such as GPUs). Feed-forward calculations within the ANN may occur with only one step per neural layer. The activation values in one layer are computed based on a weighted propagation of the activation values of the previous layer, such that the values are computed sequentially for each subsequent layer, such as with a respective iteration of a for loop. The hierarchy imposes an ordering of non-parallelizable computations. Thus, the network depth (i.e., the number of layers) may cause computational delay. Deep learning requires giving multi-layered perceptrons (MLPs) multiple layers. Each layer implements data abstraction, whereas complex (i.e., multi-dimensional with several inputs) abstractions require multiple layers implementing cascaded processes. Embodiments of reusable matrix based ANNs 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 Fast Artificial Neural Network (FANN) of the Copenhagen university. These libraries also provide model training algorithms, such as back propagation.

Counter-propagating

The output of the ANN may be more or less correct. For example, an ANN that identifies letters may mistake I as L because the letters have similar characteristics. The correct output may have a particular value(s), while the actual output may have a slightly different value. The arithmetic or geometric difference between the correct output and the actual output can be measured as an error according to a loss function, so that zero represents an error-free (i.e. completely accurate) behavior. For any edge in any layer, the difference between the correct output and the actual output is an incremental value.

Back propagation requires that errors be distributed back through the layers of the ANN to all connected edges within the ANN by different amounts. The propagation of the error causes an adjustment of the edge weights, which depends on the gradient of the error on each edge. The gradient of an edge is calculated by multiplying the error increment of the edge by the activation value of the upstream neuron. When the gradient is negative, the larger the magnitude of the error that the edge contributes to the network, the more the weight of the edge should be reduced, which is a negative reinforcement. When the gradient is positive, positive reinforcement requires increasing the weight of the edge whose activation reduces the error. The edge weights are adjusted according to the percentage of the gradient of the edge. The steeper the gradient, the larger the modulation. Not all edge weights are adjusted by the same amount. As the model training continues with additional input samples, the error of the ANN should drop. Training may stop when the error stabilizes (i.e., stops decreasing) or disappears below a threshold (i.e., approaches zero). Bishop, Christopher m.bishop, in THE related reference, "EXACT CALCULATION OF THE HESSIAN MATRIX FOR THE MULTI-LAYER sensor," teaches exemplary mathematical formulas and techniques FOR feed-forward MULTI-LAYER Sensors (MLPs), including MATRIX operations and backpropagation.

Model training may be supervised or unsupervised. For supervised training, the expected (i.e., correct) output is already known for each example in the training set. The training set is configured by assigning classification labels to each example in advance (e.g., by a human expert). For example, a training set for optical character recognition may have blurred photographs of individual letters, and an expert may pre-label each photograph depending on which letter is shown. As explained above, error calculation and back propagation occur.

More unsupervised model training is involved because the desired output needs to be found during training. Unsupervised training may be easier to employ because no human expert is required to pre-label training examples. Therefore, unsupervised training saves manpower. A natural way to achieve unsupervised training is to use an auto-encoder, which is an ANN. The auto-encoder functions as an encoder/decoder (codec) having two layer sets. The first layer set encodes the input examples as condensed codes that need to be learned during model training. The second layer set decodes the condensed code to regenerate the original input example. The two sets of layers are trained together as a combined ANN. The error is defined as the difference between the original input and the input regenerated after decoding. After sufficient training, the decoder outputs the original input more or less exactly.

For each input instance, the auto-encoder relies on condensed code as an intermediate format. The intermediate condensed code does not initially exist, but only appears through model training, which may be counter intuitive. Unsupervised training can implement intermediate coded vocabularies based on the features and distinctions of unexpected correlations. For example, which examples and which labels are used during supervised training may be somewhat unscientific (e.g., anecdotal) or incomplete depending on the human expert's understanding of the problem space. Unsupervised training finds a suitable intermediate vocabulary more or less based entirely on statistical trends that reliably converge to optimality with sufficient training due to internal feedback generated by the re-generation decoding. Implementation and integration techniques FOR an AUTO ENCODER are taught in related U.S. patent application No.14/558,700, entitled AUTO-ENCODER ENHANCED SELF-direct COMPONENTS FOR MODEL MONITORING. The patent application promotes supervised and unsupervised ANN models as objects of a first class, which are suitable for 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 methods that construct a set of randomly generated nodes and decision trees during a training phase. Different decision trees of the forest are structured to be each randomly restricted, such as by feature bootstrapping aggregation (bagging), to only a particular subset of the dataset feature dimensions. Thus, as the decision tree grows, the decision tree gains accuracy without being forced to over-fit the training data, as would occur if the decision tree were forced to learn all of the feature dimensions of the dataset. The prediction may be calculated based on an average (or other integral, such as softmax) of predictions from different decision trees.

The random forest hyper-parameters may include: number-of-trees-in-the-forest (number of trees in forest), maximum-number-of-features-related-for-splitting-a-node (considering the maximum number of features for splitting nodes), number-of-levels-in-reach-resolution-tree (number of levels in each decision tree), minimum-number-of-data-points-on-a-leaf-node (minimum number of data points on leaf nodes), method-for-sampling-data-points (method of sampling data points), and so on.

In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary from implementation to implementation. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. The sole and exclusive indicator of the scope of the invention, and what is intended by the applicants to be the scope of the invention, is the literal and equivalent scope of the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:使用标签猜测对机器学习模型进行半监督训练

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!