Semantic Matching via Interactive Attention Fusion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The Siamese network, widely used in semantic matching tasks, suffers from low accuracy due to its independent query and document sides lacking interactive characteristics, resulting in poor semantic matching performance.
Innovation Solution
A semantic matching and retrieval method that extracts original, self-attention, and interactive attention features from both query and document texts, fusing these features to obtain final vector representations for improved similarity calculations, enhancing the accuracy of semantic matching tasks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If a Siamese network is used for semantic matching, then the online computation speed is fast, but the matching accuracy is relatively poor
Solution Approach 1:
The patent introduces an attention mechanism as an intermediary component between the query and document processing streams. This attention mechanism computes interaction features by attending to both query and document embeddings, enabling the model to capture semantic relationships without sacrificing the efficient Siamese network architecture. The attention mechanism serves as a mediator that enriches the feature representation while maintaining computational efficiency.
Solution Approach 2:
The patent creates a composite feature representation by combining multiple feature types: original embeddings, self-attention features (capturing intra-sequence relationships), and interaction features (capturing inter-sequence relationships). This composite approach integrates multiple processing perspectives into a unified feature vector that preserves the speed benefits of the Siamese network while achieving higher matching accuracy through enriched feature composition.
2Device complexity
If the query side and document side are made independent in a Siamese network, then the computation is simple and fast, but the interactive characteristics are lost
Solution Approach 1:
The attention mechanism acts as an intermediary that enables interaction between the query and document sides without requiring complex bidirectional processing. By computing attention weights between query tokens and document tokens, the model captures interactive characteristics while maintaining the unidirectional processing flow that keeps the model structure relatively simple and computationally efficient.
Solution Approach 2:
The patent applies local quality by making different parts of the model have different functions: the embedding layers handle local token representations, self-attention layers handle local intra-sequence relationships, and the interaction attention layer handles specific query-document relationships. This differentiated local processing enables interactive characteristics without uniformly increasing the complexity of the entire model structure.
Data Source
AI summary
Disclosed are a semantic matching and retrieval method and apparatus. The semantic matching and retrieval method includes steps of obtaining both the vector representation of a query text and the vector representation of a document text; obtaining the final vector representation of the query text; obtaining the final vector representation of the document text; calculating, based on the final vector representation of the query text and the final vector representation of the document text, the similarity score between the query text and the document text; and selecting, based on the similarity scores between the query text and a plurality of document texts, a document text matching the query text from the plurality of document texts.


