LongCodeZip: Compress Long Context for Code Language Models
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
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Qwen Technical Reportcited by 3,273
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,205
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,838
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
38 more
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
- 2023LooGLE: Can Long-Context Language Models Understand Long Contexts?cited by 200
- 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 185
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 123
- 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approachcited by 117
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
- 2024FineSurE: Fine-grained Summarization Evaluation using LLMscited by 83
- 2024Prompt Compression for Large Language Models: A Surveycited by 65
- 2025Can LLMs Replace Human Evaluators? An Empirical Study of LLM-as-a-Judge in Software Engineeringcited by 64
- 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
- 2025GAM-Agent: Game-Theoretic and Uncertainty-Aware Collaboration for Complex Visual Reasoningcited by 56
- 2025SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolutioncited by 52
- 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 48
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025Seed-Coder: Let the Code Model Curate Data for Itselfcited by 46
- 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 45
- 2024RLCoder: Reinforcement Learning for Repository-Level Code Completioncited by 44
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2025Video Compression Commander: Plug-and-Play Inference Acceleration for Video Large Language Modelscited by 38
- 2025LongCodeBench: Evaluating Coding LLMs at 1M Context Windowscited by 37
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
- 2025KABB: Knowledge-Aware Bayesian Bandits for Dynamic Expert Coordination in Multi-Agent Systemscited by 36
- 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
- 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
Citing papers per year: 2025: 2; 2026: 36.
38 papers.
Sort:
By area:
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
- 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositoriescited by 20
- 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
- 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughtscited by 16
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answeringcited by 13
- 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understandingcited by 13
- 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compressioncited by 12
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 12
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
- 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agentscited by 8
- 2026LELA: an LLM-based Entity Linking Approach with Zero-Shot Domain Adaptationcited by 6
26 more
- 2026FASA: Frequency-aware Sparse Attentioncited by 6
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2026Improving the Completeness and Comparability of Segment Disclosures: A Large Language Model Approachcited by 6
- 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compressioncited by 5
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoringcited by 5
- 2026FastContext: Training Efficient Repository Explorer for Coding Agentscited by 4
- 2026CoACT: Action-Preserving Observation Compression for Coding Agentscited by 4
- 2026LLM Agents Can See Code Repositoriescited by 3
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generationcited by 2
- 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoningcited by 2
- 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prunecited by 2
- 2026Repo0: Design-Driven Zero-to-All Code Generationcited by 2
- 2026EarlyEval: Cheaper Agent Evaluation via Early Outcome Predictioncited by 2
- 2026Can AI Agents Generate Microservices? How Far are We?cited by 1
- 2026Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessingcited by 1
- 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Studycited by 1
- 2025When Compression Becomes an Attack Surface: Black-Box Attacks on Prompt-Compressed LLM Agentscited by 0
- 2026BaziQA-Benchmark: Evaluating Symbolic and Temporally Compositional Reasoning in Large Language Modelscited by 0
- 2026ShredBench: Evaluating the Semantic Reasoning Capabilities of Multimodal LLMs in Document Reconstructioncited by 0
- 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Studycited by 0
- 2026SemChunk-C: Semantic Segmentation for C Codecited by 0
- 2026Beyond Textual Repository Exploration: Dual-Modal Structural Reasoning for Agentic Issue Resolutioncited by 0
- 2026CodeShrink: Adaptive Visual Compression for Efficient Multimodal Code Understandingcited by 0
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Explorationcited by 0
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agentscited by 0
- 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agentscited by 0
- 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agents25 Sep 2026
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents22 Sep 2026
- 2026EarlyEval: Cheaper Agent Evaluation via Early Outcome Prediction2 Sep 2026
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration25 Aug 2026
- 2026Repo0: Design-Driven Zero-to-All Code Generation20 Aug 2026
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring10 Aug 2026
- 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Study2 Aug 2026
- 2026CodeShrink: Adaptive Visual Compression for Efficient Multimodal Code Understanding31 Jul 2026
- 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prune20 Jul 2026
- 2026CoACT: Action-Preserving Observation Compression for Coding Agents3 Jul 2026
- 2026Beyond Textual Repository Exploration: Dual-Modal Structural Reasoning for Agentic Issue Resolution2 Jul 2026
- 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agents1 Jul 2026
26 more
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents26 Jun 2026
- 2026FastContext: Training Efficient Repository Explorer for Coding Agents12 Jun 2026
- 2026LLM Agents Can See Code Repositories12 Jun 2026
- 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositories5 Jun 2026
- 2026Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessing2 Jun 2026
- 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoning14 May 2026
- 2026SemChunk-C: Semantic Segmentation for C Code12 May 2026
- 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Study6 May 2026
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generation29 Apr 2026
- 2026ShredBench: Evaluating the Semantic Reasoning Capabilities of Multimodal LLMs in Document Reconstruction26 Apr 2026
- 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression21 Apr 2026
- 2026Improving the Completeness and Comparability of Segment Disclosures: A Large Language Model Approach20 Apr 2026
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimization29 Mar 2026
- 2026Can AI Agents Generate Microservices? How Far are We?9 Mar 2026
- 2026BaziQA-Benchmark: Evaluating Symbolic and Temporally Compositional Reasoning in Large Language Models13 Feb 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
- 2026FASA: Frequency-aware Sparse Attention3 Feb 2026
- 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understanding2 Feb 2026
- 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compression31 Jan 2026
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agents23 Jan 2026
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answering16 Jan 2026
- 2026LELA: an LLM-based Entity Linking Approach with Zero-Shot Domain Adaptation8 Jan 2026
- 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughts8 Jan 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025When Compression Becomes an Attack Surface: Black-Box Attacks on Prompt-Compressed LLM Agents27 Oct 2025
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 40
- 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositoriescited by 20
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 12
- 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
- 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agentscited by 8
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoringcited by 5
- 2026FastContext: Training Efficient Repository Explorer for Coding Agentscited by 4
- 2026CoACT: Action-Preserving Observation Compression for Coding Agentscited by 4
- 2026LLM Agents Can See Code Repositoriescited by 3
- 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prunecited by 2
12 most cited of 22 All 22 (JSON)
- 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agents25 Sep 2026
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents22 Sep 2026
- 2026EarlyEval: Cheaper Agent Evaluation via Early Outcome Prediction2 Sep 2026
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration25 Aug 2026
- 2026Repo0: Design-Driven Zero-to-All Code Generation20 Aug 2026
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring10 Aug 2026
- 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Study2 Aug 2026
- 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prune20 Jul 2026
- 2026CoACT: Action-Preserving Observation Compression for Coding Agents3 Jul 2026
- 2026Beyond Textual Repository Exploration: Dual-Modal Structural Reasoning for Agentic Issue Resolution2 Jul 2026
- 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agents1 Jul 2026
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents26 Jun 2026
12 newest of 22 All 22 (JSON)
- 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughtscited by 16
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answeringcited by 13
- 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoningcited by 2
- 2026BaziQA-Benchmark: Evaluating Symbolic and Temporally Compositional Reasoning in Large Language Modelscited by 0
- 2026ShredBench: Evaluating the Semantic Reasoning Capabilities of Multimodal LLMs in Document Reconstructioncited by 0
- 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoning14 May 2026
- 2026ShredBench: Evaluating the Semantic Reasoning Capabilities of Multimodal LLMs in Document Reconstruction26 Apr 2026
- 2026BaziQA-Benchmark: Evaluating Symbolic and Temporally Compositional Reasoning in Large Language Models13 Feb 2026
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answering16 Jan 2026
- 2026GlimpRouter: Efficient Collaborative Inference by Glimpsing One Token of Thoughts8 Jan 2026
- 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understandingcited by 13
- 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compressioncited by 5
- 2026CodeShrink: Adaptive Visual Compression for Efficient Multimodal Code Understandingcited by 0
- 2026CodeShrink: Adaptive Visual Compression for Efficient Multimodal Code Understanding31 Jul 2026
- 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understanding2 Feb 2026
- 2026Can Vision-Language Models Handle Long-Context Code? An Empirical Study on Visual Compression31 Jan 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
- 2026LELA: an LLM-based Entity Linking Approach with Zero-Shot Domain Adaptationcited by 6
- 2026Improving the Completeness and Comparability of Segment Disclosures: A Large Language Model Approachcited by 6
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generationcited by 2
- 2026SemChunk-C: Semantic Segmentation for C Codecited by 0
- 2026SemChunk-C: Semantic Segmentation for C Code12 May 2026
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generation29 Apr 2026
- 2026Improving the Completeness and Comparability of Segment Disclosures: A Large Language Model Approach20 Apr 2026
- 2026LELA: an LLM-based Entity Linking Approach with Zero-Shot Domain Adaptation8 Jan 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026