mlsanityData to 14 Oct 2026

LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models

arXiv 2505.14759 ↗First posted 20 May 2025cs.SE cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Large Language Models for code often entail significant computational complexity, which grows significantly with the length of the input code sequence. We propose LeanCode for code simplification to reduce training and prediction time, leveraging code contexts in utilizing attention scores to represent the tokens' importance. We advocate for the selective removal of tokens based on the average context-aware attention scores rather than average scores across all inputs. LeanCode uses the attention scores of `CLS' tokens within the encoder for classification tasks, such as code search. It also employs the encoder-decoder attention scores to determine token significance for sequence-to-sequence tasks like code summarization. Our evaluation shows LeanCode's superiority over the SOTAs DietCode and Slimcode, with improvements of 60% and 16% for code search, and 29% and 27% for code summarization, respectively.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 19 of its 27 references that are in the map. First posted on arXiv 20 May 2025.

Builds on

19 of 27 references.

References · 19

  1. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  3. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  4. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  5. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  6. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  7. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  8. 2017Learning to Represent Programs with Graphscited by 220
  9. 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
  10. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  11. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  12. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
7 more
  1. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 41
  2. 2021What do pre-trained code models know about code?cited by 36
  3. 2022Diet Code Is Healthy: Simplifying Programs for Pre-trained Models of Codecited by 24
  4. 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
  5. 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 21
  6. 2020SCELMo: Source Code Embeddings from Language Modelscited by 16
  7. 2020Probing Model Signal-Awareness via Prediction-Preserving Input Minimizationcited by 14

Built on by

Not cited yet.