Multi-modal feature fusion learning method and device

Through multi-stage mutual distillation technology, the feature extraction capabilities of the modal encoder are improved, solving the problem of insufficient feature extraction capabilities of traditional multi-modal models, and achieving more accurate multi-modal feature fusion.

CN118797548APending Publication Date: 2024-10-18CHINA MOBILE GROUP ZHEJIANG +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311538800.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Traditional multimodal models only use a single transformer to extract modal features, resulting in weak feature extraction capabilities and affecting the fusion effect of multimodal features.

Method used

A multi-stage mutual distillation method is used to obtain multi-modal target features and improve the generalization ability of the modal encoder through interactive learning of the text encoder and the image encoder, thus improving the accuracy of feature extraction and the fusion of multi-modal features. ability.

Benefits of technology

Through multi-stage mutual distillation technology, the feature extraction capability of the modal encoder is improved, the fusion effect of multi-modal features is enhanced, and the execution effect of cross-modal tasks is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797548A_ABST
    Figure CN118797548A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a multi-modal feature fusion learning method and device. The method comprises the following steps: acquiring a multi-modal target feature; performing multi-stage mutual distillation on the multi-modal target features to obtain distillation features corresponding to each modal target feature; and fusing all the distillation features to obtain a multi-modal feature fusion tag. According to the multi-modal feature fusion learning method and device provided by the invention, the generalization ability of the self-modal encoder can be improved, so that the features finally extracted by using the encoder are more accurate, that is, the extraction ability of the multi-modal features is effectively improved, and the fusion of the multi-modal features is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a multimodal feature fusion learning method and device. Background Art

[0002] The input of multimodal data is a common form of daily work practice. Some business scenarios require the integration of multiple input data for judgment, such as: medical practice uses medical images and patient self-reports to comprehensively judge the condition; e-commerce recommends products through product pictures and text descriptions, etc. Multimodal machine learning research includes machine learning problems with different modal data. Common modalities include: images, text, and sound. They usually come from different sensors, and the data formation method and internal structure are very different.

[0003] Traditional multimodal models include single-stream structures and dual-stream structures. The single-stream structure only includes a single transformer layer. The data features of multiple modalities are connected together and then input into a single transformer layer for feature fusion; the dual-stream structure includes two transformer layers. The data features of the two modalities are no longer connected, but are input into the corresponding transformer layers respectively, and then interact across the transformer layers to complete feature fusion. The single-stream structure features have the advantages of fast feature fusion speed and convenient downstream use. They are suitable for cross-modal retrieval, but due to the lack of sufficient modal interaction, some downstream tasks do not perform well; the dual-stream structure has better cross-modal feature interaction capabilities than the single-stream structure, but because only a single transformer is used to extract features of any modality, the feature extraction capability is as weak as the single-stream structure, which affects the fusion of multimodal features. Summary of the invention

[0004] The embodiments of the present application provide a multimodal feature fusion learning method and device to solve the technical problem that the traditional multimodal model only uses a single transformer to extract modal features, has a weak feature extraction capability, and thus affects the fusion of multimodal features.

[0005] In a first aspect, an embodiment of the present application provides a multimodal feature fusion learning method, comprising:

[0006] Acquire multimodal target features;

[0007] Performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature;

[0008] All distilled features are fused to obtain multimodal feature fusion labels.

[0009] In one embodiment, the acquiring of multimodal target features includes:

[0010] The text encoder includes a text feature construction layer;

[0011] Inputting the first training text into the text encoder for training until a first preset number of training times is reached;

[0012] The second training text is input into the text feature construction layer, and the first text target feature of the second training text output by the text feature construction layer is obtained.

[0013] In one embodiment, the acquiring of multimodal target features further includes:

[0014] The image encoder includes an image feature construction layer;

[0015] Inputting the first training image into the image encoder for training until a second preset number of training times is reached;

[0016] The second training image is input into the image feature construction layer, and the first image target feature of the second training image output by the image feature construction layer is obtained.

[0017] In one embodiment, performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature includes:

[0018] The text encoder further comprises a first text transformer layer and a second text transformer layer, and the image encoder further comprises a first image transformer layer and a second image transformer layer;

[0019] The text encoder is set as a teacher model, the image encoder is set as a student model, and the first image target feature is distilled using the first text target feature to obtain a first distilled image feature;

[0020] The image encoder is set as a teacher model, the text encoder is set as a student model, and the first-level distillation image feature is used to perform first-level distillation on the first text target feature to obtain a first-level distillation text feature;

[0021] Inputting the first-level distilled text features into the first text transformer layer to obtain second text target features;

[0022] Inputting the first-level distilled image features into the first image transformer layer to obtain second image target features;

[0023] The text encoder is set as a teacher model, the image encoder is set as a student model, and the second image target feature is subjected to secondary distillation using the second text target feature to obtain a secondary distilled image feature;

[0024] The image encoder is set as a teacher model, the text encoder is set as a student model, and the second text target feature is subjected to second-level distillation using the second-level distillation image feature to obtain a second-level distillation text feature;

[0025] Inputting the secondary distilled text features into the second text transformer layer to obtain a third text target feature;

[0026] Inputting the secondary distilled image features into the second image transformer layer to obtain a third image target feature;

[0027] The text encoder is set as a teacher model, the image encoder is set as a student model, and the third image target feature is subjected to three-level distillation using the third text target feature to obtain a three-level distilled image feature;

[0028] The image encoder is set as a teacher model, the text encoder is set as a student model, and the third text target feature is subjected to three-level distillation using the three-level distilled image feature to obtain a three-level distilled text feature.

[0029] In one embodiment, the step of inputting the second training text into the text feature construction layer to obtain the first text target feature of the second training text output by the text feature construction layer includes:

[0030] Segment any second training text into a plurality of characters;

[0031] Normalize the identifier embedding vectors, position embedding vectors, and semantic embedding vectors of all characters to obtain the target identifier embedding vector, target position embedding vector, and target semantic embedding vector;

[0032] A first text target feature of any second training text is obtained according to the target identifier embedding vector, the target position embedding vector and the target semantic embedding vector.

[0033] In one embodiment, inputting the second training image into the image feature construction layer to obtain the first image target feature of the second training image output by the image feature construction layer includes:

[0034] Segmenting any second training image into a plurality of pixels;

[0035] The first image target feature of any second training image is obtained according to the feature embedding vectors and semantic embedding vectors of all pixels.

[0036] In one embodiment, the step of fusing all distilled features to obtain a multimodal feature fusion label includes:

[0037] The three-level distilled text features and the three-level distilled image features are fused to obtain a multimodal feature fusion label.

[0038] In a second aspect, an embodiment of the present application provides a multimodal feature fusion learning device, comprising:

[0039] The target feature acquisition module is used to: acquire multimodal target features;

[0040] A multi-level mutual distillation module is used to: perform multi-level mutual distillation on the multi-modal target features to obtain distillation features corresponding to each modal target feature;

[0041] The feature fusion module is used to fuse all distilled features to obtain a multimodal feature fusion label.

[0042] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the multimodal feature fusion learning method described in the first aspect are implemented.

[0043] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the multimodal feature fusion learning method described in the first aspect.

[0044] The multimodal feature fusion learning method and device provided in the present application obtain multimodal target features, perform multi-level mutual distillation on the multimodal target features, obtain distillation features corresponding to each modal target feature, fuse all distillation features, and obtain multimodal feature fusion labels. Since the obtained multimodal target features are subjected to multi-level mutual distillation, the target features of any modality can be learned multiple times from the target features of other modalities, thereby improving the generalization ability of its own modality encoder, making the features finally extracted by the encoder more accurate, that is, effectively improving the extraction ability of multimodal features, which is conducive to the fusion of multimodal features. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 This is one of the flow charts of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0047] Figure 2 Schematic diagram of the encoder structure of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0048] Figure 3 This is the second flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0049] Figure 4 This is the third flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0050] Figure 5 This is the fourth flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0051] Figure 6 It is one of the schematic diagrams of the distillation of the instance relationship graph pattern in the multimodal feature fusion learning method provided in the embodiment of the present application;

[0052] Figure 7 This is the second schematic diagram of the distillation of the instance relationship graph pattern in the multimodal feature fusion learning method provided in the embodiment of the present application;

[0053] Figure 8 It is a structural diagram of a multimodal feature fusion learning device provided in an embodiment of the present application;

[0054] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] Figure 1 This is one of the flow charts of the multimodal feature fusion learning method provided in the embodiment of the present application. Figure 1 , the present application embodiment provides a multimodal feature fusion learning method, which may include:

[0057] 101. Obtain multimodal target features;

[0058] 102. Perform multi-level mutual distillation on the multi-modal target features to obtain distillation features corresponding to each modal target feature;

[0059] 103. Fuse all distilled features to obtain multimodal feature fusion labels.

[0060] In step 101, the multimodal target feature is a target feature obtained from the multimodal data.

[0061] In step 102, multi-level mutual distillation is performed, that is, at each level of distillation, the target features of any two modalities learn from each other to improve the generalization ability of the own modality encoder.

[0062] The multimodal feature fusion learning method provided in this embodiment obtains multimodal target features, performs multi-level mutual distillation on the multimodal target features, obtains distillation features corresponding to each modal target feature, fuses all distillation features, and obtains multimodal feature fusion labels. Since the obtained multimodal target features are subjected to multi-level mutual distillation, the target features of any modality can be learned multiple times from the target features of other modalities, thereby improving the generalization ability of the own modality encoder, making the features finally extracted by the encoder more accurate, that is, effectively improving the extraction ability of multimodal features, which is conducive to the fusion of multimodal features.

[0063] Figure 2 Schematic diagram of the encoder structure of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0064] Figure 3 This is the second flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application.

[0065] Reference Figures 2 to 3 In one embodiment, obtaining multimodal target features may include:

[0066] The text encoder includes a text feature construction layer;

[0067] 301. Input a first training text into a text encoder for training until a first preset number of training times is reached;

[0068] 302. Input the second training text into the text feature construction layer, and obtain the first text target feature of the second training text output by the text feature construction layer.

[0069] In step 301, the first preset number of training times can be set according to actual conditions and is not limited here. In this embodiment, the first preset number of training times can be 5 times, that is, the first training text is input into the text encoder, and the text encoder is trained 5 times so that the text encoder can obtain text feature extraction capabilities.

[0070] Specifically, step 302 may include:

[0071] 302a, dividing any second training text into a plurality of characters;

[0072] 302b, normalizing the identifier embedding vectors, position embedding vectors, and semantic embedding vectors of all characters to obtain a target identifier embedding vector, a target position embedding vector, and a target semantic embedding vector;

[0073] 302c. Obtain a first text target feature of the second training text according to the target identifier embedding vector, the target position embedding vector and the target semantic embedding vector.

[0074] In step 302a, assuming that any second training text is a patient's self-description of his or her condition "severe cough with phlegm", the text is segmented into multiple characters, such as "cough", "have", "phlegm", etc.

[0075] In step 302b, a vocabulary can be used to encode any character into a corresponding identifier, and then the identifier, the sorting position of the character corresponding to the identifier in the text, and the semantics of the character corresponding to the identifier are embedded into a vector to obtain the identifier embedding vector, position embedding vector and semantic embedding vector of any character.

[0076] Normalize the identifier embedding vectors of all characters in the text to obtain the target identifier embedding vector;

[0077] Normalize the position embedding vectors of all characters in the text to obtain the target position embedding vector;

[0078] The semantic embedding vectors of all characters in the text are normalized to obtain the target semantic embedding vector.

[0079] In step 302c, the target features of any character of the second training text are composed of the target identifier embedding vector, target position embedding vector and target semantic embedding vector corresponding to the character, and the first text target features of the second training text are composed of the target features of all characters.

[0080] It should be noted that, refer to Figure 2 After obtaining the first text target feature of the second training text, the first text target feature can also be input into the long short-term memory network to solve the problem that when the second training text is long, the text encoder may miss more first text target features, that is, the gradient disappearance problem. In addition, Figure 2 CLS, MASK and SEP in the text are all text delimiters. CLS indicates the beginning of the text, MASK indicates the masking of characters, and SEP indicates the separation of two sentences.

[0081] This embodiment divides any second training text into characters, uses the character's target identifier embedding vector, target position embedding vector and target semantic embedding vector to represent the character's target features, and then combines the target features of all characters into the first text target features of the second training text. By fully mining the character features at specific positions, the target features of the entire text can be fully mined.

[0082] Figure 4 This is the third flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application; Figure 2 and Figure 4 In one embodiment, obtaining multimodal target features may further include:

[0083] The image encoder includes an image feature construction layer;

[0084] 401. Input a first training image into an image encoder for training until a second preset number of training times is reached;

[0085] 402. Input the second training image into the image feature construction layer to obtain the first image target feature of the second training image output by the image feature construction layer.

[0086] In step 401, the second preset number of training times can be set according to actual conditions and is not limited here. In this embodiment, the second preset number of training times can be 5 times, that is, the first training image is input into the image encoder, and the image encoder is trained 5 times so that the image encoder can obtain image feature extraction capabilities.

[0087] Specifically, step 402 may include:

[0088] 402a, dividing any second training image into a plurality of pixels;

[0089] 402b. Obtain the first image target feature of the second training image according to the feature embedding vectors and semantic embedding vectors of all pixels.

[0090] In step 402a, assuming that any second training image is a CT image of a patient, the image is segmented into a plurality of pixels.

[0091] In step 402b, the CNN visual backbone network ResNet can be used to extract the features of the image, and then the features of the image are flattened along the spatial dimension to obtain the features of any pixel, and then the features of the pixel and the semantics of the pixel are embedded in a vector to obtain the feature embedding vector and the semantic embedding vector of the pixel. The target features of any pixel of the second training image are composed of the feature embedding vector and the semantic embedding vector corresponding to the pixel, and the target features of the first image of the second training image are composed of the target features of all pixels.

[0092] It should be noted that, refer to Figure 2 After using the CNN visual backbone network ResNet to extract the features of the image, the image features can also be input into the pooling layer for pooling and then the pixel features can be obtained to reduce the dimension of the features, reduce the number of parameters in the network, suppress noise, avoid overfitting, and improve the calculation speed and operation efficiency of the model.

[0093] This embodiment divides any second training image into pixels, uses the feature embedding vector and semantic embedding vector of the pixels to represent the target features of the pixels, and then combines the target features of all pixels into the first image target features of the second training image. By fully mining the pixel features, the target features of the entire image can be fully mined.

[0094] Figure 5 This is the fourth flow chart of the multimodal feature fusion learning method provided in the embodiment of the present application;

[0095] Figure 6 It is one of the schematic diagrams of the distillation of the instance relationship graph pattern in the multimodal feature fusion learning method provided in the embodiment of the present application;

[0096] Figure 7 This is the second schematic diagram of the instance relationship graph pattern distillation in the multimodal feature fusion learning method provided in the embodiment of the present application.

[0097] Reference Figure 2 and Figure 5 In one embodiment, performing multi-level mutual distillation on the multi-modal target features to obtain the distillation features corresponding to each modal target feature may include:

[0098] The text encoder further comprises a first text transformer layer and a second text transformer layer, and the image encoder further comprises a first image transformer layer and a second image transformer layer;

[0099] 501. Set the text encoder as a teacher model, set the image encoder as a student model, and use the first text target feature to perform a first-level distillation on the first image target feature to obtain a first-level distilled image feature;

[0100] 502. Setting the image encoder as a teacher model and the text encoder as a student model, performing a first-level distillation on the first text target feature using the first-level distilled image feature to obtain a first-level distilled text feature;

[0101] 503. Input the first-level distilled text features into the first text transformer layer to obtain the second text target features;

[0102] 504. Input the first-level distilled image features into the first image transformer layer to obtain second image target features;

[0103] 505. Setting the text encoder as a teacher model, setting the image encoder as a student model, and performing secondary distillation on the second image target feature using the second text target feature to obtain a secondary distilled image feature;

[0104] 506. Setting the image encoder as a teacher model, setting the text encoder as a student model, and performing secondary distillation on the second text target feature using the secondary distillation image feature to obtain a secondary distillation text feature;

[0105] 507. Input the secondary distilled text features into the second text transformer layer to obtain the third text target features;

[0106] 508. Input the secondary distilled image features into the second image transformer layer to obtain a third image target feature;

[0107] 509. Setting the text encoder as a teacher model, setting the image encoder as a student model, and performing three-level distillation on the third image target feature using the third text target feature to obtain a three-level distilled image feature;

[0108] 510. Set the image encoder as the teacher model, set the text encoder as the student model, and use the three-level distilled image features to perform three-level distillation on the third text target features to obtain three-level distilled text features.

[0109] In step 501 to step 502, the student model will learn the knowledge of the teacher model to improve the generalization ability of its own model, and then improve its own model's ability to extract features. By setting the text encoder and the image encoder as the teacher model and the student model alternately, the two encoders can learn from each other and simultaneously improve the feature extraction capabilities of the two encoders.

[0110] In this embodiment, the instance relationship graph mode can be used in the first-level distillation. Taking the text encoder as the teacher model and the image encoder as the student model as an example, assuming that the first text target feature is composed of the target features of four characters, the first text target feature can be expressed as Figure 6 In the form of, nodes VT1, VT2, VT3 and VT4 respectively represent the target features of four characters in the first text target feature, and the connection between any two nodes, that is, the relationship edge, represents the association relationship between the two characters.

[0111] Similarly, assuming that the first image target feature is composed of the feature embedding vector and the semantic embedding vector of four pixels, the first image target feature can also be expressed as Figure 6 The distilled relationship between the first text target feature and the first image target feature can be expressed as Figure 7 As shown, VM1, VM2, VM3 and VM4 respectively represent target features of four pixels in the first image target feature.

[0112] Then the formula for the first-level distillation of the first text target feature to the first image target feature can be expressed as follows:

[0113] LIRG =λ1·∑ i ||VT i -VM i ||2+λ2·∑ j ∑ k ||AT jk -AM jk ||2;

[0114] Among them, i=1...n1, j=1...(n1-1), k=2...n1, and j<k, n1 is the number of characters and the number of pixels, and in this embodiment, n1=4.

[0115] Among them, L IRG is the difference between the first text target feature and the first image target feature, λ1 and λ2 are loss coefficients, and ||VT i -VM i ||2 is the Euclidean distance between the target feature of the character and the target feature of the corresponding pixel, AT is the association relationship between the target features of the characters, AM is the association relationship between the target features of the pixels, ||AT jk -AM jk ||2 is the Euclidean distance between the association relationship between the target features of the characters and the association relationship between the target features of the corresponding pixels.

[0116] Among them, AT jk Defined as VT j With VT k The Euclidean distance, AM jk Defined as a VM j With VM k The Euclidean distance of .

[0117] The goal of primary distillation is to make L IRG Minimum, by adjusting the parameters of the image encoder, when L IRG When it is the smallest, the first text target feature performs a first-level distillation on the first image target feature. At this time, the first image target feature is the first-level distilled image feature.

[0118] The process of performing a first-level distillation on the first text target feature using the first-level distilled image feature to obtain the first-level distilled text feature is similar to the aforementioned distillation process and will not be repeated here.

[0119] In step 503 to step 504, refer to Figure 2 , the first text transformer layer includes a first text self-attention layer and a first text cross-attention layer, and the first image transformer layer includes a first image self-attention layer and a first image cross-attention layer.

[0120] Assuming that the first-level distilled text feature is X, after X is input into the first text self-attention layer, the following operations will be performed:

[0121]

[0122] Q=X·W Q ;

[0123] K=X·W K ;

[0124] V=X·W V ;

[0125] Among them, Z′ is the output feature of the first text self-attention layer, d k is the dimension size of K, W Q , W K and W V There are three trainable parameter matrices. X is multiplied by these three parameter matrices, which is equivalent to undergoing a linear transformation.

[0126] The first text self-attention layer does not use X directly, but uses Q, K, and V generated by matrix multiplication to obtain output features, which can enhance the fitting ability of the first text self-attention layer. Q and K r Multiply them together to generate a similarity matrix, and divide each element of the similarity matrix by √d k , when d k When it is very large, Q and K T The product variance becomes larger, divided by √d k It can reduce the variance and make the gradient update more stable during the operation.

[0127] Assuming that the first-level distilled image feature is Y, after Y is input into the first image self-attention layer, after similar operations, the output feature Y′ of the first image self-attention layer can be obtained.

[0128] Then input X′ and Y′ into the first cross-attention layer for the following calculation:

[0129]

[0130] Q′=Y′·W Q′ ;

[0131] K′=X′·W K′ ;

[0132] V′=X′·W V′ ;

[0133] Among them, X″ is the output feature of the first text cross-attention layer, that is, the second text target feature, d k ′ is the dimension size of K′, W Q′ , WK′ and W V′ There are also three trainable parameter matrices.

[0134] First, the cross-attention layer of this paper uses the output feature Y′ of the first image self-attention layer as the parameter to calculate Q′, realizing the multimodal interaction between text features and image features.

[0135] Similarly, the first image cross-attention layer can also perform similar operations on the output feature X′ of the first text self-attention layer, and finally obtain the second image target feature Y″, realizing the multimodal interaction of image features and text features.

[0136] In step 505 to step 506, the second text target feature X″ and the second image target feature Y″ can be secondary distilled in the fully connected layer using the same method as step 501 to step 502 to obtain secondary distilled text feature X″′ and secondary distilled image feature Y″′.

[0137] In step 507 to step 508, the structure of the second text transformer layer is the same as that of the first text transformer layer, and the structure of the second image transformer layer is the same as that of the first image transformer layer. Therefore, the secondary distilled text feature X″′ passes through the second text self-attention layer and the second text cross-attention layer of the second text transformer layer to obtain the third text target feature X IV , the second-level distilled image feature Y″′ passes through the second image self-attention layer and the second image cross-attention layer of the second image transformer layer to obtain the third image target feature Y IV .

[0138] In step 509 to step 510, a conventional distillation method can be used to perform three-level distillation on the third text target feature and the third image target feature, and the gap between the third text target feature and the third image target feature is measured using KL divergence, and the parameters of the text encoder and the image encoder are adjusted to minimize the KL divergence, thereby obtaining the three-level distilled text feature X V and three-level distillation image features Y V .

[0139] It should be noted that, in actual applications, the execution order of step 501 and step 502 can be interchanged, depending on the specific situation; the execution order of step 505 and step 506 can be interchanged, depending on the specific situation; the execution order of step 509 and step 510 can be interchanged, depending on the specific situation.

[0140] Furthermore, the three-level distilled text features and the three-level distilled image features are fused to obtain a multimodal feature fusion label.

[0141] This embodiment performs three-level mutual distillation and two cross-attention layer interactions on the first text target feature and the first image target feature, so that the interaction of multimodal features runs through the entire process of the text encoder and the image encoder, which improves the interactive ability of the encoder while greatly improving the feature extraction ability of the text encoder and the image encoder, which is conducive to the fusion of multimodal features.

[0142] The multimodal feature fusion learning device provided in an embodiment of the present application is described below. The multimodal feature fusion learning device described below and the multimodal feature fusion learning method described above can be referenced to each other.

[0143] Figure 8 Schematic diagram of the structure of the multimodal feature fusion learning device provided in the embodiment of the present application. Figure 8 , the embodiment of the present application provides a multimodal feature fusion learning device, which may include:

[0144] The target feature acquisition module 801 is used to: acquire multimodal target features;

[0145] The multi-level mutual distillation module 802 is used to: perform multi-level mutual distillation on the multi-modal target features to obtain distillation features corresponding to each modal target feature;

[0146] The feature fusion module 803 is used to fuse all distilled features to obtain a multimodal feature fusion label.

[0147] The multimodal feature fusion learning device provided in this embodiment obtains multimodal target features, performs multi-level mutual distillation on the multimodal target features, obtains distillation features corresponding to each modal target feature, fuses all distillation features, and obtains a multimodal feature fusion label. Since the obtained multimodal target features are subjected to multi-level mutual distillation, the target features of any modality can be learned multiple times from the target features of other modalities, thereby improving the generalization ability of its own modality encoder, making the features finally extracted by the encoder more accurate, that is, effectively improving the extraction ability of multimodal features, which is conducive to the fusion of multimodal features.

[0148] In one embodiment, the target feature acquisition module 801 is specifically used for:

[0149] The text encoder includes a text feature construction layer;

[0150] Inputting the first training text into the text encoder for training until a first preset number of training times is reached;

[0151] The second training text is input into the text feature construction layer, and the first text target feature of the second training text output by the text feature construction layer is obtained.

[0152] In one embodiment, the target feature acquisition module 801 is specifically used for:

[0153] The image encoder includes an image feature construction layer;

[0154] Inputting the first training image into the image encoder for training until a second preset number of training times is reached;

[0155] The second training image is input into the image feature construction layer, and the first image target feature of the second training image output by the image feature construction layer is obtained.

[0156] In one embodiment, the multi-stage inter-distillation module 802 is specifically used for:

[0157] The text encoder further comprises a first text transformer layer and a second text transformer layer, and the image encoder further comprises a first image transformer layer and a second image transformer layer;

[0158] The text encoder is set as a teacher model, the image encoder is set as a student model, and the first image target feature is distilled using the first text target feature to obtain a first distilled image feature;

[0159] The image encoder is set as a teacher model, the text encoder is set as a student model, and the first-level distillation image feature is used to perform first-level distillation on the first text target feature to obtain a first-level distillation text feature;

[0160] Inputting the first-level distilled text features into the first text transformer layer to obtain second text target features;

[0161] Inputting the first-level distilled image features into the first image transformer layer to obtain second image target features;

[0162] The text encoder is set as a teacher model, the image encoder is set as a student model, and the second image target feature is subjected to secondary distillation using the second text target feature to obtain a secondary distilled image feature;

[0163] The image encoder is set as a teacher model, the text encoder is set as a student model, and the second text target feature is subjected to second-level distillation using the second-level distillation image feature to obtain a second-level distillation text feature;

[0164] Inputting the secondary distilled text features into the second text transformer layer to obtain a third text target feature;

[0165] Inputting the secondary distilled image features into the second image transformer layer to obtain a third image target feature;

[0166] The text encoder is set as a teacher model, the image encoder is set as a student model, and the third image target feature is subjected to three-level distillation using the third text target feature to obtain a three-level distilled image feature;

[0167] The image encoder is set as a teacher model, the text encoder is set as a student model, and the third text target feature is subjected to three-level distillation using the three-level distilled image feature to obtain a three-level distilled text feature.

[0168] In one embodiment, the target feature acquisition module 801 is specifically used for:

[0169] Segment any second training text into a plurality of characters;

[0170] Normalize the identifier embedding vectors, position embedding vectors, and semantic embedding vectors of all characters to obtain the target identifier embedding vector, target position embedding vector, and target semantic embedding vector;

[0171] A first text target feature of any second training text is obtained according to the target identifier embedding vector, the target position embedding vector and the target semantic embedding vector.

[0172] In one embodiment, the target feature acquisition module 801 is specifically used for:

[0173] Segmenting any second training image into a plurality of pixels;

[0174] The first image target feature of any second training image is obtained according to the feature embedding vectors and semantic embedding vectors of all pixels.

[0175] In one embodiment, the feature fusion module 803 is specifically used for:

[0176] The three-level distilled text features and the three-level distilled image features are fused to obtain a multimodal feature fusion label.

[0177] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call a computer program in the memory 930 to execute the steps of the multimodal feature fusion learning method, for example including:

[0178] Acquire multimodal target features;

[0179] Performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature;

[0180] All distilled features are fused to obtain multimodal feature fusion labels.

[0181] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable 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 application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0182] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the multimodal feature fusion learning method provided in the above embodiments, for example, including:

[0183] Acquire multimodal target features;

[0184] Performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature;

[0185] All distilled features are fused to obtain multimodal feature fusion labels.

[0186] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the methods provided in the above embodiments, for example, including:

[0187] Acquire multimodal target features;

[0188] Performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature;

[0189] All distilled features are fused to obtain multimodal feature fusion labels.

[0190] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0191] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0192] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A multimodal feature fusion learning method, characterized in that: include: Acquire multimodal target features; Performing multi-level mutual distillation on the multimodal target features to obtain distillation features corresponding to each modal target feature; All distilled features are fused to obtain multimodal feature fusion labels.

2. The multimodal feature fusion learning method according to claim 1, characterized in that: The acquiring of multimodal target features comprises: The text encoder includes a text feature construction layer; Inputting the first training text into the text encoder for training until a first preset number of training times is reached; The second training text is input into the text feature construction layer, and the first text target feature of the second training text output by the text feature construction layer is obtained.

3. The multimodal feature fusion learning method according to claim 2, characterized in that: The acquiring of multimodal target features further includes: The image encoder includes an image feature construction layer; Inputting the first training image into the image encoder for training until a second preset number of training times is reached; The second training image is input into the image feature construction layer to obtain the first image target feature of the second training image output by the image feature construction layer.

4. The multimodal feature fusion learning method according to claim 3, characterized in that: The multi-level mutual distillation of the multi-modal target features to obtain the distillation features corresponding to each modal target feature includes: The text encoder further comprises a first text transformer layer and a second text transformer layer, and the image encoder further comprises a first image transformer layer and a second image transformer layer; The text encoder is set as a teacher model, the image encoder is set as a student model, and the first image target feature is distilled using the first text target feature to obtain a first distilled image feature; The image encoder is set as a teacher model, the text encoder is set as a student model, and the first-level distillation image feature is used to perform first-level distillation on the first text target feature to obtain a first-level distillation text feature; Inputting the first-level distilled text features into the first text transformer layer to obtain second text target features; Inputting the first-level distilled image features into the first image transformer layer to obtain second image target features; The text encoder is set as a teacher model, the image encoder is set as a student model, and the second image target feature is subjected to secondary distillation using the second text target feature to obtain a secondary distilled image feature; The image encoder is set as a teacher model, the text encoder is set as a student model, and the second text target feature is subjected to second-level distillation using the second-level distillation image feature to obtain a second-level distillation text feature; Inputting the secondary distilled text features into the second text transformer layer to obtain a third text target feature; Inputting the secondary distilled image features into the second image transformer layer to obtain a third image target feature; The text encoder is set as a teacher model, the image encoder is set as a student model, and the third image target feature is subjected to three-level distillation using the third text target feature to obtain a three-level distilled image feature; The image encoder is set as a teacher model, the text encoder is set as a student model, and the third text target feature is subjected to three-level distillation using the three-level distilled image feature to obtain a three-level distilled text feature.

5. The multimodal feature fusion learning method according to claim 2, characterized in that: The step of inputting the second training text into the text feature construction layer to obtain the first text target feature of the second training text output by the text feature construction layer includes: Segment any second training text into a plurality of characters; Normalize the identifier embedding vectors, position embedding vectors, and semantic embedding vectors of all characters to obtain the target identifier embedding vector, target position embedding vector, and target semantic embedding vector; A first text target feature of any second training text is obtained according to the target identifier embedding vector, the target position embedding vector and the target semantic embedding vector.

6. The multimodal feature fusion learning method according to claim 3, characterized in that: The step of inputting the second training image into the image feature construction layer to obtain the first image target feature of the second training image output by the image feature construction layer includes: Segmenting any second training image into a plurality of pixels; The first image target feature of any second training image is obtained according to the feature embedding vectors and semantic embedding vectors of all pixels.

7. The multimodal feature fusion learning method according to claim 4, characterized in that: The fusion of all distilled features to obtain a multimodal feature fusion label includes: The three-level distilled text features and the three-level distilled image features are fused to obtain a multimodal feature fusion label.

8. A multimodal feature fusion learning device, characterized in that: include: The target feature acquisition module is used to: acquire multimodal target features; A multi-level mutual distillation module is used to: perform multi-level mutual distillation on the multi-modal target features to obtain a distillation feature corresponding to each modal target feature; The feature fusion module is used to fuse all distilled features to obtain a multimodal feature fusion label.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the multimodal feature fusion learning method described in any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the multimodal feature fusion learning method according to any one of claims 1 to 7 are implemented.