Network World Models as Environments for Algorithm Design on Complex Systems

Rishab Alagharu1, Hongji Pu2, Zeeshan Memon1, Xinyuan Song1, Yuntong Hu1, Liang Zhao1,†
1Emory University 2University of Illinois Urbana-Champaign
†Corresponding author
Left: a coding agent writes an algorithm, a Network World Model rolls out how its chosen seeds spread over a network and returns a reward per round. Right: a radar chart over eight tasks where the designed algorithms exceed the strongest baseline.

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).

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.

Key Results

138/141
settings where the designed algorithm matches or exceeds the strongest reported baseline
14.5×
faster rollouts than Monte Carlo simulation on Digg (116,893 nodes)
0.11%
selection regret against Monte Carlo on held-out SBM networks
8
network tasks under five diffusion models: IC, LT, CLT, SIR, and SIS

Method

A task instance fixes a network, its diffusion process, the constraints on actions, and a horizon \(H\). An algorithm returns a plan of actions, and the plan is scored by the outcome the network reaches after \(H\) steps. Computing that outcome exactly is #P-hard, so every candidate must be scored from many sampled trajectories, and simulation becomes the bottleneck of the search. We split the problem in two: learn a world model of the dynamics under interventions, then search for algorithms against it.

Network World Model

An action changes the network in two ways: through an immediate effect that is known exactly, and through the diffusion that follows. The model applies the first and learns the second:

\[ (\mathcal{G}_t^{+},\mathbf{s}_t^{+}) = T_{\mathrm{exo}}(\mathcal{G}_t,\mathbf{s}_t,a_t), \qquad \hat{\mathbf{s}}_{t+1} = f_{\theta}\big(\mathcal{G}_t^{+},\mathbf{s}_t^{+},\boldsymbol{\eta}(a_t)\big) \]
  • Exact interventions. \(T_{\mathrm{exo}}\) writes each action into the network and its state before diffusion takes its step: a seeded node, a removed node or edge, or a changed contact weight. Applying the intervention exactly removes intervention error from the rollout bound and tightens the selection guarantee below.
  • Action conditioning. Features \(\boldsymbol{\eta}(a_t)\) record which operation touched each node and edge and by how much, because distinct operations can leave similar post-intervention states. Message passing runs on the edited network, so removed edges carry no messages and downweighted edges contribute proportionally less.
  • Structured transition head. The readout is constrained to the known form of the process, leaving only its parameters to learn. For a cascade, \(g(\mathbf{h}_v) = 1-\prod_{u\to v}(1-q_{uv}z_u)\), where \(q_{uv}\) is a learned transmission probability and \(z_u\) marks the frontier.
  • Sampled rollouts. Each step draws a state instead of carrying probabilities forward, which keeps every trajectory consistent with the process. A candidate and the current best are advanced under common random numbers, so their difference is not dominated by process variance.

Algorithm Design Loop

Each round, an LLM coding agent writes an executable candidate algorithm, drawing on a library of classical algorithms for the task that it may reuse, combine, or extend. The Network World Model rolls out the candidate and the current best algorithm on the same \(n\) sampled trajectories. Search operators favor exploration early and increasingly refine the current best algorithm as evidence accumulates. Beyond the task score, the model returns three kinds of feedback, one for each way a plan can be revised:

Paired selection. A fresh seed \(\xi\) is drawn every round, and the candidate \(\pi\) replaces the current best \(\hat{\pi}\) only when its mean paired gain clears the standard error of the paired differences:

\[ \Delta_i = R_i(\pi;\xi) - R_i(\hat{\pi};\xi), \qquad \Delta = \frac{1}{n}\sum_{i=1}^{n}\Delta_i, \qquad \text{accept if } \Delta > b = \frac{\operatorname{sd}(\Delta_1,\ldots,\Delta_n)}{\sqrt{n}} \]

Re-scoring the incumbent on the fresh seed every round keeps a favorable realization from carrying it forward.

Reliability of World-Model-Based Selection

Suppose the one-step transition error of the Network World Model is at most \(\epsilon\) over the states that algorithms in the search space \(\Pi\) can reach within the horizon \(H\), the task score has range at most \(B_R\), and the returned algorithm \(\hat{\pi}\) is \(\eta_{\mathrm{search}}\)-suboptimal under the learned evaluator. Then its selection regret under the true dynamics \(P\) is bounded:

\[ \operatorname{Reg}_P(\hat{\pi};\Pi) = J_P(\pi^\star) - J_P(\hat{\pi}) \;\le\; 2B_R H\epsilon + \eta_{\mathrm{search}} \]

Exact reproduction of every rollout is not required for reliable selection: the downstream loss is controlled by the accumulated transition error and the search error. The paper also proves that pairwise rankings are preserved and that the best algorithm is recovered exactly under a sufficient selection margin.

Eight Tasks, Five Diffusion Models

One world model design and one search loop cover three problem families. Every task is evaluated on real networks with about \(10^3\) to more than \(10^5\) nodes. Five tasks intervene on a spreading process, two infer its hidden cause, and one forecasts real cascades.

Intervention

Influence maximization

Choose seed nodes whose cascade reaches the most nodes.

IC, LT · final spread (↑)

Intervention

Adaptive influence maximization

Commit seeds over rounds, each after observing how the last batch spread.

IC, LT · final spread (↑)

Intervention

Critical node detection

Remove nodes ahead of a known outbreak to contain it.

IC, LT · final infected (↓)

Intervention

Influence blocking

Counter-seed, block nodes or arcs, or cut weights against a spreading rumor.

IC, CLT · final rumor size (↓)

Intervention

Epidemic control

Vaccinate, quarantine, cut arcs, or reduce contacts to limit an epidemic.

SIR, SIS · attack rate (↓)

Inverse

Source localization

Name the source set behind an observed spread.

IC, LT · consistency with the observation (↑)

Inverse

Cascade reconstruction

Recover who was infected, when, and by whom from a partial observation.

IC, LT · likelihood of the history (↑)

Forecasting

Cascade prediction

Predict the final popularity of a real, partly observed cascade. No simulator is involved.

Logged cascades · MSLE (↓)

Datasets: 20 networks, from 1,005 to 616,316 nodes
DatasetNodesEdgesTasks
Email-EU1,00524,929Influence blocking
UCI Students1,2666,451Cascade reconstruction
Network Science1,5892,742Influence maximization, adaptive influence maximization
Cora-ML2,8107,981Source localization
Power Grid4,9416,594Critical node detection, source localization
CA-GrQc5,24214,484Cascade reconstruction
Oregon110,67022,002Epidemic control
PGP10,68024,316Critical node detection
Infectious SocioPatterns10,97244,517Epidemic control
NetHEPT15,22962,752Influence maximization, adaptive influence maximization
RT-Pol18,47048,053Cascade reconstruction
Gnutella2426,51865,369Influence blocking
Cit-HepTh27,769352,768Influence blocking
Taoke29,71195,012Cascade prediction
Deezer47,538222,887Source localization
Brightkite58,228214,078Epidemic control
Gnutella3162,561147,878Critical node detection
Digg116,8932,011,447Influence maximization, adaptive influence maximization
Digg (cascades)279,6301,731,653Cascade prediction
APS616,3163,304,400Cascade prediction

For the three cascade-prediction corpora, the counts describe the full underlying network, while the runs replay a subsample restricted to the most active participants.

Results

Every returned algorithm and every baseline is replayed independently on the trusted Monte Carlo simulator with 200 samples, so the world model used during the search never scores its own results. The design loop runs \(G = 10\) rounds with \(n = 200\) sampled rollouts per evaluation, horizon \(H = 10\), and six probes per round, with GPT-5.6 Sol as the coding agent.

Designed algorithms against the strongest baselines

The designed algorithms improve on the strongest existing method in all eight tasks and match or exceed the strongest reported baseline in 138 of 141 settings. Each cell reports IC / LT (IC / CLT for influence blocking, SIR / SIS for epidemic control). Bold marks the best value, and n/a marks an out-of-memory error or a timeout.

Influence maximization (IC / LT): spread, % of nodes activated (↑)

Network Science (1,589 nodes)Digg (116,893 nodes)NetHEPT (15,229 nodes)
Method1%5%10%20%1%5%10%20%1%5%10%20%
IMM8.7/10.924.8/30.238.0/45.159.2/68.525.9/47.036.0/60.944.2/69.755.7/79.611.6/14.828.9/36.242.4/51.661.7/72.5
OPIM8.8/10.824.2/29.537.7/45.358.3/67.427.4/50.541.6/68.451.8/77.662.7/85.512.1/15.531.4/39.244.7/54.364.5/75.7
SubSIM8.7/10.724.3/29.137.3/45.057.8/68.527.3/50.141.7/68.451.8/77.762.7/85.412.6/16.231.3/39.044.8/54.564.3/75.4
DeepIM4.8/5.315.3/20.027.7/32.945.8/53.0n/an/an/an/an/an/an/an/a
DegreeDiscount8.3/10.723.7/29.736.3/44.555.0/65.526.0/49.637.0/62.745.8/70.060.0/81.611.9/15.930.3/38.843.0/53.561.1/73.2
Network World Model8.9/11.325.3/30.939.1/46.860.1/69.330.4/56.845.8/73.256.5/83.169.4/93.512.9/16.933.0/41.447.8/58.168.5/80.0

Adaptive influence maximization (IC / LT): spread, % of nodes activated (↑)

Network Science (1,589 nodes)Digg (116,893 nodes)NetHEPT (15,229 nodes)
Method1%5%10%20%1%5%10%20%1%5%10%20%
EPIC8.4/10.823.1/28.734.6/41.552.9/62.327.5/48.440.0/65.849.0/74.060.7/82.411.4/14.628.9/36.541.2/51.360.4/70.6
Adaptive DegreeDiscount8.2/10.823.6/30.236.5/45.856.9/69.329.0/54.243.5/68.954.8/79.469.3/93.611.9/16.431.6/41.346.7/58.267.9/80.1
IMM8.7/10.924.8/30.238.0/45.159.2/68.525.9/47.036.0/60.944.2/69.755.7/79.611.6/14.828.9/36.242.4/51.661.7/72.5
Static-Split8.3/10.724.1/30.337.5/45.958.1/69.326.4/49.638.7/64.549.0/73.865.1/87.512.1/16.031.0/39.844.7/55.863.8/76.8
Network World Model8.9/11.325.2/30.939.1/46.860.0/69.430.4/56.845.6/73.256.4/83.071.9/94.012.9/16.933.0/41.547.8/58.768.6/82.0

Critical node detection (IC / LT): remaining spread, % of nodes infected (↓)

Power Grid (4,941 nodes)PGP (10,680 nodes)Gnutella31 (62,561 nodes)
Method1%5%10%20%1%5%10%20%1%5%10%20%
HDA26.5/28.924.0/27.121.8/25.418.6/22.326.4/31.923.3/28.520.8/25.618.0/21.631.3/39.026.0/35.021.9/30.817.4/22.9
BPD+R26.7/29.124.1/27.521.9/25.818.5/22.426.4/32.0n/a21.2/25.818.0/21.631.4/39.126.4/35.522.5/31.4n/a
CI+R26.7/29.024.1/27.321.9/25.718.5/22.326.6/32.023.4/28.521.2/25.918.1/21.631.3/39.1n/an/an/a
EI26.8/29.224.5/27.922.1/26.019.1/23.226.5/32.023.5/28.821.1/25.918.2/22.232.0/39.426.4/35.322.1/31.117.9/23.7
Frontier26.3/28.622.7/25.018.7/20.410.7/10.726.7/32.023.4/27.920.2/23.614.2/14.531.3/39.026.0/34.221.6/28.616.0/17.6
Network World Model26.2/28.222.0/24.117.3/19.610.2/10.725.8/31.121.3/26.716.5/21.511.0/13.031.1/38.224.7/32.019.5/26.112.3/16.6

Influence blocking (IC / CLT): rumor cascade size (nodes) (↓)

Email-EU (1,005 nodes)Gnutella24 (26,518 nodes)Cit-HepTh (27,769 nodes)
Method102030405010203040501020304050
RPS60.2/70.947.4/56.739.8/48.235.0/42.831.9/39.11520.6/1625.31311.6/1380.61151.5/1206.31029.6/1076.5939.8/980.4882.0/947.0815.3/868.8769.5/819.7737.5/784.7714.2/759.9
Reverse61.0/73.149.2/57.942.1/49.937.2/44.834.5/42.11817.6/1961.81713.1/1856.41540.1/1676.81462.0/1587.71413.1/1535.7953.0/1048.3936.6/1030.6908.8/997.2867.4/941.3857.0/929.2
Proximity63.1/74.952.4/61.244.6/53.239.6/47.736.3/44.22338.9/2531.62289.9/2481.12239.7/2424.92196.5/2379.02141.1/2319.71109.1/1292.21107.8/1290.81105.6/1288.11103.8/1286.01101.4/1282.9
GreedyReplace92.2/162.377.2/163.565.9/158.760.1/157.354.8/154.91551.8/1640.51364.9/1449.21216.8/1342.31088.2/1211.8990.4/1072.4897.6/971.7835.2/905.0795.8/857.1766.9/822.4742.6/797.5
SandIMIN92.5/160.077.4/158.766.5/157.463.7/157.854.4/150.91564.9/1633.31391.2/1456.31228.9/1300.21106.4/1173.91017.8/1096.9903.9/978.0847.4/905.0796.4/872.3767.4/825.1743.0/799.2
Network World Model59.4/71.746.3/55.439.4/47.134.5/42.231.0/38.71503.3/1582.31275.0/1333.81113.6/1154.8985.6/1023.0896.0/924.7879.1/942.2810.7/862.7767.5/815.9736.3/783.5712.2/755.7

Epidemic control (SIR / SIS): attack rate, % of nodes ever infected (↓)

Infectious SocioPatterns (10,972 nodes)Oregon1 (10,670 nodes)Brightkite (58,228 nodes)
Method1%5%10%20%1%5%10%20%1%5%10%20%
DAVA19.9/23.07.4/8.31.0/1.01.0/1.07.9/9.61.0/1.01.0/1.01.0/1.040.9/47.1n/an/an/a
NetShield+21.2/24.917.3/20.612.8/15.67.4/8.94.3/5.42.1/2.31.8/1.91.6/1.724.1/29.48.5/10.54.5/5.42.7/3.0
GreedyWalk20.9/24.616.5/19.812.3/14.97.0/8.54.8/5.92.5/2.81.9/2.11.6/1.723.2/28.48.4/10.54.6/5.52.8/3.1
EI20.7/24.416.3/19.311.5/13.68.1/9.54.2/5.22.0/2.11.7/1.81.6/1.623.5/28.78.7/10.94.5/5.32.8/3.1
CI20.7/24.316.1/18.912.4/14.66.9/8.14.2/5.22.0/2.11.7/1.81.6/1.626.0/31.110.2/12.34.7/5.52.7/3.0
Network World Model20.4/19.512.2/4.11.0/1.01.0/1.02.4/4.31.0/1.01.0/1.01.0/1.023.2/24.51.4/1.51.0/1.01.0/1.0

Source localization (IC / LT): consistency of the recovered sources with the observation, 0 is perfect (↑)

MethodCora-ML (2,810 nodes)Power Grid (4,941 nodes)Deezer (47,538 nodes)
LPSI−0.173/−0.130−0.106/−0.100−0.176/−0.174
Rumor Centrality−0.237/−0.257−0.242/−0.260−0.190/−0.200
Dynamic Age−0.200/−0.183−0.234/−0.274−0.178/−0.183
Infected-Degree−0.173/−0.154−0.116/−0.119−0.178/−0.186
SL-VAE−0.370/−0.437−0.306/−0.323−0.314/−0.240
Network World Model−0.139/−0.106−0.080/−0.073−0.147/−0.145

Cascade reconstruction (IC / LT): referee reward of the decoded history, 0 is perfect (↑)

MethodUCI Students (1,266 nodes)CA-GrQc (5,242 nodes)RT-Pol (18,470 nodes)
Reports−0.852/−0.946−0.791/−0.692−1.252/−1.068
Steiner Tree−0.901/−0.978−0.798/−0.753−2.618/−2.076
Jordan-Backward−0.852/−0.946−0.791/−0.692−1.252/−1.068
DHREC−1.464/−1.525−1.175/−1.176−2.471/−2.594
CRI−0.885/−0.995−1.106/−1.151−0.785/−0.782
Network World Model−0.675/−0.717−0.566/−0.566−0.391/−0.373

Cascade prediction : MSLE at the prediction horizon (↓)

MethodAPS (30,000 nodes)Taoke (29,711 nodes)Digg (5,000 nodes)
Persistence0.2881.1014.222
Szabo-Huberman0.0980.7160.834
Hawkes0.1410.9572.744
RPP0.1161.0093.283
Weng-Communities0.1960.8501.142
Network World Model0.0780.5440.774

Gains hold across budgets

Spread against seed budget for influence maximization on Digg under IC.
(a) Influence maximization, Digg (IC)
Spread against seed budget for adaptive influence maximization on Digg under IC.
(b) Adaptive influence maximization, Digg (IC)
Remaining spread against removal budget for critical node detection on PGP under IC.
(c) Critical node detection, PGP (IC)
Rumor cascade size against blocker budget for influence blocking on Gnutella24 under IC.
(d) Influence blocking, Gnutella24 (IC)

Performance across intervention budgets under IC. Higher is better in (a) and (b); lower is better in (c) and (d).

Against LLM algorithm discovery systems

EoH, OpenEvolve (the open-source implementation of AlphaEvolve), LLaMEA, and ReEvo each run their own search loop, prompts, and published defaults on the same problem, with a fitness function on the exact simulator and the same coding model. None of them sees the Network World Model. The design loop is best at every budget on both tasks, and none of the four systems reaches the strongest classical baseline on Network Science at any budget.

Influence maximization, Network Science (↑)Critical node detection, Power Grid (↓)
Method1%5%10%20%1%5%10%20%
EoH5.519.532.554.626.623.419.414.3
OpenEvolve5.121.936.850.826.623.821.417.7
LLaMEA6.121.134.956.226.623.419.514.3
ReEvo6.622.335.557.026.623.519.615.0
Network World Model8.925.339.060.026.222.017.310.2

Influence maximization on Network Science (spread, % of nodes activated, higher is better) and critical node detection on Power Grid (remaining spread, % of nodes infected, lower is better), under IC. All rows use GPT-5.6 Sol.

Robust to the coding model

Mean reward of the returned algorithm under three coding models against the strongest baseline, on Network Science and Power Grid.

Repeating the search with GPT-5.6 Sol, Terra, and Luna, the three finish within 0.1 points of one another on Network Science and within 0.3 points on Power Grid, averaged over budgets, and each beats the strongest baseline.

Transfers across networks

Reward of the critical node detection algorithm designed on PGP, replayed on Power Grid and Gnutella31, relative to the strongest baseline.

The critical node detection algorithm designed on PGP, replayed unmodified, beats the strongest baseline on Power Grid by 4.0% and on Gnutella31 by 11.7%. Transferred algorithms stay within 0.1 percentage points of algorithms designed directly on the target network.

Scales to larger networks

Influence maximization spread of the Network World Model and the strongest baseline on Network Science, NetHEPT, and Digg at the 10% budget.

Influence maximization under IC at the 10% budget. The designed algorithm stays ahead of the strongest baseline from Network Science to Digg, and the gain grows from 1 to 4% on Network Science to 7 to 12% on Digg.

Cheaper than simulation

Time per rollout of the Network World Model and Monte Carlo simulation on Power Grid and Digg, log scale.

One world model rollout is 4.0× faster than Monte Carlo simulation on Power Grid and 14.5× faster on Digg. Building the training set costs 38,800 simulator episodes once, while a simulator-based search needs 7,800 episodes every time it runs, so the model pays for itself after about five searches.

How Accurate Is the World Model?

Algorithm design needs three things from the world model: accurate rollouts, reliable candidate selection, and cheap evaluation. One-step \(\Delta\)F1 ranges from 0.87 to 0.99 for IC, LT, and CLT and from 0.85 to 0.86 for SIR and SIS, with Brier scores of at most 0.0006. Free-running rollouts stay within 2.2% of the trusted simulator at the horizon, except under LT, where the model undercounts by 6.0%.

Prediction and rollout quality on Network Science (IC, LT), Email-EU (CLT), and Oregon1 (SIR, SIS)

Dynamics\(\Delta\)F1 (↑)Brier (↓)Bias (%)
IC0.87380.0003+0.1
LT0.99260.0003−6.0
CLT0.98800.0001−2.2
SIR0.85650.0006+0.5
SIS0.84610.0006−0.1

Decision value on 20 held-out networks per family; regret in % of reward against Monte Carlo selection

FamilyPref. accuracy [95% CI]WM regretRandom regret
SBM (in dist.)0.902 [0.890, 0.914]0.1110.27
BA (in dist.)0.861 [0.818, 0.902]0.1312.03
WS (shift)0.860 [0.832, 0.887]1.1810.07

For search, what matters is that the model orders candidates the way the true dynamics would. On held-out SBM and BA networks, it agrees with the trusted simulator on 90.2% and 86.1% of candidate pairs, with selection regret of 0.11% and 0.13%. On Watts-Strogatz networks, a topology shift, preference accuracy stays at 86.0% and regret at 1.18%.

Relative count bias of the free-running rollout by step on Network Science and Power Grid.
Relative count bias of the free-running sampled rollout by step on the 50 held-out episodes of the main runs. The bias settles within the first few steps and does not grow, so one-step error does not compound over a rollout.

BibTeX

@article{alagharu2026network,
  title={Network World Models as Environments for Algorithm Design on Complex Systems},
  author={Alagharu, Rishab and Pu, Hongji and Memon, Zeeshan and Song, Xinyuan and Hu, Yuntong and Zhao, Liang},
  journal={arXiv preprint arXiv:2610.01048},
  year={2026}
}