SOCRATES: Simulation Optimization with Correlated Replicas and Adaptive Trajectory Evaluations

Haoting Zhang, Haoxian Chen, Donglin Zhan, Hanyang Zhao, Henry Lam, Wenpin Tang, David Yao, Zeyu Zheng

TL;DR

SOCRATES is a novel framework that leverages Large Language Models (LLMs) to automatically design tailored, hybrid simulation optimization algorithms for complex stochastic systems. By combining LLM-driven causal discovery to build data-efficient digital replicas with trajectory-aware meta-optimization, it creates adaptive optimization schedules that significantly outperform traditional standalone algorithms.

What Problem Does This Paper Address?

Simulation Optimization (SO) is crucial for finding the best decision variables in complex, noisy, and expensive-to-sample systems—such as supply chains, manufacturing plants, or queuing networks. Traditionally, practitioners apply general-purpose black-box algorithms like Bayesian Optimization (BO) or Genetic Algorithms (GA) out of the box.

However, because real-world system samples are highly costly and noisy, tailoring these optimization algorithms to specific problem instances has remained an underexplored challenge. The authors address this gap by using LLMs to inject domain knowledge from textual descriptions, automating the creation of cheap system replicas and dynamically composing optimized, multi-stage algorithm schedules.

Methods

The SOCRATES pipeline operates in two main stages:

  1. Operational AI Replica (OAR) Construction: Instead of trying to train a massive, data-hungry end-to-end model from scratch, SOCRATES uses an LLM to perform causal discovery from a textual description of the system. The LLM outputs a structural "skeleton" (a Directed Acyclic Graph or DAG). An Expectation-Maximization (EM)-type learning procedure then uses historical data to efficiently learn the local mechanisms (approximated by small MLPs) for each node, including latent variables. This creates an ensemble of inexpensive digital twins.
  2. LLM-Driven Meta-Optimization: The OAR ensemble serves as a cheap sandbox. An LLM acts as a meta-optimizer by evaluating baseline SO algorithms on these replicas. Crucially, instead of looking only at final scores, the LLM analyzes the entire performance trajectory (e.g., optimization speed, stalling, oscillation). It uses this "semantic gradient" to iteratively compose and revise a hybrid schedule (e.g., executing Algorithm A for the first 50 budgets, then switching to Algorithm B).

Additionally, the framework features online adaptation: if the optimization trajectory on the real system deviates from expectations, the weights of the OAR ensemble are updated dynamically, and the LLM revises the remaining optimization schedule on the fly.

Figure 1: Pipeline of SOCRATES: Stage 1 learns an ensemble of operational AI replicas; Stage 2 employs these inexpensive replicas to evaluate and revise SO algorithms. The final SO algorithm is tailored to the real system before deployment, and an online adaptation is feasible when needed.

Datasets

The framework was evaluated using simulated environments representing classic, complex operations research problems rather than static image or text datasets:

  • Multi-SKU Single-Echelon Warehouse System: A supply chain management problem focused on optimizing integer base-stock targets for multiple products under seasonal Poisson demand, subject to holding costs, backorder penalties, and capacity constraints.
  • Multi-Server Queuing Network: A service operations problem optimizing server allocation, service-rate multipliers, and routing probabilities to minimize expected average operating costs.

Key Insights and Ideas

  • Causal Skeletons as Inductive Biases: Relying purely on data to model complex stochastic systems requires too many expensive samples. Using an LLM to extract a causal graph from natural language text prunes the hypothesis space, making learning highly sample-efficient even in data-scarce regimes.
  • Phase-Dependent Algorithm Strengths: Different optimization algorithms excel at different times. For instance, meta-heuristics are great for early global exploration, while Bayesian optimization shines at fine-grained local refinement. Trajectory-aware meta-optimization allows the LLM to detect when an algorithm's progress is stalling and hand off the task to a better-suited method.
  • The "Semantic Gradient": Rather than optimizing algorithms through purely numerical meta-heuristics, the LLM combines quantitative trajectory metrics (like area under the improvement curve and monotonicity) with its qualitative, pre-trained understanding of algorithmic behavior to propose structured, logical revisions.

Key Results

In the Multi-SKU Warehouse optimization task, using a strict budget of 100 evaluations across 5 independent runs:

  • Best Standalone Baseline: BO-PI (Bayesian Optimization with Probability of Improvement) was the strongest single algorithm, achieving a mean cost of $28.20 \pm 1.22$.
  • SOCRATES Hybrid Schedule: The LLM iteratively designed a hybrid schedule: BO-EI(50) $\rightarrow$ GA(50) (running Expected Improvement for 50 steps to seed high-quality designs, then switching to a Genetic Algorithm for refinement). This schedule achieved a mean cost of $26.52 \pm 0.85$—a 6.0% cost reduction alongside a significant reduction in variance (higher robustness).

Similar improvements were demonstrated in the multi-server queuing network experiments, proving that hybrid schedules mutually justify and outperform standalone baselines.

Limitations and Future Work

  • Dependence on Textual Accuracy: The framework relies heavily on the quality of the initial textual description. If the text is ambiguous or misleading, the LLM's causal skeleton may introduce errors, though the admissibility checks (like cycle detection) mitigate this.
  • Offline Computational Overhead: Running multiple baseline algorithms on the OAR ensemble to generate trajectories for the LLM to analyze adds offline computational cost, though the authors argue this is well worth the sample-efficiency gains on the expensive real system.
  • Future Directions: The authors suggest integrating automated per-node model selection via AutoML layers (such as MLZero) and scaling the framework to handle larger, multi-agent industrial systems.

Summary updated

BibTeX
@misc{zhang2025socrates,
  author = {Haoting Zhang and Haoxian Chen and Donglin Zhan and Hanyang Zhao and Henry Lam and Wenpin Tang and David Yao and Zeyu Zheng},
  title = {{SOCRATES: Simulation Optimization with Correlated Replicas and Adaptive Trajectory Evaluations}},
  year = {2025},
  eprint = {2511.00685},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.00685},
}
Figure