Skip to content

Pandora's Toolbox, or Why Agent Safety Cannot Be VerifiedPandora's Toolbox Or Why Agent Safety Cannot Be Verified

arXiv: 其他 AI 安全论文· arXiv:2611.25325· Mario Franco, Carlos GershensonBinghamton University; New YorkIndexed by this site · 4 days ago· Originally publishedAlignment· Its place in the scan record →

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

The authors use computability theory to prove that the safety of agents coupling a language model with a general-purpose computing device is undecidable; under finite constraints it is decidable but PSPACE-complete, and safety is not composable.

Questions
Current agents are formed by coupling a fixed language model with a general-purpose computing device; the authors discuss whether the safety of such systems can be predicted, filtered or certified, and the conclusion tends toward no.
Methods
Formalize the agent loop with a deterministic Turing machine, define the dangerous class Ext(p) and the relay policy, prove undecidability via reduction from the halting problem, Rice's theorem and the recursion theorem, and analyze the finite-constraint and multi-agent cases.
Experiments and results
The authors prove: in the general case safety is undecidable and safe inputs are not even enumerable; a guardrail cannot be both sound and complete; under finite constraints the problem is decidable but PSPACE-complete; and safety is not a composable property.
Limitations and future work
The authors state that they adopt an abstract definition of danger, and that danger in reality is harder to mathematize; Section 6 explains that the various definitions of ϵ-safety offer weak guarantees and no proofs are given; the paper is a theoretical analysis with no experiments.
AI summaryMario Franco and Carlos Gershenson prove in their paper that the safety of an agent formed by coupling a fixed language model with a general-purpose computing device is undecidable, that is, no algorithm can predict whether the agent will run a program semantically equivalent to some dangerous program. The authors point out that guardrails, blacklists, whitelists, and certification can generally only yield imperfect safety solutions. Under constraints of limited context, values, and runtime, safety is decidable but still hard to solve; even when the agent description is known, the problem is PSPACE-complete. Safety is not composable: agents that are each provably safe may still produce unsafe behavior when combined. The authors also discuss relaxed safety definitions that are usable in practice.

Mario Franco and Carlos Gershenson prove in their paper that the safety of an agent formed by coupling a fixed language model with a general-purpose computing device is undecidable, that is, no algorithm can predict whether the agent will run a program semantically equivalent to some dangerous program. The authors point out that guardrails, blacklists, whitelists, and certification can generally only yield imperfect safety solutions. Under constraints of limited context, values, and runtime, safety is decidable but still hard to solve; even when the agent description is known, the problem is PSPACE-complete. Safety is not composable: agents that are each provably safe may still produce unsafe behavior when combined. The authors also discuss relaxed safety definitions that are usable in practice.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors discuss agents in which a language model is coupled with a general-purpose computing device, and whether their safety can be algorithmically predicted, filtered or certified.

    Core question: can the safety of an agent formed by coupling a fixed language model with a general-purpose computing device be algorithmically verified (predicted, filtered or certified).

    • Problem setting: the authors note that current agents couple a fixed language model with a general-purpose computing device through a harness, and can write code, run programs, browse the web and send messages, mostly without direct human supervision; finite language models with external memory are computationally universal, while a single forward pass is bounded computation.
    • Assumption of existing approaches: the authors state that existing safety evaluations typically combine simple input tests, filters, and tool blacklists/whitelists, on the premise that "with enough effort, agent behavior can be anticipated in advance"; the paper tests whether this assumption holds.
    • Core observation: the authors define danger as "being semantically equivalent to some (known or unknown) dangerous program p," i.e., the metric set Ext(p) = {q | φq = φp}; the authors deliberately do not define what specifically makes p dangerous, considering this subjective and not affecting the subsequent discussion.
    • Paper content: the authors formalize the agent loop with deterministic Turing machines, give explicit reductions, and analyze in turn prediction safety (Section 3), certification safety (Section 4), bounded agents under finite constraints (Section 5), relaxed ϵ-safety definitions (Section 6), and multi-agent systems (Section 7).
    • Authors' positioning: the authors state that prior work has noted computability obstacles to controlling AI systems via Rice's theorem (Brcic and Yampolskiy have a survey); this paper's contribution is to locate the obstacles in the agent loop and tools, give explicit reductions, and explain what remains under finite constraints.
  2. What related research exists?

    Related work falls into three groups: agent harnesses, the computational universality of language models, and impossibility results on AI control studied via computability.

    Agent harnesses and tool use

    • Yao et al. (2023), ReAct—synergizing reasoning and acting in language models; the authors cite it as an example of a harness.
    • Schick et al. (2023), Toolformer—teaching language models to use tools on their own; likewise cited as an example of a harness.

    Computational capabilities of language models

    • Schuurmans (2023)—the authors cite its conclusion that language models augmented with external memory are computationally universal.
    • Pérez et al. (2019) and Giannou et al. (2023)—discussing respectively the Turing completeness of modern neural network architectures and looped transformers as programmable computers; the authors use them to support "finite language models plus external memory are universal."
    • Merrill and Sabharwal (2023)—the authors cite its conclusion that a single forward pass of a fixed-precision transformer is bounded computation, in contrast with the universality above.

    Computability obstacles to AI control

    • Alfonseca et al. (2021)—discussing via Rice's theorem that superintelligence cannot be contained; the authors state that such obstacles had been noted before.
    • Brcic and Yampolskiy (2023)—a survey of AI impossibility results; the authors state that this paper's contribution is to locate the obstacles in the agent loop and tools, give explicit reductions, and explain what still holds under finite constraints, thereby distinguishing it from that survey.

    Multi-agent and concurrent system verification

    • Anderson (1972) and Kauffman and Roli (2023)—the authors use "multi-agent systems often exhibit behavior unpredictable from individual agents" as an entry point.
    • Apt and Kozen (1986), Brand and Zafiropulo (1983)—limitations of verification of finite-state concurrent systems, communicating finite-state machines; the authors use them to show that once the number of agents or message queue length is unbounded, the problem returns to undecidable.
    • METR (2026)—an investigation report of a hacking incident; the authors use it in Section 8 to show that dangerous multi-agent behavior can spread through messages like contagion.

    The paper is theoretical work and has no baseline methods or benchmark datasets for comparison.

  3. How does the paper address this problem?

    The authors formalize the agent as a policy loop on a Turing machine, and analyze the decidability of safety using halting problem reductions, Rice's theorem and the recursion theorem.

    Overall approach: abstract the "language model + computing device" agent as a policy on a deterministic Turing machine, define danger as the metric set Ext(p) of programs semantically equivalent to a dangerous program p, then use standard tools of computability theory (halting problem reductions, Rice's theorem, the recursion theorem) to analyze prediction, filtering, certification, finite constraints and the multi-agent case one by one.

    Formalization: agent loop and danger classes

    • Model: the language model is viewed as a machine with a fixed description e accepting variable input x; the computing device U executes the "tools" requested by the agent; the context γ is the list [x, o0, …, ok] recording the full computation history (Definition 3.1).
    • policy and run: a policy π decides the next action given a context (Definition 3.2); a run is a sequence of contexts; after requesting ⟨q, i⟩, if q halts the output is appended to the context, otherwise the run gets stuck (Definition 3.3).
    • Definition of unsafe: ExecD(π, x) means that on some reachable context π requested some d ∈ D (Definition 3.4); the danger class D is taken to be a nontrivial behavioral class, and Ext(p) is the smallest danger class containing p (Definition 2.11).
    • Key lemma: the authors prove that Ext(p) is nontrivial, undecidable and infinite, and that any nontrivial behavioral class is undecidable (Lemma 2.12, using Rice's theorem).

    Prediction safety: the relay construction

    • relay policy: Rp,q first requests ⟨p, x⟩, and if p halts requests ⟨q, 0⟩, then stops (Definition 3.5, Figure 2).
    • Reduction: take p ∉ D and halting-complete, q ∈ D; then Rp,q is unsafe on x if and only if φp(x) halts (Lemma 3.6); hence no algorithm can decide whether a given input is unsafe, and no procedure can enumerate safe inputs (Proposition 3.7).
    • Dangerous agent version: for a fixed input x0, no algorithm can decide for every total agent whether it is safe on x0 (Proposition 3.11, via the input-rewriting construction of Lemma 3.10).
    • Wrong predictions: for any prediction algorithm f outputting 0/1, the authors use the recursion theorem to construct a total agent h such that f's prediction about h is always wrong (Proposition 3.13).

    Filtering, whitelists and certification

    • guardrail: defined as a machine V between the agent and U that decides whether to let ⟨m, x⟩ through; sound means blocking all members of D, complete means blocking only members of D (Definition 3.14). The authors derive: no guardrail can be both sound and complete for a nontrivial Ext(p) (Corollary 3.15); a finite blacklist cannot be sound (Corollary 3.16).
    • Whitelist: if the whitelist contains both a halting-complete tool and a universal machine (interpreter I), danger can move from the program channel to the data channel: data relay RIp,q requests only the whitelisted p and I, yet runs q as data through I (Definition 3.18, Proposition 3.19).
    • Certification: a certification method is an r.e. set C containing only safe agents (Definition 4.1); the authors prove that every certification method misses some total agent that is safe on x0 (Corollary 4.2), and use the recursion theorem to directly construct the missed agent g (Proposition 4.3); Ext(p) itself is not r.e. (Corollary 4.4).

    Finite constraints and ϵ-safety

    • Bounded runs: the constraints are window L, value bound B, and total computing device T (Definition 5.1); when D is decidable, safety can be decided by simulation (Proposition 5.2), with an upper bound on rounds of N(L,B) = (B+3)L (Proposition 5.13).
    • Complexity: when the policy and T are polynomial time and D is polynomial-space decidable, the constrained safety problem is in PSPACE (Proposition 5.19), and there exists a polynomial-time policy making the problem PSPACE-hard, hence PSPACE-complete (Proposition 5.22 window version, 5.23 numeric version); the depth of a black-box verifier is at least (B+1)^L + L − 1 (Proposition 5.16, constructed using de Bruijn sequences).
    • ϵ-safety: Section 6 gives 6 relaxed definitions (by proportion of dangerous requests, input distribution, (k,h)-Levin complexity, universal mass, hazard rate, probability of divergence from p); the authors explicitly say this section is "closer to a discussion than to real definitions," and deliberately proved no related propositions.

    Multi-agent

    • System model: a system is a tuple of policies, each with its own context and computing device, which can send messages to each other via send(j, v) (Definition 7.1).
    • Compositionality: the authors construct policies αk, βk that are each safe in isolation but unsafe when composed (Proposition 7.5), and prove that no set C of agents can characterize "system safety" (Proposition 7.6).
    • Sharded execution: for any q, there exist c, d ∉ Ext(q) such that c ◦ d ∈ Ext(q) (Lemma 7.7), i.e., a dangerous program can be split into fragments computed separately by different agents (Proposition 7.10, Figure 4 summarizes the three channels of program, data and sharding); deciding the safety of a system of n polynomial-time agents is PSPACE-complete (Proposition 7.11).
  4. What experiments did the paper conduct?

    The paper is purely theoretical work with no experiments; its results are a series of theorems, propositions and constructive proofs.

    Experimental setup

    The paper has no experiments: no models under test, datasets, baselines, metrics or review methods. All results are mathematical propositions and proofs; the "evaluation" is done with standard tools of computability and complexity theory (halting problem reductions, Rice's theorem, the recursion theorem, PSPACE reductions).

    Main theoretical results

    The table below lists the main propositions in the paper's order (all are statements proved by the authors, not experimental numbers):

    PropositionKey statement
    Lemma 2.12Ext(p) is nontrivial, undecidable and infinite; any nontrivial behavioral class is undecidable
    Proposition 3.7For halting-complete p, no algorithm decides whether Rp,q is unsafe on a given input, and safe inputs cannot be enumerated
    Proposition 3.11 / 3.13For a fixed input, it cannot be decided whether a total agent is safe; for any prediction algorithm there exists an agent it always predicts wrongly
    Corollary 3.15 / 3.16No guardrail is both sound and complete for a nontrivial Ext(p); a finite blacklist cannot be sound
    Proposition 3.19When the whitelist contains a halting-complete tool and an interpreter, danger can run through the data channel and is undecidable
    Corollary 4.2 / Proposition 4.3Every certification method misses some safe total agent; Ext(p) is not r.e. (Corollary 4.4)
    Proposition 5.2 / 5.13Under finite constraints (L, B, T) with D decidable, safety is decidable, with an upper bound on rounds of N(L,B) = (B+3)^L
    Proposition 5.22 / 5.23The constrained safety problem is PSPACE-complete under polynomial-time policies (window version and numeric version)
    Proposition 7.5 / 7.6 / 7.11Safety is not composable; no set of agents characterizes system safety; deciding the safety of an n-agent system is PSPACE-complete
    • The authors' interpretation of the Section 3 results: an agent "naturally inherits the halting problem of the tools it uses"; the impossibility lies in the program itself, not necessarily in the agent.
    • The authors' interpretation of Section 5: constraints move the problem from undecidable to intractable; the three constraints (time, value, context length) are all indispensable, and relaxing any one returns the problem to undecidable (Corollary 5.10, Propositions 5.11, 5.12).
    • The authors' interpretation of Section 7: viewed as a whole, the system is just a larger agent, but system properties cannot be inferred from individual agent properties; when the requester and the composer are different agents, the difficulty lies in "what the monitor can see" rather than "what it can compute."

    Constructive proofs (key constructions given by the authors)

    • Wrongly predicted agent: for any prediction algorithm f, use the recursion theorem to construct h: when f says h is unsafe, h requests only safe programs; when f says h is safe, h requests a dangerous program as its first step (Proposition 3.13).
    • Escaping certification agent: for a certification method C, construct g to simulate C's enumerator for some steps at each step; if it finds itself certified, it requests a dangerous program, otherwise a safe program; g is safe but not in C (Proposition 4.3).
    • Black-box verification lower bound: use de Bruijn sequences to construct a safe policy πc whose run visits exactly M(L,B) = (B+1)^L + L − 1 distinct contexts; a black-box verifier of depth less than M(L,B) cannot distinguish a pair of safe/unsafe policies that differ only on one unobserved context (Proposition 5.16).

    Other analyses

    • Cost of Exts(p): restricting to agreement within s steps makes the danger class decidable (Proposition 5.6), but the authors prove this class is no longer behavioral: it misses dangerous programs that are "too slow" (Proposition 5.7), or, when p does not halt within s steps, includes programs unrelated to p (Proposition 5.8).
    • Finite tables exist but are uncomputable: for fixed N, finite input safety tables for Rp,q exist, but no algorithm can generate these tables from N (Lemma 3.9); Ext(p) ∩ TMK is finitely decidable, but likewise cannot be generated uniformly from K (Proposition 5.5).
    • Discussion of ϵ-safety: after giving 6 relaxed definitions in Section 6, the authors assess these definitions as "providing only weak guarantees in practice"—either computationally expensive or easy to game—and therefore deliberately proved no propositions about them.
  5. What are some points that can be further explored?

    The authors note that the danger definition is abstracted, that the ϵ-safety definitions each guarantee little and are unproven, and propose whether dangerous behavior dies out as a new metric direction.

    Limitations and future directions noted by the authors

    • Danger definition is abstracted (Section 8, Conclusions): the authors state that the paper uses an abstract, simplified notion of danger, whereas in reality, because "it is practically impossible to mathematize dangerous properties," danger will only be harder to handle; real agents face not a single danger pattern but infinitely many patterns, each defining its own set of metrics.
    • ϵ-safety definitions guarantee little (Section 6): the authors assess these definitions as "providing weak guarantees in practice," either because a reasonable safety confidence is computationally expensive or because they are easy to game; they therefore deliberately proved no propositions about them; the authors believe a good safety metric should be sufficiently cheap relative to the size of the system being measured and hard for malicious actors to manipulate.
    • Shortcomings of (k,h)-safety (Section 6, after Definition 6.4): the authors note that the number of candidates to check grows with k, making it "not an attractive metric in practice."
    • universal mass definition is uncomputable (Section 6, after Definition 6.5): the authors note that this definition is uncomputable because it is impossible to know which programs halt; it can only be approximated from below.
    • ϵ-far definition relies on a rich witness set (Section 6, after Definition 6.7): the authors note that this is unrealistic in general applications, because many threats are unknown in advance, and it easily makes dangerous computations appear arbitrarily close to safe ones.
    • Future direction: defining ϵ-safety by die-out of propagation (Section 8): the authors propose no longer asking whether dangerous behavior will appear, but whether, once it appears, it "will die out or spread to most of the system"; the authors also state that they do not consider this a real solution, only a metric that may be useful for near-term implementations, and caution that in the long run such proxy metrics may lead to agents that are better at hiding their intentions.

    Scope of experimental coverage

    • The paper is purely theoretical work with no experiments: no models, datasets or benchmarks were run, and there are no sample sizes, repetition counts or review methods.
    • The object of analysis is an abstract model: policies on a deterministic Turing machine, total computing devices, a nontrivial behavioral danger class D = Ext(p); stochastic agents are only classified as reducible to the deterministic case in a remark after the definition in Section 3.
    • Conditions for the complexity results: the PSPACE-complete results require the policy to be polynomial time, T polynomial time, and D polynomial-space decidable (Propositions 5.19, 5.22, 5.23, 7.11).
    • Scope of the multi-agent results: the general result on sharded execution is stated only for the case k = 1 (the authors state that everything applies to general k); the PSPACE-complete result is for systems with L = 4, B = 3b + 2, Ti(p, v) = v (Proposition 7.11).
    • The paper reports no empirical validation: the METR hacking incident cited in Section 8 (about 1200 agents, over 70k messages) is an external report relayed by the authors, not an experiment they ran themselves.
  6. Summarize the main content of the paper

    The author uses computability theory to argue: agent safety is undecidable and uncertifiable, decidable under finite constraints but PSPACE-complete, and not composable.

    A theoretical paper that uses computability and complexity theory to analyze the safety verifiability of "language model + general-purpose computing device" agents.

    • Problem: Current agents couple a fixed language model with a general-purpose computing device via a harness. The authors ask: can an algorithm predict, filter or certify that such systems will not run a program semantically equivalent to a dangerous program p (i.e., a member of Ext(p))?
    • Method highlights: The agent is formalized as a policy loop on a Turing machine, and the dangerous class is taken as the index set Ext(p); the core construction is the relay policy—first run a halting-complete safe tool p, and if p halts, trigger a dangerous request, thereby reducing the halting problem to safety determination.
    • Main results (undecidability side): The authors prove that no algorithm can decide whether a relay or total agent is safe on a given input, and safe inputs are not even enumerable (Proposition 3.7, 3.11); for any prediction algorithm there exists an agent it always predicts wrongly (Proposition 3.13); a guardrail cannot be both sound and complete, and a finite blacklist cannot be sound (Corollary 3.15, 3.16); a whitelist containing a halting-complete tool and an interpreter shifts the danger to the data channel (Proposition 3.19); every certification method misses some safe total agent (Corollary 4.2, Proposition 4.3).
    • Main results (finite-constraint side): With window L, value bound B, total device T and D decidable, safety is decidable, but the simulation upper bound is N(L,B) = (B+3)^L rounds (Proposition 5.2, 5.13); under polynomial-time policies the problem is PSPACE-complete, even with access to the agent description (Proposition 5.22, 5.23); the black-box verifier depth is at least (B+1)^L + L − 1 (Proposition 5.16).
    • Multi-agent: The authors construct pairs of agents that are each safe in isolation but unsafe when composed, proving that safety is not a composable property (Proposition 7.5, 7.6); a dangerous program can be split into fragments computed separately by different agents, bypassing each one's complete guardrail (Lemma 7.7, Proposition 7.10); deciding the safety of a system of n polynomial-time agents is PSPACE-complete (Proposition 7.11).
    • Authors' conclusions and implications: The authors stress that the paper does not argue that building safe agents is impossible, but that complete safety verification is fundamentally and practically impossible; they argue that some operational notion of ϵ-safety is needed to prevent near-term accidents, but the various relaxed definitions discussed in Section 6 offer weak guarantees, which the authors deliberately leave unproven; they call for restraint in deploying new capabilities into the real world and for more safety research before a major tragedy occurs.
Read originalarxiv.org