mlsanityData to 7 Oct 2026

LongCodeZip: Compress Long Context for Code Language Models

arXiv 2510.00446 ↗First posted 1 Oct 2025cs.CL cs.SEcited by 38

Not on the map. Why?

Cited by 23 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.

Abstract (arXiv)

Code generation under long contexts is becoming increasingly critical as Large Language Models (LLMs) are required to reason over extensive information in the codebase. While recent advances enable code LLMs to process long inputs, high API costs and generation latency remain substantial bottlenecks. Existing context pruning techniques, such as LLMLingua, achieve promising results for general text but overlook code-specific structures and dependencies, leading to suboptimal performance in programming tasks. In this paper, we propose LongCodeZip, a novel plug-and-play code compression framework designed specifically for code LLMs. LongCodeZip employs a dual-stage strategy: (1) coarse-grained compression, which identifies and ranks function-level chunks using conditional perplexity with respect to the instruction, retaining only the most relevant functions; and (2) fine-grained compression, which segments retained functions into blocks based on perplexity and selects an optimal subset under an adaptive token budget to maximize relevance. Evaluations across multiple tasks, including code completion, summarization, and question answering, show that LongCodeZip consistently outperforms baseline methods, achieving up to a 5.6x compression ratio without degrading task performance. By effectively reducing context size while preserving essential information, LongCodeZip enables LLMs to better scale to real-world, large-scale code scenarios, advancing the efficiency and capability of code intelligence applications.

Key facts. Cited by 38 papers in the map (data through 7 Oct 2026). Builds on 66 of its 80 references that are in the map. First posted on arXiv 1 Oct 2025.

Builds on

66 of 80 references.

References · 66

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  5. 2024Qwen2.5 Technical Reportcited by 4,713
  6. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  7. 2023Qwen Technical Reportcited by 3,273
  8. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
  9. 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,205
  10. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  11. 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,838
  12. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
38 more
  1. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  2. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  3. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  4. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  5. 2023StarCoder: may the source be with you!cited by 790
  6. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  7. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
  8. 2023Learning to Compress Prompts with Gist Tokenscited by 379
  9. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  10. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  11. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
  12. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
  13. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  14. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
  15. 2023LooGLE: Can Long-Context Language Models Understand Long Contexts?cited by 200
  16. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 185
  17. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  18. 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 123
  19. 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approachcited by 117
  20. 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
  21. 2024FineSurE: Fine-grained Summarization Evaluation using LLMscited by 83
  22. 2024Prompt Compression for Large Language Models: A Surveycited by 65
  23. 2025Can LLMs Replace Human Evaluators? An Empirical Study of LLM-as-a-Judge in Software Engineeringcited by 64
  24. 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
  25. 2025GAM-Agent: Game-Theoretic and Uncertainty-Aware Collaboration for Complex Visual Reasoningcited by 56
  26. 2025SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolutioncited by 52
  27. 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 48
  28. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  29. 2025Seed-Coder: Let the Code Model Curate Data for Itselfcited by 46
  30. 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 45
  31. 2024RLCoder: Reinforcement Learning for Repository-Level Code Completioncited by 44
  32. 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
  33. 2025Video Compression Commander: Plug-and-Play Inference Acceleration for Video Large Language Modelscited by 38
  34. 2025LongCodeBench: Evaluating Coding LLMs at 1M Context Windowscited by 37
  35. 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
  36. 2025KABB: Knowledge-Aware Bayesian Bandits for Dynamic Expert Coordination in Multi-Agent Systemscited by 36
  37. 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
  38. 2025DrDiff: Dynamic Routing Diffusion with Hierarchical Attention for Breaking the Efficiency-Quality Trade-offcited by 33

50 most cited of 66 All 66 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 36.

38 papers.

Sort:

By area:

  1. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
  2. 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositoriescited by 20
  3. 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
  4. 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughtscited by 16
  5. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
  6. 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answeringcited by 13
  7. 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understandingcited by 13
  8. 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compressioncited by 12
  9. 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 12
  10. 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
  11. 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agentscited by 8
  12. 2026LELA: an LLM-based Entity Linking Approach with Zero-Shot Domain Adaptationcited by 6
26 more
  1. 2026FASA: Frequency-aware Sparse Attentioncited by 6
  2. 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
  3. 2026Improving the Completeness and Comparability of Segment Disclosures: A Large Language Model Approachcited by 6
  4. 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compressioncited by 5
  5. 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoringcited by 5
  6. 2026FastContext: Training Efficient Repository Explorer for Coding Agentscited by 4
  7. 2026CoACT: Action-Preserving Observation Compression for Coding Agentscited by 4
  8. 2026LLM Agents Can See Code Repositoriescited by 3
  9. 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generationcited by 2
  10. 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoningcited by 2
  11. 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prunecited by 2
  12. 2026Repo0: Design-Driven Zero-to-All Code Generationcited by 2
  13. 2026EarlyEval: Cheaper Agent Evaluation via Early Outcome Predictioncited by 2
  14. 2026Can AI Agents Generate Microservices? How Far are We?cited by 1
  15. 2026Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessingcited by 1
  16. 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Studycited by 1
  17. 2025When Compression Becomes an Attack Surface: Black-Box Attacks on Prompt-Compressed LLM Agentscited by 0
  18. 2026BaziQA-Benchmark: Evaluating Symbolic and Temporally Compositional Reasoning in Large Language Modelscited by 0
  19. 2026ShredBench: Evaluating the Semantic Reasoning Capabilities of Multimodal LLMs in Document Reconstructioncited by 0
  20. 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Studycited by 0
  21. 2026SemChunk-C: Semantic Segmentation for C Codecited by 0
  22. 2026Beyond Textual Repository Exploration: Dual-Modal Structural Reasoning for Agentic Issue Resolutioncited by 0
  23. 2026CodeShrink: Adaptive Visual Compression for Efficient Multimodal Code Understandingcited by 0
  24. 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Explorationcited by 0
  25. 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agentscited by 0
  26. 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agentscited by 0