Research map / Architectures and efficiency / Attention and transformers
LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models
Yan Wang, Ling Ding, Tien N. Nguyen, Shaohua Wang, Yanan Zheng
Central University of Finance and Economics · University of Texas at Dallas · Yale University
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use context-aware CLS-attention token scores (LeanCode) instead of DietCode self-attention scores | code simplification, 50% removal · Code search, CodeBERT | MRR: 0.429 -> 0.688 | Improved |
| use LeanCode instead of DietCode | code simplification, 50% removal · Code search, CodeT5 | MRR: 0.561 -> 0.706 | Improved |
| use LeanCode instead of SlimCode | code simplification, 50% removal · Code search, CodeBERT | MRR: 0.594 -> 0.688 | Improved |
| use encoder-decoder attention scores (LeanCode) instead of DietCode | code simplification, 50% removal · Code summarization, CodeT5 | BLEU-4: 14.27 -> 18.46 | Improved |
| use LeanCode instead of SlimCode | code simplification, 50% removal · Code summarization, CodeT5 | BLEU-4: 14.53 -> 18.46 | Improved |
| use LeanCode instead of DietCode | code simplification, 50% removal · Code summarization, CodeBERT | BLEU-4: 14.23 -> 16.24 | Improved |
| remove 10% of tokens with LeanCode | CodeBERT code search · Code search | MRR: 0.726 -> 0.728 | Improved |
| remove 50% of tokens with LeanCode | CodeT5 code search/summarization · Code search/summarization | MRR/BLEU-4: MRR 0.747 -> 0.706; BLEU-4 20.55 -> 18.46 | Hurt |
| increase removal ratio from 30% to above 30% for SlimCode | SlimCode · Code search | MRR: CodeBERT 0.70 -> 0.594 at 50% | Hurt |
| replace LeanCode's removal algorithm with DietCode's (keeping LeanCode weights) (ablation) | LeanCode · Code search, CodeBERT, 50% | MRR: 0.688 -> 0.682 | Hurt |
| replace LeanCode's removal algorithm with DietCode's (keeping LeanCode weights) (ablation) | LeanCode · Code summarization, CodeT5, 50% | BLEU-4: 18.46 -> 17.63 | Hurt |
| apply LeanCode-simplified code to GPT-4o | GPT-4o prompts · Code search, 30% removal | Precision: 0.82 -> 0.828 | Improved |
Open problems in language model pretraining and induction
Do positional-encoding, tokenization and pretraining findings hold beyond small models and a few languages?
- Conclusions come from models of about 1B parameters or smaller. · 11 papers state it
- Tested on a handful of languages, mostly English. · 6 papers state it
- Theory is missing or rests on simplified models and assumptions. · 6 papers state it
Closest papers by meaning
- CODE REPRESENTATION LEARNING AT SCALE (ICLR 2024 · similarity 0.87)
- Hidden Positives: Why Code Retrieval Benchmarks Underestimate Model Quality (NeurIPS 2026 · similarity 0.87)
- XCodeEval: An Execution-based Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrieval (ACL 2024 · similarity 0.87)
- A Convolutional Attention Network for Extreme Summarization of Source Code (ICML 2016 · similarity 0.87)
- EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning (ICML 2025 · similarity 0.86)
- Unsupervised Evaluation of Code LLMs with Round-Trip Correctness (ICML 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.