jushengzhang/CE-Graph

CE-Graph: Failure-Driven Workflow Refinement (ICML 2026). Reference implementation, benchmark runners, and reproducible examples.

What it solves

LLM workflows are usually treated as a single success or failure score, which hides why they fail. CE-Graph instead looks at the actual failed execution traces, finds recurring failure patterns, and uses those patterns to suggest targeted edits to the workflow graph. The goal is to reduce the overall expected failure rate by learning from mistakes instead of just counting them.

How it works

CE-Graph runs a four-stage loop:

  1. Collect – execute the current workflow and keep the failed traces.
  2. Find recurring modes – build failure signatures from those traces, cluster them using a Gaussian mixture model with BIC, and fall back to a rule-based method when needed.
  3. Propose – suggest prompt revisions, or add/remove nodes in the workflow graph.
  4. Verify & commit – test each proposed edit on exemplars, accept only improvements, and stop when the process converges.

The included executor processes nodes in list order, so it is a lightweight execution model rather than a parallel DAG engine. It can optionally run regression checks and Python repair nodes. The offline demo uses synthetic traces and a deterministic operator to show the repair loop, and it requires no API keys.

Who it’s for

Researchers and developers working with LLM-based workflow pipelines who want a principled, failure-aware way to refine prompts and graph structure. The repository provides a reference implementation, task runners for several benchmarks, and configuration for API-backed execution. Python 3.10+ is required, and no GPU is needed for the included API-backed runners.

Highlights

  • Failure-driven refinement: clusters actual failures, not just scores.
  • Constrained graph edits: proposes prompt revisions and node additions/removals, then verifies before accepting.
  • Offline demo and tests: runnable without any network or API key.
  • Multiple benchmark runners: GSM8K, MATH, MultiArith, HumanEval, MBPP, a BBH proxy, and AIME 2025.
  • Flexible embedding backends: local hashing, OpenRouter, or OpenAI-compatible endpoints.
  • Reference implementation only: does not claim to reproduce the paper’s exact results, and clearly documents its reconstruction choices and limitations.

Related

  • Project
  • Project
  • Project
  • Project