A multi-modal code search method based on fine-grained attention alignment
By employing a fine-grained attention-aligned multimodal code search method, leveraging multi-head attention mechanisms and cross-entropy optimization, the heterogeneity problem between code and query is addressed. This enables efficient and accurate feature extraction and matching in large code databases, thereby improving the quality of code search.
Patent Information
- Application Number
- CN202410630129.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2026-07-24
- Estimated Expiration
- 2044-05-21
AI Technical Summary
Existing code search methods suffer from incomplete information extraction and utilization and insufficient consideration of feature dimensions when dealing with the heterogeneity of code and queries, the unified representation of embedded spaces, and the explosive growth of code databases, resulting in inaccurate search results.
A multimodal code search method based on fine-grained attention alignment is adopted. The method uses a fine-grained network to represent the text and structural features of the code and the query in different ways, and uses a fine-grained alignment mechanism to fuse the features of different modalities, including multi-head attention mechanism, bidirectional gated graph neural network and cross-entropy optimization, to improve the accuracy of feature representation and matching effect.
It improves the matching accuracy of code and query in large code databases, solves the problem of insufficient information feature extraction in code search, reduces the error caused by feature misalignment, and improves search quality.