cs.CLJun 2, 2026

Entropy Gate: Entropy Quenching for Near-Lossless Token Compression in LLM Pipelines

Authors: Justice Owusu AgyemangJerry John KponyoKwame Opuni-Boachie Obour AgyekumFrancisca Adoma AcheampongKwame Agyeman-Prempeh AgyekumJames Dzisi Gadze

Organizations: 1VIA Cybersecurity Lab, Kwame Nkrumah University of Science and Technology, Kumasi, Ghana · 2Quantum and Assistive Technologies Lab, Kwame Nkrumah University of Science and Technology, Kumasi, Ghana

Abstract

LLM pipelines waste substantial token budgets on low-information content: repeated context, verbose responses, and redundant boilerplate. We introduce Entropy Gate, a token compression framework applying entropy quenching - a thermodynamic process that progressively freezes out low-energy tokens while preserving semantic fidelity. Each token receives a multi-factor information energy E(t)E(t) combining statistical, structural, and positional components. An adaptive quenching schedule T(τ)=T0/(1+ατ)T(τ) = T_0 / (1 + ατ) removes tokens whose Boltzmann survival probability pi=exp(Ei/kT)p_i = \exp(-E_i / kT) falls below threshold, with a fidelity gate halting compression when energy-weighted similarity drops below θθ. We prove token selection by descending E(t)E(t) maximizes expected semantic preservation, that quenching produces nested survival sets, and that achievable compression approaches the information-theoretic limit CR1I(P;T)/H(P)\text{CR} \to 1 - I(P; T)/H(P). A Phase 1 heuristic achieves 40-60% compression across five prompt categories while maintaining SE>0.80S_E > 0.80, with energy-squared amplification EE2E \to E^2 adding 10-25 percentage points. Context deduplication adds 50-70% savings on repeated blocks. Output-side quenching, motivated by findings that brevity improves accuracy, further reduces response overhead. Combined with external memory, reduction composes multiplicatively to 88-96% for agentic workloads. The framework is stateless, model-agnostic, and deploys as an OpenAI-compatible HTTP proxy.

Explore similar work

Apr 16, 2026cs.CL

Compressing Sequences in the Latent Embedding Space: K-Token Merging for Large Language Models

Large Language Models (LLMs) incur significant computational and memory costs when processing long prompts, as full self-attention scales quadratically with input length. Token compression aims to address this challenge by reducing the number of tokens representing inputs. However, existing prompt-compression approaches primarily operate in token space and overlook inefficiencies in the latent embedding space. In this paper, we propose K-Token Merging, a latent-space compression framework that merges each contiguous block of K token embeddings into a single embedding via a lightweight encoder. The compressed sequence is processed by a LoRA-adapted LLM, while generation remains in the original vocabulary. Experiments on structural reasoning (Textualized Tree), sentiment classification (Amazon Reviews), and code editing (CommitPackFT) show that K-Token Merging lies on the Pareto frontier of performance vs. compression, achieving up to 75% input length reduction with minimal performance degradation. Code is available at https://github.com/shsjxzh/K-Token-Merging.
Zihao Xu, John Harvill, Ziwei Fan +3
May 17, 2026cs.LG

Compress the Context, Keep the Commitments: A Formal Framework for Verifiable LLM Context Compression

LLM context is not just tokens; it is a set of commitments. Long-running conversations accumulate goals, constraints, decisions, preferences, tool results, retrieved evidence, artifacts, and safety boundaries that future responses must preserve. Existing context-management methods reduce length through truncation, retrieval, summarization, memory systems, or token-level prompt compression, but they rarely specify which semantic commitments must survive compression or how their preservation should be measured. We propose Context Codec, a commitment-level framework for compressing prompts and chat histories. Context Codec represents dialogue state as typed, source-grounded semantic atoms with canonical identity, equivalence, conflict, confidence, risk, and evidence spans. It separates five concerns - extraction, normalization, representation, rendering, and verification - and introduces metrics for Critical Atom Recall, Weighted Atom Recall, Commitment Density, and round-trip recoverability. It also defines a taxonomy of semantic compression errors, a concrete normalization procedure, conservative fallback rules for low-confidence and safety-critical atoms, and Context Compression Language (CCL), an ASCII-first compact rendering of canonical JSON atoms. In a small diagnostic study, CCL-Core occupies a useful middle ground between structured prose and JSON: more explicit and auditable than prose, usually more compact than JSON, and less risky than heavily minified notation. The result is not a claim that shorthand solves compression, but a framework for making context compression verifiable: compress the conversation, keep the commitments.
Natalia Trukhina, Vadim Vashkelis
Jul 30, 2026cs.CL

Demystifying Entropy-based Selection for Chain-of-Thought Compression in Large Reasoning Models

Entropy-based pruning has been proposed as an effective method for compressing Chain-of-Thought (CoT) reasoning with negligible accuracy loss. We test the robustness of low- and high-entropy CoT step selection methods across various models and reasoning tasks, showing that entropy offers no advantage over random pruning in any evaluated setting. Moving from sentences to tokens, we then show that retaining low-entropy tokens seems effective only on mathematical benchmarks. We find this is due to the inherently low-entropy nature of numeric tokens, which also convey semantic content in such problems. Finally, we demonstrate that patching a subset of a few CoT tokens with their original activations recovers near-perfect full-trace performance, providing causal evidence that task information is not concentrated in a small set of CoT tokens identifiable by heuristics, but rather distributed across the full reasoning chain.
Sara Candussio, Daniel Scalena, Luca Bortolussi +3