Lune

FSE2025Top-tier venue

An Adaptive Language-Agnostic Pruning Method for Greener Language Models for Code

Mootez Saad, José Antonio Hernández López, Boqi Chen, Dániel Varró, Tushar Sharma

2025Year
1Citations
2Top-tier citations

Abstract

Language models of code have demonstrated remarkable performance across various software engineering and source code analysis tasks. However, their demanding computational resource requirements and consequential environmental footprint remain as significant challenges. This work introduces Alpine, an adaptive programming language-agnostic pruning technique designed to substantially reduce the computational overhead of these models. The proposed method offers a pluggable layer that can be integrated with all Transformer-based models. With Alpine, input sequences undergo adaptive compression throughout the pipeline, reaching a size that is up to ×3 less their initial size, resulting in significantly reduced computational load. Our experiments on two software engineering tasks, defect prediction and code clone detection across three language models CodeBert, GraphCodeBert and UniXCoder show that Alpine achieves up to a 50% reduction in FLOPs, a 58.1% decrease in memory footprint, and a 28.1% improvement in throughput on average. This led to a reduction in CO 2 emissions by up to 44.85%. Importantly, it achieves a reduction in computation resources while maintaining up to 98.1% of the original predictive performance. These findings highlight the potential of Alpine in making language models of code more resource-efficient and accessible while preserving their performance, contributing to the overall sustainability of their adoption in software development. Also, it sheds light on redundant and noisy information in source code analysis corpora, as shown by the substantial sequence compression achieved by Alpine.

CCS Concepts: • Software and its engineering → Software notations and tools; • Computing methodologies → Machine learning algorithms;

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext e8aaebc1-480a-4432-84dd-cb99b5133e24

Cited by top-tier papers2

Ask how each one uses it

Builds on20

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines