Multi-manifold embedded learning method and system
Through the multi-manifold embedding learning method, the multiple branches and loss functions of the multi-manifold embedding learning model are solved, and the problem of difficulty in detecting and distinguishing OOD samples in the prior art is achieved, achieving higher model reliability and credibility.
Patent Information
- Application Number
- CN202311395891.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to effectively detect and distinguish externally distributed (OOD) samples from identification (ID) samples, resulting in the unreliable model when facing unseen instances.
A multi-manifold embedding learning method is proposed. By training the multi-manifold embedding learning model, ID training data is used to train and freeze model parameters, and then the test data is input into the model, and the OOD sample and ID sample are distinguished using thresholds. This method initializes the multiple manifold embedding learning model to encode different complex manifolds, including hypersphere and hyperbolic branches, and enhances the heterogeneity of the embedding space through multiple loss joint learning.
By enhancing the potential representation of OOD samples, the detection ability of unknown samples is improved, and the distorted representation relationship of the model when processing unknown data is avoided, thereby improving the reliability and credibility of the model.
Smart Images

Figure CN119886391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a computer system and an operation method thereof, and more particularly to a multi-manifold embedding learning method and system. Background Art
[0002] Machine learning is one of the ways to achieve artificial intelligence, that is, using machine learning as a means to solve some problems in artificial intelligence.
[0003] In data-driven machine learning, out-of-distribution (OOD) samples refer to unseen instances that do not belong to the distribution used by the machine learning model during training. The deployment of artificial intelligence models often faces OOD challenges because the test data has a domain shift compared to the original training data. This shift may make the trained model overconfident about wrong decisions, leading to credibility and reliability issues. However, detecting OOD samples from ID data has always been a difficult task due to the fact that the OOD sample space is wider than that of ID data. Summary of the invention
[0004] The present invention proposes a multi-manifold embedding learning method and system to improve the problems of the prior art.
[0005] In one embodiment of the present invention, the multi-manifold embedding learning method proposed in the present invention includes the following steps: using identification (ID) training data to train the multi-manifold embedding learning model, and then freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; inputting test data into the trained multi-manifold embedding learning model, and then using a threshold to distinguish out-of-distribution (OOD) samples from ID samples.
[0006] In one embodiment of the present invention, the multi-manifold embedding learning method further includes: initializing a plurality of branches of the multi-manifold embedding learning model to encode different plurality of manifolds.
[0007] In an embodiment of the present invention, the plurality of branches include a hyperspherical branch and a hyperbolic branch, and the plurality of different manifolds include a hyperspherical manifold and a hyperbolic manifold.
[0008] In one embodiment of the present invention, the steps of using ID training data to train a multi-manifold embedding learning model and then freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model include: in each training iteration, extracting the embedding of each of the different multiple manifolds and calculating the corresponding loss, and then updating the multi-manifold embedding learning model based on the loss; after the training of the multi-manifold embedding learning model is completed, freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; feeding the ID training data into the trained multi-manifold embedding learning model to extract the ID reference embedding.
[0009] In one embodiment of the present invention, the loss includes different multiple manifold losses and a cross entropy classification loss.
[0010] In one embodiment of the present invention, the step of inputting test data into a trained multi-manifold embedding learning model and then using a threshold to distinguish OOD samples from ID samples includes: inputting the test data into the trained multi-manifold embedding learning model to extract latent embedding; calculating the OOD score based on the distance between the latent embedding and the ID reference embedding; comparing the OOD score with the threshold to perform OOD detection, which distinguishes OOD samples from ID samples in the test data.
[0011] In one embodiment of the present invention, the multi-manifold embedding learning system proposed by the present invention includes a storage device and a processor, and the processor is electrically connected to the storage device. The storage device stores at least one instruction, and the processor is used to access and execute at least one instruction to: initialize multiple branches of the multi-manifold embedding learning model to encode different multiple manifolds; use ID training data to train the multi-manifold embedding learning model, and then freeze the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; input test data into the trained multi-manifold embedding learning model, and then use a threshold to distinguish OOD samples from ID samples.
[0012] In one embodiment of the present invention, the processor is used to access and execute at least one instruction to: extract the embedding of each of the different multiple manifolds and calculate the corresponding loss in each training iteration, and then update the multi-manifold embedding learning model based on the loss; after the multi-manifold embedding learning model is trained, freeze the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; feed the ID training data into the trained multi-manifold embedding learning model to extract the ID reference embedding.
[0013] In one embodiment of the present invention, the processor is used to access and execute at least one instruction to: input test data into a trained multi-manifold embedding learning model to extract latent embedding; calculate an OOD score based on the distance between the latent embedding and the ID reference embedding; compare the OOD score with a threshold to perform OOD detection, which distinguishes OOD samples from ID samples in the test data.
[0014] In one embodiment of the present invention, the plurality of branches include a hypersphere branch and a hyperbolic branch, the different plurality of manifolds include a hypersphere manifold and a hyperbolic manifold, and the loss includes a hypersphere loss, a hyperbolic loss, and a cross entropy classification loss.
[0015] In summary, the technical solution of the present invention has obvious advantages and beneficial effects compared with the prior art. The purpose of the multi-manifold embedding learning method and the multi-manifold embedding learning system of the present invention is to detect OOD samples to avoid unreliable prediction results of the model. Therefore, the present invention introduces a novel multi-manifold embedding learning model, which incorporates two manifolds with positive curvature and negative curvature to enhance the potential representation of OOD samples. By using multiple losses to jointly learn multiple manifolds, the architecture of the present invention aims to increase the heterogeneity of the embedding space, thereby avoiding distorted representation relationships when processing unknown OOD samples.
[0016] The above description will be described in detail below with reference to implementation examples, and a further explanation will be provided for the technical solution of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to make the above and other objects, features, advantages and embodiments of the present invention more clearly understood, the accompanying drawings are described as follows:
[0018] Figure 1 is a schematic diagram of a multi-manifold embedding learning method according to an embodiment of the present invention; and
[0019] Figure 2 is a flowchart of a multi-manifold embedding learning method according to an embodiment of the present invention; and
[0020] Figure 3 is a block diagram of a multi-manifold embedding learning system according to an embodiment of the present invention.
[0021] Component number description
[0022] 110 Training Phase
[0023] 120 Testing Phase
[0024] 131 Identification (ID) training data
[0025] 132 Test Data
[0026] 141 Multi-manifold Embedding Learning Model
[0027] 142 Trained Multi-manifold Embedding Learning Model
[0028] 200 Multi-manifold Embedding Learning Method
[0029] 210 Training Phase
[0030] Steps 211-214
[0031] 220 Testing Phase
[0032] Steps 221-223
[0033] 300 Multi-manifold Embedding Learning System
[0034] 310 Storage Device
[0035] 320 processor
[0036] 330 Output device
[0037] L ce Cross Entropy Classification Loss
[0038] L hypb Hyperbolic loss
[0039] L sph Super ball loss
[0040] z Embedding, latent embedding
[0041] z h Embed
[0042] z k ID Reference Embed
[0043] z s Embed DETAILED DESCRIPTION
[0044] In order to make the description of the present invention more detailed and complete, reference may be made to the attached drawings and various embodiments described below, in which the same numbers represent the same or similar components. On the other hand, well-known components and steps are not described in the embodiments to avoid unnecessary limitations on the present invention.
[0045] Please refer to Figure 1The technical aspect of the present invention is a multi-manifold embedding learning method, which can be applied to artificial intelligence or widely used in related technical links. The multi-manifold embedding learning method of this technical aspect can achieve considerable technical progress and has wide industrial application value. Figure 1 To illustrate the specific implementation of the multi-manifold embedding learning method.
[0046] It should be understood that multiple implementations of the multi-manifold embedding learning method are combined with Figure 1 In the following description, for ease of explanation, many specific details are further set to provide a comprehensive description of one or more embodiments. However, the present technology can be implemented without these specific details. In other examples, in order to effectively describe these embodiments, known structures and devices are shown in block diagram form. The term "for example" used herein means "as an example, instance or illustration". Any embodiment described herein as "for example" does not need to be interpreted as better or superior to other embodiments.
[0047] Figure 1 FIG. 1 is a schematic diagram of a multi-manifold embedding learning method according to an embodiment of the present invention. Figure 1 As shown, the multi-manifold embedding learning method includes a training phase 110 and a testing phase 120.
[0048] In the training phase 110, the identification (ID) training data 131 is used to train the multi-manifold embedding learning model 141, and the parameters of the multi-manifold embedding learning model 141 are frozen to obtain the trained multi-manifold embedding learning model 142. In the testing phase 120, the test data 132 is input into the trained multi-manifold embedding learning model 142, and a threshold is used to distinguish the out-of-distribution (OOD) samples from the ID samples.
[0049] Specifically, in some embodiments of the present invention, in the training stage 110, a plurality of branches of the multi-manifold embedding learning model 141 are initialized to encode different plurality of manifolds. In practice, for example, the aforementioned plurality of branches may include a hypersphere branch and a hyperbolic branch, and the different plurality of manifolds include a hypersphere manifold and a hyperbolic manifold. By incorporating two manifolds with positive curvature and negative curvature into the multi-manifold embedding learning model 141, the potential representation of the trained multi-manifold embedding learning model 142 for OOD samples is subsequently enhanced.
[0050] Next, in the training phase 110, at each training iteration, the embedding z of each of the different multiple manifolds is extracted and the corresponding loss is calculated, and then the multi-manifold embedding learning model 141 is updated according to the loss. After the multi-manifold embedding learning model 141 is trained, the parameters of the multi-manifold embedding learning model 141 are frozen to obtain the trained multi-manifold embedding learning model 142.
[0051] In some embodiments of the present invention, the aforementioned loss includes different multiple manifold losses and cross entropy classification loss L ce In practice, for example, the embedding z includes the embedding z of the hypersphere manifold s and the embedding z of the hyperbolic manifold h , the embedding z of the hyperspherical manifold s The corresponding loss is the hypersphere loss L sph , the embedding z of the hyperbolic manifold h The corresponding loss is the hyperbolic loss L hypb .
[0052] Next, in the testing phase 120, in some embodiments of the present invention, the ID training data 131 is fed into the trained multi-manifold embedding learning model 142 to extract the ID reference embedding z k ; Input the test data 132 into the trained multi-manifold embedding learning model 142 to extract the latent embedding z; Based on the latent embedding z and the ID reference embedding z k The distance between them is used to calculate the OOD score; the OOD score is compared with the threshold to perform OOD detection, and the OOD detection distinguishes the OOD samples from the ID samples in the test data 132.
[0053] In summary, the present invention integrates hypersphere embedding, hyperbolic embedding and multi-manifold learning. In order to elaborate on the relevant technical fields, the following symbols are used. Input data x∈X is fed into the model f:X→Y to predict the label y∈Y ID , where ID means within the distribution, Y ID =\{y 1 ,y 2 ,..,y K \}There are K categories. Model f uses the marginal distribution The ID training data x extracted from the training data is trained and the potential embedding z is generated. One goal of the present invention is to infer Detect OOD samples in the Y ID OOD detection is performed based on the estimator g of the scoring function S(z) and the threshold λ:
[0054]
[0055] In some embodiments of the present invention, the standard steps for detecting OOD are as follows: 1. Train a model (e.g., multi-manifold embedding learning model 141) using ID training data and freeze the model parameters; 2. Input test data into the frozen model (e.g., trained multi-manifold embedding learning model 142); 3. Calculate the OOD score and use a threshold to distinguish OOD samples from ID samples.
[0056] Regarding the hypersphere manifold, in some embodiments of the present invention, CIDER is used to optimize the compactness and discriminability losses of the hypersphere manifold, which is composed of unit vectors in the von Mises-Fisher distribution with class k. and the category prototype μ k To express: where τ is the temperature parameter. The embedding z assigned to class k s The probability is:
[0057]
[0058] By taking the negative log-likelihood, the present invention obtains a compactness loss, which forces each sample to be located near the prototype of its category.
[0059]
[0060] The discrepancy loss encourages large angular separations between class prototypes:
[0061]
[0062] 1 of them ij is the indicator function, The loss function of the hypersphere branch can be expressed as L sph =L com +L dis , the union of these two losses, which jointly shape the clusters on the hypersphere on the ID data, with intra-class compactness and inter-class diversity, so it is more difficult for OOD data to be located in a space close to the ID prototype.
[0063] Regarding hyperbolic manifolds, in some embodiments of the invention, a hyperbolic space is a combination of Riemann manifolds with constant negative curvature, where the curvature represents a deviation from Euclidean space. A set of models are developed for isomorphic transformations between hyperbolic spaces, since hyperbolic spaces cannot be isometrically embedded in Euclidean space. One of the main models is the Poincaré Ball. It defines a Riemann metric that matches The manifold M d =\{u∈R d :c||u||<1\}, where is a conformal factor with curvature c, and g E =I is the Euclidean metric tensor. This manifold relies on operations with the Mobius gyrovector space, including Mobius addition and scalar multiplication Where u and v are vectors and w is a scalar.
[0064]
[0065]
[0066] The geometric distance between two points u and v can be expressed as follows:
[0067]
[0068] This distance converges to 2||uv|| when the curvature c→0, which is proportional to the case of the Euclidean distance.
[0069] Exponential map can map a vector to the tangent space on the Poincare sphere. The present invention can use a backbone network to generate an embedding vector v, and use the exponential map to convert the vector into a vector with the exponential map. Then, the present invention can calculate the hyperbolic averaging of multiple hyperbolic embeddings through the Einstein midpoint. The present invention can use the Poincare sphere The embedding of is projected into the Klein model , and use Klein coordinates to compute a simpler average form:
[0070]
[0071] where r i is the Lorentz factor. After obtaining the average embedding in Klein coordinates, the present invention transforms the space back to the Poincare sphere:
[0072]
[0073] Using the available operations in hyperbolic space, the present invention projects the latent embedding using a hyperbolic head to obtain the embedding u on the Poincare sphere. By augmenting the set A from X to form a complete set I = A ∩ X, the supervised contrastive loss of a positive sample p(i) in i∈I compared to other augmented set samples a∈A can be calculated. Therefore, the supervised hyperbolic contrast loss can be expressed as:
[0074]
[0075] Regarding the optimization details, the final loss is the hyperspherical and hyperbolic loss and the cross entropy loss L ce Combination of to optimize ID classification accuracy:
[0076] L=L sph +L hypb +L ce .
[0077] The curvature parameter c is usually regarded as a hyperparameter. The present invention uses the Gromov measurement to estimate the value of c.
[0078] In order to improve the stability of learning, the present invention adopts the feature clipping technique which is empirically found to be useful for better convergence to avoid the gradient vanishing of complex manifold learning. The sample point x in Euclidean space is truncated to a clipping feature with an effective radius r of the Poincare sphere This process normalizes points that are too close to the sphere boundary.
[0079] Regarding the OOD score equation, using a network trained in a multi-manifold embedding learning framework (i.e., the trained multi-manifold embedding learning model 142), the present invention extracts the output of the penultimate layer as the L2-normalized embedding z of sample x for calculation of its OOD score. In order to distinguish OOD samples from ID samples, the present invention calculates the embedding distance between each input sample and the training ID sample, and specifies the kth nearest neighbor as the ID reference embedding z k The present invention obtains the OOD score based on the L2 distance, that is, S(z)=||zz k || 2 OOD detection is achieved by comparing this score with a threshold λ.
[0080] Figure 2 FIG. 2 is a flow chart of a multi-manifold embedding learning method 200 according to an embodiment of the present invention. Figure 2As shown, the multi-manifold embedding learning method 200 includes a training phase 210 and a testing phase 220. The training phase 210 includes steps 211 to 214, and the testing phase 220 includes steps 221 to 223. (It should be understood that the steps mentioned in this embodiment, except for those specifically described in their order, can be adjusted in order according to actual needs, and can even be executed simultaneously or partially simultaneously).
[0081] The multi-manifold embedding learning method 200 may be in the form of a computer program product on a non-transitory computer-readable recording medium having a plurality of computer-readable instructions contained in the medium. Suitable recording media may include any of the following: non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electronically erasable programmable read-only memory (EEPROM); volatile memory, such as static access memory (SRAM), dynamic access memory (DRAM), double data rate random access memory (DDR-RAM); optical storage devices, such as compact disk-ROM (CD-ROM), digital versatile laser video disk-ROM (DVD-ROM); magnetic storage devices, such as hard disk drive, floppy disk drive.
[0082] In the training phase 210, the multi-manifold framework is initialized with hypersphere and hyperbolic branches in step 211. Specifically, in some embodiments of the present invention, in step 211, the hypersphere branch and the hyperbolic branch of the multi-manifold embedding learning model are initialized to encode hypersphere manifolds and hyperbolic manifolds of different curvatures.
[0083] In step 212, the training data is fed into a multi-manifold framework to obtain multiple embeddings. Specifically, in some embodiments of the present invention, in step 212, at each training iteration, an embedding of a hyperspherical manifold and an embedding of a hyperbolic manifold are extracted from the multi-manifold embedding learning model.
[0084] In step 213, the multi-manifold framework is trained with a joint loss. Specifically, in some embodiments of the present invention, in step 213, at each training iteration, the hypersphere loss corresponding to the embedding of the hypersphere manifold, the hyperbolic loss corresponding to the embedding of the hyperbolic manifold, and the cross-entropy classification loss are summed up as a joint loss to update the multi-manifold embedding learning model. For example, by adjusting the weights and / or biases of each simulated neuron in the multi-manifold embedding learning model until the joint loss is less than a preset loss value, but the present invention is not limited to this example.
[0085] In step 214, the trained multi-manifold framework is used to obtain the ID embedding from the ID training data set. Specifically, in some embodiments of the present invention, in step 214, the ID training data is fed into the trained multi-manifold embedding learning model to extract the ID reference embedding.
[0086] In the testing phase 220, the trained multi-manifold framework is used to obtain latent embeddings in step 221. In some embodiments of the present invention, in step 221, the test data is input into the trained multi-manifold embedding learning model to extract the latent embeddings.
[0087] At step 222, an out-of-distribution score is calculated. In some embodiments of the invention, at step 222, an OOD score is calculated based on the distance between the potential embedding and the ID reference embedding.
[0088] In step 223, the out-of-distribution score is compared with the threshold to perform out-of-distribution detection. In some embodiments of the present invention, in step 223, the OOD score is compared with the threshold to perform OOD detection, and OOD detection distinguishes OOD samples from ID samples in the test data. If the OOD score is approximately less than or equal to the threshold, it is determined to be an ID sample; conversely, if the OOD score is approximately greater than the threshold, it is determined to be an OOD sample. In practice, for example, the specific value of the threshold can be flexibly set based on experimental data or empirical data.
[0089] It should be understood that the "about", "approximately" or "roughly" used herein is used to modify any quantity that can be slightly changed, but such slight changes do not change its essence. If there is no special explanation in the embodiment, the error range of the value modified by "about", "approximately" or "roughly" is generally allowed within 20%, preferably within 10%, and more preferably within 5%.
[0090] For further discussion of the hardware system that implements the above multi-manifold embedding learning method, please also refer to Figure 1 to Figure 3 , Figure 3 is a block diagram of a multi-manifold embedding learning system 300 according to an embodiment of the present invention.
[0091] like Figure 3 As shown, the multi-manifold embedding learning system 300 includes a storage device 310, a processor 320, and an output device 330. For example, the multi-manifold embedding learning system 300 may be a computer device, the storage device 310 may be a hard disk, a flash memory, or other storage media, the processor 320 may be a central processing unit, and the output device 330 may be a display or a communication device.
[0092] In terms of architecture, the storage device 310 is electrically connected to the processor 320, and the processor 320 is electrically connected to the output device 330. It should be understood that in the embodiments and the scope of the patent application, the description of "electrical connection" may generally refer to a component being indirectly electrically coupled to another component through other components, or a component being directly electrically connected to another component without going through other components. For example, the storage device 310 may be a built-in storage device directly electrically connected to the processor 320, or the storage device 310 may be an external storage device indirectly connected to the processor 320 through a network device.
[0093] When in use, the storage device 310 stores at least one instruction, and the processor 320 is used to access and execute at least one instruction to execute Figure 1 Multi-manifold embedding learning methods and / or Figure 2 The steps and functions of the multi-manifold embedding learning method 200.
[0094] In some embodiments of the present invention, the processor 320 is used to access and execute at least one instruction to: initialize multiple branches of the multi-manifold embedding learning model to encode different multiple manifolds; use ID training data to train the multi-manifold embedding learning model, and then freeze the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; input test data into the trained multi-manifold embedding learning model, and then use a threshold to distinguish OOD samples from ID samples.
[0095] In some embodiments of the present invention, the processor 320 is used to access and execute at least one instruction to: extract the embedding of each of the different multiple manifolds and calculate the corresponding loss at each training iteration, and then update the multi-manifold embedding learning model according to the loss; after the training of the multi-manifold embedding learning model is completed, freeze the parameters of the multi-manifold embedding learning model to obtain the trained multi-manifold embedding learning model; feed the ID training data into the trained multi-manifold embedding learning model to extract the ID reference embedding. In practice, for example, the aforementioned multiple branches include hypersphere branches and hyperbolic branches, the different multiple manifolds include hypersphere manifolds and hyperbolic manifolds, and the loss includes hypersphere loss, hyperbolic loss, and cross-entropy classification loss.
[0096] In some embodiments of the present invention, the processor 320 is used to access and execute at least one instruction to: input the test data into the trained multi-manifold embedding learning model to extract the potential embedding; calculate the OOD score based on the distance between the potential embedding and the ID reference embedding; compare the OOD score with the threshold to perform OOD detection, and the OOD detection distinguishes the OOD samples from the ID samples in the test data. The output device 330 can be a display to present the results of the OOD detection.
[0097] In a controlled experiment, a computer device executes other machine learning methods (such as: methods based on PyTorch-OOD, methods based on traditional embedding, etc.) to perform OOD detection, wherein the methods based on PyTorch-OOD may be, for example, MaxSoftmax, Mahalanobis, ODIN, Energy, Entropy, ViM, KLMatching, etc., and the methods based on traditional embedding may be, for example, SSD, KNN+, CIDER, etc. Compared with the aforementioned other machine learning methods, the multi-manifold embedding learning method of the present invention has both a lower false positive rate (FPR) and a better area under the receiver operating characteristic curve (AUC) for OOD detection. In this way, compared with the aforementioned other machine learning methods, the multi-manifold embedding learning method of the present invention can more accurately distinguish OOD samples from ID samples.
[0098] In summary, the technical solution of the present invention has obvious advantages and beneficial effects compared with the prior art. The purpose of the multi-manifold embedding learning method 200 and the multi-manifold embedding learning system 300 of the present invention is to detect OOD samples to avoid unreliable prediction results of the model. Therefore, the present invention introduces a novel multi-manifold embedding learning model, which incorporates two manifolds with positive curvature and negative curvature to enhance the potential representation of OOD samples. By using multiple losses to jointly learn multiple manifolds, the architecture of the present invention aims to increase the heterogeneity of the embedding space, thereby avoiding distorted representation relationships when processing unknown OOD samples.
[0099] Although the present invention has been disclosed as above in the form of an implementation method, it is not intended to limit the present invention. Anyone skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope of the attached patent application.
Claims
1. A multi-manifold embedding learning method, characterized in that: The following steps are involved: Using the identified training data to train a multi-manifold embedding learning model, and then freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; as well as A test data is input into the trained multi-manifold embedding learning model, and then a threshold is used to distinguish out-of-distribution samples from ID samples.
2. The multi-manifold embedding learning method according to claim 1, characterized in that: Also includes: Initializing a plurality of branches of the multi-manifold embedding learning model to encode different plurality of manifolds.
3. The multi-manifold embedding learning method according to claim 2, characterized in that: The plurality of branches include a hyperspherical branch and a hyperbolic branch, and the plurality of different manifolds include a hyperspherical manifold and a hyperbolic manifold.
4. The multi-manifold embedding learning method according to claim 2, characterized in that: The steps of using an identified training data to train a multi-manifold embedding learning model and then freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model include: At each training iteration, extract the embedding of each of the different plurality of manifolds and calculate the corresponding loss, and then update the multi-manifold embedding learning model based on the loss; After the multi-manifold embedding learning model is trained, freezing the parameters of the multi-manifold embedding learning model to obtain the trained multi-manifold embedding learning model; as well as The recognition training data is fed into the trained multi-manifold embedding learning model to extract an ID reference embedding.
5. The multi-manifold embedding learning method according to claim 4, characterized in that: The loss includes the losses of the different multiple manifolds and the cross entropy classification loss.
6. The multi-manifold embedding learning method according to claim 4, characterized in that: The step of inputting a test data into the trained multi-manifold embedding learning model and then using a threshold to distinguish out-of-distribution samples from ID samples comprises: Inputting the test data into the trained multi-manifold embedding learning model to extract a latent embedding; Calculating an OOD score based on the distance between the potential embedding and the ID reference embedding; as well as The OOD score is compared to the threshold to perform an OOD detection that distinguishes the OOD samples from the ID samples in the test data.
7. A multi-manifold embedding learning system, characterized in that: Include: a storage device storing at least one instruction; and a processor electrically connected to the storage device, wherein the processor is used to access and execute the at least one instruction to: Initialize multiple branches of a multi-manifold embedding learning model to encode different multiple manifolds; Using an ID training data to train the multi-manifold embedding learning model, and then freezing the parameters of the multi-manifold embedding learning model to obtain a trained multi-manifold embedding learning model; as well as A test data is input into the trained multi-manifold embedding learning model, and then a threshold is used to distinguish OOD samples from ID samples.
8. The multi-manifold embedding learning system according to claim 7, characterized in that: The processor is used to access and execute the at least one instruction to: At each training iteration, extract the embedding of each of the different plurality of manifolds and calculate the corresponding loss, and then update the multi-manifold embedding learning model based on the loss; After the multi-manifold embedding learning model is trained, freezing the parameters of the multi-manifold embedding learning model to obtain the trained multi-manifold embedding learning model; as well as The ID training data is fed into the trained multi-manifold embedding learning model to extract an ID reference embedding.
9. The multi-manifold embedding learning system according to claim 8, characterized in that: The processor is used to access and execute the at least one instruction to: Inputting the test data into the trained multi-manifold embedding learning model to extract a latent embedding; Calculating an OOD score based on the distance between the potential embedding and the ID reference embedding; as well as The OOD score is compared to the threshold to perform an OOD detection that distinguishes the OOD samples from the ID samples in the test data.
10. The multi-manifold embedding learning system according to claim 8, characterized in that: The plurality of branches include a hypersphere branch and a hyperbolic branch, the plurality of different manifolds include a hypersphere manifold and a hyperbolic manifold, and the loss includes a hypersphere loss, a hyperbolic loss, and a cross entropy classification loss.