Training device and program
The learning device optimizes machine learning by terminating training based on a scale-dependent target error threshold, addressing inefficiencies in normalized data assessment and reducing training time and costs.
Patent Information
- Application Number
- PCT/JP2024/027027
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2026-02-05
AI Technical Summary
Machine learning processes using normalized data face inefficiencies due to the difficulty in accurately assessing prediction errors at the original scale, leading to unnecessary pursuit of precision and increased calculation and operational costs.
A learning device that terminates machine learning when the difference between a scale-dependent target error and a prediction error is less than a threshold, using normalized data to optimize the learning process and reduce training time.
This approach efficiently performs machine learning by shortening training time, avoiding excessive accuracy pursuit, and reducing calculation and operational costs.
Smart Images

Figure JP2024027027_05022026_PF_FP_ABST
Abstract
Description
Learning devices and programs
[0001] The present disclosure relates to a learning device and a program.
[0002] Non-Patent Document 1 discloses a method for adaptively varying the learning rate in machine learning.
[0003] L. Liu, et al., “On the Variance of the Adaptive Learning Rate and Beyond”, ICLR, 2022
[0004] In machine learning, data normalization is performed to improve numerical stability because extremely large or small values included in the training data can easily lead to errors accumulating during the calculation process.
[0005] The normalized data is divided into training data and test data. During the training process, training and model updating are performed using the training data and test data. When the training termination conditions, such as the number of epochs, are met, training ends and the trained model is output. When using predicted values in actual operation, the scale-restored values are used.
[0006] Normalization can cause data of different scales to fall within the same range, such as 0 to 1, making it difficult to see the significance of the error at the original scale. For example, suppose two data sets, a first data set with a maximum value of 2000 and a minimum value of 100, and a second data set with a maximum value of 50 and a minimum value of 10, are subjected to Min-Max normalization. When training and error calculation are performed using normalized data sets, even with the same prediction error of 0.1, the error restored for the first data set is 0.1 × (2000 − 100) + 100 = 290, while the error restored for the second data set is 0.1 × (50 − 10) + 10 = 14, a significant difference. Considering the example of network traffic prediction, the error at 290 Mbps is large, so the prediction error must be further reduced from 0.1. On the other hand, the error at 14 Mbps is small, so further reduction of the prediction error is unnecessary. Therefore, considering the error obtained at the original scale may result in unnecessarily high accuracy, which is inefficient. Excessive pursuit of precision leads to increased calculation and operational costs.
[0007] In view of the above circumstances, an object of the present disclosure is to efficiently perform machine learning using normalized data and shorten the learning time.
[0008] A learning device according to one embodiment generates and updates a predictive model by performing machine learning using normalized learning data; calculates a prediction error of the predictive model using normalized test data each time the machine learning is performed; and includes a control unit that terminates the machine learning and outputs the predictive model when it determines that the difference between a scale-dependent target error, which is a normalized target error, and the calculated prediction error is less than a threshold, even if a predetermined learning termination condition is not satisfied.
[0009] According to the present disclosure, machine learning using normalized data can be performed efficiently, thereby shortening the learning time.
[0010] FIG. 1 is a block diagram showing the configuration of a learning device according to an embodiment; FIG. 2 is a graph showing an example of a reduction in learning time; FIG. 3 is a graph showing another example of a reduction in learning time; FIG. 4 is a flowchart showing the operation of the learning device; FIG. 5 is a block diagram showing a modified example of the configuration of the learning device; FIG. 6 is a flowchart showing a modified example of the operation of the learning device; and FIG. 7 is a flowchart showing another modified example of the operation of the learning device.
[0011] An embodiment will be described below with reference to the drawings.
[0012] In each drawing, the same or corresponding parts are denoted by the same reference numerals. In the description of this embodiment, the description of the same or corresponding parts will be omitted or simplified as appropriate.
[0013] An outline of this embodiment will be described with reference to FIG.
[0014] In this embodiment, a learning device 10 that performs machine learning based on normalized data terminates learning when the difference between a scale-dependent target error 40, which is a target error that takes into account the scale of a dataset 20 used for learning, and a predicted error 50 during the learning process, becomes less than a predetermined threshold 60. The scale-dependent target error 40 is, for example, a value obtained by normalizing the target error at the original scale based on the maximum and minimum values of the dataset 20.
[0015] According to this embodiment, machine learning can be efficiently performed based on the scale-dependent target error 40, thereby shortening the learning time. That is, it is possible to provide a method for optimizing a learning process based on the scale-dependent target error 40.
[0016] For example, suppose two datasets, a first dataset with a target error of 10 and a second dataset with a target error of 4, are subjected to Min-Max normalization. The target error taking into account the scale of the first dataset is 0.1. The target error taking into account the scale of the second dataset is 0.2. That is, in this example, the actual target error of the first dataset is larger than that of the second dataset, but the scale-dependent target error 40 of the first dataset is smaller than that of the second dataset. If the threshold 60 is set to 0 and the training termination condition is set to the number of epochs reaching N, when training and error calculation are performed using the normalized first dataset, as shown in FIG. 2, the difference between the scale-dependent target error 40 and the predicted error 50 may become less than the threshold 60 before the training termination condition is met. As a result, the training time can be shortened. Similarly, when training and error calculation are performed using the normalized second dataset, as shown in FIG. 3, the difference between the scale-dependent target error 40 and the predicted error 50 may become less than the threshold 60 before the training termination condition is met. As a result, the training time can be shortened.
[0017] The learning device 10 is a device that constructs a prediction model 70. The learning device 10 may be a general-purpose computer such as a PC, a server computer such as a cloud server, or a dedicated computer. "PC" is an abbreviation for personal computer.
[0018] The learning device 10 may be capable of communicating with a terminal device that uses the predictive model 70 via a network. The network may include, for example, the Internet, at least one WAN, at least one MAN, or any combination thereof. "WAN" is an abbreviation for wide area network. "MAN" is an abbreviation for metropolitan area network. The network may include at least one wireless network, at least one optical network, or any combination thereof. The wireless network may be, for example, an ad hoc network, a cellular network, a wireless LAN, a satellite communication network, or a terrestrial microwave network. "LAN" is an abbreviation for local area network.
[0019] The configuration of a learning device 10 according to this embodiment will be described with reference to FIG.
[0020] The learning device 10 includes a control unit 11 , a storage unit 12 , a communication unit 13 , an input unit 14 , and an output unit 15 .
[0021] The control unit 11 includes at least one processor, at least one programmable circuit, at least one dedicated circuit, or any combination thereof. The processor is a general-purpose processor such as a CPU or GPU, or a dedicated processor specialized for specific processing. "CPU" is an abbreviation for central processing unit. "GPU" is an abbreviation for graphics processing unit. An example of the programmable circuit is an FPGA. "FPGA" is an abbreviation for field-programmable gate array. An example of the dedicated circuit is an ASIC. "ASIC" is an abbreviation for application specific integrated circuit. The control unit 11 controls each part of the learning device 10 and executes processing related to the operation of the learning device 10.
[0022] The storage unit 12 includes at least one semiconductor memory, at least one magnetic memory, at least one optical memory, or any combination thereof. The semiconductor memory is, for example, a RAM, a ROM, or a flash memory. "RAM" is an abbreviation for random access memory. "ROM" is an abbreviation for read only memory. RAM is, for example, an SRAM or a DRAM. "SRAM" is an abbreviation for static random access memory. "DRAM" is an abbreviation for dynamic random access memory. ROM is, for example, an EEPROM. "EEPROM" is an abbreviation for electrically erasable programmable read only memory. Flash memory is, for example, an SSD. "SSD" is an abbreviation for solid-state drive. Magnetic memory is, for example, an HDD. "HDD" is an abbreviation for hard disk drive. The storage unit 12 functions, for example, as a main storage device, an auxiliary storage device, or a cache memory. The storage unit 12 stores data used in the operation of the learning device 10 and data obtained by the operation of the learning device 10 .
[0023] The communication unit 13 includes at least one communication module. The communication module is, for example, a module compatible with a wired LAN communication standard such as Ethernet (registered trademark), a wireless LAN communication standard such as IEEE 802.11, or a mobile communication standard such as LTE, 4G, or 5G. "IEEE" is an abbreviation for the Institute of Electrical and Electronics Engineers. "LTE" is an abbreviation for Long Term Evolution. "4G" is an abbreviation for 4th generation. "5G" is an abbreviation for 5th generation. The communication unit 13 may communicate with the above-mentioned terminal devices via a network. The communication unit 13 receives data used in the operation of the learning device 10 and transmits data obtained by the operation of the learning device 10.
[0024] The input unit 14 may be, for example, a physical key, a capacitive key, a pointing device, a touch screen integrated with a display, a camera, or a microphone. The input unit 14 accepts operations to input data used in the operation of the study device 10. The input unit 14 may be connected to the study device 10 as an external input device, instead of being provided on the study device 10. The connection interface may be an interface compatible with standards such as USB, HDMI (registered trademark), or Bluetooth (registered trademark). "USB" is an abbreviation for Universal Serial Bus. "HDMI (registered trademark)" is an abbreviation for High-Definition Multimedia Interface.
[0025] The output unit 15 is, for example, a display or a speaker. The display is, for example, an LCD or an organic EL display. "LCD" is an abbreviation for liquid crystal display. "EL" is an abbreviation for electroluminescent. The output unit 15 outputs data obtained by the operation of the learning device 10. Instead of being provided in the learning device 10, the output unit 15 may be connected to the learning device 10 as an external output device. The connection interface may be an interface compatible with standards such as USB, HDMI (registered trademark), or Bluetooth (registered trademark).
[0026] The functions of the learning device 10 are realized by executing a program according to this embodiment on a processor serving as the control unit 11. That is, the functions of the learning device 10 are realized by software. The program causes a computer to execute the operations of the learning device 10, thereby causing the computer to function as the learning device 10. That is, the computer functions as the learning device 10 by executing the operations of the learning device 10 in accordance with the program.
[0027] The program can be stored on a non-transitory computer-readable medium. Examples of the non-transitory computer-readable medium include flash memory, magnetic recording devices, optical disks, magneto-optical recording media, and ROMs. The program can be distributed by selling, transferring, or lending portable media such as SD cards, DVDs, or CD-ROMs that store the program. "SD" is an abbreviation for Secure Digital. "DVD" is an abbreviation for digital versatile disc. "CD-ROM" is an abbreviation for compact disc read only memory. The program can also be distributed by storing it in the storage of a server and transferring it from the server to another computer. The program can also be provided as a program product.
[0028] A computer temporarily stores a program stored on a portable medium or transferred from a server in its main storage device. The computer then reads the program stored in the main storage device with its processor and executes processing in accordance with the read program. The computer may also read the program directly from the portable medium and execute processing in accordance with the program. The computer may also execute processing in accordance with the received program each time a program is transferred from the server to the computer. Processing may also be executed using a so-called ASP-type service that realizes functions simply by issuing execution instructions and obtaining results, without transferring the program from the server to the computer. "ASP" is an abbreviation for application service provider. A program is information used for processing by a computer and includes something equivalent to a program. For example, data that is not a direct instruction to a computer but has properties that define computer processing falls under the category of "something equivalent to a program."
[0029] Some or all of the functions of the learning device 10 may be realized by a programmable circuit or a dedicated circuit as the control unit 11. In other words, some or all of the functions of the learning device 10 may be realized by hardware.
[0030] In this embodiment, data necessary for learning, such as a dataset 20, a learning rate 30, a scale-dependent target error 40, and a threshold value 60, are input via the communication unit 13 or the input unit 14. The dataset 20 is divided into normalized learning data 21 and normalized test data 22. The memory unit 12 stores the input data, such as the dataset 20, the learning rate 30, the scale-dependent target error 40, and the threshold value 60, as well as a prediction error 50 during the learning process. The control unit 11 has a learning function 16 and an error comparison function 17. The learning function 16 acquires the dataset 20 and the learning rate 30 from the memory unit 12, generates and updates a prediction model 70 using the dataset 20 and the learning rate 30, and stores the prediction model 70 in the memory unit 12. The learning function 16 may be a general machine learning function similar to that used in conventional technology. The error comparison function 17 is a function that acquires the scale-dependent target error 40 and the threshold value 60 from the storage unit 12, and stores a flag to terminate learning in the storage unit 12 if the scale-dependent target error 40 and the prediction error 50 are closer than the threshold value 60. When the flag to terminate learning is stored in the storage unit 12, the latest prediction model 70 stored in the storage unit 12 is output via the communication unit 13 or the output unit 15.
[0031] The operation of the learning device 10 according to this embodiment will be described with reference to Fig. 4. The operation described below corresponds to the learning method according to this embodiment. That is, the learning method according to this embodiment includes at least steps S101 to S104 shown in Fig. 4.
[0032] When data necessary for learning, such as the dataset 20, the learning rate 30, the scale-dependent target error 40, and the threshold value 60, is input via the communication unit 13 or the input unit 14, step S101 is performed. In S101, the control unit 11 generates a prediction model 70 by performing machine learning using the normalized learning data 21. Thereafter, the control unit 11 updates the prediction model 70 every time machine learning is performed using the learning data 21 normalized in S101.
[0033] Each time machine learning is performed in S101, the control unit 11 calculates, in S102, a prediction error 50 of the prediction model 70 using the normalized test data 22. Then, in S103, the control unit 11 determines whether the difference between the scale-dependent target error 40, which is the normalized target error, and the prediction error 50 calculated in S102 is less than a threshold value 60.
[0034] If it is determined in S103 that the difference between the scale-dependent target error 40 and the prediction error 50 is not less than the threshold value 60, step S104 is performed. In S104, the control unit 11 determines whether a predetermined learning termination condition, such as the number of epochs, is satisfied. If it is determined in S104 that the learning termination condition is not satisfied, step S101 is performed again. If it is determined in S104 that the learning termination condition is satisfied, the control unit 11 outputs the prediction model 70 via the communication unit 13 or the output unit 15.
[0035] If it is determined in S103 that the difference between the scale-dependent target error 40 and the prediction error 50 is less than the threshold value 60, the step of S104 is not performed, and the control unit 11 outputs the prediction model 70 via the communication unit 13 or the output unit 15. In other words, when the control unit 11 determines that the difference between the scale-dependent target error 40 and the prediction error 50 is less than the threshold value 60, it terminates the machine learning and outputs the prediction model 70 even if the learning termination condition is not satisfied.
[0036] The data set 20 can be any data, whether it is for predicting a continuous value in the context of a regression problem, or for identifying discrete categories in a classification problem.
[0037] The scale-dependent target error 40 is set by the operator, but may also be automatically set by the control unit 11. The scale-dependent target error 40 can be set, for example, by the following procedure: 1. The target error E of the original scale is calculated from the quality level q to be achieved and the data X of the original scale. q Set the target error E N The operator may set an arbitrary value depending on the level q. 2. The target error E of the original scale q From the data X, the normalized target error E N is calculated using the following formula: N = (E q Instead of applying Min-Max normalization as in this formula, other normalization techniques such as Z-score normalization may be applied. 3. Normalized target error E N is input as the scale-dependent target error 40.
[0038] The operator may set any value for the learning rate 30. For example, the operator may set 0.1, 0.01, or 0.001, which are general values based on experience, or may set a value searched for using a hyperparameter optimization tool.
[0039] The threshold value 60 may also be set to any value by the operator. For example, it may be set to 0.
[0040] In S101 and S102, the control unit 11 uses the learning function 16 to divide the data set 20 into training data 21 and test data 22. The control unit 11 uses the training data 21, the test data 22, the learning rate 30, and the prediction model 70 to update the prediction model 70 and calculate the prediction error 50. The procedure for updating the prediction model 70 and calculating the prediction error 50 is similar to the procedure for general machine learning.
[0041] In S103, the control unit 11 determines, by the error comparison function 17, whether or not the difference between the scale-dependent target error 40 and the predicted error 50 calculated in S102 is smaller than a specified value based on the threshold value 60. N , the prediction error 50 is E pWhen the threshold value is 60, the determination formula is as follows: |E p -E N |<δ If this determination formula is true, the control unit 11 ends learning.
[0042] As described above, in this embodiment, if the difference between the scale-dependent target error 40 and the prediction error 50 during the learning process is equal to or less than the threshold value 60 in the machine learning process, learning is terminated, thereby shortening the learning time and improving learning efficiency. According to this embodiment, it is possible to avoid increasing accuracy more than necessary and improve efficiency. As a result, it is possible to reduce calculation costs and operation costs.
[0043] A modified example of the configuration of the learning device 10 will be described with reference to FIG.
[0044] In this modification, an initial value of the learning rate 30 is input via the communication unit 13 or the input unit 14. The input initial value of the learning rate 30 is stored in the memory unit 12. The control unit 11 further has a learning rate calculation function 18. The learning rate calculation function 18 is a function that acquires the learning rate 30, the scale-dependent target error 40, and the prediction error 50 from the memory unit 12, calculates a new setting value of the learning rate 30 using the learning rate 30, the scale-dependent target error 40, and the prediction error 50, and stores the new setting value of the learning rate 30 in the memory unit 12.
[0045] The operation of the learning device 10 corresponding to the modified example shown in Fig. 5 will be described with reference to Fig. 6. The operation described below corresponds to the learning method according to this modified example. That is, the learning method according to this modified example includes at least steps S111 to S115 shown in Fig. 6. Steps S111 to S114 are the same as steps S101 to S104 shown in Fig. 4, respectively, and therefore will not be described here.
[0046] If it is determined in S114 that the learning termination condition is not satisfied, step S111 is performed again, but step S115 is also performed before that. In S115, the control unit 11 adjusts the learning rate 30 to be applied in the t+1th run of machine learning, where t is a natural number, based on the scale-dependent target error 40 and the value calculated as the prediction error 50 in the tth run of machine learning. Here, t corresponds to the current epoch number. That is, in S115, the control unit 11 adjusts the learning rate 30 to be applied in the next step S111 based on the scale-dependent target error 40 and the prediction error 50 calculated in the immediately preceding step S112.
[0047] In S115, the control unit 11 updates the learning rate 30 using the learning rate calculation function 18 based on the current value of the learning rate 30, the scale-dependent target error 40, and the prediction error 50 calculated in S112. t , the scale-dependent target error 40 is L t , the prediction error 50 is l t When η is set, an example of updating the learning rate 30 is shown in the following equation. t+1 = f (η t , L t , l t The function f is an arbitrary function that increases the learning rate 30 as the difference between the scale-dependent target error 40 and the prediction error 50 increases, and decreases the learning rate 30 as the difference decreases.
[0048] D = |l t -L t An example of the function f when | is given by: η t+1 =η t ・e α(D-β) α is a positive real number and is an adjustment parameter that controls the rate of change of the learning rate 30. β is a positive real number and is a threshold parameter. t -L t If |>β, the learning rate 30 increases, and |l t -L t If |<β, the learning rate 30 is decreased.
[0049] As described above, in this modification, the learning rate 30 is adjusted based on the rate of decrease of the difference between the scale-dependent target error 40 and the prediction error 50 during the learning process in the machine learning process, thereby accelerating the convergence rate to the scale-dependent target error 40. This modification can further reduce the learning time.
[0050] A modified example of the operation shown in Fig. 6 will be described with reference to Fig. 7. The operation described below corresponds to a learning method according to this modified example. That is, the learning method according to this modified example includes at least steps S121 to S126 shown in Fig. 7. Steps S121 to S124 and S126 are similar to steps S111 to S115 shown in Fig. 6, respectively, and therefore will not be described here.
[0051] If it is determined in S124 that the learning termination condition is not satisfied, step S121 is performed again, but before that, step S125 is also performed. In S125, the control unit 11 determines whether or not to adjust the learning rate 30 based on the value of t. If it is determined in S125 that the learning rate 30 is to be adjusted, step S126 is performed, and then step S121 is performed again. If it is determined in S125 that the learning rate 30 is not to be adjusted, step S126 is not performed, and step S121 is performed again.
[0052] In S125, the control unit 11 determines whether it is time to adjust the learning rate 30 using the learning rate calculation function 18. When the control unit 11 determines that it is time to adjust the learning rate 30 using the learning rate calculation function 18, the control unit 11 updates the learning rate 30 in S126. n is a default value, and the current number of learning steps is n E When the learning rate is adjusted once every n times, the determination formula is as follows: E (mod(n))=0 If the number of times the learning rate 30 is adjusted can be reduced more than the total number of learning steps, a judgment formula other than this formula may be applied.
[0053] As described above, this variant allows for stabilization of learning in the machine learning process by reducing the frequency with which the learning rate 30 is adjusted based on the rate of decrease of the difference between the scale-dependent target error 40 and the predicted error 50 during the learning process.
[0054] The present disclosure is not limited to the above-described embodiments. For example, two or more blocks shown in the block diagram may be integrated, or one block may be divided. Two or more steps shown in the flowchart may be executed in parallel or in a different order, instead of being executed in chronological order as described, depending on the processing capabilities of the device executing each step, or as needed. Other modifications are possible within the scope of the present disclosure.
[0055] REFERENCE SIGNS LIST 10 Learning device 11 Control unit 12 Memory unit 13 Communication unit 14 Input unit 15 Output unit 16 Learning function 17 Error comparison function 18 Learning rate calculation function 20 Data set 21 Learning data 22 Test data 30 Learning rate 40 Scale-dependent target error 50 Prediction error 60 Threshold 70 Prediction model
Claims
1. A learning device comprising a control unit that generates and updates a predictive model by performing machine learning using normalized training data, calculates a prediction error of the predictive model using normalized test data each time the machine learning is performed, and terminates the machine learning and outputs the predictive model when it determines that the difference between a scale-dependent target error, which is a normalized target error, and the calculated prediction error is less than a threshold, even if a predetermined learning termination condition is not satisfied.
2. The learning device described in claim 1, wherein the control unit adjusts the learning rate to be applied during the t+1th execution of the machine learning, where t is a natural number, based on the scale-dependent target error and the value calculated as the prediction error during the tth execution of the machine learning.
3. The learning device according to claim 2, wherein the control unit determines whether or not to adjust the learning rate depending on the value of t.
4. A program that causes a computer to function as the learning device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Content caching method based on deep learning
CN112862060A
Frequency spectrum prediction method and device based on composite 2D-LSTM network, medium and equipment
CN114124260A
A Combinatorial Method for Learning Supervised Neural Networks
JP2005504367A