Weight-Space Programming of Policies and Their Verification via Model Checking
Abstract
Large language models (LLMs) can write the weights of small neural networks directly, without gradient descent. This weight-space programming creates policies for sequential decision-making from a task description alone, but nothing guarantees that a written policy behaves as intended. We combine weight-space programming with probabilistic model checking. Given an environment modeled as a Markov decision process and a requirement in probabilistic computation tree logic (PCTL), an LLM writes all weights of a policy network, optionally repairs them on a dataset of optimal actions, and receives model-checking feedback until the requirement holds or a round limit is reached. The model checker Storm computes, rather than estimates from simulations, the probability that the policy satisfies the requirement, so every returned policy is verified. With two LLMs on three environments, the created policy of each of the 18 runs attains the optimal probability, before any dataset or model-checking feedback. Four of six policies programmed for two transporter jobs also complete three jobs with probability 1, so they generalize to a task that the LLM never saw. The pipeline also programs a policy that satisfies a complex safety requirement expressed with the PCTL until operator in all six runs. In one of them, dataset repair raised the accuracy to 98.4\% but broke the requirement, and one round of model-checking feedback restored it.
Create a lesson
Related papers
Writing Weights or Training Them? Spatial Reasoning through Weight-Space Programming and Low-Rank Adaptation
Shared title terminology · Yalin Yang, Xiao Huang, Yanan Wu et al.
NCP: Verifier-Guided Optimization of Weight-Space Control Policies
Shared title terminology · Ekrem Aksoy
W-ISA: Transactional Execution of Weight-Space Intervention Programs
Shared title terminology · Ekrem Aksoy
Vega-Fafnir: Is Greedy Decoding the Same Decoding? Where Rounding Noise in Speculative Verification Comes From and What Removing It Costs
Shared title terminology · Mohammed Nayeem Khan, Navin Kumar R
No Perfect Guardrail & No Perfect Guard: On the Decidability of Output Policies for Large Language Models
Shared title terminology · Ahmed Amer, Loren Kinczel, Darrell D. E. Long
Bel: Step-Level Policy Improvement of Visual Agents Without Training
Shared title terminology · Jiajun Fan, Ziwen Wang, Zhaoyu Zhu et al.