A method for combining abstract syntax tree efficient parameter fine-tuning code model

By transforming code snippets into graph structures and constructing graph neural network adapter modules, efficient parameter fine-tuning is achieved, which solves the problem that existing methods fail to fully utilize code structure information and realizes efficient adaptation and performance improvement of the code model in downstream tasks.

CN118733052BActive Publication Date: 2026-04-24ZHEJIANG UNIV
4 Cites 0 Cited by

Patent Information

Application Number
CN202410868774.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2026-04-24
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

Existing efficient parameter fine-tuning methods are mainly aimed at natural language processing tasks, without fully considering the special characteristics of the code, making it difficult to effectively improve the adaptability of the code model in downstream tasks.

Method used

By combining abstract syntax trees and constructing adapter modules through graph neural networks, code snippets are transformed into graph structures for efficient parameter fine-tuning. Only the parameters of the adapter modules are updated, while other parts of the code model are frozen.

Benefits of technology

It significantly improves the performance of the code model on code tasks, reduces training resources and time costs, and adapts to the needs of various downstream code tasks.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses a method for combining abstract syntax tree efficient parameter fine-tuning code model: collecting code snippets as training data and test data; automatically analyzing the code snippets, and converting the code snippets into abstract syntax tree AST containing code structure and syntax information; converting the abstract syntax tree into a graph data structure, and constructing a graph structure containing node and edge relationship; numerizing the graph structure through dimension reduction embedding technology, and generating abstract syntax tree embedding vector; taking the edge relationship of the graph structure and the embedding vector as the input of the graph neural network, learning the structured representation of the code snippet, and obtaining the constructed graph neural network; taking the constructed graph neural network as an adapter module, training the pre-trained code model using the training data, and performing efficient parameter fine-tuning in the training process to obtain the fine-tuned code model. The method can significantly improve the performance of the code model on various code tasks while reducing the parameter quantity of the fine-tuning.
Need to check novelty before this filing date? Find Prior Art