Textual Equilibrium Propagation for Deep Compound AI Systems
Authors: Minghui Chen
Wenlong Deng
James Zou
Han Yu
Xiaoxiao Li
Venue: ICLR 2026 Poster (2026)
Keywords: Compound AI System
Primary area: foundation or frontier models, including LLMs

Abstract: Large language models (LLMs) are increasingly deployed as part of compound AI systems which coordinate multiple modules (e.g., retrievers, tools, verifiers) over long-horizon workflows. Although recent frameworks that propagate textual feedback globally (e.g., TextGrad make it feasible to optimize such pipelines, we identify two depth-scaling failure modes in long-horizon agentic workflows: 1) exploding textual gradient, where textual feedback grows exponentially with depth, leading to prohibitively long message and amplifies evaluation biases; and 2) vanishing textual gradient, where limited long-context ability causes models overemphasize recent or early feedback, while compression of lengthy feedback causes downstream messages to lose specificity gradually as they propagate many hops upstream. To mitigate these issues, we introduce Textual Equilibrium Propagation (TEP), a local learning principle inspired by Equilibrium Propagation in energy-based models. TEP includes two phases: 1) a free phase where a local LLM critics iteratively refine prompts until reaching equilibrium (no further improvements are suggested); and 2) a nudged phase which applies proximal prompt edits with bounded modification intensity, using task-level objectives that propagate via forward signaling rather than backward feedback chains. This design supports local prompt optimization followed by controlled adaptation toward global goals without the computational burden and signal degradation of global textual backpropagation. Across long-horizon QA benchmarks and multi-agent tool-use dataset, TEP consistently improves accuracy and efficiency over global propagation methods such as TextGrad, with gains that increase at greater depths, while preserving the practicality of black-box LLM components in deep compound AI system.

Published as a conference paper at ICLR 2026
TEXTUAL EQUILIBRIUM PROPAGATION FOR DEEP COMPOUND AI SYSTEMS
Minghui Chen Wenlong Deng James Zou', Han ,u', Xiaoxiao L
1 Nanyang Technological University University of British Columbia
3 Vector Institute Stannfor University
ABSTRACT
Large language models (LLMs) are increasingly deployed as part of compound AI systems that coordinate multiple modules (e.g.. retrievers, tools, verifiers) over long-horiag workflows. Recent approaches that propagate textual feedback glob- ally (e.g., TextGrad (Yuksekgonul et al., (025)) make it feasible to optimize such pipelines, but find that performance degrades system depth grows. In par- ticular, long-horizon agentic workflows exhibit two depth-scaling failure modes: (1) exploding textual gradient, where textual feedback grows exponentially with depth, leading to prohibitively long message and amplifies evaluation biases; and (2) vanishing textual gradient, where limited long-context ability causes mod- els overemphasize partial feedback and compression of lengthy feedback causes downstream messages to lose specificity gradually as they propagate many hops upstream. To mitigate these issues, we introduce Textual Equilibrium Prop- agation (TEP), a local learning principle inspired by Equilibrium Propagation in energy- baseg models (Scellier & Bengio 2017). TEP includes two phases: 1) free phase where a local LLM critics iteratively refine prompts until reach- ing equilibrium (no further improvements are suggested); and 2) nudged phase which applies proximal prompt edits with bounded modification intensity, using task-level objectives that propagate via forward signaling rather than backward feedback chains. This design supports local prompt optimization followed by controlled adaptation toward global goals without the computational burden and signal degradation of global textual backpropagation. Across long-horizon QA benchmarks and multi-agent tool-use dataset, TEP consistently improves accu- racy and efficiency over global propagation methods such as TextGrad. The gains grows with depth, while preserving the practicality of black-boo LLM components in deep compound AI system.
INTRODUCTION
Compound artificial intelligence (AI) systems (i.e., pipelines that coordinate large language models (LLMs), retrievers, tools, verifiers, etc.) are becoming a popular way for deploying AI in settings that require multi-step sequential reasoning and external tools (Yao et al., 2023; Shinn et al. 2023) Emerging benchmarks place greater emphasis on long-horizon behaviors such as mupt reason- ing, iterative planning, and multi-tool interaction at realistic scales (e.g., WebArena (Zhou et al.) 2024) for web interaction, and ToolBench (Qin et al. (024)) for large-scale tool calls). As workflow depth and task complexity grow, single-agent architectures reveal fundamental limitations: they lack the specialized expertise for diverse subtasks (Khattab al. 2024), accumulate errors without intermediate correction (Shnnn et al. 2023), and hit context limits when handling long execution
traces (Liu al. 2024
TextGrad (Yuksekgonul et al. 2025) pioneered "automatic differentiation via text" for compound AI systems. It back pook-propagates textual feedback from an LLM--s--udge upstream through the com- putation graph to update agent configurations (e.g., prompts and tools). This approach works well in relatively short chains, steering LLM behaviors without numerical gradients and enabling self- improvement at each step to better handle specialization and error accumulation.
Corresponding author; xiaoxiao. li ubc.uc

---

Published as a conference paper at ICLR 2026
Eustodogge
Book-gropeggne textuall godient
Dootes anoonders EgUnt burted
Tecn Gradiert
Regaggatioon
Exploding Textual Gradient
srast Oriiggs
Textual Gradiant
Ohanos codl
CENDE
Oradae prokolassypc
cobtll Wentheer welk serthaagi inin and d ariting act
Protites Analplis Agent
Code Deseroor Agent
LNR Teat Generetor Agant
Real Gemernoor Agent
Vanishing tepe? Textual Gradient
Co S0 Jii ond
Sckash autiot snlicia
Sgc sdge case redionn
Vertaliing tageeeteee abee acticn agait Beccomie ann- actoonadda
Code Genenator
Unit Teat
Finsl Coce
Figure 1: Textual gradient failure modes in deep compound AI systems, an example bug report propagates through a multi-agent code generation pipeline (Problem Analyzer + Code Genera- tor + Test Generator- - Final Validator). Exp-Exploding gradients: Each agent adds context to preserve information, causing exponential token growth that buries the actionable one-line fix be- neath layers of accumulated texts.
gradients: Compression to manage gradient explosion strips away critical specifics (file paths, line numbers, test cases), leaving only generic, non-actionable advice.
However, TextGrad faces depth-scaling challenges in compound Al system analogous to deep neu- ral networks. Like traditional backpropagation's vanishing and exploding gradients (Bengio al.) 1994), textual backpropagation suffers similar instabilities: each layer may amplifie noise or weaken useful signals. Specifically, TextGrad exhibits two depth-dependent failures:
Exploding textual gradient: feedback accumulates across layers, leading to growing prompt sizes and LLM-as-judge biases (Zheng et al., 2023). Critical corrections get buried in long contexts, triggering the "lost in the middle" effect (Liu et al. 2024).
Vanishing textual gradient: limited long-context ability causes models to overemphasize early or recent portions (Liu et al.] (2024), while compression strategy removes specificity (Chen al., 2025). leaving early modules with diluted guidance.
Together, these failure modes reveal a fundamental limitation of global textual backpropagation for deep compound AI systems: optimization signals degrade exponentially as workflow depth in- creases.
Our proposal. We introduce Textual Equilibrium Propagation (TEP), a local learning framework for compound systems inspired by Equilibrium Propagation in energy-based models (Scellier & Bengio 2017; 2019). As illustrated in Figure 2 TEP tackles the failure modes of global textual backpropagation using a local, two-phased optimization. In equilibrium propagation, numerical gradients are obtained via two dynamics: free phase that relaxes to an equilibrium, followed by a nudged phase that gently pushes the system toward task targets. TEP adapts this idea to agentic workflows:
local LLM critics iteratively refine prompts at each node in the workflow until reaching an "equilibrium", where more improvement is suggested by the local crities.
Free phase:
Nudged phase: proximal prompt edits with bounded modification intensity, guided by task- objectives propagated via forward signaling rather than long backward feedback chains, enabling controlled adaptation toward global goals.
2

---

Published as a conference paper at ICLR 2026
(+)
TeetGrad
[b] TEP (proposed)
Free Phase
LLM
Responoe
LMM
Prediction fruth
Resporss
LLM
Groud Truth
Query
QLery
Query
Quary
Incil
Prompt
Pronet
Losa
Low
stass
promot our bypoosddyy prompt inseroed byy
Nudiped
SFranpe
Insaoved by
LLM
Resporse
LUM
Prediction ve. Gmund Truth
Tratiol
Winkbing
Guery
Gradiort
Prompt
Promoot
Figure 2: Overview of Textual Equilibrium Propagation (TEP). (a) TextGrad: Multi-step work- flows as Stochastic Computation Graphs (SCGs) where nodes are LLM agents with configurable prompts and edges represent data flow. Global textual backpropagation suffers exploding gradi- ents (exponentially growing feedback) and vanishing gradients (decaying specificity) at depth. (b) Textual Equilibrium Propagation: Free phase optimizes each node locally until no further im- provements are suggested (equilibrium), then nudged phase applies bounded prompt modifications guided by task objectives. This local approach avoids global feedback chains.
By first achieving local optimization through equilibrium-seeking and then applying controlled prox- imal edits, TEP reduces both the computational burden and signal degradation associated with global textual backpropagation. As shown in Figure 2 this local approach helps maintain more stable op- timization signal as workflow depth increases, effectively mitigating both exploding and vanishing textual gradient issues. TEP also naturally fits with the modular design of modern compound Al frameworks while remaining model-agnostic.
Contributions.
This paper makes the following three key contributions:
Identification critical gaps: We analyze fundamental limitations of TextGrad-style optimiza- tion in deep compound Al systems, and formalize exploding and vanishing textual gradients as depth-dependent failure modes that make global backpropagation ineffective for long agentic workflow.
New optimization method: We propose Textual Equilibrium Propagation (TEP), novel com- pound AI system optimization method specifically designed for deep workflows, with (i) an equilibrium-ssekinng free phase for local refinement, and (ii) a node-local nudged phase with bounded textual perturbations.
Comprehensive empirical validation: Through extensive experiments multi-step QA and multi-agent tool-use benchmarks, we demonstrate that TEP consistently outperforms TextGrad (Yuksekgonul al. (2025) with advantages greater depths.
RELATED WORK
Compound AI System Optimization. Compound AI systems that orchestrate multiple LLMs, tools, and other components (Wu al. [2024a] Khattab al. 2024 have inspired new optimization approaches for multi-step agentic workflows Yao er al. 2023 Shinn et al. 2023). TextGrad (Yuk- sekgonul al., 2025) pioneered automatic differentiation via text, propagating textual feedback through computation graphs to optimize prompts without numerical gradients. While effective in shallow pipelines, TextGrad suffers from depth-dependent issues analogous to exploding and van- ishing gradient in deep neural networks (Bengio et al.) 1994), where textual feedback grows into intractable long messages. Limited context capacity exacerbates this, as models over-attend to early or recent portions (Liu et al. 2024), and summarization-bol based compression methods such as those in FedTextGrad (Chen et al.
2025) can dilute feedback into generic suggestions. OPTIMAS (Wul et al. 2025) employs locally trained rewards but requires costly parameter fine-tuning and global evaluations. Exisitng iterative self-refinement approaches (Madaan et al. (2033 Zhang et al.) 2025) and prompt optimization methods (Fernando et al. 2024 Dong al. 2024) still lack specific de-
3

---

Published as a conference paper at ICLR 2026
sign for deep compound Al systems. TEP mitigates these issues via local equilibrium-bart based updates that help preserve signal quality even with compound AI system depth increases.
Long-horizon Reasoning. Multi-hop QA benchmarks Yang et al. 2018 Trivedi et al. 2022 Geva ct al., 2021) and tool-use datasets (Zhou et al.) 2024; Qin et al., 2024) expose fundamental depth- scaling limitations in compound AT systems. Performance tends to drop sharply as compound AI depth increases. This is potentially driven by compounding effects such as the "lost in the middle" problem (Liu et al., 2024), LLM-as-judge biases (Zheng al. 2023) that distort evaluation, and simple error accumulation across many steps. Self-improvement techniques (Huang et al. [023] Kumar al., 2024) provide only partial mitigation, since they fail to decouple local optimization from global feedback chains. Thus, they are still vulnerable to the exponential signal degradation in deep architectures. TEP tackles this limitation through local equilibrium dynamics inspired by energy-based model learning (Scellier & Bengio 2017 2019), allowing effective and efficient opti- mization even depths where global propagation methods tend fail.
THE PROPOSED TEP METHOD
In this section, we formalize deep compound Al systems, define depth-dependent failure modes for global textual feedback, and introduce TEP as a local two-phase learning principle that avoids long- range textual backpropagation. We then show that TEP yields a consistent descent direction and converges under standard conditions.
3.1 PROBLEM FORMULATION VIA STOCHASTIC COMPUTATION GRAPIIS
We define a compound AI system as a stochastic computation graph (SCG): a directed graph G = -V, whose nodes random variables or deterministic transforms, and whose edges en- code functional dependence. Each node produces an output and has parents pa(v) C V. We distinguish deterministic nodes D from stochastic nodes S. In LLM-based compound AI systems, most nodes are stochastic due to the inherent randomness of language model outputs, whereas deter- ministic nodes typically correspond to simple tools (e.g., calculators, database queries) or function calls with fixed outputs.
Compound AI system. Nodes represent LLMs, tools, or controllers with local parameters 6g (prompts, hyperparameters, routing rules) and possibly internal state. For deterministic nodes V E D, we have 2, L (=pa(t); O..). For stochastic nodes v E S, we have 2, ~ >Po(- #pa(u) 0,)). For simplicity, we focus on predefined SCGs and optimize this fixed structure, although the frame- work and method can naturally extend to dynamic SCGs.
Problem instance. Let Drsk be distribution over task inputs For fixed SCG G (V, E)) with node-wise parameters 0 = (0w Jev, running G on input o induces a distribution Pa o) over node outputs Z (2v hvev. A task loss E(o, Z) then evaluates the resulting output.
Objective. We aim to optimize 0 to minimize the expected risk
J(0) Drus E [e(o, 2)]
Equivalently, with L(o, 0) (l) Z)], minimize J(Ø) Eow IEo (L(o,))]
3.2 TEXTUAL GRADIENT PROPAGATION AND DEPTH CHALLENGES
To understand why existing global optimization fails in deep compound Al systems and to motivate our local approach, we first formalize the textual gradient propagation in stochastic computation graphs. We then define exploding and vanishing textual gradients.
Textual gradient descent in SCGs. In TextGrad-style optimization, each node v V is treated as an L.M agent with local parameters 0, (prompts, hyperparameters). A critic LLM evaluates node outputs and generates textual feedback. For a single node, the update
0' U.(g,, 0w), go C(zu, 0w),
where is the critic LLM that takes node output x, and current parameters 6,, as input and generates textual feedback 9u with specific improvement suggestions (e.g., "increase temperature for more
4

---

Published as a conference paper at ICLR 2026
diversity," "add constraint X to the prompt," "revise line Y in the instruction"). The update operator Up implemented as an LLM that takes the textual feedback Iu and current parameters 6, as imputs, then produces updated parameters 6' by rewriting prompts, adjusting hyperparameters, or generating new instructional text that incorporates the critic's suggestions.
For multi-node chains, the update at node depends on downstream feedback:
02 Un(gw,00 0z), ge = C(zu, Oz g'))
where g' aggregates textual gradients from descendant nodes. This coupling creates dependency chain: updates at depth d require propagating feedback through all subsequent layers, leading to the depth-scaling failure modes we formalize below.
Exploding Textual Gradient. While exploding numerical gradient manifests as unbounded magni- tudes, exploding textual gradient show up unbounded message length and complexity. Let (gg) denote the token count required to transmit feedback (a practical constraint that TEP's bounded local updates respect). Explosion occurs when maintaining useful feedback (specificity S(gu) 2 for some threshold >> 0) across length-k chain requires exponentially growing messages:
[(B()))) 2 cn for > 1, <>> 0.
(4)
The key distinction from numerical gradients is that backpropagated textual feedback grows ex- ponentially with SCG depth, potentially exceeding LLM context limits (e.g.. 128K tokens). Each layer must preserve all downstream feedback while adding its own analysis, so the gradient message becomes not only very long but also increasingly distorted as LLMs inject biases that compound through the chain. As a result, exploding textual gradient can cause transmitted message to exceed an LLM's context window hide essential information inside an overly long context.
Vanishing Textual Gradient. Analogous to numerical gradients that decay exponentially in deep networks, textual gradients vanish when attempts compress exploding feedback cause speci- ficity to degrade over multi-hop propagation. Let (gg) E [0, 1] measure the actionable specificity of feedback g (how well it guides parameter updates). For length-k chain from the final output back to node u, vanishing occurs when:
B[S(aw)] S Co for a E (0, C>0,
(5)
where Iu the feedback reaching u. Unlike numerical gradients that shrink in magnitude, textual gradients lose information density as compression and summarization attempt to manage the expo- nentially growing context. This is related the "lost in the middle" effect, where LLMs struggle to extract information buried in long contexts (Liu et al. 2024). For instance, actionable feedback like "replace >= with the loop condition" may degrade into generic suggestions such as "improve algorithm efficiency" after several attempts compress the message. In this paper, quantify ishing textual gradients through a low effective update rate, meaning that suggested prompt updates do not lead to performance improvements.
Implications for compound AI systems. These failure modes limit TextGrad scalability in deep SCGs. Exploding gradients lead to context overflow and high computational costs, while vanishing gradients leave upstream nodes with generic, unusable feedback. In practice, even modest depths (10 to 20 nodes) can trigger these issues, making global textual backpropagation impractical for real systems.
This motivates local approach. TEP uses node-local crities (avoiding g' dependencies) and bounded parameter updates. As shown in Appendix [A] local evaluation can maintain feedback quality S(g) 2 - within context limits (gg) < context limit, circumventing both explosion and vanishing while keeping the effectiveness of textual optimization.
3.3 OUR PROPOSED SOLUTION: TEXTUAL EQUILIBRIUM PROPAGATION (TEP)
To address vanishing and exploding textual gradients, we introduce Textual Equilibrium Propaga- tion (TEP) for optimizing compound AI systems using textual gradients. TEP adapts equilibrium propagation from numerical networks to textual SCGs, replacing global critique propagation with local, bounded perturbations around a node-local equilibrium. Figure shows overview of the proposed TEP, which consists of two main phases: a free phase and nudge phase. Note that prompt optimization tasks evaluated only provide global label at the final output level. No intermediate
5

---

Published as a conference paper at ICLR 2026
ground-trune labels available. By default, the used critic model is the same node model. These phases are detailed below.
Free phase. In TEP, each node first optimizes locally reach behavioral equilibrium using two learnable mechanisms: (i) an LLM critic with a structured rubrics prompt @eriiic that evaluates outputs using both task-independent quality metrics (clarity, completeness, consistency) and task- dependent performance criteria, and (ii) actor temperature parameter m U(0.3, 0.9) that controls
during local refinement. The critic scores output By and returns feedback 9. = C( 0ctiicc, where C' is the critic defined in Section 3.2, now applied locally without descendant gradient g' Free phase reaches equilibrium (0) when the critic's scores stabilize across iterations. This local refinement removes global feedback chains with the structured critic prompt. (See Appendix forr implementation details.)
Nudged phase. In classical equilibrium propagation, small perturbation is applied the outputs to steer the system toward the desired behavior. In TEP, the perturbation is implemented as a minimal prompt edit at each node in SCG of deep compound Al system. Concretely, these edits are applied to reinforce node-local criteria that align with the global task target. After applying the edits, the system run again and iterate until reaches a nudged equilibrium, which is different from free equilibrium based on the local feedback signal.
Local update rule. Unlike classical EP that forms updates from numerical gradient differences between free and nudged equilibria, TEP adopts an LLM-defined operator jointly combine feed- back from both phases. The update follows: 0' = Un T 0z), where g and 9h are the feedback signals from the free and nudged phases, respectively. Both are kept within bounded length and specificity in Section 3.2's definitions. U, is the LLM-defined update operator. It maps these feed- back signals to updated node specification (i.c., prompt edit). We apply validation based selection at every update (in both phases and in the final combination), keeping only edits that do not reduce validation performance.
4 EXPERIMENTAL EVALUATION
We evaluate TEP diverse compound AT tasks that require long-horizon reasoning, and compare it
against state-of-the-an textual optimization methods. Our experiments are designed round three key
questions: (I) Does TEP improve performance over global textual backpropagation methods? (2)
How severe are apploding/aanshing gradient issues in practice, and does TEP mitigate them? (3)
Which components of TEP contribute most its overall effectiivness??
4.1 EXPERIMENT SETUP
Tasks and Datasets.
We evaluate on four multi-step reasoning and tool-orchestration benchmarks:
PubMedQA (Jin et al. 2019) (biomedical QA). We use the original "expert" split and discard ambiguous samples, yielding 475/25/500 (train/dev/tes) cnestion-abstrace pairs. Metric: classi- fication accuracy over [yes,no. maybbe. Base model: GPT-4o. Prompt-optimization modules:
Context Analyst, Problem Solver.
STARK-PRIME (Wu et al., 2024b) (retrieval over strutstructured biomedical corpora). We use the original split 495/5T/96 queries. Metric: Mean Reciprocal Rank (MRR). Base model: Claude 3 Huiku. Prompt-optimization modules: Text Scorer, Relation Scorer.
3. HotpotQA (Yang et al. 2018) (multi-hop QA with retrieval-augmennee generation). We keep the official splits 1000/250/100 Metrie: answer-level F1. Base model: GPT-4o-mini. Prompt- optimization modules: Question Rewriter, Info Extractor, Hint Generator, Answer Generator.
BigCodeBench (Zhuo et al. 2024) (self-verified code generation). We proportionally subsam- plc to 500/25/70 coding tasks. Each item includes a natural- spec and reference unit tests. Metric: pass@ Base model: Claude Haiku. Prompt-optimization modules: Code Generator, Unit-Test Generator, Final Code Generator.
Baselines.
We compare TEP against five strong baselines, summarized below.

---

Published as a conference paper at ICLR 2026
1. Chain-of-Thought (CoT) (Wei et al. 2022); Standard prompting with step-by-step reasoning; no learning or prompt updates. Serves as the unoptimized reference.
DSPy (Khattab et al., 2024): modular programmatic framework that learns and compiles prompts from demonstrations. We use task-specific modules with default DSPy tuning recipes.
3. Hierarchical Behavior Cloning (HBC) (Le et al. 2018): Hierarchical imitation learning that aligns sub-module outputs high-reward trajectories.
TextGrad (Yuksekgonul al. 2025): Global textual backpropagation over the full SCG. Feed- back is propagated hop-by-hop without length constraints, following the original setup.
5.
(Chen et al. 2025): We adapt summarization prompting- compting--rrgiinllly used in rros-eevvcce federated learning to compress stacked-lay -laee textual gradients and control their length.
Implementation Details. Across all benchmarks, we refer the SCG configurations of Wu et al. 2025). We do not include direct comparison to OPTIMAS, as their focus parallel, parameter fine-tuning differs from our black-box prompt-oprimization setting. By default, TEP uses 20 itera- tions in the free phase and 40 iterations in the nudged phase. We detail the computational cost of each baselines in the Appendix D.4.
4.2
MAIN RESULTS
Table 1: Performance comparison across compound AI benchmarks. Best in bold.
PubMedQA Medical Analysis
STARK-PRIME
HotpotQA RAG
BigCodeBench
Complex Retrieval
Verified Code Gen.
Method
(Aco.)
(MRR)
(F1)
(Pass Rate)
CoT HBC DSPy
17.34=:1.12
39.76:10.84
33.92:10.76
1.41551143
58.80=0.588
36.95=0.59
21.16:1.997
27.78
60.26:10.40
41.40:10.04
44.90:1:.32
33.81::2.75
TexIGrad
56.96:1:2224
11.71
24.86.11.19
35.71110.10
TextGrad w/ Sum
56. 1..
10.72+1.21
1..1
35.12
TEP (Ours)
62.02-+1.31
42.72-0.65
48.72++1.32
38.97:10.39
Overall Performance Result. Table ssoows shows that TEP perform consistently well across diverse compound AI benchmarks. achieves the best performance on all four tasks, with particularly strong gains complex reasoning benchmarks: 8.1% improvement over the next-best method on HotpotQA and 3.4% on BigCodeBench. TextGrad with Summarization shows modest improve- ments vanilla TextGrad retrieval tasks (STAR--RRMEE) but its performance drops reasoning-heavy tasks (HotpotQA, BigCodeBench), suggesting that compression-based solutions cannot fully address textual gradient issues. The results validate that TEP's local optimization ap- proach scales effectively to real-world compound AI systems while avoiding the fundamental limi- tations of global textual backpropagation.
4.3 EMPIRICAL ANALYSIS OF TEXTUAL GRADIENT FAILURE MODES
We empirically validate theoretical analysis with controlled depth-scaling experiments that iso- late the effects of workflow complexity on textual gradient propagation. Using artificially deepened compound Al systems, we demonstrate the practical manifestation of exploding and vanishing gra- dient phenomena predicted by our hypothesis.
Experimental Design. We vary computational graph depth using the BigCodeBench code gen- eration pipeline as our base architecture. The standard pipeline contains four sequential modules: Problem Analysis, Code Generation, Test Generation, and Code Refinement. To study depth effects, introduce scale factor f1,2,3, 3, 4, 5) that replicates each module with intermediate refine- ment stages. At scale s, the graph G, contains 4s nodes performing semantically equivalent trans- formations-con code reformatting, documentation enhancement, and style consistency checks that

---

Published as a conference paper at ICLR 2026
preserve functional correctness while extending gradient propagation paths. We measure two key metrics: feedback token count (s)) quantifying message complexity, and effective update rate p(s) measuring the fraction of nodes that successfully improve their outputs based on received feedback.
Exploding Textual Gradients: Exponential Message Growth. Figure B( shows that TextGrad's feedback messages grow roughly exponentially with depth, and the accumulated text length can exceed an LLM's maximum context window as the depth increases. The token count increases from 2K at to over 32K at 5, approaching the context limits of modern LLMs. This exponential scaling (B(s) 2.2") matches our hypothetical prediction: to preserve actionable information across multiple hops, messages need to become exponentially longer.
Vanishing Textual Gradients: Information Decay Under Compression. When TexIGrad uses summarization to manage token budgets (TextGrad w/ Sum), gradient specificity decays quickly with depth. Figure Bb) shows effective update rates declining from 36% at s 1 to merely 3% 5. Compressed feedback loses actionable details saaails-ttrnnffmmmnng specific corrections like "fix undefined variable result on ..." into generic suggestions like "improve code quality" our analysis of information decay under bounded token constraints.
TEP's Graceful Degradation. TEP exhibits fundamentally different scaling behavior, keeping nearly constant token complexity and showing only modest performance degradation (37% to 33% update success rate). By climinating multi-hop gradient chains and relying on local equilibrium computations, TEP avoids the exponential failure modes while achieving consistent optimization effectiveness across different scaling levels of workflow.
(a) Textual Exploding
48
(b) Textual Vanishing
35000
(Cuns)
Contest Overlow
30%
(Cuss)
Fuadback Taken Count
30000
Effecdtive (%6
-35
30%
25000
Expenential Growth
100
20000
12K
25
22%
20
16000
15
14%
10000
0%
8000
8
Scale
Figure 3: Textual gradient failure modes with increasing workflow depth BigCodeBench. (a) Ex- ploding gradients: TextGrad feedback messages grow exponentially, reaching context overflow at scale factor 5. (b) Vanishing gradients: Compressed feedback (TextGrad Sum) loses specificity, leading to sharp drop in effective update rates. TEP maintains stable performance across all scales through local optimization.
4.4 SOLUTION OPTIMIZATION EXPERIMENTS
Colution-Optimizzaion Setting. We evaluate TEP on solution optimization, where the tar- get is to improve the model's reasoning out- puts rather than its input prompts. We use two benchmarks: (i) GPQA (Rein et al.) 2024 expert-leeel physies/biology/chemistr questions requiring multi-step reasoning (fol- lowing Yuksekgonul et al.) 2025);; and (ii) an adapted Object Counting dataset with 5-step
Table 2: Solution optimization performance.
GPQA
Object Counting (Acc.)
Method
(Acc.)
CoT
38.5
72.4
TextGrad
41.0
74.2
TextGrad w/ Sum
39.5
68.9
TEP (Ours)
44.5
81.6
hierarchical arithmetic (e.g.." "4 pallets, each with crates, each with 5 boxes, each with bags of 40
screws; 360 discarded many remain?").
8

---

Published as a conference paper at ICLR 2026
This setting tests whether TEP's local, lask-independent critic and proximal prompt edits remain beneficial when optimization acts on generated solutions. For GPQA, optimization targets a single node. This does not reduce TEP to TextGrad: TEP's task-independent critic and proximal prompt edits remain effective even in single-node prompt optimization. For Object Counting, intermediate, verifiable subresults make the task well-suited to TEP's free-phase local refinement. In contrast, global textual backpropagation (TexIGrad) continues to suffer depth-related exploding/vanishin feedback when multi-step reasoning induces long reformulation chains (Appendix B
Setup. We compare four methods: CoT (baseline), TextGrad (full backpropagation), TextGrad+Summ. (100-token feedback cap), and TEP (local refinement). Models: GPT-4 on 200 GPQA questions and Llama 3. on 500 Object Counting problems.
Results. shows TEP outperforms all baselines. On GPQA, TEP reaches 44.5% accuracy, 3.5 point gain over TextGrad: TextGrad+Summ. falls below CoT (39.5%). indicating that compres- sion weakens nuanced reasoning signals. On Object Counting, TEP attains 81.6%v.. TextGrad's 74.2%, while summarization leads to larger drop (68.9%). These results highlight TEP's robust- ness for solution optimization, where precise, depth-robust feedback is critical.
4.5 ABLATION STUDIES
Ablation on TEP Components. Figure studies the contribution of TEP's two phases on HOtPOTQA A and BIGCODEBENCH by remov-
Companent Abletion Analysis
48
Hepprte Reyto Raak
Performence (N)
ing one component at time while holding all other settings (models, iterations, hyperparam- eters) fixed.
-0
Removing the nudged phase leads to severe degradation- HOTPOTQA the score col- lapses to 22.3% Fl (a 26.4 point drop). This shows that purely local equilibrium (free phase) not enough to achieve system-level coordina- tion: nodes converge to isolated local optima that fail to compose into globally coherent so- lutions. A similarly severe decline observed
10P (-0
10P Hodgee
Method Veriants
Figure 4: Component ablation analysis demon- strating the necessity of both TEP phases across task types.
qualitatively on BIGCODEBENCIL, underscoring the importance of nudged, task-aligned coordina- tion.
Removing the free phase also hurts performance, though less dramatically: 11.9 Fl on HoT- POTQA and -277 pass@1 1 on BIGCODEBENCH. The free phase provides high-quality local optima that serve as stable starting points for effective nudged updates. Without this local refinement, nudg- ing operates from weaker initializations and its coordinating effect is reduced. The smaller impact on BIGCODEBENCH suggests code generation is more tolerant to imperfect local optima than multi- hop reasoning chains, where errors compound more easily.
Takeaway. The results support TEP's synergistic design: the free phase establishes strong local configurations; the nudged phase aligns them toward global objectives. Neither local refinement nor global coordination alone suffices. Both necessary to achieve TEP's full gains.
CONCLUSIONS
In this paper, we introduced Textual Equilibrium Propagation (TEP), a local learning principle that tackles the depth-scaling limitations of existing textual optimization methods in compound Al sys- tems. By formalizing exploding and vanishing textual gradients as core challenges in deep agentic workflows, we showed how global backpropagation becomes impractical as system depth increases. TEP adapts equilibrium propagation to textual SCGs with a two-phase approach (free and nudged phases) that supports bounded, node-local updates while still leveraging LLMs' natural reasoning capabilities for compound AI system optimization. Our empirical evaluation demonstrates that TEP consistently outperforms TextGrad and other iterative self-refinement approaches across multi-step

---

Published as a conference paper at ICLR 2026
QA and multi-agent tool-use benchmarks, with gains that become larger greater depths. The lo- cal, equilibrium- based approach shows a path toward optimizing deep compound Al systems. In subsequent research, plan to explore dynamic graph optimization and large-scale multi-agent coordination.
ACKNOWLEDGMENT
The research is supported, in part, by the NSERC Discovery Grant liance Grant ALLRP 602633-24, Tri-Agency Canada; Canada CIFAR AI Chair Awards, and Canada Research Chair Fellowship; ITP grant, the Ministry of Science and ICT (RS-2024-00445887, RS- 2025-25444 0025-25464461) funded by the Korea government (MSIT); the Ministry of Education, Singapore, under its Academic Research Fund Tier (RG101/24).
NSERC Al-
REFERENCES
Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157-166) 1994.
Minghui Chen, Ruinan Jin, Wenlong Deng, Yuanyuan Chen, Zhi Huang, Han Yu, and Xiaoxiao Li. Can textual gradient work federated learning? The Thirteenth International Conference on Learning Representations, 2025.
Yihong Dong, Kangcheng Luo, Xue Jiang, Zhi Jin, and Ge Li. PACE: Improving prompt with actor-critic editing for large language model. In Findings of the Association for Computational Linguistics; ACI 2024, pp. 7304-7323, 2024.
Chrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero, and Tim Rocktäschel. Prompthreeder: self-referential self-improvement via prompt evolution. In Proceedings of the 41st International Conference on Machine Learning, pp. 13481-13544, 2024.
Mor Geva, Daniel Khashabi, Elad Segal, Tushar Khot, Dan Roth, and Jonathan Berant. Did aristotle use laptop? a question answering benchmark with implicit reasoning strategies. Transactions of the Association for Computational Linguistics, 9:346-361, 2021.
Jiaxin Huang, Shixiang Gu, Le Hou, Yuexin Wu, Xuezhi Wang, Hongkun Yu, and Jiawei Han. Large language models can self-improve. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 1051-1068, 2023.
Qiao Jin, Bhuwan Dhingra, Zhengping Liu, William W Cohen, and Xinghua Lu. Pubmedqa: A dataset for biomedical research question answering. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, 2019.
Omar Khattab, Arnay Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vard- hamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. Dspy: Compiling declarative language model calls into self- improving pipelines. 2024.
Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D Co- Re-es Avi Singh, Kate Baumli, Shariq Iqbal, Colton Bishop, Rebecca Roclofs, et al. Training language models to self-correct via reinforcement learning. In The Thirteenth International Conference on Learning Representations, 2024.
Hoang Le, Nan Jiang, Alekh Agarwal, Miroslav Dudík, Yisong Yue, and Hal Daumé III. Hierarchi- cal imitation and reinforcement learning. In International conference on machine learning, pp- 2917-2926. PMLR, 2018.
Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 11:157-173, 2024.
10

---

Published as a conference paper at ICLR 2026
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al. Self-refine: Iterative refinement with self-feedback. Advances in Neural Information Processing Systems, 16:46534-465944 2023.
Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang. Bill Qian, et al. Toolllm: Facilitating large language models master 16000+ real-world apis. In The Twelfth International Conference on Learning Representations, 2024.
David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Di- rani, Julian Michael, and Samuel R Bowman. Gpqa: A graduate-level google-proof q&a bench- mark. First Conference on Language Modeling, 2024.
Benjamin Scellier and Yoshua Bengio. Equilibrium propagation: Bridging the gap between energy- based models and backpropagation. In Frontiers in computational neuroscience, volume 11, pp. 24. Frontiers, 2017.
Benjamin Scellier and Yoshua Bengio. Equivalence of equilibrium propagation and recurrent back- propagation. Neural computation, 31(2)312--32, 2019.
Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimban, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems,
2023.
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. Musique: Multihop questions via Annle-hop question composition. Transactions of the Association for Computational Lingnistics, 10:539-554 554,, 2022.
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc Le, Denny Zhou, et al. Chain-of Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022.
Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, Shaokun Zhang, Jiale Liu, et al. Autogen: Enabling next-gen 11m applications via multi- agent conversations. In First Conference on Language Modeling, 2024a.
Shirley Wu, Shiyu Zhao, Michihiro Yasunaga, Kexin Huang, Kaidi Cao, Qian Huang, Vassilis N loannidis, Karthik Subbian, James Zou, and Jure Leskovec. Stark: Benchmarking Ilm retrieval on textual and relational knowledge bases. Advances in Neural Information Processing Systems, 17:127129-127155 2024b.
Shirley Wu, Parth Sarthi, Shiyu Zhao, Aaron Lee, Herumb Shandilya, Adrian Mladenic Grobelnik, Nurendra Choudhary, Eddie Huang, Karthik Subbian, Linjun Zhang, et al. Optimas: Optimizing compound ai systems with globally aligned local rewards. arXiv preprint 20070035,,, 2025.
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W Cohen, Ruslan Salakhutdinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2369-2380, 2018
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR), 2023.
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Pan Lu, Zhi Huang, Carlos Guestrin, and James Zou. Optimizing generative ai by backpropagating language model feedback. Nature, 639(8055):609-6616 2025.
Peiyan Zhang, Haibo Jin, Leyang Hu, Xinnuo Li, Liying Kang, Man Luo, Yangqiu Song, and Hao- han Wang. Revolve: Optimizing ai systems by tracking response evolution in textual optimization. In Forty-second International Conference on Machine Learning, 2025.
11

---

Published as a conference paper at ICLR 2026
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging lim-as-a-judge with mt- be-bbnnch and chatbot arena. Advances in neural information processing systems, 36:46595-46623, 2023.
Shuyan Zhou, Frank F Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, et al. Webarena: A realistic web environment for build- ing autonomous agents, In The Twelfth International Conference Learning Representations, 2024.
Terry Yue Zhuo, Vu Minh Chien, Jenny Chim, Han Hu, Wenhao Yu, Ratnadira Widyasari, Imam Nur Bani Yusuf, Haolan Zhan, Junda He, Indraneil Paul, et al. Bigcodebench: Benchmarking code generation with diverse function calls and complex instructions. In The Thirleenth International Conference on Learning Representations, 2024.
A ANALYSIS OF TEXTUAL GRADIENT FAILURE MODES
This section analyzes why global textual backpropagation fails at depth and how TEP avoids these issues.
A.1 SETUP AND ASSUMPTIONS
Textual feedback propagation. In an SCG with node outputs {2v} and parameters {0.), global textual signals from the final output F pass through intermediate LLMs, creating messages GO), (()), ((.,)......) ((k) before reaching upstream nodes.
Information contraction. Each reformulation loses task-relevant information. We model this with a per-hop factor a E (0, 1) where mutual information about desired improvements AQ de- cays geometrically across hops.
Bounded channel capacity. A textual message with B tokens carries at most kB bits of task- relevant information. Initial information is budget-limited, and reformulations can only maintain or reduce it.
A.2 THE DEPTII TAX
Exponential decay. Combining contraction with bounded capacity yields
I(QQ G(K) s aB
To maintain signal quality at distance message length must grow as B 2 a- (explosion); under fixed budgets, signals decay as a (vanishing).
The fundamental trade-off. Global textual backpropagation faces exponentially growing context requirements exponentially decaying signal quality.
A.3 How TEP AVOIDS DEPTH ISSUES
Local contrasts replace chains. TEP uses local two-phase contrasts (free vs. nudged) at each node. Critics evaluate node outputs directly, producing O(1--sized signals whose quality depends on local context, not graph depth.
Depth-invariant updates. Under mild conditions on critic informativeness, each node maintains consistent update signal quality. TEP's optimization quality scales with node count, not depth.
A.4 CONVERGENCE PROPERTIES
Local equilibrium. When node's refinement operator T, is contractive (rate 7 < 1), free-phase equilibrium exists, is unique, and converges geometrically at rate i-dnnependennt of graph depth.
12

---

Published as a conference paper at ICLR 2026
Complexity comparison. Global methods face per-iteration costs p with decaying signal quality a². TEP maintains constant per-node context and avoids multi-hop decay, achieving ((1) per-node complexity with natural parallelization.
LLM-as-Juuge bias and TextGrad. Textual gradient methods treat LLM feedback as a kind of "gradient" for optimizing compound AI system. This relies heavily on the LLM acting as a judge, so feedback quality is crucial for stable prompt optimization and convergence. In practice, the critic (or judge) model needs be strong the target domain. which is why we prefer frontier L.MSs for the more complex prompt-optimization tasks. In deep compound Al systems, bias can accumulate. small judgement error in a downstream node can compound as is backpropagated upstream. TEP addresses this specifically through the Free Phase and Nudged Phase. In the free phase, iterative local updates under a rubric-based critic stabilize each node. In the nudged phase, proximal prompt edits are guided directly by the final task objective (i.e., final ground truth labels). Together, these steps reduce the avoid the systematic bias (as shown in section 4.3) that accumulates when feedback is propagated step by step along the chain.
Model Choice and Model Size. In experiments, our choice of LLMs is driven by task diffi- culty and domain: for complex prompt-optimization tasks requiring long-horizon reasoning and reliable self-critique we use frontier models such as GPT-4o and Claude, while for simpler solution- optimization tasks we use lighter models such as Llama which already achieve strong base per- formance and are more cost-efficient. As in TextGrad, TEP assumes base LLM that is capable of meaningful self-correction on the target task: very small models or models lacking domain knowl- edge often fail to generate evaluate high-quality refinements, which limits the effectiveness of any textual optimization framework.
Summary. Global textual feedback incurs exponential depth costs through information loss and context growth. TEP generates signals locally, maintaining stable quality and depth-robust conver- gence.
B TEP ALGORITHM PSEUDOCODE
This section provides compact pseudocode for Textual Equilibrium Propagation (TEP), highlight- ing the two-phase optimization and node-local updates.
Algorithm 1: Textual Equilibrium Propagation (TEP)
Input: SCG G- E); task distribution D_task; beta>0; epsilon>0; T_max Output: Parameters theta=(theta_v)__
// Initialization for each v in V:
cheta_v"critic structured critic prompt (App. 00033, 0.9)
7 theta_v'temp
aheto <- initial actor prompt
for 1_..T_ax:
0 task
12
// Phase 1: Free-phase equilibria (parallel over v) parallel for in V: repeat
16
2_v <- LLM(theta 2_pa(v); temp-theta_v'temp) grvefree <- Crivic thetaiv' score_v <- extract_score (g_v"free) until score_v stabilizes x z
// Phase 2: Nudged-phase equilibria (parallel over v)
parallel for in V:
13

---

Published as a conference paper at ICLR 2026
ell_v (ocaloobjoctive o)
25
nudge_y <- generate (cll_v, beta)
26
cheta_v'nudget <- cheta_v'actot + nudge_v repeat
2_y [ 7_pa ( temp=theta__"'temp a_v'nudged Critic(z_v, theta_v'critiee score_v <- extract_ (g_ (g_v"nudged" until score_v stabilizes x_v"beta <- 2_y
30
// Phase 3: Local update (parallel over v) parallel for v in V:
theta_v'new <- Update0perator (g_v" g_v'nudged, theta_v'actor theta_v aattor theta_v n'ew new if performance improved then theta_v"temp <- max (0.3, theta_v"temp- 0.9)) else
39
theta_v"tenp <- min (0.9, theta_v "teta_ 1. 05)
(theta"))) (theta" (t-1)) epsilon then break beta <- beta 0.9
44
return (theta v'ata_vv'ctoo theta_v'ce vrritic, theta v v'templ_y
Key algorithmic properties. The pseudo code illustrates several critical aspects of TEP: (1) Local parallelism: Each node independently seeks equilibrium without requiring global coordination, enabling parallel execution across all nodes. (2) Two-phase structure: The free phase establishes high-quality local optima through critic-guided refnnmeet, while the nudged phase coordinates these solutions toward global objectives through minimal textual perturbations. (3) Bounded com- plexity: Each node processes only local feedback signals (ge go) of constant size (()), avoiding the exponential message growth that plagues global textual backpropagation. (4) Adaptive explo- ration: Temperature parameters 0.mmp automatically adjust based on local performance, balancing exploration and exploitation at each node. (5) Parameter annealing: The nudging strength / de- creases iterations, allowing strong initial coordination that gradually transitions to fine-tuning as the system converges.
C FREE PHASE IMPLEMENTATION DETAILS
This section provides concrete implementation details for TEP's free phase, including the structured critic prompt design and temperature tuning strategy. Note that the descriptions and examples are meant to illustrate the prompt-design principles. In practice, we further refine each task prompt using frontier LLMss to better match task requirements.
C.1 STRUCTURED CRITIC PROMPT AND RUBRIC SYSTEM
TEP employs two-component rubric system that separates -ekeinndeendent quality metrics from luskddependent performance criteria. This separation enables consistent quality assessment while allowing susk-specific adaptation.
Task-independent quality metrics. These metrics remain fixed across all nodes and evaluate gen- eral output quality through six dimensions:
Structural Clarity (1-5): Output organization and unambiguity.
1: Disorganized, ambiguous structure
3: Basic structure present but lacks coherence
5: Well-organized with clear logical flow and explicit sections
Specification Completeness (1-5); Coverage of input requirements.
14

---

boundary han- Published as a conference paper at ICLR 2026
1: Major requirements missing
3: Core requirements addressed, details lacking
5: All requirements fully addressed with appropriate depth
Internal Consistency (1-5): Freedom from contradictions.
Multiple contradictions present
Minor inconsistencies in edge cases
- Fully consistent across all aspects
Context Integration (1-5): Utilization of parent node outputs.
1: Ignores available context
3: Uses context but misses connections
5: Seamlessly integrates all relevant context
Reasoning Transparency (1-5): Clarity of decision rationale.
I: No justification for choices
3: Some reasoning provided but gaps remain
5: Clear rationale for all significant decisions
Format Compliance (1-5): Adherence to expected output schema.
I: Free-form, ignores format requirements
3: Partial compliance with format
5: Strict adherence to specified schema/structure
D TEP LOCAL CRITIC EVALUATION TEMPLATES
This appendix provides concrete examples of TEP's local critic evaluation process. The follow- ing displays illustrate the free phase context, nudged phase context, and local critic prompt us- ing the multi-agent code generation pipeline scenario from Figure These examples demonstrate how TEP's local optimization approach handles the specific debugging task where textual gradi- ents would otherwise explode or vanish through the Problem Analyzer + Code Generator Test Generator > Final Validator chain.
Free Phase Context (Node 2))
Nudged Phase Context (Node v)
System: You are a local verifier for node v. Evaluate outputs against criteria below.
Nudge: Encourage stricter dling.
Node Inputs (abridged):
Nudged Output:
query:
"Explain the failure
The lcop includes index 0; using ">" avoids the extra emit
case for k=0"
retricved: ("src/lib/math.p)
tep_k"]
Local Criteria (excerpt):
Free Output:
Boundary correctness for k=0 Consistency with unit testss Minimal patch footprint
The result length is off by one for k=0
Local Critic Prompt (Compare Free vs. Nudged)
Provide concise verdict comparing the Free and Nudged outputs:
Does the nudged output better satisfy the criteria?
If yes, extract the minimal actionable change (patch-ready).
If no, state the gap in one sentence.
Output schema:
15

---

Published as a conference paper at ICLR 2026
Verdict:
(Better Tie Worsc)
Rationale: <one sentence>
Action:
file: src/lib/math.
func: top_k
change:
"while k:" "while k:"
The overall task-independent quality score computed as: Qundep Zi=1 w; - 10, where E 5J is the rating for dimension and weights w; are: Clarity (0.20), Completeness (0.20), Consistency (0.15), Context (0.15), Reasoning (0.15), Format (0.15).
Task-dependent performance criteria. These criteria are initialized generically and refined after the nudged phase based global performance signals:
Functional correctness (0-10): Does the output achieve the intended task objective?
Constraint satisfaction (0-10): Are all task-specifer constraints and requirements met?
Quality indicators (0-10): Task-specific metrics such as test coverage for code generation nodes, relevance scores for retrieval nodes, or accuracy for reasoning nodes.
Comprehensive evaluation template. The complete TEP local critic evaluation template inte- grates both assessment dimensions with clear output specifications:
TEP Local Critic Evaluation Template
System Role: You are local quality assessor for compound AI system node.
Evaluation Framework:
Task Independenn Quality Assessment ( (1-5 scale):
Structural Clarity: Organization and logical flow
Specification Completeness: Coverage of input requirements
Internal Consistency: Freedom from contradictions
Context Integration: Utilization of parent node outputs
Reasoning Transparency: Clarity of decision rationale
Format Compliance: Adherence output schema
Task Mask-Dependent Performance Assessment (I-5 scale):
Functional Correctness: Achievement task objective
Constraint Satisfaction: Compliance with task-specific requirements
Quality Indicators: Context-specific metrics (e.g., test coverage, relevance)
Input Context:
Node Output: {z.v}
Parent Context: {z pa (v) }
Task Schema: (schema.v)
Required JSON Output:
" "task_in inseskkindeeedentt..
sttuucuural_ clarity"; <1-5>,
completeness": <1-5>,
"consistency"; <1-5>,
"context_integration <1-5>, *reaconing_trrasspprrooo""" <1-5>,
"format_compliancee" <1-5>
"task_ =iask__dependent":
Sunnctional_correcttees <1-5>,
cennttraint_catisfaetiioo <1-5>,
Squality_indicalle <1-5>
16

---

Published as a conference paper at ICLR 2026
}, "act lelecccaae__edddbeeeee "<specific improvement suggestions>", "overall _strrllssccoe: <computed wei ghted average>
The key innovation is that task-dependent criteria updated after the nudged phase, incorporating global performance signals without requiring multi-hop backpropagation.
D.1 TEMPERATURE TUNING STRATEGY
Rather than using fixed temperatures or complex annealing schedules, TEP employs a simple ran- dom sampling strategy:
Sample 0g ~ (0.33, 0.9) uniformly for each free phase iteration
Lower temperatures (0.3-0.5) encourage exploitation of current knowledge and refinement of existing solutions
Higher temperatures (0.6-0.9) promote exploration of alternative approaches and escape from local optima
No staged tion
continuous random sampling naturally balances exploration and exploita-
This simple strategy avoids the complexity of adaptive temperature schedules while maintaining sufficient diversity in the equilibrium search.
D.2 EQUILIBRIUM CONVERGENCE CRITERION
A node v is considered to have reached free equilibrium when one of the following conditions is met:
1. Score stabilization: The variance of critic scores across k 3 consecutive evaluations
falls below threshold 0.5
2. Non-substantive improvements: Suggested changes become primarily stylistic rather than functional (determined by keyword analysis of feedback)
Iteration budget: Maximum of 20 refinement iterations reached (practical constraint for efficiency)
Implementation efficiency.
The local nature of free phase optimization enables several computa-
tional optimizations:
Parallel execution: All nodes can reach equilibrium independently, enabling parallel computa- tion
Caching: Equilibrium states can be cached and reused when parent outputs remain unchanged
Early stopping: Nodes achieving high initial scores (8/10 average) can skip refinement
These implementation details demonstrate that TEP's free phase provides practical and efficient alternative to global textual backpropagation while maintaining optimization quality through struc- tured local evaluation.
D.3 TEP CONVERGENCE ANALYSIS
Figure provides detailed convergence analysis of TEP on PubMedQA, demonstrating distinct op- timization dynamics local and global levels. Subplot (a) shows free phase local critic scoring over 20 iterations 0-10 scale, where scores progress from initial values around 5.2 toward the equilib- rium threshold 8.0. The characteristic fluctuations demonstrate non-smooth gquilibrium-seekeee behavior the local critic iteratively refines prompts, with temporary score decreases reflecting the
17

---

Published as a conference paper at ICLR 2026
Table 3: Solution optimization performance.
Method
Object Counting w/ Qwen 2.5 (Acc.)
Object Counting w/ Llama 3.2 (Acc.)
CoT
60.2
72.4
TextGrad
64.5
74.2
TextGrad w/ Sum
58.6
68.9
TEP (Ours)
exploratory nature of local optimization that can lead to better long-term solutions. Subplot (b) illus- trates global convergence across different TEP outer iterations, showing performance improvements from the CoT baseline of 57.3% to the final TEP performance of 62.0%. Notable are the steady fluctuations from outer iteration 25 onwards, demonstrating mature optimization behavior where the system maintains consistent performance variations while achieving incremental gains.
Scoring
Convergence across
82
bruulibuun Thrsenod (8.2)
Local citti Score (0-10)
Total +4 Tpp
Performance
60
80
Local Store
57
Ghobel Gonneggroo
25
12.5
13.
17.5
280
20
Phoss Itration
Baratio (Duter)
Figure 5: TEP convergence analysis on PubMedQA. (a) Free phase local critic scoring over 20 itera- tions on 0-10 scale, showing characteristic fluctuations during equilibrium-seekin toward threshold of 8.0. (b) Global convergence across 40 TEP iterations with steady fluctuations from iteration 25 onwards, demonstrating cumulative performance improvements through repeated optimization cy- cles.
D.4 EXTENDED EXPERIMENTS: TEP ADVANTAGE ACROSS MODELS
We extend our experiments on solution optimization. assess whether TEP generalizes across models on the same task, we evaluate our object counting task with the Llama 3.2 11 B model and Qwen 2.5 model. As shown in Table 3, TEP consistently outperform other baselines.
D.5 COMPUTATION COSTS ANALYSIS
A central challenge in measuring computational cost is selecting metric that is both stable and comparable across settings. While latency can provide context, fluctuates heavily with region, time, hardware, and provider load. Iteration counts (or API calls) are also uninformative, different methods may consume vastly different numbers of tokens per iteration. As noted in Sec. 4.3, TextGrad's token usage grows exponentially with workflow depth.
Thus in this paper, we quantify computational cost in terms of token usage rather than wall-clock latency or iteration counts, because it is the most faithful and standardized measure of computa- tional cost in modern LLM systems. Specifically, commercial LLM API providers (e.g.. OpenA Google" " charge strictly by token count. Also, deep compound AI system optimization is dominated by token generation and context processing. Moreover, the depth-scaling failure mode we identify, where textual gradients explode or vanish, is tightly linked to the per-iteration token usage (discussed in Sec. 4.3). Taken together, the standard bill method and our specific motivation make token usage a natural, deployment-relevant and motivation- aliggned measure of computational cost in our setting.
18

---

Published as a conference paper at ICLR 2026
Table 4: Computational cost (token usage per iteration) for different methods and scales.
Scale
CoT
TextGrad
TextGrad w/ Sum.
TEP
X
841 1450
1856
1673
1902
x2
4224
2740
2587
To better demonstrate the efficiency, we demonstrate the token usage under task PubMedQA and shown in Table A TEP has comparable token usage to TextGrad at the smaller scale, but grows much more slowly as the scale increases, leading to substantially less token cost at most x2 for TextGrad with at scale 2.
E SOLUTION OPTIMIZATION DEPTH-SCALING ANALYSIS
This section provides detailed empirical analysis of textual gradient failure modes in solution opti- mization tasks, complementing the main results presented in Section 4.4.
E.I EXPERIMENTAL DESIGN DEPTH--DEPENDENT ANALYSIS
To empirically validate textual gradient pathologies in solution optimization, we conduct a con- trolled experiment on Object Counting with increasing problem complexity. We design nesting depth parameter d E (1, 2, 4,5] that controls the number of hierarchical containment levels. At depth d. problems require d sequential multiplication steps followed by aggregation and subtraction operations, creating computation graphs with 2d nodes.
Problem Structure. For depth d, we generate problems following the template: "There are n1 containers. Each container holds n2 sub-containers; each sub-container holds ny items; ... & items are discarded. How many remain?" The nesting creates a chain d multiplication operations: n1 n2 x na, followed by subtraction. This design ensures that:
Each intermediate step produces verifiable results
Errors compound through the calculation chain
Feedback must propagate through increasingly long solution paths
E.2 DETAILED RESULTS: EXPLODING AND VANISHING GRADIENTS
Exploding Gradients: Exponential Message Growth. Figure demonstrates that TextGrad's feedback messages exhibit exponential growth with depth. Token count increases from 3K at d to over 40K at = 5-a 13x increase that exceeds most LLM context windows. This explosion occurs because each intermediate calculation requires detailed feedback about numerical errors, unit conversions, and logical dependencies, which compounds multiplicatively through the solution chain. The growth follows (d) 3000 2.14 confirming our theoretical prediction of exponential scaling.
Vanishing Gradients: Information Decay Under Compression. When TextGrad employs sum- marization to manage token budgets, gradient specificity degrades exponentially with depth. Fig- bb) shows TextGrad with summarization declining from 84% at d Compressed feedback loses actionable details transforming specific corrections like "In step 3, multiply 12 boxes by screws per box to get 480, not 120" into generic suggestions like "Check arithmetic in multi-step calculations." This validates our theoretical analysis of information decay under bounded token constraints.
merely 28% at d = 5.
TEP's Graceful Degradation. TEP exhibits fundamentally different scaling behavior, maintain- ing near-constant token complexity and showing only modest performance degradation (81% 11% to 79% accuracy from d 1 to d 5). By eliminating multi-hop gradient chains in favor of local equilibrium computations. TEP avoids the exponential failure modes that plague global optimization methods while achieving consistent optimization effectiveness across all depths.
19

---

Published as a conference paper at ICLR 2026
(a) Token Explosion
(b) Performance Collapse
TEP
TEP
Contoo Lisit (2K)
80
B(d) 3000
30
Accuracy (%)
Feedback
50
(87% relutiva drop)
50
Nesting Depth d
Nesting Depth d
Figure 6: Detailed analysis of textual gradient failure modes in solution optimization. (a) Token explosion: TextGrad feedback grows exponentially with depth (3K + 40K tokens). (b) Perfor- mance collapse: TextGrad with summarization shows severe degradation, while TEP maintains robust performance.
Implications for Solution Optimization. These results confirm that solution optimization faces even more severe gradient pathologies than prompt optimization. While prompt feedback can be somewhat generic ("make this clearer"), solution feedback must be mathematically precise to en- able correction of specific computational errors. The exponential degradation in both token count and specificity makes global textual backpropagation impractical for complex reasoning chains, val- idating TEP's local approach for solution optimization tasks.
F LARGE LANGUAGE MODEL USAGE STATEMENT
Large Language Models were used to aid and polish the writing of this paper, including improving clarity, grammar, and presentation of technical content. L.MSs assisted with refining explanations, enhancing readability, and ensuring consistent terminology throughout the manuscript.
20


Reviews:
[{"review_id": "25137NRAh0", "reviewer": "Reviewer_DC6B", "summary": "This paper investigates textural propagation in large language models (LLMs) to enhance compound AI systems. The authors point out that existing textural propagation approaches, such as textgrad, suffer from two key problems: exploding textural gradients and vanishing textural gradients in the middle context. They propose Text Equilibrium Propagation (TEP), a local learning principle in which a local LLM critic iteratively refines prompts until no further performance gain is observed. The method also introduces forward propagation of prompt edits. Experimental results show that TEP achieves larger improvements than previous methods, especially as task depth increases.", "questions": "1.Can you explain what is the main difference between the forward signaling and backward feedback chains?\n2.In Table 1, the improvement of TextGrad over Chain of Thought (CoT) is relatively small. Do you have any insights into why this happens?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1.The problem is well motivated.\n2.The proposed method is conceptually sound.", "weaknesses": "1. It is not entirely clear how the local critic model operates. Does it require ground truth labels for intermediate outputs?\n2. The baseline method Revolve[1] is mentioned. \n3. While performance gains are significant, the paper does not analyze the tradeoff between accuracy and computational cost,e.g. how does the computational cost look like for each of the baseline and TEP?\n\n[1]Revolve: Optimizing AI Systems by Tracking Response Evolution in Textual Optimization", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "DBSphCGu06", "reviewer": "Reviewer_ccip", "summary": "The paper tackles a timely and relevant problem: the optimization of deep compound AI systems that perform multi-step reasoning and multi-tool coordination at realistic scales. The authors identify that current textual optimization methods—particularly TextGrad—encounter depth-scaling failures analogous to the vanishing and exploding gradient problems in neural networks. To address this, they propose **Textual Equilibrium Propagation (TEP)**, a two-phase optimization method inspired by equilibrium propagation in energy-based models.\nIn TEP, global feedback propagation is replaced by local refinement in a “free phase”, where each node independently updates its prompt using a local LLM critic until equilibrium is reached, and a “nudged phase,” where small task-specific perturbations are introduced to align local equilibria with the global objective. While the authors cite conceptual inspiration from equilibrium propagation, the mathematical connection is loose—TEP does not define or optimize an explicit energy function ($E(x, \\theta)$).", "questions": "1. Could the authors provide more rigorous mathematical support for the claimed “local optimization until equilibrium” behavior? In particular, can they formalize the contraction assumptions or provide sufficient conditions under which the refinement operator is guaranteed to converge?\n2. Clarify whether “consistent descent direction” refers to an empirical observation or a theoretical guarantee. If the latter, please include a proof or clearly stated theorem.\n3. Include wall-clock comparisons and iteration counts to quantify the trade-off between per-node efficiency and convergence speed.\n4. Strengthen generalization claims by running at least one benchmark task with multiple base models under the same conditions.\n5. Specify whether the critic LLM is identical to the base model or distinct, and discuss how this choice affects equilibrium stability and sample efficiency.", "limitations": "", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 3, "strengths": "1. The paper clearly articulates the depth-scaling issues of existing methods and communicates them effectively through illustrative figures.\n2. The proposed method has well-defined computational properties: local optimization has bounded token complexity ($O$(1)) per node versus exponential (*O*($2^{depth}$)) complexity in multi-hop textual backpropagation, allowing scalability to deeper systems (10–20+ nodes).\n3. Empirically, TEP demonstrates strong performance improvements over TextGrad on multiple benchmarks (PubMedQA, STaRK-PRIME, HotpotQA, BigCodeBench).\n4. The depth-scaling experiments (Fig. 3) are particularly compelling: TextGrad’s feedback length grows from 2K to 32K tokens with decreasing update effectiveness (36%→5%), while TEP maintains near-constant token complexity and only modest performance degradation (37%→33%).\n5. The ablation studies on TEP’s free and nudged phases effectively show that both components are necessary for the observed gains.", "weaknesses": "1. The connection to classical Equilibrium Propagation (Scellier & Bengio, 2017) remains metaphorical rather than formal. TEP does not define a differentiable energy function, nor does it derive a learning rule corresponding to a negative gradient step. As a result, claims of “consistent descent direction” and “convergence under standard conditions” are not theoretically substantiated in the paper.\n2. The “convergence analysis” in Appendix A is largely qualitative. It assumes information contraction and bounded channel capacity but does not provide a formal proof of convergence or conditions guaranteeing equilibrium stability.\n3. Computational cost analysis is incomplete. While token complexity is analyzed, the paper omits wall-clock time or total iteration comparisons against baseline methods. The trade-off between token efficiency and the number of required refinement steps remains underexplored.\n4. The experimental section would benefit from deeper analysis of model generality. Although the authors report results using different base LLMs (GPT-4o, Claude 3 Haiku, Llama 3.2), there are no controlled ablations where the same task is optimized using multiple base models. This weakens the generalization claim.\n5. It is unclear whether the same model or a separate model serves as the critic LLM for local refinement. Clarifying this choice (and its impact on stability or bias) would help contextualize results.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "nlBEy5b19V", "reviewer": "Reviewer_HWwQ", "summary": "This paper addresses the issue of vanishing and exploding textual gradients in compound AI systems by introducing Textual Equilibrium Propagation (TEP). This framework, inspired by equilibrium propagation in energy-based models employs two phases: iterative refinement and nudging. Experimental results indicate that the proposed framework achieves superior performance over TextGrad and offers a robust approach for black-box optimization.", "questions": "- What is the rationale for selecting the specific large language models (LLMs) used for different tasks?\n- How does the size of the LLM influence the performance of various components within the proposed framework?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "- The paper is clearly written, and the inclusion of illustrative examples enhances clarity and comprehension.\n- Extensive experiments are conducted, demonstrating consistent empirical gains.\n- Evaluation includes both prompt optimization and solution optimization tasks, even though the latter is limited to two datasets.", "weaknesses": "- The rationale behind the choice of large language models (LLMs) is insufficiently explained.\n- There is limited discussion of potential LLM biases and how they may influence results.\n- Details regarding hyperparameter selection and tuning are lacking.\n- The paper does not analyze the trade-off between performance gains and the associated increase in computational cost.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "hKDCe6GNyd", "reviewer": "Reviewer_xN4N", "summary": "The work (i) formalizes exploding and vanishing textual gradients in global textual backprop frameworks like TextGrad, (ii) introduces a depth-robust, node-local alternative inspired by Equilibrium Propagation, and (iii) reports consistent empirical gains on multi-step QA, retrieval, and code-generation suites, alongside ablations and depth-scaling analyses.", "questions": "1. Can you precisely distinguish TEP from prior local methods such as Self-Refine, PACE (actor–critic editing), and verifier-guided prompt tuning, beyond the free/nudged phrasing?\n\n2. Which concrete properties of TEP (and not general self-refinement) are necessary for the reported gains?", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. This paper clearly identifies and formalizes depth-dependent pathologies (exploding/vanishing textual gradients) with simple but compelling measures for message length and specificity.\n\n2. This paper presents a principled, modular algorithm (free-phase local refinement; nudged-phase bounded edits) with parallelizable node-local procedures and clean pseudocode.\n\n3. This paper provides breadth across tasks (PubMedQA, STARK-PRIME, HotpotQA, BigCodeBench) and shows consistent improvements, with larger gains at greater depth.", "weaknesses": "1. The novelty is unclear because the “free phase + nudged edits” design is very close to existing self-refinement and actor–critic prompt editing methods, and the paper does not include matched-budget comparisons against those strongest local baselines.\n\n2. The definition of “equilibrium” relies on a heuristic stopping rule (score stabilization over three evaluations or a cap of 20 iterations), and the paper does not provide a sensitivity analysis to show that the results are not artifacts of this choice.\n\n3. The computational cost of TEP is underreported; running 20 free iterations plus 40 nudged iterations per node appears expensive, and the paper does not normalize token, latency, or dollar costs against the baselines.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)