Learning What to Skip: Counterfactual Credit Assignment for Efficient Multi-Agent LLM Workflows
Organizations: The University of British Columbia, Canada · The Hong Kong Polytechnic University, Hong Kong · The Hong Kong University of Science and Technology, Hong Kong · University of Luxemburg, Luxemburg ·
Abstract
Multi-agent LLM workflows use planning, execution, verification, and summarization to improve task performance, yet the value of each component depends on the state already produced. Executing every component can waste computation or overwrite a correct intermediate answer. We formulate component omission as counterfactual credit assignment: full-workflow logs reveal the executed trajectory's reward, while controlled skip interventions reveal the consequences of omitting a future step. We introduce Learning What to Skip (LW2S), which learns action-specific safety models from these interventions and combines held-out calibration with domain-native guards to select skips. When an early skip is rejected, the controller can continue execution and reconsider a later component. Across mathematical reasoning, multiple-choice QA, and code generation with two instruction-model families, LW2S reduces recorded token cost while matching or improving aggregate full-workflow accuracy in the evaluated settings. Scale-up and second-topology experiments further examine component redundancy, while shared-error cases reveal why agreement alone is insufficient for skip selection. These findings connect efficient workflow execution to learning the conditional utility of individual components.
Figures & tables
| Backbone | Setting | Metric | Full | RouteLLM | GraphPlanner | AutoMix | Prompt-LLM | LW2S |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-7B | MATH verifier | Acc. | 65.2 | 64.8 1 | 65.2 1 | 65.6 | 64.8 1 | 66.4 |
| Save | 0.0 | 14.6 | 11.2 | 18.3 | 20.5 | 25.1 | ||
| MATH summarizer | Acc. | 65.2 | 64.8 1 | 65.2 | 65.2 | 64.8 1 | 65.2 | |
| Save | 0.0 | 11.8 | 9.5 | 14.2 | 16.5 | 18.4 | ||
| GSM8K verifier | Acc. | 88.5 | 88.0 1 | 88.5 | 88.0 1 | 88.0 1 | 88.5 | |
| Save | 0.0 | 12.7 | 8.9 | 15.8 | 19.1 | 20.6 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Block | Backbone | Workflow | Tasks | Traces | Tokens (M) | Latency (h) | GPU | API |
|---|---|---|---|---|---|---|---|---|
| Main matrix | Qwen2.5-7B | Five-role | 1100 | 6600 | 12.74 | 9.02 | PRO6000 | none |
| Model generalization | Mistral-7B | Five-role | 1490 | 8940 | 20.31 | 14.52 | PRO6000 | none |
| Scale-up diagnostic | Qwen2.5-14B | Five-role | 250 | 1500 | 3.27 | 4.62 | PRO6000 | none |
| Second workflow | Qwen2.5-7B | Debate | 200 | 1200 | 3.14 | 2.90 | PRO6000 | none |
| Second workflow | Qwen2.5-7B | Debate | 250 | 1500 | 3.83 | 2.97 | PRO6000 | none |
| Total | – | – | 3290 | 19740 | 43.30 | 34.04 | PRO6000 | none |
| Workflow family | Benchmarks | Backbones | Evidence role |
|---|---|---|---|
| Five-role | MATH, GSM8K, MMLU, MBPP | Qwen2.5-7B, Mistral-7B | Main safety–efficiency matrix with same-protocol named baselines and calibrated skip policies. |
| Scale-up fixed template | MATH, MMLU, MBPP | Qwen2.5-14B | Larger-backbone diagnostic for skip-safe redundancy and unsafe high-saving shortcuts. |
| Debate-refine | MBPP | Qwen2.5-7B | Topology diagnostic with different roles and information flow from the main workflow. |
| Method family | Decision target | Supervision or evidence | Boundary to LW2S |
|---|---|---|---|
| Model routers | choose a model before execution | preference or task reward | Optimize model/cost trade-off; no component-level skip intervention labels or sequential fall-through. |
| Graph/workflow routers | choose a graph or agent allocation | end-to-end reward | Estimate workflow utility; usually does not identify whether a specific future component is safely omissible. |
| Selective prediction and early exit | emit, reject, or exit at a confidence gate | labels plus reject loss | Controls prediction risk–coverage; does not intervene on verifier/summarizer components in an observed workflow prefix. |
| Counterfactual MARL credit | assign action advantage during policy learning | counterfactual returns | Uses counterfactual credit, but it is not a calibrated deployment-time skip policy over LLM workflow components. |
| Workflow compaction | replace an evaluated workflow before deployment | workflow search or evaluation | Finds fewer turns or a single-agent simulation; no per-task fall-through after a blocked component skip. |
| LW2S | omit a specific future component after observing a prefix | full and single-skip traces | Learns action-specific skip labels, calibrates source-stable risk, and can fall through to later skip decisions. |
| Action | Observed prefix | Removed component | Emitted/evaluated output | Accounting |
|---|---|---|---|---|
| skip verifier | after both executors | verifier | summarizer or finalizer consumes executor answers; the domain parser scores the final answer | token cost; latency logged separately |
| skip summarizer | after verifier | summarizer | verified answer is emitted directly and parsed by the same task parser | token cost; latency logged separately |
| two-stage MBPP | after executors, then after verifier if blocked | one component per task | selected recorded intervention: skip verifier, skip summarizer, or full workflow; unit tests score the result | token cost of selected trace; latency logged separately |
| Method | Input state | Training signal | Calibration data | Deployment rule |
|---|---|---|---|---|
| RouteLLM | observed prefix features | binary skip-safe label | same split | threshold sweep; fallback to full workflow |
| GraphPlanner | prefix plus memory features | binary skip-safe label | same split | threshold sweep; fallback to full workflow |
| AutoMix | prefix confidence and action value | trace reward and cost | same split | value threshold; fallback to full workflow |
| Prompt-LLM | task, prefix, candidate action | in-context skip judgment | calibration split | probability threshold; fallback to full workflow |
| LW2S | prefix, agreement, metadata | action-specific intervention label | same split plus source checks | source-stable threshold with guard; fallback to full or later skip |
| Setting | Policy | Full | Acc. | Deg. | Save | Interpretation |
|---|---|---|---|---|---|---|
| MATH seed55 | fixed skip verifier | 66.0 | 70.0 | 0 | 25.0 | verifier removal improved reward on this evaluated slice |
| MATH seed55 | executor-consensus verifier skip | 66.0 | 68.0 | 0 | 13.5 | guarded redundancy remained after scaling the backbone |
| MATH seed55 | fixed skip summarizer | 66.0 | 66.0 | 0 | 17.2 | summarizer removal preserved full-workflow reward |
| MMLU seed2 | fixed skip verifier | 82.0 | 83.0 | 3 | 23.6 | boundary case: high saving did not imply safe skipping |
| MMLU seed2 | executor-consensus verifier skip | 82.0 | 84.0 | 2 | 22.0 | consensus did not remove the shared-error failure mode |
| MBPP slice1 | fixed skip verifier | 69.0 | 70.0 | 0 | 24.5 | verifier redundancy persisted on the scaled coding slice |
| Policy | Full | Acc. | Deg. | Save | Interpretation |
|---|---|---|---|---|---|
| Full workflow | 67.0 | 67.0 | 0 | 0.00 | reference execution of the debate-refine workflow |
| LW2S after executors | 67.0 | 68.0 | 0 | 16.65 | learned verifier/summarizer skip decision after observing proposer and opponent outputs |
| LW2S after verifier | 67.0 | 68.0 | 0 | 16.65 | learned summarizer skip decision after the critic/verifier state is available |
| Hindsight reward-improving skip | 67.0 | 69.0 | 0 | 25.79 | hindsight diagnostic, not a deployed policy |
| Fixed skip verifier | 67.0 | 67.0 | 0 | 27.42 | high-saving fixed intervention that is safe on this evaluated slice |
| Fixed skip summarizer | 67.0 | 68.0 | 0 | 16.65 | fixed late-component omission in the debate-refine workflow |
| Setting | Backbone | Workflow | Policy | Full | Acc. | Deg. | UCB 95 | Save |
|---|---|---|---|---|---|---|---|---|
| MATH verifier | Mistral-7B | Five-role | LW2S transfer | 12.8 | 12.8 | 0 | 1.5 | 19.1 |
| MATH verifier | Qwen2.5-7B | Five-role | LW2S final | 65.2 | 66.4 | 0 | 1.5 | 25.1 |
| MATH verifier | Qwen2.5-7B | Five-role | Full workflow | 65.2 | 65.2 | 0 | 1.5 | 0.0 |
| MATH summarizer | Mistral-7B | Five-role | LW2S transfer | 12.8 | 14.0 | 0 | 1.5 | 21.8 |
| MATH summarizer | Qwen2.5-7B | Five-role | LW2S final | 65.2 | 65.2 | 0 | 1.5 | 18.4 |
| MATH summarizer | Qwen2.5-7B | Five-role | Full workflow | 65.2 | 65.2 | 0 | 1.5 | 0.0 |
| Setting | cal. | Deg. | UCB 80 | Cal. saving | |
|---|---|---|---|---|---|
| MATH summarizer | 140 | 0.95 | 0 | 0.5 | 10.5 |
| GSM8K verifier | 50 | 0.00 | 0 | 1.4 | 26.2 |
| MBPP verifier | 150 | 1.00 | 0 | 0.5 | 24.5 |
| MBPP summarizer | 150 | 0.00 | 0 | 0.5 | 16.6 |
| Setting | Selected | Deg. | UCB 95 | Save | |
|---|---|---|---|---|---|
| MATH verifier | 250 | 250 | 0 | 1.5 | 25.1 |
| MATH summarizer | 250 | 250 | 0 | 1.5 | 18.4 |
| GSM8K verifier | 200 | 173 | 0 | 1.9 | 20.6 |
| MMLU verifier | 100 | 100 | 1 | 5.4 | 8.6 |
| MBPP slice0 | 100 | 100 | 0 | 3.7 | 28.5 |
| MBPP slice1 | 100 | 100 | 0 | 3.7 | 31.2 |
| Slice | Method | Full | Acc. | Deg. | Save | ||
|---|---|---|---|---|---|---|---|
| MBPP slice0 | RouteLLM | 69.0 | 68.0 | 1 | – | – | 16.9 |
| GraphPlanner | 69.0 | 69.0 | 0 | – | – | 13.4 | |
| AutoMix | 69.0 | 69.0 | 0 | – | – | 22.1 | |
| Fixed skip verifier | 69.0 | 70.0 | 0 | 100 | 0 | 24.2 | |
| Fixed skip summarizer | 69.0 | 69.0 | 0 | 0 | 100 | 16.3 | |
| LW2S (ours) | 69.0 | 70.0 | 0 | 69 | 31 | 28.5 |
| Regime | Observable state | Mechanism | Evidence | LW2S response |
|---|---|---|---|---|
| Shared wrong consensus | Executors agree on the same answer, but the verifier changes it to the gold answer | Agreement is not a certificate when agents share a misconception or shortcut | MMLU verifier boundary; Table 15 ; Qwen2.5-14B MMLU rows | Accept calibrated actions; retain the verifier when acceptance fails |
| Superficial code agreement | Programs look similar, but visible tests expose a shared bug | Non-executable agreement can preserve the same incorrect logic across executors | MBPP slice1 AST-guard degradation in Table 14 | Use executable guards and fall through to later decisions when early removal is blocked |
| Redundant late summarization | A verifier or checked intermediate already contains a parsable final answer or executable code | The final summarizer can add cost without improving reward, and can overwrite a correct intermediate answer | MATH summarizer, MBPP two-stage, and debate-refine rows | Prefer late-component omission when calibrated evidence supports reward preservation |
| Slice | Condition | Full | Acc. | Deg. | Selected |
|---|---|---|---|---|---|
| slice0 | both executors pass | 69.0 | 70.0 | 0 | 69 |
| Executor AST equality | 69.0 | 70.0 | 0 | 93 | |
| both pass + AST | 69.0 | 70.0 | 0 | 65 | |
| verifier passes tests | 69.0 | 69.0 | 0 | 69 | |
| verifier/summarizer AST (hindsight) | 69.0 | 69.0 | 0 | 99 | |
| slice1 | both executors pass | 63.0 | 63.0 | 0 | 58 |
| Example | Subject | Short prompt cue | Failure signal | Skip | Verifier | Gold |
| mmlu_test_13860 | virology | What is a virus pandemic? | executor consensus A/A | A | C | C |
LLM Agent Workflow Optimization
LLM agent workflow optimization studies how to design and run multi-step agents for better task success, reliability, latency, and cost.
See all 260 papers