HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Guang, Zhu, Yujie
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912730237108224
author Yang, Guang
Zhu, Yujie
author_facet Yang, Guang
Zhu, Yujie
contents Pre-trained language models (PLMs) are increasingly being applied to code-related tasks. Although PLMs have achieved good results, they do not take into account potential high-order data correlations within the code. We propose three types of high-order correlations in code tokens, i.e. abstract syntax tree family correlation, lexical correlation, and line correlation. We design a tokens and hyperedges generator to capture these high-order data correlations. We improve the architecture of hypergraph neural networks and combine it with adapter tuning to propose a novel hypergraph-based adapter (HGAdapter) to fine-tune PLMs. HGAdapter can encode high-order data correlations and is allowed to be inserted into various PLMs to enhance performance. Experiments were conducted on several public datasets, including six languages of code summarization and code clone detection tasks. Our methods improved the performance of PLMs in datasets to varying degrees. Experimental results validate the introduction of high-order data correlations that contribute to improved effectiveness.
format Preprint
id arxiv_https___arxiv_org_abs_2510_17591
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection
Yang, Guang
Zhu, Yujie
Computation and Language
Artificial Intelligence
Machine Learning
Software Engineering
Pre-trained language models (PLMs) are increasingly being applied to code-related tasks. Although PLMs have achieved good results, they do not take into account potential high-order data correlations within the code. We propose three types of high-order correlations in code tokens, i.e. abstract syntax tree family correlation, lexical correlation, and line correlation. We design a tokens and hyperedges generator to capture these high-order data correlations. We improve the architecture of hypergraph neural networks and combine it with adapter tuning to propose a novel hypergraph-based adapter (HGAdapter) to fine-tune PLMs. HGAdapter can encode high-order data correlations and is allowed to be inserted into various PLMs to enhance performance. Experiments were conducted on several public datasets, including six languages of code summarization and code clone detection tasks. Our methods improved the performance of PLMs in datasets to varying degrees. Experimental results validate the introduction of high-order data correlations that contribute to improved effectiveness.
title HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection
topic Computation and Language
Artificial Intelligence
Machine Learning
Software Engineering
url https://arxiv.org/abs/2510.17591