Anomaly detection method, computing device, program, correction method, anomaly score generation device, machine learning device, electronic device, simulation device, data processing method, and simulation program
The simulation device employs unsupervised learning and chunking to simulate anomaly detection, addressing data confidentiality and domain knowledge transfer issues, ensuring effective AI verification and efficient analysis.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- ROHM CO LTD
- Filing Date
- 2025-11-21
- Publication Date
- 2026-07-29
AI Technical Summary
Existing AI-based anomaly detection systems for mechanical systems face challenges in verifying effectiveness without using actual equipment, require sharing confidential data, and struggle with domain knowledge transfer, leading to inappropriate algorithm selection and inefficient data analysis.
A simulation device and method that utilizes unsupervised learning and chunking techniques to simulate anomaly detection on user-owned data, allowing on-the-spot analysis and reducing data sharing risks, while enabling effective verification of AI effectiveness.
Enables effective verification of AI anomaly detection without sharing confidential data, facilitating on-the-spot analysis and appropriate algorithm selection, thus enhancing data security and analysis efficiency.
Smart Images

Figure 2026122892000001_ABST
Abstract
Description
[Technical Field]
[0001] This disclosure relates to an anomaly detection method and a machine learning device. [Background technology]
[0002] Traditionally, the application of AI (artificial intelligence) to condition-based maintenance of mechanical systems has been progressing in the industrial machinery sector (for example, Patent Document 1). [Prior art documents] [Patent Documents]
[0003] [Patent Document 1] International Publication No. 2019 / 035279
[0004] [overview] When introducing AI for the above-mentioned condition management and maintenance, it would be useful to be able to verify the effectiveness of the AI without using actual equipment. As a form of machine learning, unsupervised learning, which does not use training data, is well known. It is desirable to be able to accurately identify anomalies using machine learning.
[0005] Furthermore, the machine learning device disclosed in Patent Document 1 had room for further consideration regarding the detection of abnormal conditions in mechanical systems.
[0006] Furthermore, the machine learning device used in such mechanical systems as disclosed in Patent Document 1 had room for further consideration regarding the utilization of the data characteristics of the input data.
[0007] One aspect of this disclosure is an anomaly detection method using a computing device, When supplying data sequentially to a machine learning model, a single chunk of data is referred to as a chunk. A step of obtaining learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, A step of obtaining an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A step of dividing the chunk width into multiple intervals based on the second data and the inference result, and calculating the interval anomaly score for each interval, This is included as an anomaly detection method.
[0008] Furthermore, one aspect of this disclosure refers to a single chunk of data when data is supplied sequentially to a machine learning model as a chunk, A learning processing unit that obtains learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, An inference processing unit that obtains an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A section anomaly calculation unit calculates the section anomaly degree for each section obtained by dividing the chunk width into multiple sections based on the second data and the inference result, It is equipped with an abnormality level generation device.
[0009] Furthermore, a machine learning apparatus according to one aspect of the present disclosure includes: a model holding unit configured to hold a first machine learning model; a first data processing unit configured to directly input target data, sample it to generate first sampled data, and convert the first sampled data into a first frequency amplitude spectrum; and a first calculation unit configured to input the first frequency amplitude spectrum into the first machine learning model, perform at least one of learning and inference, and calculate a first calculation result.
[0010] Furthermore, an electronic device according to one aspect of this disclosure includes a machine learning device having the above configuration.
[0011] Furthermore, a program according to one aspect of this disclosure is a program that causes a computer to perform the following steps: a first step of directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum; and a second step of inputting the first frequency amplitude spectrum into a first machine learning model, performing at least one of learning and inference, and calculating a first calculation result.
[0012] Furthermore, a simulation device according to one aspect of this disclosure is configured to calculate the first calculation result using a machine learning device with the above configuration.
[0013] Furthermore, a data processing method according to one aspect of the present disclosure comprises: a first step of directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum; and a second step of inputting the first frequency amplitude spectrum into a first machine learning model, performing at least one of learning and inference, and calculating a first calculation result.
[0014] Furthermore, a machine learning apparatus according to one aspect of this disclosure comprises a machine learning model, a model holding unit, a data storage unit, and a computation unit. The machine learning model has an input layer, an output layer, and a hidden layer positioned between the input layer and the output layer and performing recursive calculations internally. The model holding unit is configured to hold the machine learning model. The data storage unit is configured to store input data that is input to the machine learning model. The computation unit is configured to input the input data to the machine learning model and perform learning or inference calculations. The first connected weights between the input layer and the hidden layer, and the second connected weights within the hidden layer are set to fixed setpoints or random numbers that are not updated by learning, while the third connected weights between the hidden layer and the output layer are set to be updated by learning.
[0015] Furthermore, an electronic device according to one aspect of this disclosure includes a machine learning device having the above configuration.
[0016] Furthermore, a simulation program relating to one aspect of this disclosure is intended to function as a machine learning device with the above configuration.
[0017] Furthermore, the simulation device according to one aspect of this disclosure uses the machine learning device with the above configuration to acquire inference results based on input data. [Brief explanation of the drawing]
[0018] [Figure 1] Figure 1 shows the configuration of a computer according to an exemplary embodiment of the present disclosure. [Figure 2] Figure 2 shows the configuration of a simulation apparatus according to an exemplary embodiment of the present disclosure. [Figure 3] Figure 3 shows an example of a machine learning model configuration. [Figure 4] Figure 4 shows a three-layer neural network. [Figure 5] Figure 5 shows the first settings screen. [Figure 6] Figure 6 shows a dialog box. [Figure 7] Figure 7 shows an example of data in a data file (sample file). [Figure 8] Figure 8 shows the first settings screen. [Figure 9] Figure 9 shows the second settings screen. [Figure 10] Figure 10 shows the second settings screen. [Figure 11] Figure 11 shows the third settings screen. [Figure 12] Figure 12 shows an example of the learning and inference settings. [Figure 13] Figure 13 shows the fourth settings screen. [Figure 14] Figure 14 shows the first graph screen. [Figure 15] Figure 15 shows the second graph screen. [Figure 16]Figure 16 is a schematic diagram illustrating the relationship between chunk width and interval. [Figure 17] Figure 17 is a schematic diagram showing the internal configuration of a biochemical analyzer. [Figure 18] Figure 18 is a block diagram of a biochemical analyzer. [Figure 19] Figure 19 shows an example of absorbance time-course data. [Figure 20] Figure 20 shows the time course data from Figure 19 arranged side by side. [Figure 21] Figure 21 is a flowchart showing the anomaly detection process in a biochemical analyzer. [Figure 22] Figure 22 is a schematic diagram illustrating the relationship between chunk width and interval. [Figure 23] Figure 23 shows a specific example of the correction process. [Figure 24] Figure 24 shows the configuration of a machine learning apparatus according to an exemplary first embodiment of the present disclosure. [Figure 25] Figure 25 is a graph showing an example of the target data. [Figure 26] Figure 26 is a magnified view of a portion of Figure 25. [Figure 27] Figure 27 is a magnified view of another part of Figure 25. [Figure 28] Figure 28 shows the first frequency amplitude spectrum corresponding to Figure 26. [Figure 29] Figure 29 shows the first frequency amplitude spectrum corresponding to Figure 27. [Figure 30] Figure 30 is a graph showing the degree of abnormality. [Figure 31] Figure 31 shows the first frequency amplitude spectrum when an anti-aliasing filter is provided. [Figure 32] Figure 32 is a graph showing the degree of abnormality when an anti-aliasing filter is provided. [Figure 33] Figure 33 shows the configuration of a machine learning apparatus according to an exemplary second embodiment of the present disclosure. [Figure 34] Figure 34 is a diagram illustrating supervised learning. [Figure 35] Figure 35 is a diagram illustrating future prediction, which is an example of a supervised learning task. [Figure 36] Figure 36 shows the configuration of a machine learning apparatus according to an exemplary third embodiment of the present disclosure. [Figure 37] Figure 37 shows the first frequency amplitude spectrum when the sampling frequency is 100 Hz. [Figure 38] Figure 38 shows the first frequency amplitude spectrum when the sampling frequency is 89 Hz. [Figure 39] Figure 39 is a block diagram showing the basic configuration of the machine learning device 6. [Figure 40] Figure 40 shows the configuration of the machine learning model 80. [Figure 41] Figure 41 schematically shows how the input data din is divided into multiple chunks and input into the machine learning model 80 for processing. [Figure 42] Figure 42 shows the computational stages when inference is performed using the input data din and the machine learning model 80.
[0019] [Detailed explanation] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings.
[0020] <Computer Configuration> Figure 1 shows the configuration of a computer 100 according to an exemplary embodiment of this disclosure. The configuration of computer 100 is common to the first, second, and third disclosed technologies described later. Computer 100 functions as a simulation device related to the first disclosed technology described later, or a machine learning device 1 related to the second disclosed technology described later, or a machine learning device 6 related to the third disclosed technology described later. Computer 100 is, for example, a PC (personal computer). If computer 100 is a PC, it does not matter whether it is a desktop or notebook type.
[0021] The computer 100 includes a CPU (Central Processing Unit) 100A, memory 100B, auxiliary storage device 100C, operation input unit 100D, and display unit 100E.
[0022] The CPU 100A includes a control unit and an arithmetic unit (neither of which are shown). The control unit interprets program instructions and controls various parts of the computer 100. The arithmetic unit is a device that performs arithmetic processing.
[0023] Memory 100B is a semiconductor memory device that temporarily stores programs or data. The information stored in memory 100B is erased when the power to computer 100 is turned off.
[0024] The auxiliary storage device 100C is composed of an HDD (Hard Disk Drive) or SSD (Solid State Drive), and stores programs or data. Programs stored in the auxiliary storage device 100C are loaded into memory 100B. The CPU 100A executes the programs loaded into memory 100B.
[0025] Here, the simulation program P is stored in the auxiliary storage device 100C. The simulation program P is a program that causes the computer 100 to function as either machine learning device 1 or machine learning device 6, which will be described later. Details about machine learning device 1 or machine learning device 6 will be described later.
[0026] The operation input unit 100D is a device consisting of a keyboard or mouse, which provides operation input to the computer 100. The information input from the operation input unit 100D is sent to the memory 100B.
[0027] The display unit 100E is composed of, for example, a liquid crystal display, and converts information acquired from the memory 100B into an image and outputs it.
[0028] [First Disclosure Technology] Next, the first disclosure technique will be described. Note that, in the descriptions of the first, second, and third disclosure techniques, even if the symbols attached to the components are the same, they may represent different components. Furthermore, the numbers of the formulas in the descriptions of the first, second, and third disclosure techniques are to be independent of each other.
[0029] <Configuration of the simulation system> Figure 2 shows the configuration of a simulation device 1 according to an exemplary embodiment of the present disclosure. The simulation device 1 is a device capable of simulating learning and inference using machine learning (AI).
[0030] The simulation device 1 comprises a file storage unit 2, a file reading unit 3, a model storage unit 4, a model calculation unit 5, a model setting unit 6, a display control unit 7, an operation input unit 8, and a display unit 9. The program P (Figure 1) stored in the auxiliary storage device 100C of the computer 100 is a program that causes the computer 100 to function as the simulation device 1.
[0031] The file storage unit 2 stores the data file 21 and is configured with the auxiliary storage device 100C of the computer 100. The data file 21 is configured as an Excel® file, for example. The file may also be stored in the auxiliary storage device 100C from outside the computer 100 via, for example, the USB interface or network interface of the computer 100 (neither of which are shown in Figure 1).
[0032] Data file 21 contains data 210. Data 210 is data used to perform so-called unsupervised learning and inference by inputting it into the machine learning model 40 (described later). As will be described later, it is possible to specify which data from data 210 will be used for training and which data will be used for inference.
[0033] The file reading unit 3 reads the data file 21 from the file storage unit 2.
[0034] The model storage unit 4 stores the machine learning model 40 and is composed of the auxiliary storage device 100C of the computer 100. The machine learning model 40 is configured as a program P using, for example, MATLAB / Simulink (registered trademark). A specific example of the machine learning model 40 will be described later.
[0035] The functions of the file reading unit 3, the model calculation unit 5, the model setting unit 6, and the display control unit 7 are realized by the CPU 100A executing program P. The operation input unit 8 and the display unit 9 correspond to the operation input unit 100D and the display unit 100E in the computer 100, respectively.
[0036] The model calculation unit 5 performs the simulation by processing the machine learning model 40 stored in the model storage unit 4. The model setting unit 6 configures the machine learning model 40 stored in the model storage unit 4 (settings for data to be used for learning and inference, setting of parameters, setting of function types, etc.) in response to input from the operation input unit 8. The simulation by the model calculation unit 5 is performed according to the settings made by the model setting unit 6. The display control unit 7 controls the display of various screens, such as the setting screen described later, on the display unit 9 in response to input from the operation input unit 8.
[0037] For example, in the industrial machinery sector, machine learning is increasingly being applied to the condition management and maintenance of mechanical systems in factory equipment maintenance. However, even when a user wants to test an AI algorithm they have identified as promising, they need to provide data to the AI vendor or other AI developer. In many cases, this data contains confidential information related to products and manufacturing processes, making disclosure difficult. Therefore, traditionally, users had no choice but to refer to various case studies from AI vendors or have the AI solve open problems that serve as benchmarks for general AI performance (e.g., predicting housing prices in Boston, estimating the physical properties of diesel fuel, etc.) to determine if it was suitable for solving the user's problems and challenges. Naturally, such open problems do not match the user's problems and challenges, so it often becomes clear afterward that the selected AI algorithm was inappropriate or not very suitable when applied to the user's data. This necessitates a re-selection of the AI algorithm, which is detrimental to both the user and the AI vendor.
[0038] As described above, even if a user wants to experiment with what can be done with AI using data they have acquired, they need to share the data with external parties (such as AI vendors or IC manufacturers with AI solutions). In other words, there is a risk of releasing confidential data to external parties. Furthermore, even if data is provided, it is difficult to guarantee that it will be properly analyzed externally, and adjusting the AI parameters appropriately is difficult without advanced knowledge of the domain in which the user acquired the data. Communicating domain knowledge from the user to AI vendors is also very time-consuming, and communication errors are likely to occur due to differences in background knowledge. In addition, it is not possible to analyze the data acquired by the user on the same day and on the spot.
[0039] In light of the above circumstances, using the simulation device 1 related to this disclosure makes it possible to effectively verify the effects of AI through unsupervised learning using data owned by the user. More specifically, it is possible to verify the effectiveness of anomaly detection, which is an unsupervised learning task. This has the effect of eliminating the risk of releasing confidential data to external parties, and enabling on-the-spot analysis of acquired data. In particular, as described later, this disclosure introduces the concept of chunking to the data input to the machine learning model, making it easy to input multiple types of input data in multiple quantities. This makes it possible to examine what kind of anomaly detection can be performed when various signals are combined.
[0040] <Machine learning model configuration> Here, we will describe the machine learning model 40. Figure 3 shows an example of the configuration of the machine learning model 40. The machine learning model 40 has a preprocessing unit 401 and a machine learning unit 402.
[0041] The preprocessing unit 401 performs preprocessing before inputting data into the machine learning unit 402. This preprocessing includes normalization. Normalization is the process of fitting the data into a range of approximately 0 to 1 (or -1 to +1). As will be described later, by setting the parameters of the normalization process, it is also possible to set it to perform shifting or no processing at all.
[0042] Preprocessing includes envelope processing. Envelope processing is performed on data that has been processed by normalization. Note that whether or not envelope processing is performed can be configured as described later.
[0043] Preprocessing includes window function processing and FFT (fast Fourier transform) processing. As described later, window function processing and FFT processing are performed on data that has undergone normalization and envelope processing. Furthermore, window function processing and FFT processing are performed chunk by chunk, as described later. Whether or not window function processing and FFT processing are performed can be configured as described later. In terms of patterns, it is possible to select to perform only window function processing, only FFT processing, or both window function processing and FFT processing. Note that frequency analysis processing other than FFT processing, such as wavelet transform, may also be used.
[0044] The machine learning unit 402 performs learning and inference on the input data. As the AI model used in the machine learning unit 402, for example, a three-layer neural network 30 as shown in Figure 4 is used.
[0045] As shown in Figure 4, the 3-layer neural network 10 is an AI model having an input layer 10A, a hidden layer 10B, and an output layer 10C. Generally, in the 3-layer neural network 10, n-dimensional input data x∈R with batch size k k×n For this, the inference result y∈R in n' dimension k×n’ This is obtained by setting y = G(x·α+b)β, where α∈R n×m is the weight that connects the input layer 10A and the hidden layer 10B, where β∈R m×n’ b is the weight connecting the hidden layer 10B and the output layer 10C. Also, b∈R m is the bias of hidden layer 10B, and G is the activation function of hidden layer 10B.
[0046] In this embodiment, an algorithm that can sequentially train a three-layer neural network 10 with an arbitrary batch size is used. The batch size is k i For the i-th training data {x i ∈R ki×n , t i ∈R ki×n’} obtained, it is necessary to find β that minimizes the error represented by the following equation (1). i
Equation
[0050] The computational bottleneck in equation (2) above is (I + H i P i-1 H i T ) -1 This is the result. (I+H i P i-1 H i T The matrix size of ) is k × k. Therefore, when k=1, the inverse matrix operation can be replaced with the reciprocal operation. Consequently, by fixing the batch size to k=1, calculations become easier even with an arithmetic unit of the size of a microcontroller. For this reason, the machine learning model 40 has a fixed batch size of k=1.
[0051] Furthermore, in this embodiment, learning is performed using an autoencoder. The autoencoder reuses the input data directly as training data and learns to reconstruct the input data as the inference result. In other words, it learns with t=x as described above. Since the autoencoder does not require the creation of separate training data, it is a type of unsupervised learning algorithm.
[0052] According to the AI model in the machine learning unit 402, learning can be performed on edge devices using a processing unit of the size of a microcontroller. In other words, when introducing such on-device learning to applications such as motor anomaly detection, the effectiveness of anomaly detection can be confirmed through simulation. The input data x is time-series data if no FFT processing is performed in the preprocessing unit 401, and frequency-domain data if FFT processing is performed.
[0053] In the machine learning unit 402, the anomaly score is calculated using a loss function L(y,t) that represents the error between the inference result y and the training data t. For example, MAE (Mean Absolute Error) or MSE (Mean Squared Error) can be used as the loss function. When the loss function is MAE, the loss function L is expressed as shown in equation (4) below.
number
number
[0054] Since training is performed using an autoencoder, the anomaly score is calculated using the loss function L(y,t)=L(y,x).
[0055] <gui> Next, the GUI (Graphical User Interface) that enables the settings related to the simulation in the simulation device 1 according to this embodiment will be described. Examples of the various screens described below are displayed on the display unit 9 by the display control unit 7 (Figure 2). Selection and settings on the various setting screens, or screen switching, are performed based on input from the operation input unit 8. The contents set on the various setting screens are set by the model setting unit 6.
[0056] <<First Settings Screen>> When program P is launched, the first settings screen shown in Figure 5 is displayed. On the first settings screen, you can load data files and configure preprocessing settings as needed. Tabs are displayed side by side at the top of the first settings screen. You can switch between settings screens by pressing the tabs. Figure 5 (first settings screen) shows the "1. Data loading" tab TB1 pressed.
[0057] The first settings screen displays a selection button BT1 for selecting a data file. Pressing the selection button BT1 displays the dialog box shown in Figure 6. In the dialog box, the file names are displayed in a list in the selection section SA1. The file name selected in the selection section SA1 is displayed in the file name display section DA1 below. When the OK button BT2 is pressed in the dialog box, the data file with the file name displayed in the file name display section DA1 is read by the file reading section 3. Here, an Excel file with the extension .xlsx can be selected.
[0058] Figure 7 shows an example of data in a data file (a sample file). The data in Figure 7 is a time-series data of various signals assuming that there is damage to the inner ring raceway of the bearing supporting the motor output shaft, and that the damage worsens in stages over time. Specifically, column A stores time [s], column B stores motor current [A], column C stores displacement in the x direction [m], column D stores acceleration in the x direction [m / s^2], column E stores displacement in the y direction [m], column F stores acceleration in the y direction [m / s^2], and column G stores output shaft rotation speed [rpm]. In each column, the first row stores the variable name. Also, in Figure 7, as an example, the first 4000 data points represent a normal state, and then the degree of damage worsens every 4000 points thereafter. The following explanation assumes that such a file is read.
[0059] When a data file is loaded, the data contained in the loaded data file is displayed in a tabular format in the table display unit DA2 on the first settings screen, as shown in Figure 8. Note that the first row of the data file is ignored when the data is loaded. This allows the user to verify that the data has been loaded correctly. The number of rows of the loaded data is displayed in the row count display unit DA3, and the number of columns of the loaded data is displayed in the column count display unit DA4. All loaded data is displayed in the table display unit DA2.
[0060] On the other hand, once the data file is loaded, the loaded data is displayed as a graph column by column in the graph display unit DA5 on the first settings screen, as shown in Figure 8. The horizontal axis represents the data number and the vertical axis represents the data value. In the column selection unit SD1, columns 1 through 5 can be selected using radio buttons. By default, the data in column 1 is displayed as a graph, but the columns displayed can be switched by pressing the radio buttons mentioned above. Note that columns 6 and beyond cannot be displayed as graphs, but this does not mean that data has not been loaded. In the example in Figure 8, the graph display of the data in column 2 (i.e., motor current) is selected.
[0061] The pre-processing settings unit ST1 is displayed in the center of the first settings screen (Figure 8). In the pre-processing settings unit ST1, settings related to normalization and envelope processing can be configured. Normalization and envelope processing can be configured individually for each of the five columns of the loaded data.
[0062] The normalization process is performed by equation (6) below.
number
[0063] In the parameter setting unit PS1 of the preprocessing setting unit ST1, each parameter (di, si) from the first to the fifth column can be set. Depending on the parameter settings, it is also possible to set the system to perform a shift process or to perform no process at all.
[0064] Furthermore, checkbox BX1 in the preprocessing setting unit ST1 is provided for each of the columns from the 1st to the 5th. Envelope processing is performed on columns where checkbox BX1 is checked. Envelope processing is not performed on columns where checkbox BX1 is not checked.
[0065] When the preprocessing button BT2 is pressed on the first settings screen, preprocessing is performed on the data in columns 1 through 5 according to the settings in the preprocessing settings unit ST1. The table display unit DA6 on the first settings screen displays the preprocessed data in a table format. Here, the data from columns 1 through 5 is displayed. The graph display unit DA7 displays the preprocessed data of the column selected by the radio button in the selection unit SD2. The display format is the same as that of the graph display unit DA5. The row display unit DA8 and the column display unit DA9 display the number of rows and columns of the data displayed in the table display unit DA6, respectively. The column display unit DA9 displays "Number of columns = 5". In the example in Figure 8, the graph display unit DA7 displays the preprocessed data of column 2 (Column2), which was selected in the selection unit SD2.
[0066] If pre-processing is not required, do not press the pre-processing button BT2, but instead press the tab TB2 (Figure 9, described later) to switch screens.
[0067] <<Second Settings Screen>> When Tab 2 ("2. Input chunk range") is pressed, the second settings screen shown in Figure 9 will be displayed. On the second settings screen, data setting buttons BT31 and BT32 will be displayed, and either button will be pressed.
[0068] When the data setting button BT31 is pressed, the data loaded on the first setting screen (original data) is used as input data for the machine learning model 40. When the data setting button BT32 is pressed, the data obtained by performing the preprocessing set on the first setting screen on the data loaded on the first setting screen is used as input data for the machine learning model 40.
[0069] The data selected using either the data setting button BT31 or BT32 is displayed in the table display unit DA10 and the graph display unit DA13. The table display unit DA10 displays the data in notation. The graph display unit DA13 allows switching between columns 1 through 5 by selecting columns using radio buttons in the column selection unit SD3.
[0070] Figure 10 shows the state when the data setting button BT32 is pressed on the second settings screen (i.e., using pre-processed data). Here, the data of the second column selected in the column selection unit SD3 is displayed on the graph display unit DA13.
[0071] In the second settings screen, the chunk setting section ST2 is displayed. A chunk is a single block of data that is sequentially input into the machine learning model 40 (machine learning unit 402). The chunk setting section ST2 includes the column number setting section ST21, the row number setting section ST22, and the column number setting section ST23. In the column number setting section ST21, you can input the column number in the data being used (data selected by the data setting buttons BT31 and BT32) that indicates the first column of the input data to be input to the machine learning model. In the row number setting section ST22, you can input the number of rows in one chunk in the data being used. In the column number setting section ST23, you can input the number of columns in one chunk in the data being used.
[0072] In the example shown in Figure 10, "2" is entered in the column number setting unit ST21, "512" in the row number setting unit ST22, and "1" in the column number setting unit ST23. As a result, the second column of the data being used is set as the first column of the input data, and a block of data with 512 rows and 1 column is set as a single chunk. In other words, the data in the second column (motor current in Figure 7) is selected as the input data.
[0073] Furthermore, by setting a value of 2 or more in the column number setting unit ST23, it is possible to input data from multiple columns, i.e., multiple types of signal data. For example, it is possible to input data such as motor current and x-direction displacement data as shown in Figure 7.
[0074] The chunk count display unit DA15 shows the chunk count calculated from the number of rows in the data used and the number of rows in one chunk (in the example in Figure 10, chunk count = 31). Also, when the check button BT4 is pressed on the second setting screen, the first chunk is displayed in a table format on the table display unit DA14. This allows you to check whether the chunks are set correctly. At this time, the data count display unit DA16 shows the number of data items contained in one chunk. This data count is the same as the product of the number of rows and columns in one chunk (in the example in Figure 10, data count = 512).
[0075] <<Third Settings Screen>> Pressing tab TB3 ("3. Preprocessing by MCU") displays the third settings screen, as shown in Figure 11. On the third settings screen, you can consider applying preprocessing such as FFT that can be executed by the MCU (microcontroller).
[0076] The third settings screen displays the preprocessing settings section ST3. In the preprocessing settings section ST3, you can set whether or not to apply window function processing and FFT processing. For window function processing, you can use Hann window, Hamming window, Gauss window, triangular window, Kaiser window, Chebyshev window, Blackman window, etc. Specifically, the presence or absence of window function processing is set by checkbox BX2, and the presence or absence of FFT processing is set by checkbox BX3. Furthermore, in the output unit selection section SD4, you can select the unit of the FFT processing result (Amplitude or dB) using radio buttons.
[0077] Note that window function processing and FFT processing are performed for each chunk. The FFT processing algorithms are optimized for computation on an MCU. Since only the one-sided amplitude spectrum is used for the data after FFT processing, the number of data points will be (FFT length / 2) + 1 for each chunk (FFT length). However, depending on the algorithm implemented on the MCU, the highest frequency component of the one-sided amplitude spectrum may be discarded, resulting in (FFT length / 2) data points. Furthermore, the FFT processing may allow selection of using only amplitude, only phase, or both amplitude and phase.
[0078] Furthermore, in the pre-processing setting unit ST3, the FFT length is displayed in the FFT length display unit DA17.
[0079] When the preprocessing button BT5 is pressed, the preprocessing set in the preprocessing setting unit ST3 is executed, and the processing results are displayed in the result display unit DA18. The processing results are displayed chunk by chunk. The data numbers included in the displayed chunks can be set in the data number setting unit ST31 in the preprocessing setting unit ST3. Here, the data number is a sequential number across all chunks, assigned sequentially from 1 to the data in different columns of the same row, starting from the smallest row, if the chunk has multiple columns. For example, if the chunk has 3 columns, the numbers are assigned in the order of 1st row, 1st column, 2nd column, 3rd column → 2nd row, 1st column, 2nd column, 3rd column → ... In the example in Figure 10 mentioned above, since the set chunk has 512 rows and 1 column, data numbers from 1 to 512 represent the first of the same chunks.
[0080] In the results display unit DA18, the raw data display unit DA181, the display unit after window function processing DA182, and the display unit after FFT processing DA183 are displayed from left to right. The raw data display unit DA181 displays the raw data (data before processing) of one chunk. The display unit after window function processing DA182 displays the data obtained by processing the data of one chunk with a window function. The display unit after FFT processing DA183 displays the data obtained by processing the data after window function processing with FFT. Note that the raw data display unit DA181, the display unit after window function processing DA182, and the display unit after FFT processing DA183 are all displayed as graphs with the data number on the horizontal axis (however, sequential numbering when the first data in the target chunk is number 1) and the data value on the vertical axis.
[0081] However, if, for example, only FFT processing is performed without applying window function processing, the raw data will be displayed in the post-window function processing display unit DA182. If neither window function processing nor FFT processing is applied, the raw data will be displayed in the raw data display unit DA181, the post-window function processing display unit DA182, and the post-FFT processing display unit DA183. In any case, the data displayed in the post-FFT processing display unit DA183 will be the data input to the machine learning unit 402 (3-layer neural network 10).
[0082] Figure 11 shows an example of the display of processing results when both window function processing and FFT processing are applied. The result display unit DA18 displays the data number setting unit ST32. The data number setting unit ST32 allows setting the data number corresponding to the chunk to be redisplayed in the result display unit DA18. When the redisplay button BT6 is pressed, the processing results are redisplayed in the result display unit DA18.
[0083] Next, we will describe the learning / inference setting unit ST4 (Figure 11) in the third setting screen. In the learning / inference setting unit ST4, the raw data display unit DA19 is displayed. In the raw data display unit DA19, the data of all chunks set in the second setting screen (data before processing) is displayed as a graph. The horizontal axis is displayed as the data number and the vertical axis as the data value.
[0084] Below the raw data display unit DA19, the first data number display unit DA20 and the first chunk number display unit DA21 are displayed at the far left. The first data number display unit DA20 displays the first number of the data number (1 in Figure 11), and the first chunk number display unit DA21 displays the number of the first chunk (1 in Figure 11).
[0085] Below the raw data display unit ST4, the final data number display unit DA22 and the final chunk number display unit DA23 are displayed at the far right. The final data number display unit DA22 displays the final data number, and the final chunk number display unit DA23 displays the final chunk number. In the example in Figure 11, the chunks are set to 512 rows and 1 column in the example in Figure 10, and as shown in Figure 7, the number of data in one column is 16001, so the number of chunks = 31 (final chunk number), and the final data number is 31 × 512 = 15872.
[0086] In the machine learning unit 402, training and prediction are performed in chunk units. First, one of the data numbers included in the chunk from which you want to start training is input to the data number setting unit ST41. Figure 12 is a diagram showing the settings for training and prediction for a raw data sequence similar to that in Figure 11. In the example in Figure 7, the motor current data in the second column shows an increase in current when the motor starts up. If you do not want to learn this current increase, it is effective to start training from the second chunk CH2 (chunk number = 2). Therefore, if you set the data number included in the second chunk CH2, for example 513, training will start from the second chunk CH2, and the first chunk CH1 will not be used for training.
[0087] Next, one of the data numbers included in the chunk from which you want to start inference is input to the data number setting unit ST42 (Figure 11) and set. In the motor current example in Figure 7, the system transitions to an abnormal state from data number 4000. Until then, it is in a normal state, so here, as an example, data number 3500 is set so that only the normal state is used for learning. Note that data number 3500 corresponds to chunk CH7 with chunk number = 7, as shown in Figure 12. In this way, in the example in Figure 12, chunk CH1 is not used for learning, chunks CH2 to CH6 are used for learning, and chunks CH7 to the last chunk CH31 are used for inference.
[0088] <<Fourth Settings Screen>> When the tab TB4 ("4. AI Settings and Sim") is pressed, the fourth settings screen, as shown in Figure 13, is displayed. The fourth settings screen is used for setting parameters for the machine learning unit 402, running simulations, and checking simulation results.
[0089] In the fourth settings screen shown in Figure 13, the AI parameter setting unit ST5 is displayed. The AI parameter setting unit ST5 includes the input node count setting unit ST51, the hidden layer node count setting unit ST52, and the output node count setting unit ST53. The input node count setting unit ST51 displays the number of nodes in the input layer 10A (i.e., the value of n above). The number of nodes in the input layer is calculated by multiplying the number of rows and columns in one chunk of input data. That is, the data in one chunk corresponds to data with a batch size of 1. Note that when using data after FFT processing, the number of data points in one chunk = the number of one-sided amplitude spectra. In the example in Figure 13, as shown in Figure 11, the data after FFT processing is input to the machine learning unit 402, so the number of data points in one chunk is reduced from 512 to 256 (= FFT length / 2 = 512 / 2), and this 256 is set as the number of input nodes (as mentioned above, this is an example of discarding the highest frequency component of the one-sided amplitude spectrum).
[0090] The hidden layer node count setting unit ST52 can accept the number of nodes in the hidden layer 10B (i.e., the value of m above). The output node count setting unit ST53 displays the number of nodes in the output layer 10C (i.e., the value of n' above). Because it is an autoencoder, the number of output nodes matches the number of input nodes.
[0091] The AI parameter setting unit ST5 also includes the activation function setting unit ST54, the loss function setting unit ST55, and the forgetting rate setting unit ST56. The activation function setting unit ST54 allows selection of the type of activation function for the hidden layer 10B. For example, the activation function can be set to Sigmoid or ReLU.
[0092] The loss function setting unit ST55 allows selection of the type of loss function used to calculate the anomaly score in the machine learning unit 402. For example, the loss function can be set to MAE or MSE.
[0093] The forgetting rate setting unit ST56 allows you to input a value for the forgetting rate. The forgetting rate is a parameter that represents the degree to which the learned results are forgotten. Methods that do not reflect the learned results include, for example, using past learned results or initializing the learned results. A forgetting rate of 1 means that previous learned results are not forgotten at all, and a forgetting rate of 0 means that everything is forgotten.
[0094] Additionally, the AI parameter setting unit ST57 also displays the number of learning iterations setting unit ST57. The number of learning iterations setting unit ST57 allows you to set the number of times to repeat the learning process.
[0095] Furthermore, the AI parameter setting unit ST5 also displays the interval anomaly setting unit ST58. The interval anomaly setting unit ST58 allows settings for calculating the interval anomaly, which will be described later, and includes the interval width setting unit ST581 and the shift amount setting unit ST582. The interval width setting unit ST581 sets the number of data points in one interval for calculating the interval anomaly. The shift amount setting unit ST582 sets the shift amount of the interval when calculating the interval anomaly. In addition, the interval width setting unit ST581 may be used to set the interval width by setting the number of intervals in one chunk.
[0096] Once all settings have been configured via the settings screen described above, and the simulation start button BT7 is pressed, the model calculation unit 5 executes the simulation according to the settings configured by the model setting unit 6. Here, data is sequentially input to the machine learning unit 402 in chunk units, and β is sequentially updated by the algorithm described above to perform unsupervised learning. When data is input, it is input to each node of the input layer 10A in the order of the data number in the chunk. Inference is also performed by the machine learning unit 402 during learning. Furthermore, inference is also performed by the machine learning unit 402 after learning is complete. Inference results are calculated for each chunk. In addition, an anomaly score is calculated for each chunk based on the inference results, input data, and loss function. Furthermore, in addition to the anomaly score for each chunk, an interval anomaly score is also calculated. The interval anomaly score is calculated based on the inference results, input data, and loss function.
[0097] The simulation results are displayed in the results display section RA1 on the fourth settings screen, as shown in Figure 13, for example. The results display section RA1 displays the anomaly score table display section RA11 and the anomaly score graph display section RA12 in the upper section. The anomaly score table display section RA11 displays the anomaly score for each chunk during training in a table format. The anomaly score graph display section RA12 displays the anomaly score for each chunk during training in a graph format. In both the anomaly score table display section RA11 and the anomaly score display section RA12, the chunk number and anomaly score are displayed in correspondence.
[0098] The results display unit RA1 shows the anomaly score table display unit RA13 and the anomaly score graph display unit RA14 in the lower section. The anomaly score table display unit RA13 shows the anomaly score for each chunk during inference after training is complete in a table format. The anomaly score graph display unit RA14 shows the anomaly score for each chunk during inference after training is complete in a graph format. In both the anomaly score table display unit RA13 and the anomaly score display unit RA14, the chunk number and anomaly score are displayed in correspondence.
[0099] When the simulation start button BT7 is pressed with the learning iteration count setting unit ST57 entered, the learning process using all the learning chunks (chunks CH2 to CH6 in the example in Figure 12) is reused the number of times set in the learning iteration count setting unit ST37. In other words, once the last chunk has been used, the learning process returns to the first chunk and resumes. This makes it easy to perform sufficient learning even when it is not easy to prepare long-term data for learning.
[0100] <<Graph screen>> When the tab TB51 ("5-1.Graph") is pressed, the first graph screen shown in Figure 14 is displayed. On the first graph screen, the graph display unit GD1 is displayed at the top, the graph display unit GD2 is displayed in the middle, and the graph display unit GD3 is displayed at the bottom. The graph display unit GD1 displays the input data values for all the data (data consisting of all chunks) input to the machine learning unit 402. The horizontal axis represents the data number. In the example in Figure 14, since the input data is obtained by performing window function processing and FFT processing on each chunk in the third setting screen, one chunk corresponds to the area from a spike-like peak to just before the next peak (number of data in one chunk = FFT length / 2). Also, due to the FFT processing, the last data number in the third setting screen, which was 15872 (Figure 18), has been halved to 7936 (final data number display unit DA24). Note that the final chunk number is 31, just like on the third settings screen (final chunk number display section DA25).
[0101] The graph display unit GD2 shows the anomaly score for each chunk for all data input into the machine learning unit 402. The horizontal axis represents the data number. The graph display unit GD3 shows the interval anomaly score for all data input into the machine learning unit 402. The horizontal axis represents the data number.
[0102] In the threshold setting section TS1 in the upper right of the graph screen, enter the abnormality threshold in the threshold input section TS11 and press the setting button BT8, and the set threshold TH will be displayed in the graph display section GD2.
[0103] Furthermore, when the tab TB52 ("5-2.Graph") is pressed, the second graph screen shown in Figure 15 is displayed. The second graph screen displays graph display units GD11, GD12, and GD13. Graph display unit GD11 displays a comparison between the data input to the machine learning unit 402 for one chunk and the inference results from the machine learning unit 402. Graph display unit GD12 displays the anomaly score for one chunk. Graph display unit GD13 also displays the anomaly score for one chunk. In graph display units GD11, GD12, and GD13, the horizontal axis is displayed as the data number.
[0104] Above the graph display unit GD11, the chunk number display unit DA26 and the data number setting unit ST6 are displayed. The chunk number display unit DA26 displays the chunk number of the chunk to be displayed in the graph display units GD11, GD12, and GD13. By default, the last chunk number is displayed. The data number setting unit ST6 allows you to set the data number included in the chunk to be redisplayed in the graph display units GD11, GD12, and GD13. After setting the data number in the data number setting unit ST6, pressing the redisplay button BT9 will redisplay the graph display units GD11, GD12, and GD13.
[0105] <Examples of anomaly detection> An example of anomaly detection will be explained using the various screens described above. A data file containing time-series data as shown in Figure 7 was loaded on the first settings screen (Figure 8), and the motor current data (second column) was normalized. Then, on the second settings screen (Figure 9), it was selected to use the normalized data, and the chunks were set (set chunk size = 512 × 1). Then, on the third settings screen (Figure 11), window function processing and FFT processing were performed on each chunk, and the chunks for starting learning and inference were set. Due to the FFT processing, the number of data points in one chunk is FFT length / 2 = 512 / 2 = 256. Therefore, the chunk width = FFT length / 2. Note that if FFT processing is not performed, the chunk width = the above chunk size. Also, in the data shown in Figure 7, the first quarter is normal data and the last three-quarters is abnormal data, so the chunk number for starting inference was set to 7, and learning was performed using chunks number 2 to 6, which are normal data. Furthermore, the abnormal data is presented in a gradual manner, with the abnormal conditions becoming more severe as the analysis progresses.
[0106] Then, in the fourth settings screen (Figure 13), various machine learning parameters are set and the simulation is executed. When the first graph screen (Figure 14) is displayed, the anomaly score for each chunk (chunk width = 256) is displayed in the graph display section GD2. As shown in Figure 14, the anomaly score is high in the dashed line section A, which is the furthest back part.
[0107] Furthermore, on the first graph screen, the interval anomaly score is displayed in the graph display unit GD3. The interval anomaly score is an anomaly score calculated for each interval into which the chunk width is divided into multiple intervals. On the fourth setting screen (Figure 13), the interval width setting unit ST581 sets the number of data points in one interval for the interval anomaly score. The shift amount setting unit ST582 sets the shift amount of the interval when calculating the interval anomaly score. Figure 16 conceptually shows the relationship between the chunk width CW and the interval SC. When the shift amount = 0, the interval SC is set from the beginning of the first chunk in the chunk to be inferred (= the chunk at the start of inference). In Figure 16, the first chunk in the chunk to be inferred is denoted as "chunk #1". In the example in Figure 16, the chunk width CW is divided into 8 intervals by the interval SC.
[0108] In the example in Figure 13, the interval width setting unit ST581 is set to 8 data points per interval, and the shift amount setting unit ST582 is set to 0. Therefore, the chunk width is divided into 32 intervals of chunk width / number of data points per interval = 256 / 8. Chunk #1 in Figure 16 is the chunk with the inference start chunk number = 7. Consequently, the graph display unit GD3 in Figure 14 displays the interval anomaly score for each of the 32 intervals. The dashed line at the very end shows a high interval anomaly score.
[0109] In the second graph screen of Figure 15, the anomaly score for the last chunk (chunk number = 31) is displayed in the graph display unit GD12, and the interval anomaly score is displayed in the graph display unit GD13. Thus, while the graph display unit GD12 displays a constant value, the graph display unit GD13 displays the interval anomaly score for each interval. From this, it can be seen that the interval anomaly score is high in the beginning part of the last chunk (border line C).
[0110] In this way, the anomaly score for each chunk allows us to check for overall anomalies, and the interval anomaly score allows us to identify which parts of the data are particularly abnormal, pinpointing localized anomalies. Once anomalies in the data are identified, the bandwidth of the anomaly is associated with a predetermined anomaly mode, making it possible to determine that there is a high probability that the predetermined anomaly mode is occurring. For example, in the above example, if we input the motor current data after FFT processing into a machine learning model and find that the interval anomaly score is high at the beginning of the chunk, i.e., at the low frequency, as in the example in Figure 15, then if we identify the anomaly as occurring in the 400KHz bandwidth, we can determine that there is a high probability that bearing damage has occurred. Alternatively, if we can identify the anomaly as occurring in the bandwidth of the motor's rotation frequency (e.g., 60Hz), we can determine that there is a high probability that an anomaly synchronized with that rotation frequency is occurring.
[0111] Furthermore, if the shift amount is set to a value greater than 0, the interval anomaly score is calculated after shifting the interval backward by the shift amount from the beginning of the first chunk being inferred, as shown in the lower part of Figure 16. This helps to prevent anomaly detection from being missed even if there is an anomaly at the boundary between adjacent chunks (such as the boundary between chunk #1 and chunk #2 in Figure 16).
[0112] <Biochemical analyzer> Next, a biochemical analyzer according to an embodiment of this disclosure will be described. Figure 17 is a schematic diagram showing the internal structure of the biochemical analyzer 50. Figure 18 is a block diagram of the biochemical analyzer 50.
[0113] As shown in Figure 17, the biochemical analyzer 50 comprises a rotary table 501 and a chip holder 502. Also, as shown in Figure 18, the biochemical analyzer 50 comprises a light source unit 51, a light receiving unit 52, a drive unit 53, and a measurement control unit 54.
[0114] The biochemical analyzer 50 is a device for analyzing and testing biochemical samples, such as blood, using a microchip 503. The rotary table 501 is driven to rotate by a drive unit 53. A chip holder 502 is rotatably fixed to the rotary table 501. The chip holder 502 is driven to rotate independently of the rotary table 501 by the drive unit 53. The microchip 503 is held by the chip holder 502.
[0115] Blood collected from the subject is injected into the microchip 503, for example, by aspirating it using a capillary. The microchip 503 is then attached to the chip holder 502. The analytical test in the biochemical analyzer 50 includes a pretreatment operation to prepare a test solution according to the test item, and a measurement operation to measure the absorbance of the test solution obtained by this pretreatment operation.
[0116] The pre-processing operation is performed using centrifugal force acting on the microchip 503 as the rotary table 501 is driven to rotate, and includes a separation process to separate the target liquid from the sample, a weighing process to dispense a certain amount of the target liquid, a mixing and reaction process to prepare a test solution by mixing and reacting the target liquid with a reagent, and a feeding process to send the prepared test solution to the measurement cell in the microchip 503. Each process in the pre-processing operation is performed sequentially while the orientation of the microchip 503 is switched by the chip holding unit 502.
[0117] After the pre-processing operation, the measurement operation is performed on the measurement cell. Here, light is shone from the light source unit 51 onto the measurement cell of the microchip 503, and the light that has passed through the inspection liquid in the measurement cell is received by the light receiving unit 52. The measurement control unit 54 measures the absorbance based on the amount of light received by the light receiving unit 52. The measurement control unit 54 acquires the time change of absorbance (called the time course).
[0118] Figure 19 shows an example of such absorbance time-course data. Figure 19 shows 14 time-course data points, from Data 1 to Data 14. Figure 20 shows Data 1 to Data 14 arranged in order. In Figure 19, as an example, measurements taken at 1-second intervals for 60 seconds are considered as one time-course data point. That is, one time-course data point contains 60 absorbance data points. Therefore, Figure 20 shows 60 × 14 = 840 data points.
[0119] In the example shown in Figure 20, data 1 through 12 are considered normal data, while data 13 and 14 are considered abnormal data. Data 13 and 14 include an abnormality in which a step-like distortion occurs (indicated by the frame in Figure 19). The measurement operation is performed with the rotary table 501 and the chip holder 502 stopped, but such step-like distortion may occur depending on the mechanical conditions.
[0120] To detect such anomalies, the biochemical analyzer 50 of this embodiment uses machine learning and anomaly score calculation. The anomaly detection process in the biochemical analyzer 50 will be explained in accordance with the flowchart shown in Figure 21.
[0121] Here, the learning processing unit 541 in the measurement control unit 54 performs training (unsupervised learning) on a machine learning model using normal absorbance time course data. Each chunk input to the machine learning model is a time course data. In the example in Figure 20, since data 1 to data 9 are used for training, each time course data from data 1 to data 9 becomes one chunk. That is, the chunk width is 60.
[0122] Subsequently, each time new time-course data is acquired, the process shown in Figure 21 is initiated. First, in step S1, the inference processing unit 542 in the measurement control unit 54 performs inference on the acquired time-course data using a machine learning model. In the example in Figure 20, for example, if data 10 is acquired, inference data (60 data points) is obtained when data 10 is input into the machine learning model. Then, in step S2, the anomaly score calculation unit 543 in the measurement control unit 54 calculates the anomaly score for one chunk. For example, the anomaly score is calculated based on the inference data obtained for data 10 and the loss function.
[0123] The process proceeds to step S3, where the determination unit 544 in the measurement control unit 54 determines whether the abnormality level obtained in step S2 is equal to or greater than the threshold TH1. If the abnormality level is not equal to or greater than the threshold TH1, the process proceeds to step S4, where the acquired time course data is output as a measured value from the output unit 545 in the measurement control unit 54.
[0124] On the other hand, if the abnormality level is equal to or greater than the threshold TH1, the process proceeds to step S5, where the determination unit 544 determines whether the abnormality level obtained in step S2 is equal to or greater than the threshold TH2 (>TH1). If the abnormality level is equal to or greater than the threshold TH2, the output unit 545 outputs an error.
[0125] If the anomaly level is not equal to or greater than the threshold TH2, the process proceeds to step S6, where the interval anomaly level calculation unit 546 in the measurement control unit 54 calculates the interval anomaly level. The interval anomaly level is the anomaly level in one interval, which is obtained by dividing the chunk width into multiple intervals. However, here, as shown in the conceptual diagram in Figure 22, the interval anomaly level is calculated when the intervals SC are arranged from the beginning of the chunk width CW of the chunk to be inferred in step S1. For example, if data 10 is acquired, and the chunk width = 60, then, for example, if the interval width (number of data points in one interval) = 5, the chunk width CW is divided into intervals of chunk width / interval width = 12.
[0126] Furthermore, in step S6, the section number calculation unit 547 in the measurement control unit 54 calculates the number of NG (No Good) sections, which are those among the section abnormality scores calculated in step S6 that are equal to or greater than the threshold TH3.
[0127] The process proceeds to step S7, where the determination unit 544 determines the number of NG sections. If the number of NG sections is 2 or more, the process proceeds to step S8, where the output unit 545 outputs an error. On the other hand, if the number of NG sections is 0, the process proceeds to step S9. In step S9, the section anomaly calculation unit 546 calculates the section anomaly after the shift. As shown in Figure 22, when section SC is shifted by a shift amount sht, section SC is arranged starting from a point shifted by the shift amount sht from the beginning of the chunk width CW. Note that, as shown by the dashed line section SC in Figure 22, if the section SC does not fit within the chunk width CW after the shift, the section SC that does not fit is not set.
[0128] In step S9, the section number calculation unit 547 calculates the number of sections with an abnormality score after the shift that is equal to or greater than the threshold TH3, and this is called the number of NG sections. The process then proceeds to step S10, where the determination unit 544 determines the number of NG sections. If the number of NG sections is not 1, the process proceeds to step S8, and the output unit 545 outputs an error. On the other hand, if the number of NG sections is 1, the process proceeds to step S11. Note that if the number of NG sections is 1 in step S7, the process also proceeds to step S11.
[0129] In step S11, the correction unit 548 in the measurement control unit 54 performs a correction process. The correction process corrects the absorbance data in one NG section identified in step 7 or step S10. The correction process will be explained using Figure 23. Figure 23 shows an example of time course data, showing from left to right: measurement time, absorbance data before correction, difference (=difference between the absorbance data before and after correction), average of the differences in one section, and absorbance data after correction.
[0130] In the correction process, the average of the differences (1.65 and 1.59) in each section SC1 and SC2 before and after the identified NG section SC0 is calculated (the average is 1.62). Then, the calculated average is added to the last uncorrected absorbance data in section SC1 before NG section SC0 for each measurement time to generate the corrected absorbance data. For sections SC2 and beyond after NG section SC0, the difference from the uncorrected data is added to the last corrected absorbance data in NG section SC0 for each measurement time to generate the corrected absorbance data.
[0131] The process proceeds to step S12, where the output unit 545 outputs the corrected absorbance data. After steps S4, S8, or S12, the process is completed (end).
[0132] With this type of anomaly detection process, in the example shown in Figure 20, when data 13 and data 14 are acquired, the interval anomaly degree can be calculated to detect and correct step-like distortions. This eliminates the need for repeated measurement operations.
[0133] <Other> Furthermore, the various technical features disclosed herein can be modified in various ways, in addition to the embodiments described above, without departing from the spirit of the technical creation. In other words, the embodiments described above should be considered in all respects to be illustrative and not restrictive, and the technical scope of the present invention should be understood to include all modifications that fall within the meaning and scope equivalent to the claims, rather than being limited to the embodiments described above.
[0134] For example, in the above embodiment, chunks were defined two-dimensionally by the number of rows and columns, but chunks may also be defined in three or more dimensions.
[0135] Furthermore, for example, the anomaly detection method of this disclosure is not limited to the above-described embodiment, but can be applied to various industrial machinery, home appliances, analytical instruments, medical devices, and the like.
[0136] <Note> As described above, the anomaly detection method relating to one aspect of this disclosure is An anomaly detection method using a computing device (100A), When supplying data sequentially to a machine learning model, a single chunk of data is referred to as a chunk. A step of obtaining learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, A step of obtaining an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A step of dividing the chunk width into multiple intervals based on the second data and the inference result, and calculating the interval anomaly score for each interval, This includes (the first configuration).
[0137] With this configuration, accurate detection of anomalies becomes possible by generating interval anomaly scores.
[0138] In the first configuration described above, the configuration may include a step of calculating the degree of anomaly for each chunk width based on the second data and the inference result (second configuration).
[0139] Furthermore, the first or second configuration described above may include a step of calculating the degree of abnormality for each section when the multiple sections have been shifted by a set shift amount (third configuration).
[0140] Furthermore, in any of the first to third configurations described above, the first data and the second data may be configured to be data after frequency analysis processing (fourth configuration).
[0141] Furthermore, one aspect of this disclosure is a computing device used in an anomaly detection method of any of the first to fourth configurations described above (fifth configuration).
[0142] Furthermore, one aspect of this disclosure is a program (P) used in an anomaly detection method of any of the first to fourth configurations described above (sixth configuration).
[0143] Furthermore, one aspect of this disclosure is a correction method for correcting abnormal data detected by any of the first to fourth configurations described above (the seventh configuration).
[0144] Furthermore, in one aspect of this disclosure, the anomaly score generation device (50) refers to a single block of data when sequentially supplying data to a machine learning model as a chunk, A learning processing unit (541) obtains learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, An inference processing unit (542) obtains an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A section anomaly calculation unit (546) calculates the section anomaly degree for each section obtained by dividing the chunk width into multiple sections based on the second data and the inference result, It includes (the eighth configuration).
[0145] Furthermore, in the eighth configuration described above, the first data and the second data are time-varying data of the object to be measured, and the system may also include a correction unit (548) configured to correct the data in the section in which an anomaly was detected based on the section anomaly degree (ninth configuration).
[0146] Furthermore, the abnormality generation device of the ninth configuration described above is a biochemical analyzer, and the time-change data of the measurement target may be configured to be absorbance data of the test solution (the tenth configuration).
[0147] [Second Disclosure Technology] Next, we will explain the second disclosure technique.
[0148] <Configuration of the machine learning device according to the first embodiment> Figure 24 shows the configuration of a machine learning apparatus 1 according to an exemplary first embodiment of the present disclosure. The machine learning apparatus 1 comprises a first data processing unit 2, a data storage unit 3, a model holding unit 4, and a first calculation unit 5.
[0149] The first data processing unit 2 directly inputs the target data, samples it to generate first sampled data, and converts the first sampled data into a first frequency amplitude spectrum 30. The target data is time-series analog data. The target data is supplied to the first data processing unit 2, for example, from an analog output sensor included in a mechanical system. The conversion from the first sampled data to the first frequency amplitude spectrum is achieved, for example, by FFT (Fast Fourier Transform), wavelet transform, etc. In the conversion from the first sampled data to the first frequency amplitude spectrum, the first sampled data may be subjected to processing such as normalization, envelope processing, window function processing before being converted to the first frequency amplitude spectrum.
[0150] For example, a digital output sensor may be part of the machine learning device 1, or more specifically, the part of the first data processing unit 2 that directly inputs target data, samples it, and generates first sampled data. In this case, the machine learning device 1 would be composed of the computer 100 and the digital output sensor.
[0151] The data storage unit 3 stores the first frequency amplitude spectrum 30 received from the first data processing unit 2.
[0152] The model holding unit 4 holds the first machine learning model 40. The first machine learning model 40 is configured as part of a simulation program P, for example, using MATLAB / Simulink®. A specific example of the first machine learning model 40 will be described later.
[0153] The first arithmetic unit 5 performs so-called unsupervised learning and inference using the first frequency amplitude spectrum 30 and the first machine learning model 40. The first arithmetic unit 5 inputs the first frequency amplitude spectrum 30 to be learned into the first machine learning model 40 to perform unsupervised learning and calculates the first calculation result (e.g., anomaly score). The first arithmetic unit 5 inputs the first frequency amplitude spectrum 30 to be inferred into the first machine learning model 40 to perform inference and calculates the first calculation result (e.g., anomaly score). Inference can be performed by the first arithmetic unit 5 during the learning process described above, and after the learning process is complete.
[0154] In this embodiment, the first arithmetic unit 5 inputs the first frequency amplitude spectrum 30 to the first machine learning model 40 to perform learning and inference. However, the first arithmetic unit 5 may perform only learning or inference.
[0155] <Machine learning model configuration> The first machine learning model 40 performs learning and inference on the input data (first frequency amplitude spectrum 30). As the first machine learning model 40, for example, a three-layer neural network 10 as shown in Figure 4 is used.
[0156] As shown in Figure 4, the 3-layer neural network 10 is an AI model having an input layer 10A, a hidden layer 10B, and an output layer 10C. Generally, in the 3-layer neural network 10, n-dimensional input data x∈R with batch size k k×n For this, the inference result y∈R in n' dimension k×n’ This is obtained by setting y = G(x·α+b)β, where α∈R n×m is the weight that connects the input layer 10A and the hidden layer 10B, where β∈R m×n’ b is the weight connecting the hidden layer 10B and the output layer 10C. Also, b∈R m is the bias of hidden layer 10B, and G is the activation function of hidden layer 10B.
[0157] In this embodiment, an algorithm is used that can sequentially train a three-layer neural network 10 with an arbitrary batch size. For the i-th training data {x i ∈ R i , t ki×n ∈ R i} obtained with a batch size of k ki×n’ , it is necessary to obtain β that minimizes the error represented by the following formula (1). i
Equation
[0158] The optimized weight β i is calculated by the following formula (2). P i = P i-1 - P i-1 H i <00OO068>(I + H i P i-1 H i T ) -1 H i P i-1 [[ID=S4]]β i = β i-1 + P i H i T (t i - H i β i-1 ) (2)
[0159] Here, P0 and β0 are obtained by the following formula (3). P0 = (H0 T H0) -1 β0 = P0H0 T t0 (3)
[0160] The training algorithm is as follows.<000091o>(1) Initialize the values of the weights α and the bias b with random numbers. (2) Calculate H0 for x0, and then calculate P0 and β0. (3) Batch size k i Each time the i-th training data is obtained, P i and β i The following is calculated sequentially. Alternatively, instead of using the formula for calculating β0 in equation (3), a value initialized with a random number may be used as β0.
[0161] Furthermore, in this embodiment, learning is performed using an autoencoder. The autoencoder reuses the input data directly as training data and learns to reconstruct the input data as the inference result. In other words, it learns with t=x as described above. Since the autoencoder does not require the creation of separate training data, it is a type of unsupervised learning algorithm.
[0162] According to this first machine learning model 40, learning can be performed on edge devices using a computing device of the size of a microcontroller. An edge device refers to an information processing device that takes over a trained machine learning model from another device and performs inference calculations using the trained machine learning model. In other words, when introducing such on-device learning to, for example, motor anomaly detection, the effectiveness of anomaly detection can be confirmed by simulation. An edge device is an example of an electronic device equipped with a machine learning device.
[0163] In the first machine learning model 40, the anomaly score is calculated using a loss function L(y,t) that represents the error between the inference result y and the training data t. For example, MAE (Mean Absolute Error) or MSE (Mean Squared Error) can be used as the loss function. When the loss function is MAE, the loss function L is expressed as shown in equation (4) below.
number
number
[0164] Since training is performed using an autoencoder, the anomaly score is calculated using the loss function L(y,t)=L(y,x).
[0165] Figure 25 is a graph showing an example of the target data. In Figure 25, the target data is shown as a time-series graph with time on the horizontal axis and a predetermined output value on the vertical axis. Figure 26 is a magnified view of the portion of Figure 25 from time t1 to time t2. Figure 27 is a magnified view of the portion of Figure 25 from time t4 to time t5.
[0166] In Figure 25, the start point of the data is defined as time t0, and the end point is defined as time t6. In Figure 25, the period from time t0 to time t3 is defined as the normal period T1. In Figure 25, the period from time t3 to time t6 is defined as the abnormal period T2.
[0167] The normal period T1 is the period during which no abnormalities occur in the target data. In other words, during the normal period T1, it is estimated that no particular abnormalities occur in the output values of the machine system implementing the machine learning device 6. On the other hand, the abnormal period T2 is the period during which abnormalities occur in the target data. In other words, during the abnormal period T2, it is estimated that some kind of abnormality occurs in the output values of the machine system implementing the machine learning device 6.
[0168] In the examples shown in Figures 25 to 27, the target data has components at 20Hz, 30Hz, 60Hz, 120Hz, and 220Hz. Furthermore, in the examples shown in Figures 25 to 27, the target data during the abnormal period T2 has larger 220Hz and 120Hz components compared to the target data during the normal period T1. In other words, in the examples shown in Figures 25 to 27, abnormal conditions appear in the 220Hz and 120Hz components of the target data.
[0169] Here, if the sampling frequency in the first data processing unit 2 is 200 Hz, high-frequency components above the Nyquist frequency of 100 Hz (= 200 Hz / 2) are folded back into a bandwidth below the Nyquist frequency by aliasing. Therefore, the first frequency amplitude spectrum 30 corresponding to Figure 26 is as shown in Figure 28, and the first frequency amplitude spectrum 30 corresponding to Figure 27 is as shown in Figure 29.
[0170] As can be seen from Figures 28 and 29, the first frequency amplitude spectrum 30 corresponding to Figure 26 (first frequency amplitude spectrum 30 during normal period T1) and the first frequency amplitude spectrum 30 corresponding to Figure 27 (first frequency amplitude spectrum 30 during abnormal period T2) have different waveforms. As a result, the degree of abnormality in normal period T1 and the degree of abnormality in normal period T2 can be distinguished as shown in Figure 30, so the machine learning device 1 can detect abnormalities even when abnormal conditions appear in the high-frequency range (above the Nyquist frequency) of the target data.
[0171] Here, if an anti-aliasing filter is provided to suppress aliasing by removing frequency components above the Nyquist frequency, then the first frequency amplitude spectrum 30 corresponding to Figure 26 and the first frequency amplitude spectrum 30 corresponding to Figure 27 will both be as shown in Figure 31. As a result, the degree of abnormality in normal period T1 and the degree of abnormality in normal period T2 become indistinguishable, as shown in Figure 32. Therefore, if an anti-aliasing filter is provided in the first data processing unit 2, the machine learning device 1 will be unable to detect abnormalities when abnormal conditions appear in the high-frequency region (region above the Nyquist frequency) of the target data.
[0172] <Configuration of the machine learning device according to the second embodiment> Figure 33 shows the configuration of a machine learning apparatus 1 according to an exemplary second embodiment of the present disclosure. The machine learning apparatus 1 comprises a first data processing unit 2, a data storage unit 3, a model holding unit 4, and a first calculation unit 5. Hereinafter, parts similar to those in the first embodiment will be omitted from description as appropriate.
[0173] The data storage unit 3 stores the learning data 31. The learning data 31 includes input data 31A and training data 31B. The learning data 31 is data for performing so-called supervised learning by supplying the input data 31A and the training data 31B to the first machine learning model 40 as input and output respectively.
[0174] The first calculation unit 5 performs supervised learning and inference using the first frequency amplitude spectrum 30 and the first machine learning model 40. The first calculation unit 5 supplies the input data 31A as input to the first machine learning model 40, and supplies the training data 31B as output to the first machine learning model 40 to perform supervised learning. The first frequency amplitude spectrum 30 to be learned is used as the input data 31A. The first calculation unit 5 inputs the first frequency amplitude spectrum 30 to be inferred into the first machine learning model 40 to perform inference. Inference can be performed during the above learning by the first calculation unit 5 and after the learning is completed.
[0175] In this embodiment, the first calculation unit 5 inputs the first frequency amplitude spectrum 30 into the first machine learning model 40 to execute learning and inference, but the first calculation unit 5 may be configured to execute only one of learning and inference.
[0176] Here, we will provide an overview of supervised learning. Figure 34 is a diagram illustrating supervised learning. In supervised learning, a machine learning model (AI) is given input data as input and training data as output, and the parameters of the machine learning model are learned. Subsequently, test input data is input to the machine learning model, and inference data is output as a result of the inference performed by the machine learning model. The output inference data is compared with expected data. Note that in Figures 34 and 35, the inference data is illustrated as actual data for comparison with the expected data.
[0177] Figure 35 illustrates a future prediction task, an example of supervised learning. Here, the original data is split into input data (first half of the time series) and training data (second half). A machine learning model is then trained using this input and training data. Subsequently, test input data (first half of the time series) is fed into the machine learning model, generating actual data (inference data) from the second half of the time series. In this way, the data for the second half of the time series can be predicted based on the data for the first half. The outputted actual data is then compared with the expected data.
[0178] <Configuration of the machine learning device according to the third embodiment> Figure 36 shows the configuration of a machine learning apparatus 1 according to an exemplary third embodiment of this disclosure. The third embodiment is a modification of the first embodiment. In the first embodiment, when an abnormal condition appears in the low-frequency region (region below the Nyquist frequency) of the target data, high-frequency noise and other elements contained in the target data may be folded back into the band below the Nyquist frequency due to aliasing, which may make it difficult to detect the abnormality.
[0179] The machine learning apparatus 1 according to the exemplary third embodiment of this disclosure is configured to detect abnormalities even when abnormal conditions appear in the high-frequency range (range above the Nyquist frequency) of the target data, and to easily detect abnormalities when abnormal conditions appear in the low-frequency range (range below the Nyquist frequency) of the target data.
[0180] The machine learning device 1 comprises a first data processing unit 2, a data storage unit 3, a model holding unit 4, a first calculation unit 5, an anti-aliasing filter 6, a second data processing unit 7, and a second calculation unit 8. Hereafter, descriptions of parts similar to those in the first embodiment will be omitted as appropriate.
[0181] The model holding unit 4 also holds the second machine learning model 41. The second machine learning model 41 is configured as part of a simulation program P, for example, using MATLAB / Simulink®. A specific example of the second machine learning model 41 is similar to a specific example of the first machine learning model 40.
[0182] The anti-aliasing filter 6 is placed before the second data processing unit 7. Examples of anti-aliasing filters 6 include bandpass filters, Butterworth low-pass filters, Chebyshev low-pass filters, and elliptic function low-pass filters.
[0183] The second data processing unit 7 samples the target data via the anti-aliasing filter 6 to generate second sampled data, and converts the second sampled data into a second frequency amplitude spectrum 32. In other words, the target data is input to the anti-aliasing filter 6, and the output of the anti-aliasing filter 6 is supplied to the second data processing unit 7. The second data processing unit 7 samples the output of the anti-aliasing filter 6 to generate second sampled data.
[0184] The second calculation unit 8 performs so-called unsupervised learning and inference using the second frequency amplitude spectrum 32 and the second machine learning model 41. The second calculation unit 8 inputs the second frequency amplitude spectrum 32 to be learned into the second machine learning model 41 to perform unsupervised learning and calculates a second calculation result (e.g., anomaly score). The second calculation unit 8 inputs the second frequency amplitude spectrum 32 to be inferred into the second machine learning model 41 to perform inference and calculates a second calculation result (e.g., anomaly score). Inference can be performed by the second calculation unit 8 during the learning process described above, and after the learning process is complete.
[0185] In the second frequency amplitude spectrum 32, the high-frequency region of the target data (the region above the Nyquist frequency) is not folded back into the bandwidth below the Nyquist frequency. Therefore, if an abnormal condition appears in the low-frequency region (the region below the Nyquist frequency) of the target data, the abnormality can be easily detected by the second calculation result (e.g., the degree of abnormality).
[0186] The processing of the first arithmetic unit 5 and the processing of the second arithmetic unit 8 may be executed in parallel, or they may be executed with a set priority.
[0187] When the processing of the first arithmetic unit 5 and the processing of the second arithmetic unit 8 are executed in parallel, the combination of the first calculation result (e.g., abnormality level) and the second calculation result (e.g., abnormality level) can be used to determine whether the data is normal, whether a first abnormality has occurred where an abnormal state appears in the high-frequency range (above the Nyquist frequency) of the target data, whether a second abnormality has occurred where an abnormal state appears in the low-frequency range (below the Nyquist frequency) of the target data, or whether both the first and second abnormalities have occurred.
[0188] When the processing of the first arithmetic unit 5 and the processing of the second arithmetic unit 8 are executed according to a set priority order, for example, first, it is determined whether or not a first abnormality has occurred based on the result of the first calculation (e.g., the degree of abnormality), and then, if no first abnormality has occurred, it is determined whether or not it is normal based on the result of the second calculation (e.g., the degree of abnormality), or whether or not a second abnormality has occurred.
[0189] Furthermore, modifications similar to those made from the first embodiment to this embodiment may be made to the second embodiment.
[0190] <Configuration of the machine learning device according to the fourth embodiment> The fourth embodiment differs from the first embodiment in that the first data processing unit 2 samples the target data at two different sampling frequencies to generate two types of first sampled data, converts the first type of first sampled data into a first frequency amplitude spectrum 30, and converts the second type of first sampled data into a second type of first frequency amplitude spectrum 30, but is otherwise the same as the first embodiment. The first data processing unit 2 is equipped with two ADCs (Analog to Digital Converters) so that the target data can be sampled at two different sampling frequencies.
[0191] Since the frequency position at which high-frequency components above the Nyquist frequency are aliased and folded into the band below the Nyquist frequency changes depending on the sampling frequency, using two different sampling frequencies allows one of the sampling frequencies to prevent the aliasing position from overlapping with the original frequency component, especially when the original frequency component has a peak at the aliasing position. Therefore, when abnormal conditions appear in the high-frequency range of the target data, improved accuracy in anomaly detection can be expected.
[0192] For example, if the target data has components at 15Hz, 20Hz, 40Hz, 235Hz, and 345Hz, and the two sampling frequencies are 100Hz and 89Hz, the approximate frequency band to which aliasing is performed would be as follows:
[0193] Figure 37 shows the first frequency amplitude spectrum 30 when the sampling frequency is 100 Hz. Figure 38 shows the first frequency amplitude spectrum 30 when the sampling frequency is 89 Hz.
[0194] As can be seen from Figures 37 and 38, the 15Hz, 20Hz, and 40Hz components appear as peaks with the same frequency band and amplitude whether the sampling frequency is 100Hz or 89Hz.
[0195] The 35Hz peak when the sampling frequency is 100Hz (see Figure 37) and the 32Hz peak when the sampling frequency is 89Hz (see Figure 38) are both high frequencies in the same frequency band that appear folded back due to aliasing (aliasing I).
[0196] The 45Hz peak when the sampling frequency is 100Hz (see Figure 37) and the 11Hz peak when the sampling frequency is 89Hz (see Figure 38) are due to aliasing, where high frequencies in the same frequency band appear folded back due to the same amplitude value (aliasing II).
[0197] Regarding aliasing I, if the sampling frequency is 100Hz, the high frequencies at which aliasing peaks appear in the 35Hz frequency band are 65Hz, 135Hz, 165Hz, 235Hz, ..., i.e., multiples of 100 ± 35Hz.
[0198] Regarding aliasing I, if the sampling frequency is 89Hz, the high frequencies at which aliasing peaks appear in the 32Hz frequency band are 57Hz, 121Hz, 146Hz, 210Hz, ..., i.e., multiples of 89 ± 32Hz.
[0199] The original frequency bands of aliasing that satisfy the two conditions above are multiples of 8900 ± 235Hz and multiples of 8900 ± 2435Hz. In other words, the original frequency band of aliasing can be narrowed down. Note that 8900 is the least common multiple of 100 and 89.
[0200] Regarding Aliasing II, if the sampling frequency is 100Hz, the high frequencies at which aliasing causes a peak in the 45Hz frequency band are 55Hz, 145Hz, 155Hz, 245Hz, ..., i.e., multiples of 100 ± 45Hz.
[0201] Regarding Aliasing II, if the sampling frequency is 89Hz, the high frequencies at which aliasing causes a peak in the 11Hz frequency band are 78Hz, 100Hz, 167Hz, 189Hz, ..., i.e., multiples of 89 ± 11Hz.
[0202] The original frequency bands of aliasing that satisfy the two conditions above are multiples of 8900 ± 345 Hz and multiples of 8900 ± 545 Hz. In other words, the original frequency band of aliasing can be narrowed down.
[0203] Here, it is desirable that the two sampling frequencies are relatively prime. If the two sampling frequencies are relatively prime, the filtering of the original approximate frequency band for aliasing can be optimized.
[0204] Furthermore, modifications similar to those made from the first embodiment to this embodiment may be made to the second embodiment. In addition, although the first data processing unit 2 sampled the target data at two different sampling frequencies in this embodiment, the first data processing unit 2 may sample the target data at three or more different sampling frequencies.
[0205] <Other> The embodiments described above should be considered in all respects to be illustrative and not restrictive, and the technical scope of this disclosure is indicated by the claims rather than by the description of the embodiments, and should be understood to include all modifications that fall within the meaning and scope equivalent to the claims.
[0206] For example, the third and fourth embodiments may be combined and implemented.
[0207] <Note> A note is added to this disclosure, which provides specific configuration examples in the embodiments described earlier.
[0208] The machine learning device (1) of this disclosure comprises a model holding unit (4) configured to hold a first machine learning model (40), a first data processing unit (2) configured to directly input target data, sample it to generate first sampled data, and convert the first sampled data into a first frequency amplitude spectrum (30), and a first calculation unit (5) configured to input the first frequency amplitude spectrum to the first machine learning model, perform at least one of learning and inference, and calculate a first calculation result (first configuration).
[0209] The machine learning device with the first configuration described above directly inputs and samples the target data, so high-frequency components above the Nyquist frequency are folded back into a band below the Nyquist frequency by aliasing. The machine learning device with the first configuration described above inputs the first frequency amplitude spectrum, which includes the high-frequency components folded back by aliasing, into the first machine learning model, so it can detect anomalies even when abnormal conditions appear in the high-frequency region of the target data.
[0210] In the machine learning apparatus with the first configuration described above, the first data processing unit may be configured to sample the target data at two or more sampling frequencies (second configuration).
[0211] In the machine learning device of the second configuration described above, the two or more sampling frequencies may be configured to be relatively prime (third configuration).
[0212] In a machine learning device having any of the first to third configurations described above, the device further comprises a second data processing unit (7) and a second calculation unit (8), wherein the model holding unit is configured to also hold a second machine learning model, the second data processing unit is configured to sample the target data via an anti-aliasing filter (6) to generate second sampled data, and to convert the second sampled data into a second frequency amplitude spectrum (32), and the second calculation unit is configured to input the second frequency amplitude spectrum into the second machine learning model to perform at least one of learning and inference to calculate a second calculation result (fourth configuration).
[0213] The electronic device of this disclosure comprises a machine learning device having any of the configurations described in the first to fourth above.
[0214] The program of this disclosure is a program that causes a computer to perform the following steps: a first step of directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum; and a second step of inputting the first frequency amplitude spectrum into a first machine learning model, performing at least one of learning and inference, and calculating a first calculation result.
[0215] The simulation apparatus of this disclosure is configured to calculate the first calculation result using a machine learning apparatus with any of the first to fourth configurations described above.
[0216] The data processing method of this disclosure comprises: a first step of directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum; and a second step of inputting the first frequency amplitude spectrum into a first machine learning model, performing at least one of learning and inference, and calculating a first calculation result.
[0217] [Third Disclosure Technology] Next, we will describe the third disclosure technology.
[0218] <Basic configuration of machine learning device 6> Next, the basic configuration of the machine learning device 6 will be described. The machine learning device 6 is composed of an MCU. The machine learning device 6 is incorporated into a predetermined mechanical system (such as a motor device) and controls this mechanical system. In addition to controlling the mechanical system, the machine learning device 6 can also perform machine learning using various data from this mechanical system as input data.
[0219] Figure 39 is a block diagram showing the basic configuration of the machine learning device 6. As shown in Figure 39, the machine learning device 6 comprises a data storage unit 7, a model holding unit 8, and a calculation unit 9.
[0220] The data storage unit 7 stores the input data din and the initial value data 72. The input data din is time-series data output from, for example, a mechanical system (motor device, etc.). This time-series data may be preprocessed as needed, such as by normalization or FFT. The initial value data 72 is set to the initial value determined by the computer 100, as described above.
[0221] The model holding unit 8 holds the machine learning model 80. The machine learning model 80 is a machine learning model capable of learning and inference according to the input data din. Details about the machine learning model 80 will be described later.
[0222] The calculation unit 9 calculates the calculation result 30 using the input data din and the machine learning model 80. The calculation result 30 includes the inference result from the inference calculation unit 92 (output data do, described later), the estimation result from the estimation unit 93 (for example, the anomaly score da, described later), and so on. The calculation unit 9 is described in detail as follows.
[0223] The arithmetic unit 9 includes a learning arithmetic unit 91, an inference arithmetic unit 92, and an estimation unit 93. The learning arithmetic unit 91 performs learning using a machine learning model 80, input data din, and initial value data 72. This learning can be either supervised or unsupervised.
[0224] The inference unit 92 performs inference using the machine learning model 80, the input data din, and the initial value data 72 to generate the output data do. This inference may be performed either during the learning process by the learning unit 91 or after the learning process is complete.
[0225] The output data do is the result of inference performed by inputting the input data din into the trained machine learning model 80. If the model was trained based on normal input data din, the output data do will represent a normal state. In other words, in this case, the machine learning model 80 generates output data do that approximates the normal input data din.
[0226] Suppose the input data din contains an abnormal state in a portion that has not been trained. In this case, a discrepancy will occur between the output data do and the actual input data din in the portion that has not been trained.
[0227] The estimation unit 93 performs a predetermined estimation based on the input data din and the output data do generated by the inference calculation unit 92. This estimation may include, for example, detecting whether there is an anomaly in the input data din, calculating the anomaly score da, or predicting the future state of the input data din. The estimation unit 93 includes the estimation result (anomaly score da in Figure 39) of the above estimation in the calculation result 30. That is, when the calculation unit 9 generates the calculation result 30, the calculation result 30 will include the estimation result from the estimation unit 93 in a predetermined manner.
[0228] <About the abnormality level da> Here, we will explain the anomaly score da as an example of the estimation result generated by the estimation unit 93. The anomaly score da is a numerical value that indicates the degree of anomaly in the output data do. The anomaly score da when the input data 71 does not contain any anomalies will be different in appearance, tendency, etc. from the anomaly score da when the input data 71 contains anomalies. In other words, this difference in appearance, tendency, etc., suggests the anomaly of the input data 71.
[0229] For example, the input-output error can be used as the anomaly score da. The input-output error is the difference between the value contained in the input layer 50A (=input data din) and the value contained in the output layer 50C (=output data do) when the input data din is input to the machine learning model 80 and inference is performed. The input-output error is calculated using a loss function. The loss function used to calculate the anomaly score da will be described later.
[0230] As described above, when there is a discrepancy between the input data 71 and the output data do, the characteristics and trends of the input / output error (= anomaly degree da) change compared to when there is no discrepancy.
[0231] The anomaly score da may use the result of a function other than the input / output error, or it may include the input / output error and multiple other calculation results. In this case, if the anomaly score da includes multiple calculation results, each calculation result may have different tendencies or similar tendencies.
[0232] As described above, when the computer 100 is used as a machine learning device 6, the machine learning device 6 outputs the calculation result 30 to the display unit 100E.
[0233] <About Machine Learning Model 80> Next, the machine learning model 80 will be described in detail. Figure 40 shows the configuration of the machine learning model 80. The machine learning model 80 is an inference model that can be trained using predetermined training data. As shown in Figure 40, the machine learning model 80 includes a three-layer neural network 50.
[0234] The three - layer neural network 50 is an AI model having an input layer 50A, a hidden layer 50B, and an output layer 50C. The hidden layer 50B is also referred to as a reservoir hidden layer or an intermediate layer. Here, the input data din may also be represented by the symbol x. Similarly, the output data do may also be represented by the symbol y.
[0235] Generally, in the three - layer neural network 50, for n - dimensional input data x ∈ R k×n with a batch size of k, the n'-dimensional inference result y ∈ R k×n’ is obtained as y = G(x·α + b)·β. G is the activation function of the hidden layer 50B. The activation function can use, for example, Sigmoid or ReLU. In FIG. 40, the batch size k is set to 1 and b is set to a zero matrix.
[0236] Here, α ∈ R n×m shown in FIG. 40 is the weight (the first connection weight) connecting the input layer 50A and the hidden layer 50B. β ∈ R m×n’ is the weight (the third connection weight) connecting the hidden layer 50B and the output layer 50C. b ∈ R k×m is the bias. Also, h ∈ R m is the hidden - layer matrix within the hidden layer 50B. γ ∈ R m×m is the weight (the second connection weight) connecting the elements (h 1~ h n ) within the hidden layer 50B, and it is the weight when the recursive calculation described later is performed.
[0237] The three - layer neural network 50 adopts an algorithm that can be sequentially learned with an arbitrary batch size. When the i - th training data {x i ∈ R i , t ki×n ∈ R i} of the batch size k is obtained, it is necessary to find β ki×n’ that minimizes the error shown by the following formula (1). i
Equation
[0238] Optimized weight β i This is calculated by the following equation (2). Note that P i is the weight β i This is a matrix for updating the data. P i =P i-1 -P i-1 h i T (I+h i P i-1 h i T ) -1 h i P i-1 β i =β i-1 +P i h i T (t i -h i β i-1 ) (2)
[0239] Here, P0 and β0 are obtained by equation (3) below. P0=( h0 T h0) -1 β0 = P0h0 T t0(3)
[0240] The learning algorithm is as follows: (A) Initialize the values of weights α, γ, and the hidden layer matrix h using random numbers. (B)Calculate h0 for x0, and calculate P0 and β0. (C) Batch size k i Each time the i-th training data is obtained, P i and β i The results are calculated sequentially.
[0241] The computational bottleneck in equation (2) above is (I+h i P i-1 h i T ) -1 This is the result. (I+h i P i-1 h i T The matrix size of ) is k × k. Therefore, when k=1, the inverse matrix operation can be replaced with the reciprocal operation. Consequently, by fixing the batch size to k=1, calculations become easier even with an arithmetic unit of the size of a microcontroller. For this reason, the batch size of machine learning model 80 is fixed to k=1.
[0242] Furthermore, the machine learning model 80 may also be trained using an autoencoder. The autoencoder reuses the input data directly as training data and learns to reconstruct the input data as the inference result. In other words, it learns with t=x as described above. Since the autoencoder does not require the creation of separate training data, it is a type of unsupervised learning algorithm. Also, by making the number of nodes in the hidden layer smaller than the number of nodes in the input and output layers, the hidden layer matrix can be considered as a dimensionality-reduced form of the input data when the error between the input data and the inference result converges. That is, the encoded result of the input data x is h=G(F), and the decoded result of h is obtained as the hidden layer matrix y=h·β.
[0243] <Input data din input elements x1~x n About > As shown in Figure 40, the input data din here is time-series data as described above. The input data din is obtained by dividing this time-series data into individual input elements x1~x n It is composed of including the following: The output data do is output elements y1~y i It includes the output elements y1~y n’ This is the input element x1~x using machine learning model 80. n These are the individual inference results for each. Also, in Figure 40, input elements x1~x n When the machine learning model 80 is input and inference is performed, the hidden layer matrix h of the hidden layer 50B is given by the hidden layer matrix h1~h m That is what they say.
[0244] Here, let's assume that the input data din has input elements x1~x n If all of these were input into the machine learning model 80 at once and calculations were performed, the computational load would become enormous. Therefore, when the machine learning device 6 inputs the input data din into the machine learning model 80, it processes the input data din into predetermined groups of input elements x1 to x n The input elements are divided into chunks. Each of these divided chunks is called a chunk. Then, the input elements x1 to x n The data is input into the machine learning model 80 chunk by chunk, and the machine learning model 80 performs calculations for each chunk. More specifically, it is as follows:
[0245] Figure 41 schematically shows how the input data din is divided into multiple chunks and input into the machine learning model 80 for processing. Here, as shown in Figure 41, each chunk is divided into 6 elements. That is, the first chunk of the input data din contains input elements x1 to x6. The second chunk contains input elements x7 to x 12 It includes the third chunk, which is input element x. 13 ~x 18 Includes.
[0246] First, the first chunk of the input data din (=input elements x1~x6) is input to the machine learning model 80, and the inference result (output elements y1~y6) is calculated. Next, the elements of the second chunk of the input data din (=input elements x7~x 12 ) is input to the machine learning model 80, and the inference result (output elements y7~y 12 Next, the third chunk of the input data din (= input element x) is calculated. 13 ~x 18 ) is input to the machine learning model 80 and the inference result (output element y 13 ~y 18 The result is calculated. Similarly, for the 4th chunk (not shown in the diagram) and beyond, elements of the input data din are input to the machine learning model 80 for each chunk, and the inference result is calculated.
[0247] <Details about Hidden Layer 50B> Hidden layer 50B performs recursive calculations using the activation function G(F). The argument F of the activation function G is the element (= input element x1~x n A predetermined calculation formula is used to make the elements interact with each other. Here, "to make them interact" can be rephrased as combining the characteristics (=information) of the elements into a single piece of information.
[0248] The formula for calculating argument F is the elements (x1~x) of input layer 50A. n The first variable is obtained by multiplying ) by the weight α, and the hidden layer matrix of hidden layer 50B (h1~h m The formula for calculating F for the i-th input element xi is: The first variable is x i ·α. Also, in this case, the second variable is h i-1 ·γ. The argument F can be, for example, the sum, cross product, or Hadamard product of the first and second variables. More specifically, it is as follows:
[0249] If the argument F is the sum of the first and second variables, then the argument F is given by equation (4) below. k1 and k2 are predetermined weights, which can be set arbitrarily.
number
[0250] If the argument F is the cross product of the first and second variables, then the argument F is given by equation (5) below.
number
[0251] If the argument F is the Hadamard product of the first and second variables, then the argument F is given by equation (6) below.
number
[0252] Figure 42 shows the computational stages when inference is performed using the input data din and the machine learning model 80. In Figure 42, the input elements x1~x n Of these, the i-th input element x i This shows the calculation for the input element x. The state shown in Figure 42 is the state immediately preceding the input element x i-1 The result of the activation function G for h i-1 With γ already obtained, input element x i This shows how calculations are performed on [the specified value].
[0253] As shown in Figure 42, first in the first calculation stage, the input element x i A calculation is performed on the input element x. In the first calculation stage, the input element x i A weight α is applied to the input element x. Specifically, the input element x i Multiplying by the weight α, x i • Obtain α.
[0254] Next, in the second calculation stage, x obtained in the first calculation stage i ·α and the previously obtained h i-1 Based on γ, the argument F is calculated. i-1 ·γ is the previous input element x i-1 Information containing (more specifically, input element x i-1 Information and input element x i-1 It can be said that this includes information from the previous input element. Therefore, the calculation in this second calculation stage is based on the immediately preceding element (in this case, input element x). i-1 ) can also be understood as a recursive computation that uses recursively in its calculations.
[0255] Next, in the third calculation stage, the argument F is substituted into the activation function G, and the calculation result h i Obtain h. Next, in the fourth calculation stage, i We multiply this by a weight β. This gives us the output element y i This is generated.
[0256] Note that the calculation result h in the third calculation stage i After obtaining h, in the fifth calculation stage, separate from the fourth calculation stage i We will perform calculations on the following. Specifically, these are as follows:
[0257] In the fifth calculation stage, first h i It temporarily stores the next input element x. i+1 Until the first stage calculation for is completed, the stored h i We multiply this by the weight γ. Note that in Figure 42, x is calculated in the second calculation stage. i The state in which calculations are performed for is shown. Therefore, in Figure 42, in the fifth calculation stage, h i-1 The state in which the data is stored and multiplied by weight γ is shown.
[0258] Next input element x i+1 The calculation for x in the second calculation stage is i+1 ·α and h i The calculation will use γ. That is, h obtained in the third stage i We recursively apply this to the second computation stage, x i+1 This is applied to the next input element. In other words, the calculation result obtained in the third calculation stage is recursively passed through the fifth calculation stage to the second calculation stage, where it is applied to the information of the next input element. The above recursive calculation, which goes through the second, third, and fifth calculation stages, is performed within the hidden layer 50B (see Figures 40 and 41).
[0259] Input elements x1~x n Each time an inference is made for a given input element x1 to x, this recursive computation is repeated. n Each time it is calculated sequentially for the previous input elements (x in Figure 42), i-1 The information of the input element (x) currently being used for calculations is used to determine the input element (x i The information of ) is included, and the hidden sheath matrix h m It accumulates as such.
[0260] Input elements x1~x n Assume that all calculations have been completed for one of the chunks. The output elements y1~y generated by the calculations within this chunk are as follows: n‘ This is temporarily stored. The location for this temporary storage may be the data storage unit 7 or a predetermined volatile memory. Then, input elements x1~x are stored from the machine learning model 80. n and output elements y1~y n’ It will be reset.
[0261] And the hidden layer matrix h m The input elements x1~x are not reset and remain in the same state. n The next chunk of the input is input to machine learning model 80. At this point, the random numbers for weight α can be reset or kept as they are. Then the input elements x1~x n After performing operations on this chunk, the output elements y1~y corresponding to this chunk are generated. n‘ This is generated.
[0262] <Considerations regarding the amount of input data and computational load> Conventional neural network machine learning models (e.g., feedforward neural networks) do not perform the recursive calculations described above. While such models can learn, detect, and identify features of input elements within the same chunk when training / inferring across chunks, they are unable to learn, detect, or identify features common to input elements across different chunks. In other words, they cannot effectively utilize features of input data that exist across chunks in their machine learning model calculations.
[0263] In such cases, for example, one might increase the number of input elements within a chunk, or input all input elements into the machine learning model at once. This can be seen as widening the scope of a single chunk. In other words, the number of chunks decreases relative to the input data din. As a result, compared to a chunk with a large number of chunks, the predetermined features of the input elements are more likely to be present within a single chunk. Therefore, it may be possible to resolve the problems mentioned above. However, as mentioned above, this would lead to an enormous amount of computation, increasing the computational load on the machine learning model.
[0264] On the other hand, the machine learning model 80 of this disclosure sequentially calculates the input elements x by the recursive computation described above. i ~x n The information for this is the hidden layer matrix h of hidden layer 50B. m It is accumulated in. Furthermore, as mentioned above, when the chunk changes, the hidden layer matrix h m It is not reset and is maintained. That is, the input element x in the chunk i ~x n Without increasing the number of different input elements x in the chunk i ~x n It is possible to learn, detect, and identify features present in the input data din (input element x) while suppressing the computational load of the machine learning model 80. i ~x n The characteristics of ) can be effectively utilized in calculations performed by the machine learning model 80.
[0265] Furthermore, as described above, the machine learning model 80 in this disclosure has fixed weights α and γ, and these are not updated during learning or inference. Therefore, the increase in the computational load of the machine learning model 80 can be suppressed more effectively.
[0266] <Considerations on On-Device Learning> Generally, machine learning models can improve the accuracy of their inference results by incorporating (training) them with vast amounts of data during the training process. Therefore, for machine learning models that require highly accurate inference results, for example, the machine learning model would be installed on a PC with high computing power, or the machine learning model would be linked with a high-performance computer such as a server computer on the cloud.
[0267] On the other hand, the aforementioned machine learning model 80 may be directly incorporated into the control circuit of a mechanical system (for example, an edge computer such as a microcontroller in a motor device) to perform so-called on-device learning. On-device learning refers to learning on an AI chip (device) without coordinating with a cloud server.
[0268] Generally, when machine learning models are trained on-device, they are installed on edge computers, which are endpoints of mechanical systems (for example, microcontrollers that control the drive of motor devices). Unlike server computers or high-performance PCs, such computers are subject to limitations such as low power consumption and limited space. In other words, such computers have lower processing power compared to server computers and the like.
[0269] Therefore, machine learning models installed on edge computers have limitations in the amount of input data (din) available for training and inference. In other words, machine learning models that perform on-device learning are not suited to training and inferring from the massive amounts of data mentioned above.
[0270] <Regarding the usefulness of the machine learning model 80 in this disclosure> To address these issues, the machine learning model 80 employs the algorithms (A) to (C) described above, learning using an autoencoder, processing the input data din in chunks, and recursive calculations in the hidden layer 50B. These techniques enable the machine learning model 80 to achieve a certain level of learning / inference accuracy without having to input a massive amount of data. In particular, the recursive calculations in the hidden layer 50B mentioned above allow the machine learning model 80 to acquire information that exists across chunks while reducing its computational load.
[0271] Therefore, the machine learning model 80 is more suitable for implementation on microcontrollers in mechanical systems for on-device learning. Furthermore, even when the machine learning model 80 is installed on a high-performance computer, it is effective in reducing computational costs and increasing computational resources, not just for on-device learning.
[0272] <About the abnormality level da> Next, we will explain the anomaly score da in detail. As mentioned above, the output data do is the inference result obtained by inputting the input data din into the machine learning model 80 and performing inference. The input-output error is calculated by the loss function based on the input data din and the output data do.
[0273] In other words, the anomaly score da, which is the input-output error, represents the error between the input data din (=input data din) and the inference result based on the input data din (output data do). To put it another way, the anomaly score da is the error between the actual input data din and the inferred computational input data din (=output data do). From this, it can be said that the anomaly score da suggests the anomaly of the input data din. Specifically, the calculation of the anomaly score da is as follows.
[0274] For calculating input-output errors, loss functions such as MAE (Mean Absolute Error) and MSE (Mean Squared Error) can be used. When the loss function is MAE, the loss function L is expressed as shown in equation (7) below.
number
number
[0275] As described above, by calculating the anomaly score da, the user can determine whether or not the input data din contains anomalies, and consequently, whether or not an anomaly has occurred in the machine system implementing the machine learning device 6.
[0276] <Variation> Furthermore, this disclosure is not limited to the embodiments described above, and various modifications are possible without departing from the spirit of this disclosure. For example, in the example of anomaly detection in a machine system described above, training is performed immediately before inference. However, training may not be performed immediately before inference, and a pre-trained machine learning model 80 may be used. Also, the argument F is not limited to equations (4) to (6) above.
[0277] <Note> The machine learning apparatus (6) disclosed in the specification comprises a machine learning model (80) having an input layer (50A), an output layer (50C), and a hidden layer (50B) positioned between the input layer (50A) and the output layer (50C) and performing recursive calculations internally; a model holding unit (8) configured to hold the machine learning model (80); a data storage unit (7) configured to store input data (din) input to the machine learning model (80); and a calculation unit (9) configured to input the input data (din) to the machine learning model (80) and perform learning or inference calculations, wherein the first bond weight (α) between the input layer (50A) and the hidden layer (50B), and the second bond weight (γ) within the hidden layer (50B) are set to fixed setpoints or random numbers that are not updated by learning, and the third bond weight (β) between the hidden layer (50B) and the output layer (50C) is set to be updated by learning (first configuration).
[0278] In the first configuration, the machine learning device (6) is configured such that the calculation unit (9) sequentially calculates the third bond weight βi as a parameter of the machine learning model (80) using the following equation (A) (second configuration). P i =P i-1 -P i-1 h i T (I+h i P i-1 h i T ) -1 h i P i-1 β i =β i-1 +P i h i T (t i -h i β i-1 )) (A) However, the hidden layer (50B) matrix h i =G(F), P i :Third bond weight β i Matrix for updating, G: Activation function of the hidden layer (50B), x i : Batch size k i The i-th input data (din), t i : Batch size k i i-th training data
[0279] In the second configuration, the machine learning device (6) is configured such that the calculation unit (9) calculates the third bond weight β0 as a parameter using the following equation (B) (third configuration). P0=( h0 T h0) -1 β0 = P0h0 T t0(B)
[0280] The second configuration of the machine learning device (6) has an activation function G whose argument F is the first bond weight α and the input data (din) x i The first variable is obtained by multiplying by and , and the second bond weight γ and the hidden layer matrix h i-1 It is preferable to construct the system so that it is calculated by a formula that includes a second variable obtained by multiplying by and (fourth configuration).
[0281] The machine learning device (6) in the second configuration should be configured such that the argument F is calculated using the following equation (C) (fifth configuration). F=k1x i ·α+k2h i-1 ·γ (C) However, k1 and k2 are predetermined constants.
[0282] The machine learning device (6) in the second configuration should be configured such that the argument F is calculated using the following equation (D) (sixth configuration). F=(x i ·α)×(h i-1 ·γ) (D) However, ×: cross product symbol
[0283] The machine learning device (6) in the second configuration should be configured such that the argument F is calculated using the following equation (E) (seventh configuration). F=(x i ·α)〇(h i-1 ·γ) (E) However, ○: Hadamard product symbol
[0284] The semiconductor device (100) disclosed in the specification comprises an integrated machine learning device (6) in any of the first to seven configurations (the eighth configuration).
[0285] The semiconductor device (100) of the eighth configuration is a microcontroller comprising a storage unit (100B, 100C) configured to store predetermined information, which includes a model holding unit (8) and a data storage unit (7), and a processor (100A) configured to perform calculations based on the information stored in the storage units (100B, 100C) (ninth configuration).
[0286] The simulation program (P) disclosed in the specification is intended to function as a machine learning device (6) in any of the first to seven configurations (the tenth configuration).
[0287] The simulation apparatus (100) disclosed in the specification uses a machine learning apparatus (6) with any of the first to seven configurations to obtain inference results based on input data (din) (the eleventh configuration). [Explanation of Symbols]
[0288] 1...Simulation device, 2...File storage unit, 3...File reading unit, 4...Model storage unit, 5...Model calculation unit, 6...Model setting unit, 7...Display control unit, 8...Operation input unit, 9...Display unit, 10...3-layer neural network, 10A...Input layer, 10B...Hidden layer, 10C...Output layer, 21...Data file, 40...Machine learning model, 100...Computer, 100A...CPU, 100B...Memory, 100C...Auxiliary storage device, 100D...Operation input unit, 100E...Display unit, 210...Data, 401...Preprocessing unit, 402...Machine learning unit, 50...Biochemical analyzer, 51...Light source unit, 52...Light receiving unit, 53...Drive unit, 54...Measurement control unit, 501...Rotating table, 502...Chip holding unit, 503...Microchip, 541...Learning processing unit, 542...Inference processing unit, 543...Anomaly degree calculation unit, 544...Determination unit, 545...Output unit, 546...Interval anomaly degree calculation unit, 547...Interval number calculation unit, 548...Correction unit, P...Program< / gui>
Claims
1. An anomaly detection method using a computing device, When supplying data sequentially to a machine learning model, a single chunk of data is referred to as a chunk. The steps include obtaining learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, A step of obtaining an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A step of dividing the chunk width into multiple intervals based on the second data and the inference result, and calculating the interval anomaly score for each interval, An anomaly detection method, including the above.
2. An anomaly detection method according to claim 1, comprising the step of calculating the degree of anomaly for each chunk width based on the second data and the inference result.
3. An anomaly detection method according to claim 1, further comprising the step of calculating the degree of anomaly in each section when the multiple sections are shifted by a set shift amount.
4. The anomaly detection method according to claim 1, wherein the first data and the second data are data after frequency analysis processing.
5. A computing device used in the anomaly detection method according to any one of claims 1 to 4.
6. A program used in the anomaly detection method according to any one of claims 1 to 4.
7. A correction method for correcting abnormal data detected by the abnormality detection method described in claim 1.
8. When supplying data sequentially to a machine learning model, a single chunk of data is referred to as a chunk. A learning processing unit that obtains learning results by performing unsupervised learning using the machine learning model with a predetermined chunk width based on the first data, An inference processing unit that obtains an inference result by performing inference using the machine learning model with the chunk width based on the second data and the learning result, A section anomaly calculation unit calculates the section anomaly degree for each section obtained by dividing the chunk width into multiple sections based on the second data and the inference result, An abnormality level generating device equipped with the following features.
9. The first data and the second data are time-varying data of the object being measured. The abnormality degree generation device according to claim 8, further comprising a correction unit configured to correct data in sections where abnormalities have been detected based on the aforementioned section abnormality degree.
10. The abnormality level generating device according to claim 9 is a biochemical analyzer, The aforementioned time-varying data of the measured object is absorbance data of the test solution, in an abnormality level generating device.
11. A model holding unit configured to hold a first machine learning model, A first data processing unit is configured to directly input target data, sample it to generate first sampled data, and convert the first sampled data into a first frequency amplitude spectrum. A first arithmetic unit configured to input the first frequency amplitude spectrum to the first machine learning model, perform at least one of learning and inference, and calculate a first calculation result, A machine learning device equipped with the following features.
12. The machine learning apparatus according to claim 11, wherein the first data processing unit is configured to sample the target data at two or more sampling frequencies.
13. The machine learning apparatus according to claim 12, wherein the two or more sampling frequencies are relatively prime.
14. The system further comprises a second data processing unit and a second arithmetic unit, The aforementioned model holding unit is configured to also hold a second machine learning model. The second data processing unit is configured to sample the target data via an anti-aliasing filter to generate second sampled data, and to convert the second sampled data into a second frequency amplitude spectrum. The machine learning apparatus according to claim 11, wherein the second calculation unit is configured to input the second frequency amplitude spectrum to the second machine learning model, perform at least one of learning and inference, and calculate a second calculation result.
15. An electronic device comprising a machine learning device according to any one of claims 11 to 14.
16. The first step involves directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum. A second step involves inputting the first frequency amplitude spectrum into a first machine learning model and performing at least one of learning and inference to calculate a first calculation result, A program that causes a computer to execute something.
17. A simulation device configured to calculate the first calculation result using a machine learning device according to any one of claims 11 to 14.
18. The first step involves directly inputting target data, sampling it to generate first sampled data, and converting the first sampled data into a first frequency amplitude spectrum. A second step involves inputting the first frequency amplitude spectrum into a first machine learning model and performing at least one of learning and inference to calculate a first calculation result, A data processing method comprising the following features.
19. A machine learning model having an input layer, an output layer, and a hidden layer positioned between the input layer and the output layer to perform recursive calculations internally, A model holding unit configured to hold the aforementioned machine learning model, A data storage unit configured to store input data that is input to the machine learning model, A calculation unit configured to input the aforementioned input data into the machine learning model and perform learning or inference calculations, Equipped with, The first connection weight between the input layer and the hidden layer, and the second connection weight within the hidden layer, are set to fixed values or random numbers that are not updated by learning. A machine learning device in which the third connection weight between the hidden layer and the output layer is set to be updated through learning.
20. The machine learning apparatus according to claim 19, wherein the calculation unit sequentially calculates the third bond weight βi as a parameter of the machine learning model using the following equation (A). P i =P i-1 -P i-1 h i T (I+h i P i-1 h i T ) -1 h i P i-1 b i =b i-1 +P i h i T (t) i -W i b i-1 ) (A) However, the hidden layer matrix h i = G(F), P i : Matrix for updating the third bond weight βi, G: Activation function of the hidden layer, x i Batch size k i The i-th input data, t i Batch size k i i-th training data
21. The calculation unit uses the following equation (B) as the parameter for the third bond weight β 0 A machine learning apparatus according to claim 20, which calculates [something]. P 0 =(h 0 T h 0 ) -1 β 0 =P 0 h 0 T t 0 (B)
22. The argument F of the activation function G is, The first bond weight α and the input data x i The first variable is obtained by multiplying by and The second bond weight γ and the hidden layer matrix h i-1 The second variable is obtained by multiplying by and A machine learning device according to claim 20, which is calculated by a formula including the following:
23. The machine learning apparatus according to claim 20, wherein the aforementioned argument F is calculated using the following formula (C). F=k 1 + i ・a+k 2 h i-1 ・c (C) However, k 1 , k 2 : predetermined constant
24. The machine learning apparatus according to claim 20, wherein the argument F is calculated using the following formula (D). F=(x) i ・a)×(h) i-1 ・c) (D) However, ×: cross product symbol
25. The machine learning apparatus according to claim 20, wherein the argument F is calculated using the following formula (E). F=(x) i ・a)〇(] i-1 ・c) (E) However, ○: Hadamard product symbol
26. A semiconductor device comprising an integrated machine learning device according to any one of claims 19 to 25.
27. A microcontroller which is a semiconductor device according to claim 26, A storage unit comprising the model holding unit and the data storage unit, configured to store predetermined information, A processor including the aforementioned calculation unit and configured to perform calculations based on information stored in the aforementioned storage unit, A microcontroller equipped with the following features.
28. A machine learning program for functioning as a machine learning device according to any one of claims 19 to 25.
29. A simulation device that obtains inference results based on input data using a machine learning device according to any one of claims 19 to 25.