Papers
Topics
Authors
Recent
Search
2000 character limit reached

Parallel Context-of-Experts Decoding

Updated 14 January 2026
  • Parallel Context-of-Experts Decoding is a framework that treats each retrieved document as an isolated expert to enable multi-document reasoning without retraining.
  • It employs retrieval-aware contrastive decoding to calibrate expert predictions against a model prior, ensuring efficient evidence aggregation and robust performance.
  • The approach synchronizes parallel token decoding and cache updates, dramatically reducing prefilling costs and latency compared to traditional long-prompt methods.

Parallel Context-of-Experts Decoding (Pced) is a training-free, decode-time framework for retrieval-augmented generation (RAG). It addresses the classical trade-off in RAG between enabling cross-document reasoning via long concatenated prompts (incurring prohibitive prefill costs) and fast single-document encoding (which prevents multi-document interaction). Pced reconceptualizes retrieved documents as isolated “experts” and achieves evidence aggregation through a novel retrieval-aware contrastive decoding rule at generation time. This approach enables cross-document reasoning capabilities while maintaining high computational efficiency and robustness in large or noisy document pools (Corallo et al., 13 Jan 2026).

1. Framework Overview

Pced operates without retraining or model modification. Its primary workflow consists of three phases: offline preparation, parallel encoding, and retrieval-aware contrastive decoding.

  1. Offline Preparation:
    • A document datastore D\mathcal{D} is constructed. For each document did_i, its embedding eie_i is stored for retrieval, as well as its key-value (KV) cache KiK_i for future parallel decoding.
    • At query time, top-NN documents are retrieved and reranked. The retrieval score and reranker score are combined using the harmonic mean to yield a normalized relevance rk(0,1)r_k \in (0,1) for each expert.
    • In addition to NN contextual experts, an “amateur expert” K0=K_0 = \emptyset (representing the model prior) is instantiated.
  2. Parallel Encoding:
    • Each of the N+1N+1 experts processes the same prompt (query prefix qq and previously generated tokens) in one batched forward pass, computing logits did_i0 for vocabulary did_i1.
    • No cross-document token concatenation or attention is performed; experts remain isolated except for synchronization at the decoding step.
  3. Retrieval-Aware Contrastive Decoding:
    • At each generation step, contextual experts’ predictions are contrastively calibrated against the model prior and modulated by the retrieval prior, yielding did_i2 (adjusted logits).
    • The next token did_i3 is selected by maximizing over all experts’ adjusted logits for each vocabulary entry.
    • The generated token is appended to all experts’ histories, synchronizing future context and enabling “evidence stitching” across otherwise isolated caches.

This process enables efficient multi-document reasoning and avoids the quadratic scaling and latency bottlenecks characteristic of traditional long-prompt RAG approaches.

2. Mathematical Formulation

The fundamental innovation in Pced is its retrieval-aware contrastive decoding rule. Let did_i4 denote the output vocabulary. At each decoding step did_i5 and for each expert did_i6 (where 0 is the amateur/prior expert):

  • did_i7: logits from the model prior (no context) for token did_i8.
  • did_i9: logits from each contextual expert eie_i0.
  • eie_i1: fused, normalized relevance for expert eie_i2’s retrieved document.
  • eie_i3: contrastive strength (set dynamically on the first token, fixed thereafter; follows AdaCAD).
  • eie_i4: retrieval-gating weight (empirically set to eie_i5).

For each eie_i6,

eie_i7

The token to emit at step eie_i8 is selected by: eie_i9 This mechanism contrasts each expert’s evidence against the model’s uninformed prior while favoring high-relevance documents.

3. Algorithmic Description

The Pced decoding procedure is summarized in the following pseudocode:

NN9

Critical points include the synchronized update of all experts’ caches and shared generation history, and amortization of computational cost via batched forward passes (Corallo et al., 13 Jan 2026).

4. Computational and Latency Properties

Pced achieves substantial improvements in computational efficiency and latency relative to conventional and alternative RAG methods. Characteristics of the principal approaches are summarized below:

Scheme Prefill Cost/TTFT Interaction Per-Token Cost Memory
Long-Prompt Attention KiK_i0 Native (full context) Quadratic; scales poorly with KiK_i1 N/A
Separate-KV + Merge Moderate (recompute) Partial (by merging) Requires selective recomputation N/A
Pced KiK_i2 per cache Via decoding, not attn Linear in KiK_i3 + fused logits KiK_i4 for caches

Where KiK_i5 is number of documents, KiK_i6 is doc length, KiK_i7 is hidden state dim.

  • Time-to-First-Token (TTFT): Pced, with a single batched token-forward for all experts, avoids quadratic scaling. Empirical measurements demonstrate up to KiK_i8 faster TTFT (KiK_i9s vs. NN0s) at NN1 documents.
  • End-to-End Latency: For 65k-token contexts and 512-token generation, Pced is NN2 faster.
  • Memory: Pced stores FP16 KV caches linearly in corpus size and NN3 (e.g., NN4 GB for NN5 passages with Llama-3.1-8B).
  • Suitability: It is naturally suited for read-heavy, static corpora due to amortized offline preparation.

5. Benchmark Results and Empirical Findings

Pced exhibits strong empirical performance in multi-document reasoning and RAG contexts. Representative results (APE: Attentive Prompt Encoding, Pced Dense variant):

Benchmark Dataset/Task APE Pced-Dense
LOFT RAG HotpotQA 27 66
LOFT RAG MuSiQue 11 34
LOFT RAG NQ 38 81
LOFT ICL Web 58.9 62.2
LOFT ICL Date 40.0 57.8
LongBench (Qwen3-8B) Multi-Doc QA (Hotpot) 56.3 62.6
LongBench Few-Shot (TriviaQA) 84.0 88.8
LongBench Code (RepoB-P) 51.1 60.1

Additional ablation experiments demonstrate:

  • Removal of contrastive term (NN6) or retrieval prior (NN7) substantially reduces performance (e.g., NQ falls from 85 to 52 without retrieval gating).
  • Expert aggregation via max-selection is crucial for multi-hop reasoning; max selection yields 64 on HotpotQA versus 56 for a weighted mixture approach.

6. Limitations and Prospective Extensions

Pced’s design introduces unique constraints and opportunities for further development:

  • Dependence on Model Logits: Full access to expert per-token logits is required, precluding use with closed APIs that yield only sampled tokens.
  • Retrieval Quality Sensitivity: If relevant documents are omitted or erroneously ranked, Pced cannot recover evidence absent from the expert pool.
  • Storage Footprint: Storing FP16 KV caches becomes linearly costly with corpus and hidden-state size.

Potential avenues for enhancement include:

  • End-to-end training of expert selection within the LLM to reduce reliance on external retrievers/rerankers.
  • Dynamic or instance-wise optimization of NN8 and other aggregation rules.
  • Hybrid methods combining limited cross-attention with decode-time fusion for richer inter-expert dependencies.

A plausible implication is that Pced provides a competitive trade-off, recovering much of the cross-document reasoning power of long-prompt approaches while achieving substantial speed and efficiency improvements, particularly in settings with large candidate pools or noisy retrieval (Corallo et al., 13 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Parallel Context-of-Experts Decoding (Pced).