Multi-modal knowledge graph completion method and system based on cross-view contrast learning
By integrating multimodal information through cross-perspective contrastive learning, multimodal knowledge representations with semantic similarity are generated, solving the problem of inconsistent representations in multimodal knowledge graphs and achieving more accurate entity representation and prediction.
Patent Information
- Application Number
- CN202410456318.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-04-16
AI Technical Summary
Existing multimodal knowledge graph completion methods fail to effectively integrate multimodal information, resulting in inconsistent and incomplete representations and an inability to fully understand multimodal information.
By employing a cross-perspective contrastive learning approach, multi-perspective knowledge embedding, relation-aware information aggregation, multi-modal knowledge contrastive learning, and relation-aware decision fusion are used to generate multi-modal knowledge representations with semantic similarity, reduce modal heterogeneity and noise, capture effective information from multi-relational heterogeneous graphs, and generate more discriminative entity representations.
It achieves the integrity and consistency of multimodal knowledge graphs, improves the discriminativeness and prediction accuracy of entity representations, and reduces interference and noise between modalities.
Smart Images

Figure CN118364901B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, specifically to a multimodal knowledge graph completion method and system based on cross-perspective comparative learning. Background Technology
[0002] The rise of multimodal knowledge graphs stems from the increasingly rich real-world scenarios of multimodal data, including image and video sharing on social media, the proliferation of smart devices, and the large-scale collection of sensor data. This trend has spurred the development of multimodal knowledge graphs, which integrate data from multiple media types into a unified knowledge representation, enabling a more comprehensive understanding and processing of multimodal information. Multimodal knowledge graphs have wide applications across various fields, including cross-media search and retrieval, multimodal question answering systems, multimodal sentiment analysis, image and video content recommendation, social media analytics, healthcare, intelligent transportation systems, and education, providing powerful support for a variety of tasks.
[0003] However, knowledge graphs are often incomplete because the complexity, diversity, and variability of knowledge make it impossible to cover all knowledge in the real world. To bridge this gap, knowledge graph completion tasks aim to discover missing triples in the knowledge graph. For example, given a head entity and a relation (h,r), predict the tail entity t. To date, various reasoning methods for knowledge graph completion have been proposed. The key idea of these methods is to infer new knowledge by effectively integrating existing information in the graph. However, existing schemes often neglect the heterogeneity and diversity in multimodal information, leading to inconsistent and incomplete multimodal representations, thus necessitating the development of this proposed solution. Summary of the Invention
[0004] The purpose of this invention is to provide a multimodal knowledge graph completion method and system based on cross-perspective comparative learning, so as to solve at least one of the technical problems existing in the background art.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a multimodal knowledge graph completion method based on cross-perspective contrastive learning, comprising:
[0007] Multi-view knowledge embedding obtains multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information;
[0008] Relationship-aware information aggregation enables representation learning of heterogeneous graphs with multiple relationships by capturing effective information from different modalities.
[0009] Multimodal knowledge contrastive learning, by making full use of the diversity of multimodal information in knowledge graphs, enables cross-modal knowledge understanding and generates more discriminative entity representations;
[0010] Relationship-aware decision fusion generates corresponding modality weights and combines decision scores from different modalities.
[0011] Further, multi-perspective knowledge extraction processing includes:
[0012] The CLIP cross-modal model extracts visual and textual multimodal representations from entities in a knowledge graph, capturing the overall semantic consistency and relationships between text and images, making text descriptions and image content closer in a shared feature space.
[0013] After acquiring multimodal representations, a pooling-based prototype learning module is used to learn enhanced visual feature representations for multiple visual features of an entity. By learning the optimal strategy for aggregating visual features, multiple visual features with a lot of noise are aligned with the textual features of the entity, thereby focusing on specific semantics and reducing the influence of noise from irrelevant visual elements.
[0014] Furthermore, adopting the ideas from CLIP, we maximize the similarity of matched image-text pairs and minimize the similarity of mismatched image-text pairs, aligning the visual aggregation features and text features of entities.
[0015] Furthermore, the relation-aware information aggregation includes: calculating relation-aware attention to measure the importance of neighboring entities; and using the aggregation function of relation-aware attention to aggregate relevant neighboring entity information and update the entity representation in the current modality.
[0016] Furthermore, multimodal knowledge comparison learning includes: narrowing the distance between the structure and text information, and between visual and text information of the same entity through intermodal comparison learning, so as to reduce mutual interference between modalities and retain specific information within each modality; and using intramodal knowledge alignment modules to narrow the embedding of the same entities within each modality.
[0017] Furthermore, relationship-aware decision fusion includes: dividing the data into subsets according to relationship type, generating corresponding modal weights, and finally combining decision scores from different modalities.
[0018] Secondly, this invention provides a multimodal knowledge graph completion system based on cross-perspective contrastive learning, comprising:
[0019] A multi-view knowledge embedding module is used to obtain multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information;
[0020] The relation-aware information aggregation module is used to achieve representation learning of multi-relation heterogeneous graphs by capturing effective information from different modalities;
[0021] The knowledge comparison learning module is used to achieve cross-modal knowledge understanding and generate more discriminative entity representations by making full use of the diversity of multimodal information in the knowledge graph.
[0022] Relationship-aware decision fusion is used to generate corresponding modality weights and combine decision scores from different modalities.
[0023] Thirdly, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the multimodal knowledge graph completion method based on cross-perspective contrastive learning as described in the first aspect.
[0024] Fourthly, the present invention provides a computer device including a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the multimodal knowledge graph completion method based on cross-view contrastive learning as described in the first aspect.
[0025] Fifthly, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the multimodal knowledge graph completion method based on cross-perspective contrastive learning as described in the first aspect.
[0026] The beneficial effects of this invention are: generating multi-view representations of entities and handling heterogeneity between modalities and irrelevant information therein; flexibly capturing effective information within each modality through an information aggregation module; obtaining entity representations for cross-modal understanding using contrastive learning; and integrating predictions from different modalities for final decision-making through a decision fusion module.
[0027] The advantages of additional aspects of the invention will be set forth more clearly in the following description or will be learned by practice of the invention. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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 creative effort.
[0029] Figure 1This is a block diagram of the overall system for multimodal knowledge graph completion based on cross-perspective comparative learning as described in an embodiment of the present invention.
[0030] Figure 2 This is a flowchart of the graphic and text interaction alignment module according to an embodiment of the present invention.
[0031] Figure 3 This is a flowchart illustrating the knowledge comparison and learning process described in an embodiment of the present invention. Detailed Implementation
[0032] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0033] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0034] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as here.
[0035] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.
[0036] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0037] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0038] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.
[0039] Example 1
[0040] In this embodiment 1, a multimodal knowledge graph completion system based on cross-view comparative learning is first provided, including: a multi-view knowledge embedding module, used to obtain multimodal knowledge representations with semantic similarity and reduce noise introduced by modal heterogeneity and irrelevant information; a relation-aware information aggregation module, used to achieve representation learning of multi-relational heterogeneous graphs by capturing effective information in different modalities; a knowledge comparative learning module, used to achieve cross-modal knowledge understanding and generate more discriminative entity representations by making full use of the diversity of multimodal information in the knowledge graph; and a relation-aware decision fusion module, used to generate corresponding modal weights and combine decision scores of different modalities.
[0041] In this embodiment, the above-described system is used to implement a multimodal knowledge graph completion method based on cross-view comparative learning, including: Step (1) using a multi-view knowledge embedding module to reduce noise introduced by modal heterogeneity and irrelevant information, and to obtain multimodal knowledge representations with semantic similarity. Step (2) introducing a relation-aware information aggregation module to capture effective information from different modalities, thereby realizing representation learning of multi-relational heterogeneous graphs. Step (3) using a knowledge comparative learning module to fully utilize the diversity of multimodal information in the knowledge graph, thereby realizing cross-modal knowledge understanding and generating more discriminative entity representations. Step (4) using relation-aware decision fusion to generate corresponding modal weights and combine decision scores from different modalities.
[0042] Step (1) involves multi-perspective knowledge extraction and processing. The steps are as follows:
[0043] The CLIP cross-modal model extracts visual and textual multimodal representations from entities in a knowledge graph, capturing the overall semantic consistency and relationships between text and images, making text descriptions and image content more similar in a shared feature space.
[0044] After acquiring multimodal representations, a pooling-based prototype learning module is proposed to learn enhanced visual feature representations for multiple visual features of the entity. By learning the optimal strategy for aggregating visual features, multiple visual features with significant noise are aligned with the entity's textual features, thereby focusing on specific semantics and reducing the influence of noise from irrelevant visual elements. Here, The max represents the visual feature corresponding to the nth image of the i-th entity. k (·) represents the k-th maximum value after sorting, θ kThis represents the corresponding learnable weights. Simultaneously, adopting the ideas from CLIP, we maximize the similarity of matched image-text pairs and minimize the similarity of mismatched image-text pairs to align the visual aggregation features and textual features of entities.
[0045]
[0046]
[0047] Step (2) involves relation-aware information aggregation. The steps are as follows:
[0048] First, calculate the relation-aware attention a. ij This is used to measure the importance of neighboring entities. Here, h... i and h j Indicates the embedding of head and tail entities, r ij `||` represents relation embedding, and `||` represents the `concat` operation. The calculation formula is as follows:
[0049] e ij =W e [h i ||r ij ||h j ]
[0050]
[0051] Relationship-aware attention aggregation functions are used to aggregate information about relevant neighboring entities and update the entity representations in the current modality. Specifically, Let f(h) represent the learnable parameter matrix. i ,h j ) indicates aggregation h i and its neighbor h j The information is added, along with residual terms to enhance expressiveness. Update the relation matrix. The calculation formula is as follows:
[0052]
[0053] f(h i ,h j )=w1(h i -h j )+w2(h i ·h j )+w3h j
[0054]
[0055] The multimodal knowledge comparison learning in step (3) includes:
[0056] First, through intermodal contrastive learning, the distance between structural and textual information, and visual and textual information of the same entity is narrowed to reduce intermodal interference and preserve specific information within each modality. Here, i∈I={1...N} is the positive sample index, and j∈A(i)≡I\{i} is the negative sample index. Modal pairs p,q∈M={(V,T),(S,T)} represent the visual-text contrastive modality and the structural-text contrastive modality, respectively. The symbol · represents the dot product. This is a scalar temperature parameter. The intermodal contrast loss is calculated as follows:
[0057]
[0058] Then, intramodal knowledge is used to align modules, bringing the embeddings of identical entities within different modalities closer together. Here, Let |P(i)| represent the set of indices of the same class as the positive sample in a batch, and |P(i)| represent the cardinality of the set P(i). m∈M={S,V,T} represent the structural modality, visual modality, and text modality, respectively. It is h u The conjugate complex number of . The intramodal contrast loss is calculated as follows:
[0059]
[0060]
[0061] The relation-aware decision fusion in step (4) includes: first, dividing the data into subsets according to relation types and generating corresponding modal weights; and finally, combining the decision scores of different modalities. The algorithm is described using pseudocode, as shown in Algorithm 1.
[0062]
[0063] Example 2
[0064] To fully utilize the effective information between different modalities, this embodiment 2 proposes a cross-view comparative learning model for multimodal knowledge graph completion. The overall system framework diagram of this embodiment is attached. Figure 1 As shown, the system consists of four key modules: (1) Multi-view knowledge embedding: First, multi-view representations of entities are generated, and heterogeneity between modalities and irrelevant information are processed; (2) Information aggregation: Effective information within each modality is flexibly captured through the information aggregation module; (3) Knowledge contrastive learning: Entity representations for cross-modal understanding are obtained using contrastive learning; (4) Decision fusion: Different modal predictions are integrated through the decision fusion module to make the final decision. The modules of the system are described below:
[0065] Multi-perspective knowledge embedding, including:
[0066] (1) Multi-view knowledge embedding encoder
[0067] First, we introduce pre-trained encoders for different modalities to acquire multi-view information about entities, namely textual and visual information. In recent years, large-scale visual-language pre-trained models have attempted to learn the semantic relationships between images and text, thereby achieving multimodal understanding and generation. Benefiting from the massive amount of image-text pairs available online, visual-language pre-training can utilize the rich visual and textual information provided by these pairs to learn semantic alignment and associations between the two modalities. For example, CLIP is pre-trained on 400 million image-text pairs for tasks such as classification and retrieval. To fully extract complex knowledge, we employ CLIP as a multimodal encoder, which can obtain semantically similar visual and textual features of entities to supplement multimodal information.
[0068] (2) Image and text interaction alignment module
[0069] To address multiple visual features of entities, a text-image interaction alignment module is proposed. This module learns the optimal strategy for aggregating visual features that can be aligned with the text features of the entity, effectively leveraging visual knowledge and mitigating the impact of noise from irrelevant visual elements. Figure 2 As shown.
[0070] The relationship-aware information aggregation module includes:
[0071] To learn more effective knowledge from multimodal information, it is necessary to aggregate information in the neighborhoods of different modalities to enhance cross-modal understanding. An information aggregation module was designed to aggregate entity neighborhood information that conforms to the semantics of the current scene through relation-specific attention, so as to flexibly capture effective information of entities in different modalities.
[0072] Comparative learning of knowledge includes:
[0073] (1) Intermodal alignment module
[0074] The interaction of different modal information plays a crucial role in multimodal representation. Textual information is more direct than structural information, better reflecting the uniqueness and differences of entities. Structural information can provide neighborhood information, while image information can supplement textual descriptions. Therefore, these three types of information can mutually provide supervisory information to reveal more useful information, thereby obtaining effective entity representations for cross-modal understanding.
[0075] (2) Intramodal alignment module: An intramodal knowledge alignment module is proposed to bring the embedding of the same entities in different modalities closer together.
[0076] Specifically, the method described in this embodiment includes the following implementation steps:
[0077] Step (1) Relationship-aware decision fusion: In order to integrate predictions from different modalities, the correlation between relationships and modal importance is captured for decision fusion.
[0078] Step (1.1) Multi-view knowledge extraction. To fully extract complex knowledge, this system first uses the multi-modal pre-trained model CLIP to extract multi-modal features of entities, namely textual and visual information. To mitigate the influence of noise from irrelevant visual elements, multiple visual features of the entity are aggregated. Here, The max represents the visual feature corresponding to the nth image of the i-th entity. k (·) represents the k-th maximum value after sorting, θ k This represents the corresponding learnable weights. Simultaneously, adopting the ideas from CLIP, we maximize the similarity of matched image-text pairs and minimize the similarity of mismatched image-text pairs to align the visual aggregation features and textual features of entities.
[0079]
[0080]
[0081] Step (2) Relationship-Aware Information Aggregation: To flexibly capture effective information about entities in different modalities, the information aggregation module is used to aggregate entity neighborhood information that conforms to the semantics of the current scene through relationship-specific attention. The operation process is as follows:
[0082] Step (2.1) First, calculate the relation-aware attention a. ij This is used to measure the importance of neighboring entities. Here, h... i and h j Indicates the embedding of head and tail entities, r ij `||` represents relation embedding, and `||` represents the `concat` operation. The calculation formula is as follows:
[0083] e ij =W e [h i ||r ij ||h j ]
[0084]
[0085] Step (2.2) uses a relation-aware attention aggregation function to aggregate relevant neighbor entity information and update the entity representation in the current modality. Wherein, Let f(h) represent the learnable parameter matrix. i ,h j ) indicates aggregation h i and its neighbor h j The information is added, along with residual terms to enhance expressiveness. Update the relation matrix. The calculation formula is as follows:
[0086]
[0087] f(h i ,h j )=w1(h i -h j )+w2(h i ·h j )+w3h j
[0088]
[0089] Step (3) Knowledge Comparison Learning: To explore the intermodal and intramodal diversity of entities in multimodal information, the multimodal knowledge comparison learning module is used to align intermodal and intramodal knowledge. The operation process is as follows:
[0090] Step (3.1) first uses intermodal contrastive learning to narrow the distance between structural and textual information, and visual and textual information of the same entity, in order to reduce mutual interference between modalities and retain specific information within each modality. Here, i∈I={1...N} is the positive sample index, and j∈A(i)≡I\{i} is the negative sample index. Modal pairs p,q∈M={(V,T),(S,T)} represent the visual-text contrastive modality and the structural-text contrastive modality, respectively. The symbol · represents the dot product. This is a scalar temperature parameter. The intermodal contrast loss is calculated as follows:
[0091]
[0092] Step (3.2) then utilizes intramodal knowledge to align modules, thereby bringing the embeddings of identical entities within each modality closer together. Here, Let P(i) represent the set of indices of the same class as the positive sample in a batch, and |P(i)| represent the cardinality of the set P(i). m∈M={S,V,T} represent the structural modality, visual modality, and text modality, respectively. It is h u The conjugate complex number of . The intramodal contrast loss is calculated as follows:
[0093]
[0094]
[0095] Step (4) Relationship-Aware Decision Fusion: To integrate predictions from different modalities, the correlation between relationship and modality importance is captured for decision fusion. To better illustrate the entire training process of relationship-aware decision fusion, we describe it using pseudocode, as shown in Algorithm 1. Subsets are divided according to relationship type, and corresponding modality weights are generated. The combined decision scores for different modalities are:
[0096]
[0097] Example 3
[0098] This embodiment 3 provides a non-transitory computer-readable storage medium for storing computer instructions. When executed by a processor, the computer instructions implement the multimodal knowledge graph completion method based on cross-perspective contrastive learning as described above. The method includes:
[0099] Multi-view knowledge embedding obtains multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information;
[0100] Relationship-aware information aggregation enables representation learning of heterogeneous graphs with multiple relationships by capturing effective information from different modalities.
[0101] Multimodal knowledge contrastive learning, by making full use of the diversity of multimodal information in knowledge graphs, enables cross-modal knowledge understanding and generates more discriminative entity representations;
[0102] Relationship-aware decision fusion generates corresponding modality weights and combines decision scores from different modalities.
[0103] Example 4
[0104] This embodiment 4 provides a computer device, including a memory and a processor, wherein the processor and the memory communicate with each other, and the memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute the multimodal knowledge graph completion method based on cross-view contrastive learning as described above, the method including:
[0105] Multi-view knowledge embedding obtains multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information;
[0106] Relationship-aware information aggregation enables representation learning of heterogeneous graphs with multiple relationships by capturing effective information from different modalities.
[0107] Multimodal knowledge contrastive learning, by making full use of the diversity of multimodal information in knowledge graphs, enables cross-modal knowledge understanding and generates more discriminative entity representations;
[0108] Relationship-aware decision fusion generates corresponding modality weights and combines decision scores from different modalities.
[0109] Example 5
[0110] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions to implement the multimodal knowledge graph completion method based on cross-view contrastive learning as described above. The method includes:
[0111] Multi-view knowledge embedding obtains multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information;
[0112] Relationship-aware information aggregation enables representation learning of heterogeneous graphs with multiple relationships by capturing effective information from different modalities.
[0113] Multimodal knowledge contrastive learning, by making full use of the diversity of multimodal information in knowledge graphs, enables cross-modal knowledge understanding and generates more discriminative entity representations;
[0114] Relationship-aware decision fusion generates corresponding modality weights and combines decision scores from different modalities.
[0115] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0119] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solutions disclosed in the present invention, various modifications or variations that can be made by those skilled in the art without creative effort should be included within the scope of protection of the present invention.
Claims
1. A multimodal knowledge graph completion method based on cross-perspective contrastive learning, characterized in that, include: Multi-view knowledge embedding obtains multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information; Relationship-aware information aggregation, by capturing effective information from different modalities, enables representation learning of multi-relationship heterogeneous graphs, including: computation of relationship-aware attention. The importance of neighboring entities is measured using the following formula: in, and This indicates that the head and tail entities are embedded. Indicates relational embedding. This indicates the concat operation; The aggregation function of relation-aware attention is used to aggregate information about relevant neighboring entities and update the entity representation in the current modality. The calculation formula is as follows: in, This represents the learnable parameter matrix. Indicates aggregation and his neighbors The information is added, along with residual terms to enhance expressiveness. Update the matrix for the relations; Multimodal knowledge contrastive learning, by fully utilizing the diversity of multimodal information in knowledge graphs, achieves cross-modal knowledge understanding and generates more discriminative entity representations. This includes: firstly, through intermodal contrastive learning, bridging the gap between structural and textual information, and visual and textual information of the same entity, to reduce intermodal interference and retain specific information within each modality. The intermodal contrastive loss is calculated as follows: in, It is a positive sample index. It is a negative sample index; modality pair , respectively representing visual text contrast modality and structural text contrast modality; symbol Represents the dot product. It is a scalar temperature parameter; Then, the module alignment is used to bring the embeddings of the same entities within each modality closer together. The intramodal contrast loss is calculated as follows: in, This represents the set of indices in a batch that are of the same type as positive samples. Represents a set The base number, These represent structural modality, visual modality, and text modality, respectively. yes The conjugate of complex numbers; Relationship-aware decision fusion generates corresponding modality weights and combines decision scores from different modalities.
2. The multimodal knowledge graph completion method based on cross-perspective contrastive learning according to claim 1, characterized in that, Multi-perspective knowledge extraction processing, including: The CLIP cross-modal model extracts visual and textual multimodal representations from entities in a knowledge graph, capturing the overall semantic consistency and relationships between text and images, making text descriptions and image content closer in a shared feature space. After acquiring multimodal representations, a pooling-based prototype learning module is used to learn enhanced visual feature representations for multiple visual features of an entity. By learning the optimal strategy for aggregating visual features, multiple visual features with a lot of noise are aligned with the textual features of the entity, thereby focusing on specific semantics and reducing the influence of noise from irrelevant visual elements.
3. The multimodal knowledge graph completion method based on cross-perspective contrastive learning according to claim 2, characterized in that, Adopting the ideas from CLIP, we maximize the similarity of matched image-text pairs and minimize the similarity of mismatched image-text pairs, aligning the visual aggregation features and text features of entities.
4. The multimodal knowledge graph completion method based on cross-perspective contrastive learning according to claim 1, characterized in that, Relationship-aware decision fusion includes: dividing the data into subsets according to relationship types, generating corresponding modal weights, and finally combining decision scores from different modalities.
5. A multimodal knowledge graph completion system based on cross-perspective comparative learning, characterized in that, include: A multi-view knowledge embedding module is used to obtain multimodal knowledge representations with semantic similarity, reducing noise introduced by modal heterogeneity and irrelevant information; The relation-aware information aggregation module is used to achieve representation learning of multi-relation heterogeneous graphs by capturing effective information from different modalities, including: computing relation-aware attention. The importance of neighboring entities is measured using the following formula: in, and This indicates that the head and tail entities are embedded. Indicates relational embedding. This indicates the concat operation; The aggregation function of relation-aware attention is used to aggregate information about relevant neighboring entities and update the entity representation in the current modality. The calculation formula is as follows: in, This represents the learnable parameter matrix. Indicates aggregation and his neighbors The information is added, along with residual terms to enhance expressiveness. Update the matrix for the relations; The knowledge contrast learning module is used to achieve cross-modal knowledge understanding and generate more discriminative entity representations by fully utilizing the diversity of multimodal information in the knowledge graph. This includes: firstly, through intermodal contrast learning, bridging the gap between structural and textual information, and visual and textual information of the same entity, to reduce intermodal interference and retain specific information within each modality. The intermodal contrast loss is calculated as follows: in, It is a positive sample index. It is a negative sample index; modality pair , respectively representing visual text contrast modality and structural text contrast modality; symbol Represents the dot product. It is a scalar temperature parameter; Then, the module alignment is used to bring the embeddings of the same entities within each modality closer together. The intramodal contrast loss is calculated as follows: in, This represents the set of indices in a batch that are of the same type as positive samples. Represents a set The base number, These represent structural modality, visual modality, and text modality, respectively. yes The conjugate of complex numbers; Relationship-aware decision fusion is used to generate corresponding modality weights and combine decision scores from different modalities.
6. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the multimodal knowledge graph completion method based on cross-perspective contrastive learning as described in any one of claims 1-4.
7. A computer device, characterized in that, The method includes a memory and a processor, the processor and the memory communicating with each other, the memory storing program instructions that can be executed by the processor, and the processor calling the program instructions to execute the multimodal knowledge graph completion method based on cross-view contrastive learning as described in any one of claims 1-4.
8. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions that implement the multimodal knowledge graph completion method based on cross-perspective contrastive learning as described in any one of claims 1-4.
