Entropy Gate: Entropy Quenching for Near-Lossless Token Compression in LLM Pipelines
Title: Entropy Gate: Near-Lossless Token Compression via Entropy Quenching in LLM Pipelines
Abstract
Large Language Model (LLM) workflows frequently squander significant token allowances on content with minimal informational value, such as repetitive context, overly verbose outputs, and redundant boilerplate. To address this inefficiency, we present Entropy Gate, a token compression framework that utilizes entropy quenching—a thermodynamic-inspired mechanism designed to progressively freeze out low-energy tokens without compromising semantic integrity.
In this system, every token is assigned a multi-factor information energy score, denoted as $E(t)$, which integrates statistical, structural, and positional data. The framework employs an adaptive quenching schedule defined by $T(\tau) = T_0 / (1 + \alpha \tau)$. Tokens are removed when their Boltzmann survival probability, calculated as $p_i = \exp(-E_i / kT)$, drops beneath a specific threshold. To ensure quality, a fidelity gate intervenes to halt compression if the energy-weighted similarity falls below a set value, $\theta$.
Theoretical analysis demonstrates that selecting tokens based on descending $E(t)$ optimizes expected semantic preservation. Furthermore, the quenching process generates nested survival sets, and the resulting compression ratio approaches the information-theoretic limit, expressed as $\text{CR} \to 1 - I(P; T)/H(P)$.
Empirical results from Phase 1 heuristics indicate that the framework achieves 40-60% compression across five distinct prompt categories while sustaining semantic fidelity scores ($S_E$) above 0.80. The application of energy-squared amplification ($E \to E^2$) further boosts compression by 10-25 percentage points. Additionally, context deduplication yields 50-70% savings on repeated blocks. On the output side, quenching reduces response overhead, leveraging the finding that brevity enhances accuracy. When integrated with external memory, these reductions combine multiplicatively, achieving an 88-96% reduction for agentic workloads. The solution is model-agnostic and stateless, functioning as an OpenAI-compatible HTTP proxy.
Source: arXiv Generated at: 2026-06-03 00:00:00 UTC





