Manuscript Offprint

arXiv:2610.01048

Network World Models as Environments for Algorithm Design on Complex Systems

Rishab Alagharu, Hongji Pu, Zeeshan Memon, Xinyuan Song, Yuntong Hu, Liang Zhao

ABSTRACT

World models, which simulate an environment and predict how it changes under actions, are increasingly used in real-world applications such as robotics. Complex systems call for the same tool because the effect of an action is not immediate. Seeding nodes for a campaign, or immunizing nodes against an epidemic, changes little on its own; what matters is the outcome that unfolds over the steps that follow. Designing an algorithm that selects such actions to maximize expected performance on a task is inherently iterative, and every candidate must be scored by the outcome it produces. Obtaining that outcome has relied on simulation, whose cost becomes a bottleneck when candidates are evaluated over many sampled trajectories. We propose an action-conditioned Network World Model that learns a network's diffusion dynamics under interventions over time, applies each action to the network, and predicts the outcome that follows. It serves as a fast evaluator inside an algorithm design loop in which a coding agent designs and refines executable algorithms using feedback from full rollouts, action-level credit, and counterfactual probes over alternative interventions. Across eight network tasks and five diffusion models, the designed algorithms match or exceed the strongest reported baseline in 138 of 141 settings while enabling up to 14.5 times faster rollouts than Monte Carlo simulation. Code will be released upon acceptance.

Figure

Figure 1: A coding agent writes algorithms that choose interventions on a network, and a Network World Model rolls out how each choice unfolds, returning a reward, feedback, and probe answers the agent uses to improve the algorithm (left). Across eight tasks on complex networks, the agent-designed algorithms outperform the strongest baselines, averaged over budgets (right).

1 INTRODUCTION

Complex systems such as social, contact and information networks are dynamic in two ways: their state evolves on its own, and it also changes under actions taken on the system (Pastor-Satorras et al.,

2015). Choosing which actions to take to maximize task performance is a combinatorial problem that appears across domains, from selecting the users who will carry adoption farthest (Kempe et al., 2003) to choosing who to vaccinate before an outbreak spreads (Pastor-Satorras & Vespignani, 2002; Cohen et al., 2003) or seeding a correction ahead of a rumor (Budak et al., 2011). One of the major roadblocks in designing algorithms for these choices lies in evaluation: how do we know what an action will lead to before taking it? Classically, the answer is simulation, called inside the search once per candidate (Kempe et al., 2003; Tang et al., 2014; Han et al., 2018), since computing the expected outcome is #P-hard (Chen et al., 2010a). Learning-based methods handle this problem by fitting a mapping from a network and a chosen set to the quantity of interest (Xia et al., 2021; Ko et al., 2020), or by predicting the solution itself (Fan et al., 2020; Ling et al., 2023), but each is fit to a particular task and objective. This creates a trade-off between generality and cost: simulation supports arbitrary candidate interventions but requires repeated process execution, whereas learned mappings are inexpensive but typically specialized to a particular task and objective.

Designing effective algorithms for these problems often requires substantial heuristic design and empirical tuning. LLM-based program search can automate part of this process by generating, evaluating, and refining algorithmic code (Romera-Paredes et al., 2024; Mankowitz et al., 2023; Novikov et al., 2025; Liu et al., 2024; Ye et al., 2024; Van Stein & Bäck, 2024; Zheng et al., 2025). Such a search process needs an environment in which the consequences of candidate actions can be evaluated. In other domains, world models serve this role by learning environment dynamics in which an agent can act (Ha & Schmidhuber, 2018; Hafner et al., 2025; Schrittwieser et al., 2020; Bruce et al., 2024). Existing world models largely operate on images, video, point clouds, or low-dimensional control states. Yet network systems require modeling both the relational structure through which interactions propagate and how interventions modify the system and its subsequent dynamics. This raises the central question of this work: can we learn such an action-conditioned world model and use it as a reliable and efficient environment for algorithm design?

Complex systems pose three challenges for world modeling and algorithm design. First, actions may modify node states, edges, or contact weights, changing both the immediate system configuration and the subsequent diffusion dynamics. Conventional world models evolve states within fixed observation spaces (Hafner et al., 2025; Schrittwieser et al., 2020), while learned diffusion surrogates often fix the intervention type, such as a seed set, and predict a specific objective (Xia et al., 2021; Ko et al., 2020; Ling et al., 2023). Second, long-horizon evaluation introduces compounding transition error, so accurate next-state prediction does not necessarily preserve the relative performance of candidate algorithms over repeated rollouts. Third, evaluating candidate algorithms with Monte Carlo simulation is costly, while aggregate task scores provide limited guidance for revision, and evaluating alternatives, such as swapping a seed or blocking a different edge, incurs simulation cost.

To address these challenges, we propose a Network World Model and an LLM-based algorithm design framework (Figure 1). The model is a graph neural simulator that applies interventions exactly to node states, edges, and contact weights, then predicts subsequent diffusion through a transition head constrained by the process's known rules. We develop a coding agent search loop that uses fast model rollouts to score candidate algorithms, estimate the contribution of individual actions through ablation, and evaluate alternatives such as node swaps, providing targeted feedback for algorithm revision. We further provide a theoretical analysis that bounds algorithm selection regret in terms of transition error, rollout horizon, and search suboptimality, and shows how exact intervention handling tightens this bound. Across eight tasks and five diffusion models, the framework matches or exceeds the strongest reported baseline in 138 of 141 settings while enabling up to 14.5×14.5 \times faster rollouts than Monte Carlo simulation. Our main contributions are: (1) an action-conditioned Network World Model for complex network dynamics; (2) an LLM-based framework for network algorithm design using the learned model; and (3) theoretical guarantees for world-model-based algorithm selection, together with extensive evaluation across eight tasks and five diffusion models.

References (100)

Couldn't load all references. Reload the page to try again.