Manuscript Offprint

arXiv:2610.27543

KNOX: Hardware-assisted Regulatory Sandbox for Generative Models

Vasisht Duddu, Adam Caulfield, Xi He

Vasisht Duddu ∗^{*} †^{\dagger}, Adam Caulfield 1^{1} †^{\dagger}, Xi He ∗^{*} †^{\dagger}

*Vector Institute, †University of Waterloo

vasisht.duddu@vectorinstitute.ai, acaulfield@uwaterloo.ca, xi.he@uwaterloo.ca

Abstract—Regulations require companies to run AI models in a regulatory sandbox, an isolated environment that enables monitoring model behavior by regulators, prior to deployment. But, they do not spell out the technical mechanisms to design such a sandbox. Ideally, a regulatory sandbox should show (i) compliance (checks against regulations, and deviations from intended behavior, i.e., unauthorized tool and system calls); (ii) confidentiality (protects model weights from regulators); (iii) attestability (produces tamper-resistant evidence of model behavior for monitoring); and (iv) scalability (evidence is verifiable by multiple regulators). Several prior works (information-flow control, prompt-injection defenses, control-flow integrity, and traditional sandboxing) address specific compliance aspects but lack confidentiality, attestability, and scalability. TEEs meet some of these requirements, but simply running models inside a TEE is insufficient as we need compliance mechanisms.

We present KNOX, the first regulatory sandbox, built by running AI workloads inside TEEs. We demonstrate KNOX using agentic workloads. For compliance, we derive an attested policy manifest (with the applicable regulations, the expected tool calls, and the permitted system calls) for a given user prompt. Before an executor performs an action, an attested reference monitor compares it against the attested policy manifest and allows it only if it matches. Every action and verdict is recorded in an attested execution graph, enabling regulators to verify the model's execution and its compliance. We show that KNOX meets all requirements, and can check for compliance with regulations and deviations from intended behavior (e.g., due to prompt injection); and incurs low overhead (<1%).

1. Introduction

Model developers (e.g., Anthropic and OpenAI) are designing and deploying increasingly capable AI systems, including large generative models used as chatbots and agents. These raise concerns about security, privacy, transparency, and safety, highlighting the need for stronger governance through transparent design and evaluation of their model behavior. Various jurisdictions have already introduced, or are developing AI regulations which will take effect in the near future [1]-[9]. A key requirement is the establishment of AI regulatory sandboxes as “frameworks for testing AI systems in controlled environments that [...] facilitate development, training, testing, and validation before market entry” [3]-[9]. The current regulations do not spell out the technical mechanisms to realize them. Using the EU’s AI Act [8], [9], we identify the design requirements for regulatory sandboxes:

• Compliance: “Sandboxes shall [...] improve legal certainty to achieve regulatory compliance with this regulation or other applicable [...] laws” and “ensure that appropriate safeguards are in place”. Thus, the model behavior should comply with relevant laws, while resisting deviations from intended behavior, i.e., unauthorized tool and system calls induced by prompt injection attacks [10]–[13]. The OpenAI–Hugging Face incident illustrates both unauthorized system calls and tool calls by agents [14].

• Confidentiality: The sandbox should protect “intellectual property rights and confidential business information or trade secrets [...] including source code” and requires “adequate and effective cybersecurity measures to protect the security and confidentiality of the information and data obtained” [Article 78]. This will incentivize companies to participate in the sandbox and share their models.

• Attestability: “The competent authority shall provide a written proof of the activities carried out in the sandbox [and] an exit report detailing [them] and the results” [Article 57]. This suggests generating tamper-resistant evidence of model behavior for monitoring and verification. Further, “sandboxes shall be designed and implemented [to] facilitate cross-border cooperation between national competent authorities” and “with the competent authorities of other Member States” [Article 57]. This requires that the generated evidence can be checked independently by multiple regulators, which we refer to as verifiers hereafter.

• Scalability: Although the EU AI Act and other related regulations treat interconnected or chained AI architectures (e.g., AI Agents) as a single system [15], regulatory sandboxes must scale to handle both single- and multi-agent systems with single- or multi-task objectives.

While prior works have discussed regulatory sandboxes conceptually [16]–[19], their concrete design and implementation are missing. Our goal is to address this gap and develop technical mechanisms to realize regulatory sandboxes.

Several related works, including information-flow control [20]–[30], prompt-injection defenses [31]–[36], contextual integrity [37]–[40], and sandboxes [41]–[48], provide isolated execution and address specific compliance aspects. However, none cover all compliance requirements, including regulatory checks and detection of both prompt injections and unauthorized system calls. Furthermore, they do not

1^{1}Author completed this work at University of Waterloo and is now employed at MIT Lincoln Laboratory.

provide confidentiality, attestability, and scalability. Trusted execution environments (TEEs) provide hardware-isolated confidentiality and integrity with attestability to multiple verifiers, but require additional mechanisms for compliance.

We present KNOX, the first TEE-based regulatory sandbox designed to meet all the above requirements. We demonstrate it for agentic workloads where a planner generates an ordered sequence of expected tool calls for an executor to follow [49]–[51]. Before execution, KNOX converts each user prompt into an attested policy manifest (APM) specifying the applicable regulations, the expected tool-call sequence, and the permitted tools and system calls under least privilege, and any stop conditions (e.g., timeout). An attested reference monitor (AttRM) checks each executor action against the APM, and blocks any violations. KNOX records actions and AttRM decisions in an attested execution graph (AEG). KNOX uses the TEE's remote attestation to construct verifiable evidence of the APM, AEG, and AttRM decisions, enabling multiple verifiers to check them independently. We prototype and evaluate KNOX on Intel TDX and NVIDIA H100 GPU across realistic agentic workloads involving interrupts, single- and multi-task, and single- and multi-agent settings. We claim the following contributions:

• identify the design requirements for a regulatory sandbox from the EU’s AI Act, covering compliance, confidentiality, attestability, and scalability; (§3)

• present KNOX 1^{1}, the first regulatory sandbox designed to meet the various design requirements by running the models inside TEEs; (§4)

• evaluate KNOX across realistic agentic workloads showing that it correctly checks regulatory compliance and detects deviations from intended behavior, i.e., unauthorized tool and system calls (e.g., from prompt injection); and incurs low overhead for attestations (<1%). (§5 and §6)

References (89)