[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112517":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":15,"starSnapshotCount":15,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},112517,"CE-Graph","jushengzhang\u002FCE-Graph","jushengzhang","CE-Graph: Failure-Driven Workflow Refinement (ICML 2026). Reference implementation, benchmark runners, and reproducible examples.","https:\u002F\u002Fproceedings.mlr.press\u002Fv306\u002Fzhang26f.html",null,"Python",438,1,71,0,48,198,350,246,90.9,"Apache License 2.0",false,"main",true,[],"2026-11-03 12:06:45","2026-11-23 20:32:12","\u003Cdiv align=\"center\">\n\n# CE-Graph\n\n### Failure-Driven Workflow Refinement\n\n**Learn from recurring failures. Propose targeted edits. Verify before committing.**\n\n**Contributors**\n\n[Jusheng Zhang](https:\u002F\u002Fjushengzhang.github.io\u002F), [Kaitong Cai](https:\u002F\u002Farxiv.org\u002Fsearch\u002Fcs?searchtype=author&query=Cai,+K), [Qinglin Zeng](https:\u002F\u002Farxiv.org\u002Fsearch\u002Fcs?searchtype=author&query=Zeng,+Q), [Ningyuan Liu](https:\u002F\u002Farxiv.org\u002Fsearch\u002Fcs?searchtype=author&query=Liu,+N), [Stephen Fan](https:\u002F\u002Farxiv.org\u002Fsearch\u002Fcs?searchtype=author&query=Fan,+S),\u003Cbr>\nJing Yang, Ziliang Chen, Yongsen Zheng, Kwok-Yan Lam, Liang Lin, Keze Wang\n\n[![Paper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-PMLR-4064AC?style=for-the-badge)](https:\u002F\u002Fproceedings.mlr.press\u002Fv306\u002Fzhang26f.html)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2510.10035-B3424A?style=for-the-badge)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2510.10035)\n[![ICML](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FICML_2026-Spotlight-BB8737?style=for-the-badge)](https:\u002F\u002Ficml.cc\u002Fvirtual\u002F2026\u002Fspotlight\u002F84846)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-7764A8?style=for-the-badge)](LICENSE)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.10%2B-3572A5?style=for-the-badge)](pyproject.toml)\n\n\u003C\u002Fdiv>\n\n> **Contributor acknowledgment:** Qinglin Zeng, Ningyuan Liu, and Stephen Fan also contributed to this work; I apologize for inadvertently omitting them from the initial repository credits, which have now been corrected.\n\n\u003Cp align=\"center\">\u003Cimg src=\"assets\u002Freadme\u002Foverview.png\" width=\"100%\" alt=\"Original paper overview comparing AFlow, MaAS, and CE-Graph: failure signatures are clustered into recurring modes, then guide verified workflow edits.\">\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Csub>Original paper figure. CE-Graph turns execution failures into signals for targeted workflow refinement.\u003C\u002Fsub>\u003C\u002Fp>\n\nCE-Graph optimizes LLM workflows by examining **how they fail**, rather than treating each run as a single success or failure score. It collects counterexamples, identifies recurring failure modes, proposes constrained graph edits, and accepts edits after verification. The aim is to reduce the workflow's expected failure mass.\n\nThis repository releases a **reference implementation** of that loop, task runners, and reproducible commands. It retains the supplied package's reconstruction choices and limitations; it is not an archive of the original paper's complete experiment environment or raw results. See [Implementation scope](#implementation-scope) before comparing scores.\n\n## Contents\n\n- [Overview](#overview)\n- [Quick start](#quick-start)\n- [Run an experiment](#run-an-experiment)\n- [Benchmarks](#benchmarks)\n- [Configuration](#configuration)\n- [Implementation scope](#implementation-scope)\n- [Repository structure](#repository-structure)\n- [Citation](#citation)\n\n## Overview\n\n| Stage | What happens | Implementation |\n|---|---|---|\n| **Collect** | Run the current workflow and retain failed execution traces. | [`counterexamples.py`](verl\u002Fce_graph\u002Fcounterexamples.py) |\n| **Find recurring modes** | Build failure signatures; cluster embeddings with GMM and BIC, with a rule-based fallback. | [`failures.py`](verl\u002Fce_graph\u002Ffailures.py) |\n| **Propose** | Suggest prompt revisions, inserted nodes, or removed nodes. | [`proposer.py`](verl\u002Fce_graph\u002Fproposer.py) |\n| **Verify & commit** | Evaluate candidate edits on exemplars, accept improvements, and stop on convergence. | [`refine.py`](verl\u002Fce_graph\u002Frefine.py) |\n\nOptional extensions include regression checks and Python repair nodes. The standard benchmark driver uses the prompt\u002Fgraph-edit proposer. The bundled executor processes nodes in list order; it is a lightweight execution model rather than a general parallel DAG engine.\n\n## Quick start\n\n**Python 3.10+**. No GPU is required for the included API-backed runners.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjushengzhang\u002FCE-Graph.git\ncd CE-Graph\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate          # Windows: .venv\\Scripts\\activate\npython -m pip install -e .\n```\n\nStart with a small **offline demonstration**:\n\n```bash\npython -m examples.ce_graph_refine.offline_demo\npython -m unittest discover -s tests -v\n```\n\nThe demo uses synthetic traces and a deterministic operator to show a failure mode being repaired. It makes no network calls and needs no API key. Its scores illustrate control flow; they are not research benchmark results.\n\n## Run an experiment\n\nConfigure your own API key and model:\n\n```bash\nexport OPENROUTER_API_KEY=\"your-api-key\"\nexport OPENROUTER_MODEL=\"openai\u002Fgpt-4o-mini\"\nexport EMBED_BACKEND=\"local\"\n```\n\nRun a small GSM8K experiment and save its report:\n\n```bash\npython -m examples.ce_graph_refine.run_all_paper \\\n  --benchmark gsm8k \\\n  --train-n 10 --val-n 20 \\\n  --max-iters 2 --n-proposals 2 --verify-k 4 --patience 2 \\\n  --n-workers 2 --max-tokens 2048 \\\n  --save-report runs\u002Fgsm8k.json\n```\n\n`local` uses hashing features for failure clustering. Switch to `EMBED_BACKEND=openrouter` to use the embedding API. Chat-model and embedding requests use your account and may incur charges.\n\nReports contain baseline\u002Frefined scores, the model, embedding backend, example IDs, refinement decisions, and the resulting workflow. The `train` and `val` arguments name **disjoint refinement\u002Fevaluation slices of the loader's selected split**; they do not automatically select a dataset's official train and test splits.\n\nFor larger runs, code tasks, and protocol details, see **[Reproduction guide](docs\u002FREPRODUCTION.md)**.\n\n## Benchmarks\n\n| Task | Dataset used by the runner | Evaluation |\n|---|---|---|\n| GSM8K | `openai\u002Fgsm8k` | Numeric answer matching |\n| MATH | `EleutherAI\u002Fhendrycks_math`, four subjects | Normalized LaTeX string matching |\n| MultiArith | `ChilleD\u002FMultiArith` | Numeric answer matching |\n| HumanEval | `openai\u002Fopenai_humaneval` | Python grading tests |\n| MBPP | `google-research-datasets\u002Fmbpp`, sanitized | Python assertions |\n| BBH proxy (`--benchmark gaia`) | Selected `lukaemon\u002Fbbh` tasks | Multiple-choice matching |\n| AIME 2025 | `MathArena\u002Faime_2025_I` and `MathArena\u002Faime_2025_II` | Integer answer matching |\n\n**The `gaia` option runs a BBH proxy, not the GAIA benchmark.** No measured benchmark scores or model weights are bundled with this release. Use the published paper for its reported results; this repository does not assert numerical reproduction.\n\n## Configuration\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `OPENROUTER_API_KEY` | Required for API runs | Your provider API key |\n| `OPENROUTER_MODEL` | `openai\u002Fgpt-4o-mini` | Chat model identifier |\n| `OPENROUTER_BASE_URL` | `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions` | Full chat-completions endpoint |\n| `EMBED_BACKEND` | `openrouter` | `openrouter`, `openai`, or `local` |\n| `EMBED_MODEL` | `text-embedding-3-small` for `openai` mode | Embedding model |\n| `EMBED_BASE_URL` | `https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fembeddings` for `openai` mode | Full embeddings endpoint |\n\nTo use another OpenAI-compatible provider, set its full endpoint and model ID. The legacy variable name `OPENROUTER_API_KEY` is also used for that provider's key and for remote embeddings. `.env.example` lists the settings; export them in your shell rather than committing credentials.\n\n## Implementation scope\n\n- **Reference release.** The provided archive reconstructs the method and a MaAS-style baseline. Matching the paper requires aligning splits, prompts, model versions, token budgets, and graders.\n- **Evaluation visibility.** `--maas` selects the reconstructed workflow architecture. It does **not** expose full grading tests. `--expose-public-tests` explicitly enables a test-visible diagnostic run, which is labeled in its report and must not be presented as hidden-test benchmark accuracy. MBPP retains the runner's single visible example assertion.\n- **Code execution.** HumanEval, MBPP, and Python repair nodes execute generated code in local subprocesses. Timeouts are not security isolation; run these experiments in a disposable environment without unrelated secrets.\n- **Protocol differences.** MATH uses a balanced four-subject slice and string matching rather than symbolic equivalence; BBH is only a reasoning proxy. The offline hashing fallback differs from semantic API embeddings.\n- **Reported results.** Report every seed and selection rule. Do not select a best seed on the evaluation set and describe it as a single-seed reproduction.\n\n## Repository structure\n\n```text\nCE-Graph\u002F\n├── assets\u002Freadme\u002F                 # Original paper figure and provenance\n├── verl\u002Fce_graph\u002F                 # Workflow, executor, clustering, proposer, refinement\n├── examples\u002Fce_graph_refine\u002F      # Benchmark runners and offline demo\n├── docs\u002FREPRODUCTION.md           # Commands and evaluation protocol\n├── tests\u002F                        # Offline regression tests\n├── scripts\u002Fcheck.sh             # Offline validation without API keys\n├── CITATION.cff\n├── pyproject.toml\n└── LICENSE\n```\n\nThe `verl.ce_graph` import path is preserved from the supplied release. This is a standalone lightweight package, not the full verl reinforcement-learning framework; use a separate virtual environment if you also work with upstream verl.\n\n## Citation\n\nPlease cite the published paper:\n\n```bibtex\n@InProceedings{pmlr-v306-zhang26f,\n  title     = {Failure-Driven Workflow Refinement},\n  author    = {Zhang, Jusheng and Cai, Kaitong and Yang, Jing and Chen, Ziliang and\n               Zheng, Yongsen and Lam, Kwok-Yan and Lin, Liang and Wang, Keze},\n  booktitle = {Proceedings of the 43rd International Conference on Machine Learning},\n  pages     = {154214--154240},\n  year      = {2026},\n  volume    = {306},\n  series    = {Proceedings of Machine Learning Research},\n  publisher = {PMLR},\n  url       = {https:\u002F\u002Fproceedings.mlr.press\u002Fv306\u002Fzhang26f.html}\n}\n```\n\nThe earlier arXiv version has a different author list; the metadata above follows the published PMLR version.\n\n## License & acknowledgments\n\nCode is released under the **[Apache License 2.0](LICENSE)** included in the supplied archive. Datasets remain subject to their own terms. The original paper figure is attributed in [assets\u002Freadme\u002FREADME.md](assets\u002Freadme\u002FREADME.md).\n\nThe reconstructed MaAS-style workflow is described in the [reproduction guide](docs\u002FREPRODUCTION.md). README presentation was inspired by [UMM-Reflection](https:\u002F\u002Fgithub.com\u002Fwaltstephen\u002FUMM-Reflection); its code, results, and visual assets are not included here.\n","CE-Graph 是一个面向大语言模型（LLM）工作流的失败驱动式自动化优化框架。它通过系统性收集执行失败的反例、聚类识别反复出现的失败模式、生成受约束的图结构编辑方案，并在应用前进行验证，从而降低工作流的整体失败概率。项目基于ICML 2026 Spotlight论文实现，提供可复现的参考代码、基准测试运行器和标准化实验配置，技术上聚焦于工作流图（DAG）的语义感知编辑与失败归因分析。适用于需持续迭代调试复杂LLM流水线（如RAG、Agent编排、多步推理）的研发场景，尤其适合对可靠性与可解释性有较高要求的工业级AI工程实践。",2,"2026-11-24 04:43:41","CREATED_QUERY"]