An electronic device and storage medium applied to data sparse projection algorithm

By iteratively optimizing the high-dimensional sparse two-dimensional matrix in the data sparse projection algorithm, the problem of unstable projection matrices in the existing technology is solved. The generated projection matrix is ​​more stable in practical applications, has faster calculation speed, and is suitable for a variety of learning tasks. .

CN111783033BActive Publication Date: 2024-08-23THE CHINESE UNIV OF HONG KONG (SHENZHEN)
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202010644569.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-07
Publication Date
2024-08-23
Estimated Expiration
2040-07-07

AI Technical Summary

Technical Problem

The projection matrix generation in the existing random projection technology is too random, resulting in the inability to protect the similarity features between samples, and the output results are unstable, affecting practical applications.

Method used

By randomly initializing a high-dimensional sparse two-dimensional matrix in the data sparse projection algorithm, using a winner-take-all algorithm to establish the functional relationship between the input vector and the output vector, and generating the optimal high-dimensional sparse two-dimensional matrix through an iterative optimization process, Ensure the stability and sparsity of the matrix.

Benefits of technology

The generated projection matrix is ​​more stable, can better protect the similarity features of the original data, improves calculation speed, and is suitable for supervised and unsupervised learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783033B
    Figure CN111783033B
Patent Text Reader

Abstract

The present invention discloses an electronic device and a storage medium applied to a data sparse projection algorithm. The electronic device can use a processor to execute a computer program to implement the data sparse projection algorithm. The data sparse projection algorithm includes: randomly initializing a high-dimensional sparse two-dimensional matrix; fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate an optimal output variable; fixing the optimal output variable, and using the optimal output variable to calculate an optimal high-dimensional sparse two-dimensional matrix; cyclically fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed; and continuously optimizing the high-dimensional sparse two-dimensional matrix in a random and iterative manner, so that the high-dimensional sparse two-dimensional matrix can be made more stable, and the similarity feature of the original data can be better protected. In addition, the sparsity and binary nature of the algorithm make the calculation speed faster in practical applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an electronic device and a storage medium applied to a data sparse projection algorithm. Background Art

[0002] Random projection technology is an important tool for data analysis. It uses matrix multiplication to re-express the original input sample data (matrix form), thereby achieving better performance while protecting the characteristics of the original data, such as calculation speed, storage space, accuracy, etc.

[0003] The existing random projection technologies mainly include the LSH (locality sensitive hashing) algorithm and the FLY (fruit fly algorithm).

[0004] However, the structure of LSH and FLY is relatively simple, which makes the generation of the projection matrix too random, resulting in the inability to protect the similarity characteristics between samples before and after projection. In addition, since the output results change continuously each time, it is unstable in practical applications. Summary of the invention

[0005] The main purpose of the present invention is to provide an electronic device and a storage medium for a data sparse projection algorithm, aiming to solve the technical problems in the prior art that the generation of the projection matrix is ​​too random, resulting in the inability to protect the similarity characteristics between samples before and after projection, and the output results are constantly changing each time, resulting in instability in practical applications.

[0006] To achieve the above-mentioned purpose, the first aspect of the present invention provides an electronic device applied to a data sparse projection algorithm, which is applied to the calculation of matrix multiplication in a storage space. The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The invention is characterized in that when the processor executes the computer program, a data sparse projection algorithm is implemented. The data sparse projection algorithm is applicable to supervised learning and unsupervised learning. The data sparse projection algorithm includes: randomly initializing a high-dimensional sparse two-dimensional matrix; fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable; fixing the optimal output variable, and using the optimal output variable to calculate the optimal high-dimensional sparse two-dimensional matrix; cyclically fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed, at which time the final high-dimensional sparse two-dimensional matrix is ​​generated.

[0007] Furthermore, fixing the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable includes: training a set of existing samples, wherein the samples include input vectors or input vectors and output variables, and the input vectors are high-dimensional sparse two-dimensional matrices; using a winner-takes-all algorithm to establish a functional relationship between the input vectors and output vectors in the set; fixing the high-dimensional sparse two-dimensional matrix, and calculating the optimal output variable based on the fixed high-dimensional sparse two-dimensional matrix and the functional relationship.

[0008] Furthermore, fixing the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable also includes: subjecting the high-dimensional sparse two-dimensional matrix to sparsity constraints according to given constraint values; and constraining the output variables according to the winner-takes-all algorithm and the constrained high-dimensional sparse two-dimensional matrix.

[0009] A second aspect of the present invention provides a computer-readable storage medium applied to a data sparse projection algorithm, which is applied to the calculation of matrix multiplication in a storage space. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the data sparse projection algorithm is implemented. The data sparse projection algorithm is applicable to supervised learning and unsupervised learning. The data sparse projection algorithm includes:

[0010] Randomly initialize a high-dimensional sparse two-dimensional matrix;

[0011] Fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate an optimal output variable;

[0012] The optimal output variable is fixed, and the optimal high-dimensional sparse two-dimensional matrix is ​​calculated using the optimal output variable;

[0013] Circularly fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed, and at this time, generating a final high-dimensional sparse two-dimensional matrix;

[0014] The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable comprises:

[0015] According to an existing sample training set, the sample includes an input vector or an input vector and an output variable, and the input vector is a high-dimensional sparse two-dimensional matrix;

[0016] Using a winner-takes-all algorithm to establish a functional relationship between input vectors and output vectors in the set;

[0017] The high-dimensional sparse two-dimensional matrix is ​​fixed, and the optimal output variable is calculated according to the fixed high-dimensional sparse two-dimensional matrix and the functional relationship;

[0018] The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable further comprises:

[0019] According to the given constraint value, the high-dimensional sparse two-dimensional matrix is ​​subjected to sparsity constraint; and the output variable is constrained according to the winner-takes-all algorithm and the constrained high-dimensional sparse two-dimensional matrix.

[0020] The present invention provides an electronic device and a storage medium applied to a data sparse projection algorithm, which have the beneficial effects of continuously optimizing a high-dimensional sparse two-dimensional matrix in a random and iterative manner, making the high-dimensional sparse two-dimensional matrix more stable, better protecting the similarity features of the original data, and making the calculation speed faster in practical applications due to its sparsity and binary nature. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 A schematic block diagram of the process of executing a data sparse projection algorithm according to an embodiment of the present invention;

[0023] Figure 2 The figure is a schematic block diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] See also Figure 1 and Figure 2, an embodiment of the present application provides an electronic device applied to a data sparse projection algorithm, which is applied to the calculation of matrix multiplication in a storage space. The electronic device includes: a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602. When the processor 602 executes the computer program, the data sparse projection algorithm is implemented. The data sparse projection algorithm is applicable to supervised learning and unsupervised learning. The data sparse projection algorithm includes: S1, randomly initializing a high-dimensional sparse two-dimensional matrix; S2, fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable; S3, fixing the optimal output variable, and using the optimal output variable to calculate the optimal high-dimensional sparse two-dimensional matrix; S4, cyclically fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed.

[0026] Specifically, at the beginning of the algorithm, a random initialization , and remember to do , through interactive iteration and Continuous optimization, is the output variable, and the specific iterative optimization process is:

[0027] For the tth iteration, fix Remember to do Maximize the variables Function , then the optimal ; then fixed Remember to do Maximize the variables Function ,get , repeat the above steps until L no longer increases, that is, the function value converges.

[0028] Fixing the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable includes: training a set of existing samples, where the samples include input vectors or input vectors and output variables, and the input vector is a high-dimensional sparse two-dimensional matrix; using a winner-takes-all algorithm to establish a functional relationship between the input vectors and the output vectors in the set; fixing the high-dimensional sparse two-dimensional matrix, and calculating the optimal output variable based on the fixed high-dimensional sparse two-dimensional matrix and the functional relationship.

[0029] The high-dimensional sparse two-dimensional matrix is ​​fixed, and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable also includes: according to a given constraint value, performing sparsity constraints on the high-dimensional sparse two-dimensional matrix; and binarizing the output variable according to the winner-takes-all algorithm and the constrained high-dimensional sparse two-dimensional matrix.

[0030] In the above, about the optimal Can easily pass Find, among which .

[0031] Among them, first of all, according to the given sample set , where each sample Based on the training set , we hope to obtain a high-dimensional sparse binary matrix Will dimensional input vector Project to dimension( Much greater than ) , and each pair of input and output vectors satisfies .

[0032] here Indicates the Winner-Take-All calculation method. That is: for ,

[0033]

[0034] here Represents the hash length of the projection. Since there is noise in the actual training data, in order to find the projection matrix , the problem is transformed into the question of variables and variables The maximization problem is:

[0035]

[0036] make ,when and , Make Increase, overall increases in a positive direction; otherwise, ,right There is no effect, so the problem is ultimately to find the ideal and For sparse binary projection, we impose sparsity constraints on W. For a given c, we have:

[0037]

[0038] From the WTA function, we have information about The constraints are as follows:

[0039]

[0040] As for the optimal , the following derivation is obtained:

[0041]

[0042]

[0043] Therefore the optimal yes , for all ,and = .

[0044] Through the interactive iterative optimization process, our function value can obtain a local optimal solution. Converges when no longer rising.

[0045] In summary, the electronic device provided in the embodiment of the present application for applying to the data sparse projection algorithm generates a high-quality projection matrix. For samples with given input and output, the optimal high-dimensional sparse two-dimensional matrix can be directly generated according to the above method, which is suitable for supervised learning.

[0046] In the case of only given input samples but no given output samples, the high-dimensional sparse two-dimensional matrix is ​​continuously optimized by random high-dimensional sparse two-dimensional matrix and iteration, so that the generated projection matrix is ​​more stable, the similarity feature of the original data is better protected, and its sparsity and binary nature make it faster to calculate in practical applications, which is suitable for unsupervised learning. Therefore, the present invention is not only suitable for supervised learning, but also for unsupervised learning, and the projection matrix in the present invention is learned from the input data, which has the beneficial effects of being more stable, better in feature protection, and faster in calculation than the existing methods.

[0047] Furthermore, the electronic device also includes: at least one input device 603 and at least one output device 604 .

[0048] The memory 601 , processor 602 , input device 603 and output device 604 are connected via a bus 605 .

[0049] The input device 603 may be a camera, a touch panel, a physical button or a mouse, etc. The output device 604 may be a display screen.

[0050] The memory 601 may be a high-speed random access memory (RAM) memory, or a non-volatile memory, such as a disk memory. The memory 601 is used to store a set of executable program codes, and the processor 602 is coupled to the memory 601 .

[0051] Furthermore, the embodiment of the present application also provides a computer-readable storage medium applied to the data sparse projection algorithm, which is applied to the calculation of matrix multiplication in the storage space. The computer-readable storage medium may be provided in the electronic device in each of the above embodiments, and the computer-readable storage medium may be the memory 601 in the aforementioned embodiment. The computer-readable storage medium stores a computer program, which implements the aforementioned data sparse projection algorithm when executed by the processor 602. It should be noted that the data sparse projection algorithm has been recorded in the aforementioned embodiment and will not be repeated here.

[0052] Furthermore, the computer storable medium may also be a U disk, a mobile hard disk, a read-only memory 601 (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.

[0053] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0054] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0055] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0056] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0057] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0058] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0059] The above is a description of an electronic device and a storage medium provided by the present invention for use in a data sparse projection algorithm. For those skilled in the art, according to the ideas of the embodiments of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. An electronic device applied to a data sparse projection algorithm, the electronic device is applied to the calculation of matrix multiplication in a storage space, the electronic device include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a data sparse projection algorithm is implemented, the data sparse projection algorithm is applicable to supervised learning and unsupervised learning, and the data sparse projection algorithm includes: Randomly initialize a high-dimensional sparse two-dimensional matrix; Fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate an optimal output variable; The optimal output variable is fixed, and the optimal high-dimensional sparse two-dimensional matrix is ​​calculated using the optimal output variable; Circularly fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed, and at this time, generating a final high-dimensional sparse two-dimensional matrix; The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable comprises: According to an existing sample training set, the sample includes an input vector or an input vector and an output variable, and the input vector is a high-dimensional sparse two-dimensional matrix; Using a winner-takes-all algorithm to establish a functional relationship between input vectors and output vectors in the set; The high-dimensional sparse two-dimensional matrix is ​​fixed, and the optimal output variable is calculated according to the fixed high-dimensional sparse two-dimensional matrix and the functional relationship; The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable further comprises: According to a given constraint value, a sparsity constraint is imposed on the high-dimensional sparse two-dimensional matrix; Constrain the output variables according to the winner-takes-all algorithm and the constrained high-dimensional sparse two-dimensional matrix; Among them, the optimal high-dimensional sparse two-dimensional matrix is ​​obtained by To obtain, ; represents the randomly initialized high-dimensional sparse two-dimensional matrix; According to the given sample set , where each sample ; Based on the training set , obtain a high-dimensional sparse binary matrix Will dimensional input vector Project to dimensional sparse binary vector ,in, Much greater than , and each pair of input and output vectors satisfies ; Represents the winner-takes-all calculation method, for , Indicates the hash length of the projection, at this time, the calculation about the variable and variables The maximization of is as follows: make ,when and , Make Increase, overall increases in a positive direction; otherwise, ,right No effect. For sparse binary projection, a sparsity constraint is imposed on W. For a given c, we have: From the WTA function, there are The constraints are as follows: About the best , the following derivation is obtained: Therefore the optimal yes , for all ,and = ; Through the interactive iterative optimization process, the function value can obtain the local optimal solution. Converges when no longer rising.

2. A computer-readable storage medium for use in a data sparse projection algorithm, the storage medium being used for calculation of matrix multiplication in a storage space, the computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, a data sparse projection algorithm is implemented, the data sparse projection algorithm is applicable to supervised learning and unsupervised learning, and the data sparse projection algorithm includes: Randomly initialize a high-dimensional sparse two-dimensional matrix; Fixing the high-dimensional sparse two-dimensional matrix, and using the high-dimensional sparse two-dimensional matrix to calculate an optimal output variable; The optimal output variable is fixed, and the optimal high-dimensional sparse two-dimensional matrix is ​​calculated using the optimal output variable; Circularly fixing the high-dimensional sparse two-dimensional matrix and the output variable until the optimal output variable no longer increases when the high-dimensional sparse two-dimensional matrix is ​​fixed, and at this time, generating a final high-dimensional sparse two-dimensional matrix; The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable comprises: According to an existing sample training set, the sample includes an input vector or an input vector and an output variable, and the input vector is a high-dimensional sparse two-dimensional matrix; Using a winner-takes-all algorithm to establish a functional relationship between input vectors and output vectors in the set; The high-dimensional sparse two-dimensional matrix is ​​fixed, and the optimal output variable is calculated according to the fixed high-dimensional sparse two-dimensional matrix and the functional relationship; The fixing of the high-dimensional sparse two-dimensional matrix and using the high-dimensional sparse two-dimensional matrix to calculate the optimal output variable further comprises: According to a given constraint value, a sparsity constraint is imposed on the high-dimensional sparse two-dimensional matrix; Constrain the output variables according to the winner-takes-all algorithm and the constrained high-dimensional sparse two-dimensional matrix; Among them, the optimal high-dimensional sparse two-dimensional matrix is ​​obtained by To obtain, ; represents the randomly initialized high-dimensional sparse two-dimensional matrix; According to the given sample set , where each sample ; Based on the training set , obtain a high-dimensional sparse binary matrix Will dimensional input vector Project to dimensional sparse binary vector ,in, Much greater than , and each pair of input and output vectors satisfies ; Represents the winner-takes-all calculation method, for , Indicates the hash length of the projection, at this time, the calculation about the variable and variables The maximization of is as follows: make ,when and , Make Increase, overall increases in a positive direction; otherwise, ,right No effect. For sparse binary projection, a sparsity constraint is imposed on W. For a given c, we have: From the WTA function, there are The constraints are as follows: About the best , the following derivation is obtained: Therefore the optimal yes , for all ,and = ; Through the interactive iterative optimization process, the function value can obtain the local optimal solution. Converges when no longer rising.

Citation Information

Patent Citations

  • Pedestrian re-identification method based on projection matrix constraint and through combination of identification dictionary learning

    CN108509854A

  • Face recognition method and device based on projection dictionary pair learning

    CN110147782A

  • Training method and device, feature extraction method and device, classification method and device and storage medium

    CN110717519A

  • Method and apparatus for image search using sparsifying analysis operators

    EP3166022A1

  • Absolute rotation estimation including outlier detection via low-rank and sparse matrix decomposition

    US20160163114A1