Data processing device and data processing method
By employing singular value decomposition to reduce dimensions and using projective transformation and singular value matrices for weighted combination, the device addresses the inefficiency of conventional covariance matrix calculations, achieving faster processing.
Patent Information
- Application Number
- JP2025569452
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2025-03-21
- Filing Date
- 2025-07-02
- Publication Date
- 2026-02-16
- Estimated Expiration
- 2045-07-02
AI Technical Summary
Conventional weighted combination processing of covariance matrices requires a large number of multiplications, leading to increased computational time due to the need to recalculate covariance matrices and assign weighting coefficients, which is inefficient.
A data processing device that performs singular value decomposition on feature matrices to reduce dimensions, using projective transformation and singular value matrices for weighted multiplication and combination, thereby approximating the covariance matrix calculation.
The device achieves covariance matrix calculation in a significantly shorter time by reducing the number of multiplications and dimensions, enhancing processing efficiency.
Smart Images

Figure 0007814648000006 
Figure 0007814648000007 
Figure 0007814648000008
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a data processing device, an anomaly detection device, and a data processing method. [Background technology]
[0002] Patent Document 1 discloses a feature similarity determination device that evaluates whether a time-series data sample to be determined is similar to a population, and discloses a technology (hereinafter referred to as "prior art") that effectively determines the similarity with a population even for events in which it is difficult to determine the behavior that indicates the characteristics. In the prior art, when determining the similarity between a population and a target sample based on the distance between them in a feature space, the feature of the target sample is compressed using incremental SVD, and the Mahalanobis distance to the population is calculated using the compressed feature. In this case, the use of compressed feature when determining the similarity reduces the computational load, and the compression process is also lightweight because the feature is compressed using incremental SVD.
[0003] There is a need to obtain a better learning model by combining multiple existing learning models. There is also a need to utilize the information contained in multiple existing learning models to reduce the effort required for retraining the learning models. For example, when integrating or combining distribution data used in the training of multiple learning models, the covariance matrix and mean vector contained in each distribution data may be multiplied by a predetermined weight before the data is combined. This type of weighted combination process is similar to the case where feature values are compressed using the conventional technology described in Patent Document 1, for example. Even when feature values are compressed using this conventional technology, a covariance matrix and a mean vector are calculated from the compressed feature values, and these are multiplied by predetermined weights in the same manner as above before being combined with other distribution data. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2006-235669 Summary of the Invention [Problem to be solved by the invention]
[0005] However, the above-described weighted combination process has the problem of requiring a large number of multiplications. For example, when performing weighted combination processing on R covariance matrices, it is necessary to calculate the covariance matrices R times before processing. In this case, the number of multiplications required to calculate the covariance matrices is proportional to the number of combination targets R. For example, as shown in FIG. 17, when the length of the feature quantity N f When calculating R covariance matrices Σ for Nd data sets, the required number of multiplications is R×Nd×N f 2 Furthermore, when combining R covariance matrices Σ, each covariance matrix is multiplied by a predetermined weighting coefficient, and the number of multiplications is proportional to the square of the feature length. In the example of Figure 17, R × N f 2 The number of multiplications required is
[0006] As described above, in conventional weighted combination processing, it is necessary to calculate the covariance matrix again before performing the combination processing, which increases the number of multiplications required to calculate the covariance matrix and assign weighting coefficients. As a result, conventionally, there has been a problem in that it takes a long time to calculate the covariance matrix that involves weighted combination processing.
[0007] The present disclosure has been made to solve the above-mentioned problems, and aims to provide a data processing device that can obtain, in a shorter time than conventional methods, a matrix equivalent to a new covariance matrix obtained by weighting and combining multiple covariance matrices. [Means for solving the problem]
[0008] A data processing device according to the present disclosure includes a learning unit that acquires a projective transformation matrix and a singular value matrix that are generated for each of a plurality of pieces of training data based on the plurality of pieces of training data, the projective transformation matrix and the singular value matrix having a reduced number of dimensions compared to the corresponding training data; a combining unit that calculates new projective transformation matrices and singular value matrices by performing a weighted multiplication and combining process on the plurality of projective transformation matrices and singular value matrices acquired by the learning unit; and a calculation unit that approximately calculates a covariance matrix obtained by performing a weighted multiplication and combining process on covariance matrices corresponding to each of the plurality of pieces of training data using the new projective transformation matrix and singular value matrix calculated by the combining unit. [Effects of the Invention]
[0009] According to the present disclosure, with the above configuration, it is possible to obtain a matrix equivalent to a new covariance matrix obtained by weighting and combining multiple covariance matrices in a shorter time than conventionally possible. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 2 is a diagram for explaining an outline of processing performed by the data processing device according to the first embodiment. [Figure 2] 1 is a diagram illustrating an example of a configuration of a data processing device according to a first embodiment. [Figure 3] 3 is a diagram illustrating an example of the configuration of a combining unit in the data processing device according to the first embodiment. FIG. [Figure 4] 3 is a diagram for explaining an outline of processing by a combining unit in the data processing device according to the first embodiment. FIG. [Figure 5] 4 is a flowchart showing an example of the operation of the data processing device according to the first embodiment. [Figure 6] 6 is a flowchart showing details of an example of operation by a learning unit in the data processing device according to the first embodiment. [Figure 7] 10 is a flowchart showing details of an example of operation by a combining unit in the data processing device according to the first embodiment. [Figure 8]8A and 8B are diagrams for explaining an outline of the processing performed by the sign inverting unit according to the first embodiment. [Figure 9] FIG. 2 is a diagram for explaining the effect of the data processing device according to the first embodiment. [Figure 10] FIG. 2 is a diagram for explaining an application example of the data processing device according to the first embodiment. [Figure 11] FIG. 2 is a diagram for explaining an application example of the data processing device according to the first embodiment. [Figure 12] 12A and 12B are diagrams illustrating an example of a hardware configuration of a data processing device according to the first embodiment. [Figure 13] FIG. 10 is a diagram illustrating an example of the configuration of a data processing device according to a second embodiment. [Figure 14] 10 is a diagram illustrating components corresponding to the first and second terms of equation (5) calculated by an evaluation unit in a data processing device according to the second embodiment. [Figure 15] FIG. 10 is a diagram illustrating an example of the configuration of an evaluation unit in a data processing device according to a second embodiment. [Figure 16] 10 is a flowchart showing an example of the operation of the data processing device according to the second embodiment. [Figure 17] 10A and 10B are diagrams for explaining problems in calculating a covariance matrix by conventional weighted combination processing. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments will be described in detail with reference to the drawings. Embodiment 1 First, an overview of the processing performed by the data processing device 10 according to the first embodiment will be described with reference to FIG.
[0012] The data processing device 10 does not obtain a final covariance matrix by directly performing weighting and combining processing on multiple covariance matrices, but rather performs singular value decomposition on the feature matrix X that is the basis of each covariance matrix, and uses the results to approximately represent each covariance matrix. The data processing device 10 then performs weighting and combining processing on the data obtained by the approximation, and approximately calculates the final covariance matrix from the results. If the number of dimensions of the feature matrix X is reduced by singular value decomposition, the number of dimensions of the matrix to be subjected to weighting and combining processing can be reduced below the number of dimensions of the original covariance matrix, making it possible to perform the weighting and combining processing in a shorter time than conventional methods.
[0013] For example, if the length (number of dimensions) of the feature is N f Consider the process of calculating the covariance matrix Σ where The covariance matrix is Σ=XX T X is the feature matrix that is the basis of the covariance matrix, and T is the transposed matrix. When the original feature matrix X is subjected to singular value decomposition, this feature matrix X is decomposed into X = USV using the top k singular values. T In other words, the number of dimensions of the original feature matrix X can be reduced (the downward white arrow in Figure 1).
[0014] This X=USV T Σ=XX T , the covariance matrix Σ is U k diag(s1 2 , …, s k 2 ) U k T (The left-pointing white arrow in Figure 1) U k is the left singular matrix obtained by singular value decomposition, and diag(s1 2 , …, s k 2 ) is the singular value matrix obtained by singular value decomposition. k is the length (number of dimensions) of the feature of the left singular matrix.
[0015] As shown in FIG. 1, the data processing device 10 has a number of rows and a number of columns of N. f The covariance matrix Σ is f ×k matrix U k and k s i 2 (i=1, …, k) (upward white arrow in Figure 1). In other words, the number of data to be stored in the learning model as a learning result is approximated by the original N f ×N f From N f ×k+k, the data processing device 10 can calculate the covariance matrix Σ with much fewer operations than the original matrix operations. k and the singular value matrix diag(s1,…, s 1k ), the number of weight multiplications is R×N f 2 Instead, R(N f ×k+k)=R(N f +1)k, where k <N f This makes it possible to assign weights with fewer calculations.
[0016] Furthermore, the data processing device 10 approximately calculates the above-mentioned final covariance matrix from the result of the weighted combination process, i.e., the covariance matrix obtained by directly applying the weighted combination process to the multiple covariance matrices. This enables the data processing device 10 to calculate the final covariance matrix involving the weighted combination process in a shorter time than conventionally possible.
[0017] In the following explanation, the left singular matrix U obtained by singular value decomposition is k is sometimes called a projective transformation matrix. In the following explanation, the projective transformation matrix is the left singular matrix U obtained by singular value decomposition. k The projective transformation matrix is a matrix for projecting the elements of the original feature matrix X onto the principal component space after dimension reduction.
[0018] 2 is a diagram showing an example of the configuration of the data processing device 10 according to embodiment 1. As shown in FIG. 1, the data processing device 10 includes a learning unit 11, a combining unit 13, a calculation unit 15, an input interface 110, and an output interface 130.
[0019] The learning unit 11 acquires a projective transformation matrix and a singular value matrix that are generated for each piece of learning data based on the learning data used in learning each of a plurality of learning models, and that have a reduced number of dimensions compared to the corresponding learning data. For example, the learning unit 11 may acquire such a projective transformation matrix and a singular value matrix from an external device (not shown) other than the data processing device 10.
[0020] Alternatively, the learning unit 11 may generate a projective transformation matrix and a singular value matrix for each piece of learning data based on the learning data used in learning each of the multiple learning models, and acquire the generated projective transformation matrix and singular value matrix. In this case, the learning unit 11 may acquire, for example, learning data used in learning each of the multiple learning models from the external device, and acquire, as the projective transformation matrix, a left singular matrix generated by singular value decomposition of the acquired learning data. The learning unit 11 may also acquire a singular value matrix generated by singular value decomposition of the acquired learning data. Here, the left singular matrix (projective transformation matrix) and the singular value matrix generated by singular value decomposition have fewer dimensions than the learning data that was the subject of singular value decomposition.
[0021] The combining unit 13 performs weighted combining processing on the multiple projective transformation matrices and singular value matrices acquired by the learning unit 11 to calculate new projective transformation matrices and singular value matrices.
[0022] When performing the weighted combination process, the combination unit 13 may perform correction to prevent components of corresponding column vectors from disappearing in multiple projective transformation matrices. An example configuration of the combination unit 13 for performing this correction is shown in Fig. 3. For example, as shown in Fig. 3, the combination unit 13 is configured to include a weighted combination processing unit 131.
[0023] The weighted multiplication and combination processor 131 includes, for example, an inner product calculation unit 1311, a sign inversion unit 1312, and a weighted multiplication and combination unit 1313. When one of the column vectors corresponding to a plurality of projective transformation matrices is set as a reference vector, the inner product calculation unit 1311 calculates the inner product of the reference vector and the other column vectors. If the result calculated by the inner product calculation unit 1311 is negative, the sign inversion unit 1312 performs the above-mentioned correction by inverting the sign of the other column vector. The weighted multiplication and combination unit 1313 performs weighted multiplication and combination processing on the plurality of projective transformation matrices, including the projective transformation matrix after the above-mentioned correction by the sign inversion unit 1312, and the plurality of singular value matrices. The alphabetic symbols shown in FIG. 3 will be described later.
[0024] The calculation unit 15 approximately calculates a covariance matrix obtained by performing a weighting and combining process on the covariance matrices corresponding to each of the plurality of pieces of training data, using the new projective transformation matrix and singular value matrix calculated by the combining unit 13. For example, the calculation unit 15 may approximately calculate the above-mentioned covariance matrix using the new projective transformation matrix and singular value matrix calculated by the combining unit 13, using a known method.
[0025] The input interface 110 is a functional unit that functions as an interface for receiving input from the user of the data processing device 10, and is configured by, for example, a keyboard, a mouse, a touch panel, and the like.
[0026] The output interface 130 is a functional unit that functions as an interface for outputting data to the user of the data processing device 10, and is configured by, for example, a display.
[0027] In addition, the data processing device 10 may include a storage unit (not shown). The storage unit is configured, for example, by an HDD (Hard Disc Drive) or an SSD (Solid State Drive). The storage unit stores various data handled by the data processing device 10.
[0028] 4 shows an overview of the processing performed by the combining unit 13. Following the dimension reduction by the singular value decomposition described above, a projective transformation matrix U k , and the singular value matrix D k Each of the multiple learning models has one of the
[0029] The combining unit 13 combines the projective transformation matrix U k and the singular value matrix D k As shown in the following equation (1), the weighting coefficient w i The projection space is changed by applying a weighted combination (linear combination) by TIFF0007814648000001.tif12166
[0030] Figure 4 shows the distribution space of the training data used in training learning model 1, the distribution space of the training data used in training learning model 2, and the distribution space of the training data obtained by weighted combination. Figure 4 shows that for a certain test vector x, the first component (principal component) and the second component (component other than the principal component) change due to weighted combination.
[0031] When there are two learning models, the combining unit 13 performs a weighting and combining process so that the ratio of the weighting coefficients is p:q, for example. Since it is impossible to assign negative weights to a covariance matrix, it is common for p, q ≧ 0. However, the combining unit 13 does not necessarily have to set p, q ≧ 0; for example, one or more of p and q may be negative. Furthermore, the sum of the ratios (p + q) is usually 1, but it does not have to be 1.
[0032] If necessary, the combining unit 13 also performs weighted combining on the average values μ of the respective training data. For example, if the training data are not normalized so that the sum of the average values μ of the respective training data is 0, the combining unit 13 also performs weighted combining on the average values μ.
[0033] Next, a description will be given of an example of the operation of the data processing device 10 shown in Fig. 2. Fig. 5 is a flowchart showing an example of the operation of the data processing device 10.
[0034] First, the learning unit 11 acquires a projective transformation matrix and a singular value matrix that are generated for each piece of learning data based on the learning data used in learning each of a plurality of learning models, and that have a reduced number of dimensions compared to the corresponding learning data (step ST1).
[0035] Next, the combining unit 13 performs weighting and combining processing on the multiple projective transformation matrices and singular value matrices acquired by the learning unit 11 to calculate new projective transformation matrices and singular value matrices (step ST2).
[0036] Next, the calculation unit 15 approximately calculates a covariance matrix obtained by performing a weighting and combining process on the covariance matrices corresponding to each of the plurality of training data using the new projective transformation matrix and singular value matrix calculated by the combining unit 13 (step ST3). For example, the calculation unit 15 may approximately calculate the above-mentioned covariance matrix using the new projective transformation matrix and singular value matrix calculated by the combining unit 13 by a known method.
[0037] Next, step ST1 performed by the learning unit 11 will be described in detail with reference to Fig. 6. Fig. 6 is a flowchart showing the details of step ST1. In the following explanation, for ease of understanding, an example will be described in which the learning unit 11 acquires the learning data used in learning each of the two learning models from the above-mentioned external device, acquires the left singular matrix generated by singular value decomposition of the acquired learning data as a projective transformation matrix, and acquires the singular value matrix generated by singular value decomposition.
[0038] First, the learning unit 11 acquires the feature quantity x included in the learning data used in the learning of each of the two learning models from the external device (step ST11). When the respective learning data are, for example, learning data A and B, each of the learning data A and B includes a plurality of feature quantities x (for example, height, weight, sitting height, age, etc.).
[0039] Next, the learning unit 11 checks whether or not the acquisition of the feature quantity x has been completed for all the learning data (here, two learning data) (step ST12). As a result, if the acquisition of the feature quantity x has not been completed for all the learning data (step ST12; NO), the process returns to step ST11, and the learning unit 11 acquires the feature quantity x that has not been acquired. If the acquisition of the feature quantity x has been completed for all the learning data (step ST12; YES), the process proceeds to step ST13.
[0040] In step ST13, the learning unit 11 calculates the average value μ of the feature amount x included in the acquired learning data for each feature amount (step ST13). The learning unit 11 performs this process for all learning data.
[0041] Next, the learning unit 11 calculates a feature matrix X, which is a matrix in which values obtained by subtracting the average value μ from the feature x are arranged in the column direction (step ST14). The learning unit 11 performs this process for all learning data.
[0042] Next, the learning unit 11 performs singular value decomposition on the feature matrix X calculated in step ST14 to obtain a left singular matrix U k and the singular value matrix D k(Step ST15). The learning unit 11 performs this process for all the learning data. The learning unit 11 converts the left singular matrix calculated as described above into the projective transformation matrix U k , and the projection transformation matrix U of the training data B k The learning unit 11 also obtains the singular value matrix calculated as described above as the singular value matrix D of the learning data A. k , and the singular value matrix D of the training data B k Obtain as.
[0043] The projective transformation matrix and singular value matrix acquired by the learning unit 11 both have a reduced number of dimensions compared to the training data that was the subject of singular value decomposition. For example, the learning unit 11 can acquire a projective transformation matrix and singular value matrix that have a reduced number of dimensions compared to the training data that was the subject of singular value decomposition by previously retaining feature quantities with singular values within the top k and eliminating other feature quantities. The learning unit 11 calculates a projective transformation matrix U for each acquired training data. k and the singular value matrix D k is output to the combining unit 13.
[0044] Next, step ST2 performed by the combining unit 13 will be described in detail with reference to Fig. 7. Fig. 7 is a flowchart showing the details of step ST2.
[0045] First, the weighting and combining processing unit 131 of the combining unit 13 calculates the projective transformation matrix U for each piece of training data acquired by the training unit 11 in the above-mentioned step ST15. k and the singular value matrix D k The weighting and combining unit 131 obtains a projective transformation matrix U k and the singular value matrix D k From the above, the reference projection transformation matrix U k and the singular value matrix D k and the selected projective transformation matrix U k and the singular value matrix D k are obtained as the first projective transformation matrix U1 and the first singular value matrix D1 (step ST21).
[0046] For example, the weighting and combining unit 131 selects the projection transformation matrix U of the learning data A from the projection transformation matrix U of the learning data B. k When using the standard, the projective transformation matrix U of the training data A is k As the first projective transformation matrix U1, the weighting and combining unit 131 obtains the singular value matrix D of the training data A from among the singular value matrices of the training data A and the singular value matrices of the training data B. k When the singular value matrix D of the training data A is used as the basis, k is acquired as the first singular value matrix D1. Note that in the above-mentioned FIG. 3, the first projective transformation matrix is represented by the symbol U1, and the first singular value matrix is represented by the symbol D1.
[0047] Next, the weighting and combining unit 131 performs weighting and combining on a projective transformation matrix U other than the first projective transformation matrix U1 and the first singular value matrix D1, which is to be combined with the first projective transformation matrix U1 and the first singular value matrix D1. i and the singular value matrix D i (step ST22). For example, in the above example, the inner product calculation unit 1311 obtains the projective transformation matrix U k and the singular value matrix D of the training data B k In FIG. 3, the projection transformation matrices other than the first projection transformation matrix are denoted by the symbol U 2…i and the singular value matrices other than the first singular value matrix are denoted by D i It is expressed as:
[0048] Next, the inner product calculation unit 1311 of the weighted combination processing unit 131 calculates the column vector included in the first projective transformation matrix U1 acquired in step ST21 and the projective transformation matrix U i and the column vectors included in the vectors, calculate the inner product of the corresponding column vectors, and check whether the calculated inner product is negative (step ST23).
[0049] As a result, if the calculated inner product is negative (step ST23; YES), the sign inversion unit 1312 of the weighted combination processor 131 inverts the non-reference projective transformation matrix Ui The column vector u contained in n On the other hand, if the calculated inner product is not negative (step ST23; NO), the sign inversion unit 1312 of the weighted combination processor 131 inverts the sign of the column vector u n The code is left as it is, and the process proceeds to step ST25.
[0050] Here, step ST24 will be described with reference to Fig. 8. As already described, the weighting and combining unit 131 combines the first projective transformation matrix U1 acquired in step ST21 and the projective transformation matrix U2 acquired in step ST22. i Here, a weighted combination process is performed on the first projective transformation matrix U1 and the projective transformation matrix U i The singular value decomposition is used to calculate the first projective transformation matrix U1 and the projective transformation matrix U i When compared in units of corresponding column vectors, the angle formed by some column vectors may be an obtuse angle as shown in FIG. 8A.
[0051] Here, if the angle between the column vectors is obtuse, the components of the column vectors may cancel out when the weighted combination process is performed, resulting in an incorrectly generated combined matrix. In particular, if the angle between the column vectors is 180 degrees, the component of the column vector included in the weighted combination matrix becomes 0, and the component disappears.
[0052] Therefore, in order to avoid such a problem, when the angle formed between the column vectors is an obtuse angle, the sign inversion unit 1312 of the weighted combination processing unit 131 performs a correction to invert the signs of the corresponding column vectors included in the projective transformation matrix other than the reference projective transformation matrix (first projective transformation matrix U1) as shown in FIG. 8B so that the angle formed between the column vectors becomes an acute angle.
[0053] When there are three or more projective transformation matrices to be subjected to the weighted combination process, the sign inverting unit 1312 may use any one of the projective transformation matrices as a reference. In this case, the sign inverting unit 1312 may perform correction by inverting the signs of all column vectors whose inner products with column vectors included in the one reference projective transformation matrix are negative, or may perform correction by inverting the signs of only certain column vectors rather than all column vectors.
[0054] Returning to FIG. 7, in step ST25, the weighting and combining unit 131 performs a weighting and combining process by combining the column vectors included in the first projective transformation matrix U1 and the projective transformation matrix U i If the calculation of the inner products of all corresponding column vectors has been completed (step ST25; YES), the inner product calculation unit 1311 outputs the first projective transformation matrix U1 to the weighting and combining unit 1313, and the sign inversion unit 1312 converts the corrected projective transformation matrix U' 2…i to the weighting and combining unit 1313, and the process proceeds to step ST26. On the other hand, if the calculation of the inner products of all the corresponding column vectors has not been completed (step ST25; NO), the process returns to step ST23, and the inner product calculation unit 1311 calculates the inner products of the column vectors for which the calculation of the inner products has not been completed. Note that in the above-mentioned FIG. 3, the projective transformation matrix after the correction is denoted by the symbol U' 2…i It is expressed as:
[0055] In step ST26, the weighting combiner 1313 receives an input of a combination ratio (weight) (step ST26). For example, a user of the data processing device 10 inputs the combination ratio (weight) to the data processing device 10 using the input interface 110. The weighting combiner 1313 receives the input of the combination ratio (weight) by the user of the data processing device 10 via the input interface 110. Note that in FIG. 3 described above, the combination ratio (weight) is represented by the symbol w i It is expressed as:
[0056] Next, the weighting and combining unit 1313 combines the first projective transformation matrix U1 and the corrected projective transformation matrix U' 2…i In contrast, the connection ratio (weight) w i Similarly, the weighted combination unit 1313 performs weighted combination processing based on the first singular value matrix D1 and the singular value matrix D i In contrast, the connection ratio (weight) w i Then, weighted combination processing is performed according to the above (step ST27).
[0057] Next, the weighting and combining unit 131 calculates all the projective transformation matrices U′ 2…i and the singular value matrix D i It is checked whether the weighted combination process with the first projective transformation matrix U1 and the first singular value matrix D1 has been completed for all projective transformation matrices U' 2…i and the singular value matrix D i If the weighted combination process with the first projective transformation matrix U1 and the first singular value matrix D1 has been completed (step ST28; YES), the weighted combination processor 131 outputs the weighted combined projective transformation matrix Uc and the weighted combined singular value matrix Dc, and ends the process. 2…i and the singular value matrix D i If the weighted multiplication and combination process between the first projective transformation matrix U1 and the first singular value matrix D1 has not been completed (step ST28; NO), the process returns to step ST22. Then, the inner product calculation unit 1311 calculates the weighted multiplication and combination process between the first projective transformation matrix U1 and the first singular value matrix D1 for the projective transformation matrix U' 2…i and the singular value matrix D i Then, the process proceeds to step ST22 and thereafter.
[0058] The processing contents of the above steps ST21 to ST28 are expressed in the following formula (2). TIFF0007814648000002.tif53166
[0059] In equation (2), d n represents the inner product. Also, in equation (2), b n represents the column vector contained in the first projective transformation matrix U1, and u n is the projective transformation matrix U that is combined with the first projective transformation matrix U1. i In addition, n represents the column vector included in the first projective transformation matrix U1 and the projective transformation matrix U i represents the number of column vectors (i.e., the number of feature quantities x) included in the matrix U1. The calculation and correction (sign inversion) of the inner product are performed using the first projective transformation matrix U1 and the projective transformation matrix U i This is done for all n column vectors included in equation (2). n ´ represents the column vector after correction, and U i ´ represents the projective transformation matrix after correction. In addition, in equation (2), w i represents the connection ratio (weight), and U Combined represents a new homography matrix obtained by the weighted combination process.
[0060] Next, the effects of the data processing device 10 will be described with reference to Fig. 9. Fig. 9 is a diagram showing a comparison between the flow of weighted multiplication and combination processing by a device in the prior art (hereinafter referred to as the "conventional device") and the flow of weighted multiplication and combination processing by the data processing device 10.
[0061] For example, in the processing flow (part 1) of a conventional device, when learning data containing feature x that was used to train an existing learning model is input to the conventional device, the conventional device calculates a covariance matrix Σ from the feature x, and performs a weighted combination process on the calculated covariance matrix Σ and a covariance matrix Σ similarly calculated from features included in learning data used to train another learning model, thereby obtaining a new covariance matrix Σ.
[0062] Furthermore, in the processing flow (part 2) by the conventional device, when training data containing feature x that was used in training an existing learning model was input to the conventional device, the conventional device performed singular value decomposition on the feature x, compressed the length (dimension) of the feature x, calculated a covariance matrix Σ from the dimension-compressed feature x, and performed a weighted combination process on the calculated covariance matrix Σ and a covariance matrix Σ similarly calculated from features included in the training data used in training another learning model to obtain a new covariance matrix Σ. Therefore, in either process by the conventional device, the number of multiplications required to obtain the new covariance matrix Σ increased in proportion to the number R of covariance matrices to be combined, which could result in a significant processing time.
[0063] In contrast, in the processing flow by the data processing device 10, when training data including feature x used in training an existing learning model is input to a conventional device, the data processing device 10 performs singular value decomposition on a feature matrix X generated from the feature x to reduce the dimension of the feature x and obtain a projective transformation matrix (left singular matrix) and a singular value matrix.The data processing device 10 then performs weighted multiplication and combination processing on the acquired projective transformation matrix and singular value matrix and on a projective transformation matrix and a singular value matrix similarly obtained by singular value decomposition of a singular value matrix generated from features included in training data used in training another learning model, and approximately calculates a new covariance matrix Σ from the resulting singular vectors and singular values.In other words, in the processing flow by the data processing device 10, weighted multiplication and combination processing is performed on the projective transformation matrix and singular value matrix before calculating the new covariance matrix Σ.
[0064] As a result, the data processing device 10 only needs to calculate a new covariance matrix Σ once, regardless of the number R of covariance matrices to be combined, thereby reducing the time required for processing compared to processing by conventional devices. Furthermore, because the projective transformation matrix and singular value matrix to be subjected to the weighted combination process can have a reduced number of dimensions with respect to the original feature quantity x, the data processing device 10 can also reduce the number of multiplications required for weighted combination compared to processing by conventional devices. As a result, the data processing device 10 can reduce the time required for processing to obtain a new covariance matrix Σ compared to processing by conventional devices.
[0065] Next, application examples of the data processing device 10 will be described with reference to Figures 10 and 11. For example, the data processing device 10 can be applied to a case such as that shown in Figure 10.
[0066] In Figure 10, learning model A is a model generated during initial learning (initial operation) using learning data A during learning. Learning model B is a model generated during additional learning using learning data A and learning data B during learning. Now, suppose we want to combine learning model A and learning model B to generate a new learning model, and perform new learning using learning data C that includes defective images.
[0067] In this case, the data processing device 10 acquires training data A, training data B, and training data C, performs singular value decomposition on feature matrices generated from features included in each training data, and acquires a homography matrix and a singular value matrix for each training data according to the above-described flow. The data processing device 10 then performs weighted combination processing on each homography matrix and singular value matrix according to a predetermined combination ratio, and approximately calculates a new covariance matrix Σ from the newly obtained homography matrix and singular value matrix. This allows the data processing device 10 to obtain a new training model (combined model) in a shorter time than processing by conventional devices.
[0068] The data processing device 10 can also be applied to a case such as that shown in Fig. 11. In Fig. 11, learning model A is a model that uses learning data A during learning. Learning model B is a model that uses learning data B during learning. Learning model N is a model that uses learning data N during learning. Here, it is assumed that learning model A, learning model B, and learning model N are combined to generate a new learning model, and new learning is performed using learning data C that includes a defective image.
[0069] In this case, the data processing device 10 acquires training data A, training data B, training data C, and training data N, performs singular value decomposition on feature matrices generated from features included in each training data, and acquires a homography matrix and a singular value matrix for each training data according to the above-described flow. The data processing device 10 then performs weighted combination processing on each homography matrix and singular value matrix according to a predetermined combination ratio, and approximately calculates a new covariance matrix Σ from the newly obtained homography matrix and singular value matrix. This allows the data processing device 10 to acquire a new training model (combined model) in a shorter time than processing by conventional devices.
[0070] In the above description, the data processing device 10 is applied to the generation of a learning model (learning data). However, the data processing device 10 is not limited to this, and can be applied to cases other than those described above as long as it performs weighted combination processing.
[0071] For example, the data processing device 10 can be applied to a case where a multivariate normal distribution contained in a mixed normal distribution is obtained from the mixed normal distribution containing multiple multivariate normal distributions. Regarding the multivariate normal distribution, the multivariate normal distribution when there are m variables is expressed by the following formula (3). This formula (3) makes it possible to obtain a distribution based on the mean μ and covariance matrix Σ of the m variables. TIFF0007814648000003.tif14166
[0072] Regarding the mixed normal distribution, when the number of variables is m and the number of normal distributions is n, the mixed normal distribution is expressed by the following formula (4). TIFF0007814648000004.tif24166
[0073] Although details are omitted here, weighted combination processing may also be performed when obtaining a multivariate normal distribution contained in a mixed normal distribution from the mixed normal distribution. In such cases, by applying the data processing device 10, the number of multiplications required to obtain a multivariate normal distribution contained in the mixed normal distribution can be reduced, and the time required for processing can be shortened compared to when the data processing device 10 is not applied. In addition, the data processing device 10 can be applied to any case in which weighted combination processing is performed.
[0074] Next, with reference to FIG. 12, an example of a hardware configuration of the data processing device 10 according to the first embodiment will be described. The functions of the learning unit 11, the combining unit 13, and the calculating unit 15 in the data processing device 10 are realized by processing circuits. The processing circuit may be dedicated hardware as shown in FIG. 12A, or may be a CPU (Central Processing Unit, central processing unit, processing device, arithmetic unit, microprocessor, microcomputer, processor, or DSP (Digital Signal Processor)) that executes a program stored in a memory 53 as shown in FIG. 12B. i The digital signal processor (DSP) 52 may be used.
[0075] If the processing circuitry is dedicated hardware, the processing circuitry 51 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit). iThe functions of the learning unit 11 and the combining unit 13 may be realized by the processing circuit 51 individually, or the functions of the respective units may be realized by the processing circuit 51 collectively.
[0076] When the processing circuit is a CPU 52, the functions of the learning unit 11, the combining unit 13, and the calculation unit 15 are realized by software, firmware, or a combination of software and firmware. The software and firmware are written as programs and stored in the memory 53. The processing circuit realizes the functions of each unit by reading and executing the programs stored in the memory 53. That is, the data processing device 10 includes a memory for storing a program that, when executed by the processing circuit, results in the execution of each step shown in FIG. 5. It can also be said that these programs cause a computer to execute the procedures and methods of the learning unit 11, the combining unit 13, and the calculation unit 15. Here, the memory 53 may be, for example, a random access memory (RAM), a read-only memory (ROM), a flash memory, an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a non-volatile or volatile semiconductor memory such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a minidisk, or a DVD (Discrete Disc). i Versatile D i sc) etc.
[0077] It is also possible to realize some of the functions of the learning unit 11, the combining unit 13, and the calculating unit 15 with dedicated hardware and some with software or firmware. For example, the function of the learning unit 11 can be realized by a processing circuit as dedicated hardware, and the functions of the combining unit 13 and the calculating unit 15 can be realized by the processing circuit reading and executing a program stored in the memory 53.
[0078] Thus, the processing circuitry can implement each of the above-described functions by hardware, software, firmware, or a combination thereof.
[0079] As described above, according to the first embodiment, the data processing device 10 includes a learning unit 11 that acquires a projective transformation matrix and a singular value matrix that are generated for each of a plurality of pieces of training data based on the plurality of pieces of training data and have a reduced number of dimensions compared to the corresponding pieces of training data; a combining unit 13 that calculates new projective transformation matrices and singular value matrices by performing a weighted multiplication and combining process on the plurality of projective transformation matrices and singular value matrices acquired by the learning unit 11; and a calculation unit 15 that approximately calculates a covariance matrix obtained by performing a weighted multiplication and combining process on covariance matrices corresponding to each of the plurality of pieces of training data using the new projective transformation matrix and singular value matrix calculated by the combining unit 13. As a result, the data processing device 10 according to the first embodiment can obtain a matrix equivalent to the new covariance matrix obtained by the weighted multiplication and combining process on the plurality of covariance matrices in a shorter time than conventional methods.
[0080] Furthermore, the learning unit 11 acquires learning data used in learning each of the multiple learning models, and acquires a left singular matrix obtained by singular value decomposition of the acquired learning data as a homography matrix. This allows the data processing device 10 according to the first embodiment to acquire a homography matrix with a reduced number of dimensions compared to the learning data.
[0081] Furthermore, the projective transformation matrix generated for each training data is a transformation matrix for projecting the training data that was the subject of singular value decomposition when the projective transformation matrix was obtained into the principal component space after the dimension of the training data has been reduced. This allows the data processing device 10 according to the first embodiment to obtain a projective transformation matrix with a reduced number of dimensions compared to the training data.
[0082] Furthermore, when performing the weighted combining process, the combining unit 13 performs correction to prevent the loss of components of corresponding column vectors in the multiple projective transformation matrices to be combined. This allows the data processing device 10 according to the first embodiment to prevent the loss of components of specific column vectors in the weighted combining process.
[0083] The combining unit 13 further includes an inner product calculation unit 1311 that calculates the inner product of a reference vector and other column vectors when the reference vector is one of the corresponding column vectors in the plurality of projective transformation matrices, a sign inversion unit 1312 that corrects the other column vectors by inverting their signs when the result calculated by the inner product calculation unit 1311 is negative, and a weighted combining unit 1313 that performs weighted multiplication and combining processing on the plurality of projective transformation matrices including the projective transformation matrix corrected by the sign inversion unit 1312 and the plurality of singular value matrices. This enables the data processing device 10 according to the first embodiment to prevent components of column vectors whose inner products are negative from disappearing in the weighted multiplication and combining processing.
[0084] Furthermore, the homography matrix and singular value matrix acquired by the learning unit 11 are generated for each piece of learning data used for training each of a plurality of learning models or each of a plurality of normal distributions, based on the learning data used for training the respective pieces of learning data. This allows the data processing device 10 according to the first embodiment to acquire the homography matrix and singular value matrix from the learning data used for training the learning models or normal distributions.
[0085] Embodiment 2 In the first embodiment, a data processing device 10 has been described that can obtain, in a shorter time than conventional methods, a matrix equivalent to a new covariance matrix obtained by weighting and combining multiple covariance matrices. In the second embodiment, a data processing device 10b will be described that can evaluate the similarity between the principal component space defined by the new homography matrix calculated by the combining unit 13 and the data to be evaluated.
[0086] An example configuration of a data processing device 10b according to the second embodiment is shown in Fig. 13. As shown in Fig. 13, the example configuration of the data processing device 10b according to the second embodiment is obtained by adding an evaluation unit 17 to the data processing device 10 according to the first embodiment shown in Fig. 2. Since the other configuration of the data processing device 10b according to the second embodiment is the same as that of the data processing device 10 according to the first embodiment shown in Fig. 2, the same reference numerals are used and the description thereof will be omitted.
[0087] The evaluation unit 17 evaluates the degree of similarity between the principal component space defined by the new projective transformation matrix calculated by the combination unit 13 and the data to be evaluated.
[0088] For example, the evaluation unit 17 evaluates the new projective transformation matrix U calculated by the combining unit 13. C , singular value matrix D C , and the new projective transformation matrix U C The similarity S can be calculated from the average value μ of multiple training data projected onto the principal component space defined by the following formula (5): In formula (5), α in the first term and β in the second term are parameters that can be adjusted by the user to appropriate values. TIFF0007814648000005.tif16166
[0089] Figure 14 shows a diagram of the components corresponding to the first and second terms of equation (5). The test vector x is a vector obtained by projecting the data (features) to be evaluated onto the principal component space.
[0090] As shown in FIG. 15, for example, the evaluation unit 17 includes a first component similarity calculation unit 171 and a second component similarity calculation unit 172. The first component similarity calculation unit 171 calculates the first term of equation (5). The second component similarity calculation unit 172 calculates the second term of equation (5). The evaluation unit 17 adds the calculation result by the first component similarity calculation unit 171 and the calculation result by the second component similarity calculation unit 172 using an adder to calculate the final similarity S(X). In FIG. 15, α and β represent the above-mentioned parameters, X represents the data to be evaluated (test vector x), μ represents the above-mentioned average value, and U k represents the projective transformation matrix after the combination, and D represents the singular value matrix after the combination.
[0091] The similarity S(X) calculated by the evaluation unit 17 is used, for example, in anomaly detection technology. For example, when normal data is distributed in a principal component space defined by a new projective transformation matrix Uc, data calculated to have a high similarity S with this principal component space is likely to be normal data. On the other hand, data calculated to have a low similarity S(X) with this principal component space is likely to be abnormal data. Therefore, for example, an anomaly detection device (not shown) can be realized that includes a detection unit that detects whether the data to be evaluated is abnormal data based on the similarity S(X) evaluated by the evaluation unit 17.
[0092] Next, a description will be given of an example of the operation of the data processing device 10b shown in Fig. 16. Fig. 16 is a flowchart showing an example of the operation of the data processing device 10b.
[0093] First, the evaluation unit 17 acquires the parameters α and β (step ST31). For example, the evaluation unit 17 acquires the parameters α and β input by the user to the data processing device 10b using the input interface 110.
[0094] Next, the evaluation unit 17 calculates the mean vector μ and the combined projection transformation matrix U k , and the combined singular value matrix D k is acquired (step ST32).
[0095] Next, the evaluation unit 17 acquires the feature quantity x to be evaluated (step ST33).
[0096] Next, the evaluation unit 17 evaluates the feature x and the combined projective transformation matrix U k (Step ST34) For example, the evaluation unit 17 calculates the similarity using the above-mentioned formula (99).
[0097] Next, the evaluation unit 17 checks whether or not the calculation of similarity has been completed for all feature quantities x to be evaluated (step ST35). As a result, if the calculation of similarity has been completed for all feature quantities x to be evaluated (step ST35; YES), the evaluation unit 17 ends the process. If the calculation of similarity has not been completed for all feature quantities x to be evaluated (step ST35; NO), the process returns to step ST33, and the evaluation unit 17 acquires feature quantities x for which the calculation of similarity has not been completed.
[0098] As described above, according to the second embodiment, the data processing device 10b includes the evaluation unit 17 that evaluates the degree of similarity between the data to be evaluated and the principal component space defined by the new projective transformation matrix calculated by the combination unit 13. Thus, in addition to the effects of the first embodiment, the data processing device 10b according to the second embodiment can evaluate the degree of similarity between the data to be evaluated and the principal component space defined by the new projective transformation matrix.
[0099] Furthermore, according to the second embodiment, the anomaly detection device includes a detection unit that detects whether or not the data to be evaluated is abnormal data, based on the similarity evaluated by the evaluation unit 17. This allows the anomaly detection device according to the second embodiment to detect whether or not the data to be evaluated is abnormal data.
[0100] Although the preferred embodiments have been described in detail above, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the claims.
[0101] Furthermore, the present disclosure allows for free combination of the embodiments, modification of any of the components of the embodiments, or omission of any of the components of the embodiments. [Industrial Applicability]
[0102] The present disclosure makes it possible to obtain a matrix equivalent to a new covariance matrix obtained by weighting and combining multiple covariance matrices in a shorter time than conventional methods, and is suitable for use in data processing devices, anomaly detection devices, and data processing methods. [Explanation of symbols]
[0103] 10, 10b data processing device, 11 learning unit, 13 connection unit, 15 calculation unit, 17 evaluation unit, 51 processing circuit, 52 CPU, 53 memory, 110 input interface, 130 output interface, 131 weighted connection processing unit, 171 first component similarity calculation unit, 172 second component similarity calculation unit, 1311 inner product calculation unit, 1312 sign inversion unit, 1313 weighted connection unit, D1 first singular value matrix, D c The combined singular value matrix, D i Singular value matrix, D k Singular value matrix, U1 First projective transformation matrix, U c The combined projective transformation matrix, U i Projection transformation matrix, U k Projection transformation matrix, w i Weight coefficients, X feature matrix, α, β parameters, Σ covariance matrix.
Claims
1. a learning unit that acquires a projective transformation matrix and a singular value matrix generated for each of a plurality of pieces of training data based on the projective transformation matrix and the singular value matrix, the projective transformation matrix and the singular value matrix having a reduced number of dimensions compared to the corresponding piece of training data; a combining unit that performs a weighted combining process on the plurality of projective transformation matrices and singular value matrices acquired by the learning unit to calculate new projective transformation matrices and singular value matrices; a calculation unit that approximately calculates a covariance matrix obtained by performing a weighted combination process on covariance matrices corresponding to each of the plurality of training data using the new projective transformation matrix and singular value matrix calculated by the combination unit; A data processing device comprising:
2. The learning unit acquires the plurality of pieces of learning data, and acquires, as the projective transformation matrix, a left singular matrix obtained by performing singular value decomposition on each piece of the acquired learning data.
2. The data processing device according to claim 1.
3. The projective transformation matrix generated for each of the training data is This is a transformation matrix for projecting the training data that was the subject of singular value decomposition when the projective transformation matrix was obtained into the principal component space after the dimensionality of the training data has been reduced.
3. The data processing device according to claim 2.
4. The coupling portion is When performing the weighted combination process, correction is performed to prevent the loss of corresponding column vector components in the multiple projective transformation matrices to be combined.
4. The data processing device according to claim 1, wherein the first and second inputs are input to the first and second inputs.
5. The coupling portion is an inner product calculation unit that calculates an inner product of a reference vector and another column vector when the reference vector is set as a reference vector among the corresponding column vectors in the plurality of projective transformation matrices; a sign inversion unit that performs the correction by inverting the sign of the other column vector when the result calculated by the inner product calculation unit is negative; a weighting and combining unit that performs a weighting and combining process on a plurality of projective transformation matrices including the projective transformation matrix after the correction by the sign inverting unit and a plurality of singular value matrices; 5. The data processing device according to claim 4, further comprising:
6. The projective transformation matrix and the singular value matrix acquired by the learning unit are A learning data set is generated for each of the learning data sets used for learning each of the plurality of learning models or each of the learning data sets used for learning each of the plurality of normal distributions.
4. The data processing device according to claim 1, wherein the first and second inputs are input to the first and second inputs.
7. and an evaluation unit that evaluates the similarity between the principal component space defined by the new projective transformation matrix calculated by the combining unit and the data to be evaluated.
4. The data processing device according to claim 1, wherein the first and second inputs are input to the first and second inputs.
8. A detection unit is provided for detecting whether the data to be evaluated is abnormal data based on the similarity evaluated by the evaluation unit.
8. The data processing device according to claim 7.
9. A data processing method by a data processing device, comprising: a learning unit acquiring a projective transformation matrix and a singular value matrix generated for each of a plurality of pieces of training data based on the projective transformation matrix and the singular value matrix having a reduced number of dimensions compared to the corresponding piece of training data; a combining unit performing a weighted combining process on the plurality of projective transformation matrices and singular value matrices acquired by the learning unit to calculate new projective transformation matrices and singular value matrices; a calculation unit approximately calculating a covariance matrix obtained by performing a weighted combination process on covariance matrices corresponding to each of the plurality of training data using the new projective transformation matrix and singular value matrix calculated by the combination unit; A data processing method comprising:
Citation Information
Patent Citations
Data analysis method, device and equipment based on intelligent gateway and storage medium
CN119337291A
Apparatus, method , and program for detecting network abnormity
JP2004312064A
System, method, and program for amplifying training data used for machine learning
WO2020218490A1
Data processing device and data processing method
WO2024166339A1
Feature similarity determining device and program
JP2006235669A