narcolepticchicken commited on
Commit
1ee34c5
Β·
verified Β·
1 Parent(s): 450b6be

Upload docs/deep_literature_review.md

Browse files
Files changed (1) hide show
  1. docs/deep_literature_review.md +91 -0
docs/deep_literature_review.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Agent Cost Optimization: Deep Literature Review (2024–2026)
2
+
3
+ **Date: 2026-06-03**
4
+ **Part of: [agent-cost-optimizer](https://huggingface.co/narcolepticchicken/agent-cost-optimizer)**
5
+
6
+ ## Summary Table (Ranked by Impact)
7
+
8
+ | Rank | Paper | Method | Key Result | Applies to Agents? |
9
+ |------|-------|--------|-----------|---------------------|
10
+ | 1 | In-Context Distillation + Self-Consistency Cascades (2512.02543) | ICL retrieval + student voting + teacher fallback | **2.5-3.5Γ— cost reduction** at iso-quality | βœ… Directly (ALFWorld, AppWorld) |
11
+ | 2 | Make Every Penny Count: DSC (2408.13457) | Difficulty-adaptive sample count | **65.29% cost reduction** vs standard SC | ⚠️ Single-turn reasoning |
12
+ | 3 | BAVT: Budget-Aware Value Tree Search (2603.12634) | Residual value critic + budget-annealed search | Matches baseline at **4Γ— budget** | βœ… Multi-hop tool-calling |
13
+ | 4 | Efficient Agents (2508.02694) | Systematic ablation across agent components | **42.7% cost reduction**, 96.7% quality | βœ… Directly (GAIA) |
14
+ | 5 | Agentic Plan Caching (2506.14852) | Structured plan reuse + template adaptation | **50.31% cost reduction**, 27% latency | βœ… Multi-step Plan-Act |
15
+ | 6 | SpecEyes (2603.23483) | Speculative perception for agentic MLLMs | **1.1-3.35Γ— speedup**, +6.7% accuracy | ⚠️ Vision agents only |
16
+ | 7 | R2-Router (2602.02823) | Joint model + length budget selection | **4-5Γ— cheaper** than existing routers | ⚠️ Single-turn, length budget applicable |
17
+ | 8 | RouteLLM (2405.03860) | BERT routers beat LLM routers on cost | **2Γ— cost reduction**, $0.8/hr vs $5.23/hr | βœ… Model routing |
18
+
19
+ ## Ablation Findings from Efficient Agents (2508.02694)
20
+
21
+ **The only systematic ablation across ALL agent cost components:**
22
+
23
+ | Component | Finding | Cost Impact |
24
+ |-----------|---------|-------------|
25
+ | Backbone selection | Claude 3.7 costs **3.6Γ—** more than GPT-4.1, **27Γ—** more than Qwen3-30B-A3B | Dominates everything |
26
+ | Best-of-N (N=4 vs N=1) | +0.61% accuracy for +34% tokens | **Waste β€” don't use** |
27
+ | Max steps (12 vs 8) | +0.6% accuracy for +27% cost | 8 is sweet spot |
28
+ | Complex memory | No improvement on GAIA | Simple memory is optimal |
29
+ | Multi-search tools | Helps only at L2-L3 | Gating needed |
30
+ | Planning interval | Interval=1 is optimal | No optimization opportunity |
31
+
32
+ **Optimal config:** GPT-4.1 backbone, 8 max steps, plan interval=1, BoN=1, simple memory.
33
+
34
+ ## Prompt Caching Discounts
35
+
36
+ | Provider | Discount | Mechanism | Cache Lifetime |
37
+ |----------|----------|-----------|----------------|
38
+ | Anthropic | **90%** on reads | Explicit breakpoints | 5 min TTL |
39
+ | OpenAI | **50%** automatic | 1024+ token prefix match | 5-60 min |
40
+ | Google Gemini | **75%** on cached input | Explicit context caching API | Configurable |
41
+ | DeepSeek | Unknown | β€” | β€” |
42
+
43
+ **Critical:** Use the Hub kernels library (`kernels-community/flash-attn2`) instead of building flash-attn from source. Building takes minutes to hours.
44
+
45
+ ## Router Architectures (2025–2026)
46
+
47
+ | Router | Approach | Innovation | Cost Claim |
48
+ |--------|----------|-----------|------------|
49
+ | Router-R1 (2506.09033) | RL-trained LLM, multi-round | Unseen model generalization | β€” |
50
+ | R2-Router (2602.02823) | Joint model + length budget | "Powerful+constrained > weak" | 4-5Γ— cheaper |
51
+ | CARROT (2502.03261) | Optimal routing theory | Cost-rate-optimal proofs | β€” |
52
+ | xRouter (2510.08439) | RL tool-calling router | Cost-aware reward function | β€” |
53
+ | BaRP (2510.07429) | Online bandit routing | Partial feedback learning | Outperforms offline |
54
+ | **RouteLLM** (2405.03860) | **BERT classifier** | **$0.8/hr deployment** | **2Γ— cost reduction** |
55
+
56
+ ## Token-Level Cost Prediction
57
+
58
+ | Method | Approach | Key Result |
59
+ |--------|----------|------------|
60
+ | LenVM (2604.27039) | Token-level value model | 63% at 200-token vs 6% baseline |
61
+ | Budget Guidance (2506.13752) | Gamma distribution predictor | +26% accuracy under tight budgets |
62
+ | TALE (2412.18547) | Binary search budget | Token elasticity β€” cutoff too far = costlier |
63
+ | BudgetThinker (2508.17196) | Control tokens + SFT/RL | Budget-conditioned generation |
64
+
65
+ ## Speculative Agent Actions
66
+
67
+ | Paper | Method | Result |
68
+ |-------|--------|--------|
69
+ | ForeAgent (2601.05930) | Predict ML code execution | 6Γ— convergence, +6% over execution-only |
70
+ | AWO/Meta-tools (2601.22037) | Recurring tool sequences β†’ meta-tools | 11.9% fewer LLM calls |
71
+ | SpecEyes (2603.23483) | Cognitive gating via answer separability | Key insight transferable to text agents |
72
+
73
+ ## What's Missing from Literature
74
+
75
+ 1. **No speculative decoding for tool-calling agents** β€” draft-then-verify is proven for text, never applied to tool calls. Genuine research gap.
76
+ 2. **No real-time cost monitoring with action** β€” all existing work is static/offline optimization.
77
+ 3. **No combined routing + compression + caching optimizer** β€” each technique studied in isolation.
78
+ 4. **No provider-aware cache routing** β€” which provider to use based on cache hit probability.
79
+ 5. **No learned cost-quality frontiers per task type** β€” all routing is task-agnostic.
80
+
81
+ ## Implementation Priorities for ACO
82
+
83
+ 1. **Self-consistency cascade** (training-free, 2.5-3.5Γ— reduction, best ROI) β€” IMPLEMENTED: `aco/self_consistency_cascade.py`
84
+ 2. **Trained BERT routers** (ModernBERT, focal loss, threshold calibration) β€” TRAINING: v2 specialist models
85
+ 3. **Cache-aware prompt layout** (90% Anthropic discount, zero risk) β€” IMPLEMENTED: `aco/cache_layout.py`
86
+ 4. **Context compression** (ACON pattern, improves success rate) β€” IMPLEMENTED: `aco/context_compression.py`
87
+ 5. **Tool-use gating** (ModernBERT binary, 93% of ToolACE doesn't need tools) β€” TRAINING: v2 tool gater
88
+ 6. **Plan caching** (50% cost reduction, requires integration) β€” PENDING
89
+ 7. **Verifier gating with Intervention Paradox protection** β€” TRAINING: v2 verifier gater
90
+ 8. **Budget-aware value tree search** (for multi-hop agents) β€” PENDING
91
+ 9. **Token-length prediction** (LenVM-style, stop early) β€” PENDING