SOCIA-$\nabla$: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generation
Yuncheng Hua, Sion Weatherhead, Mehdi Jafari, Hao Xue, Flora D. Salim
TL;DR
SOCIA-$\\nabla$ presents an end-to-end, loss-driven framework that treats simulator construction as instance optimization over code within a textual computation graph, embedding specialized agents as nodes and coordinating them with a Workflow Manager. It introduces Textual Gradient Descent (TGD) with momentum and a textual projection (PGD) to repair and constrain simulator code, enabling a closed-loop loop from execution metrics back to targeted code edits. Across three CPS-inspired benchmarks (User Modeling, Mask Adoption, Personal Mobility), SOCIA-$\\nabla$ achieves state-of-the-art results and exhibits strong generalization to out-of-distribution scenarios, thanks to loss-aligned, component-level repairs and constraint-aware updates. The approach unifies multi-agent orchestration with differentiable-style feedback in text, producing reproducible, domain-agnostic simulator code that scales in granularity from aggregate to agent-based models, with ablations confirming the importance of iteration, CoT guidance, HITL validation, momentum, and constraint projection.
Abstract
In this paper, we present SOCIA-$\nabla$, an end-to-end, agentic framework that treats simulator construction asinstance optimization over code within a textual computation graph. Specialized LLM-driven agents are embedded as graph nodes, and a workflow manager executes a loss-driven loop: code synthesis -> execution -> evaluation -> code repair. The optimizer performs Textual-Gradient Descent (TGD), while human-in-the-loop interaction is reserved for task-spec confirmation, minimizing expert effort and keeping the code itself as the trainable object. Across three CPS tasks, i.e., User Modeling, Mask Adoption, and Personal Mobility, SOCIA-$\nabla$ attains state-of-the-art overall accuracy. By unifying multi-agent orchestration with a loss-aligned optimization view, SOCIA-$\nabla$ converts brittle prompt pipelines into reproducible, constraint-aware simulator code generation that scales across domains and simulation granularities. We will release the code soon.
