COLM 2026 Submission

Context Management
Meets Epigenetics

EpiContext treats your agent's history like a genome β€” preserving everything, but dynamically regulating what gets expressed. Inspired by how your cells decide which genes to activate.

βˆ’90%
Token Reduction
βˆ’64%
Fewer Turns
p<0.001
Statistical Significance
6
Strategies Compared
Your Agent's Memory Problem
Modern AI agents accumulate massive context histories across hundreds of turns. Keeping everything is expensive; throwing things away loses critical information. There's a better way.
πŸ“‹

Full Context

Keep every turn in the context window. Token costs explode, and LLM performance degrades from "lost in the middle" effects.

πŸ—‘οΈ

Sliding Window

Only keep the last N turns. Simple and fast, but critical early decisions are permanently lost when they scroll out of view.

🧬

EpiContext

Store everything (the genome), but dynamically select what to include in each request (epigenetic expression). Content-aware, not time-based.

The Epigenetic Pipeline
Your agent's complete history is the genome. Three operators decide what gets expressed in each LLM call.

🧬 Context Graph

Complete history
(Immutable Genome)
β†’

πŸ”‡ Methylation

Silence resolved
or noisy blocks
β†’

πŸ“’ Acetylation

Activate relevant
tools & context
β†’

🎯 Fitness Function

F(P) = Ξ±R βˆ’ Ξ²C + Ξ³I
Optimize & feedback
β†’

⚑ Optimized Payload

Minimal, relevant
context to LLM
How Epigenetic Regulation Works
Each operator addresses a different failure mode of context accumulation. Together they form a self-tuning system.

Memory Methylation

M: w(v) β†’ 0 for resolved blocks

When the agent resolves a subproblem after extensive trial-and-error, those detailed logs become noise. Methylation detects low-progress segments and replaces them with compact summaries β€” preserving the insight, discarding the noise.

Tool Acetylation

A: r(f, Ο„) = λ₁·name + Ξ»β‚‚Β·desc + λ₃·param

Modern agents carry 20+ tools, but any task needs only 2–3. Acetylation computes multi-level relevance scores between each tool and the current task, activating only what's needed.

Fitness Feedback

F(P) = Ξ±Β·R_task βˆ’ Ξ²Β·C_token + Ξ³Β·I_density

A joint objective over task success, token cost, and information density. After each turn, weights update: successful context is reinforced, failed context is suppressed. The system learns what to keep.

Adaptive Strategy Switching
The breakthrough: don't use epigenetic regulation on every turn. Use simple sliding window for early turns, then switch to content-aware filtering when context volume exceeds the window.

πŸͺŸ Turns 1–10

Sliding Window
Simple & fast
β†’

πŸ”„ Turn 10+

Switch to
EpiContext
β†’

✨ Result

Best of both:
efficient + intelligent

Like driving: use first gear in the parking lot, fifth gear on the highway. Don't use fifth gear everywhere.

Experimental Results
81 successful runs across 5 containerized tasks in the Harbor evaluation framework. 6 strategies compared under identical conditions.
StrategyNAvg TurnsAvg Time (s)Avg Input TokensAvg Output Tokens
Full-Context1510.669.611,9802,581
Sliding Window158.742.34,6651,801
Methylation-Only910.031.75,9191,854
Acetylation-Only1212.575.614,2643,362
EpiContext (v1)1512.561.613,7913,351
Adaptive EpiContext (v2)153.815.91,153667

describe-image

βˆ’96%

1,801 vs 43,600 tokens
5 turns vs 20 turns

Statistical Tests

Turns: p = 0.0001
Tokens: p = 0.022

Paired t-test, 15 matched runs
Both highly significant

v1 β†’ v2 Journey

12Γ—

Token efficiency improvement
From worst to best strategy

Ready to dive deeper?

Read the full paper β€” 17 pages with architecture diagrams, mathematical proofs, ablation studies, and complete experimental data.

πŸ“„ Download Paper (PDF) πŸ”— GitHub Repository