TL;DR
This paper introduces Proof-of-Guardrail, a system that uses Trusted Execution Environments (TEEs) to provide cryptographic proof that an AI agent actually ran specific safety checks before delivering a response. It allows developers to prove they are following safety protocols without revealing their proprietary agent logic, though it warns that "proof of execution" is not the same as "proof of absolute safety."
What Problem Does This Paper Address?
As AI agents move from simple chatbots to autonomous services (handling finances, medical advice, or social media), we usually have to take the developer's word that the agent is "safe." If a developer claims their bot uses a hallucination filter or a content safety guardrail, there is currently no way for a remote user to verify that claim.
This creates a "threat of falsely advertised safety." A developer might skip guardrails to save on latency/costs or, more maliciously, claim to have safety measures while secretly allowing the agent to generate harmful content. Furthermore, developers are often unwilling to open-source their entire agent (including proprietary system prompts) for public audit. The challenge is: How can a user verify that a specific safety guardrail was applied to a response without the developer revealing their "secret sauce"?
Methods
The authors leverage Trusted Execution Environments (TEEs)—hardware-isolated areas of a processor (like AWS Nitro Enclaves or Intel SGX)—to bridge this trust gap.
- The Wrapper (f): Developers create an open-source "wrapper" program that includes the specific safety guardrail (e.g., Llama Guard).
- Remote Attestation: When the TEE starts, it generates a "measurement" (a cryptographic hash) of the code being loaded. Because the wrapper is open-source, any user can calculate what that hash should be.
- Execution: The user sends an input. Inside the TEE, the wrapper takes the developer's private agent as a secret input, generates a response, and then runs the public guardrail on that response.
- The Proof: The TEE produces a signed attestation document. This document includes the code measurement and a commitment (hash) of the specific input and output.
- Verification: The user receives the response and the attestation. They verify the TEE's signature and check that the code measurement matches the expected open-source guardrail. If it matches, they have cryptographic certainty that the guardrail was executed on that specific response.
Datasets
The researchers evaluated their system using two primary benchmarks to simulate real-world agent tasks:
- ToxicChat: Used to test a Content Safety Guardrail (Llama Guard 3-8B). This dataset contains real-world user-AI interactions labeled for toxicity.
- FacTool-KBQA: Used to test a Factuality Guardrail (Loki). This dataset focuses on knowledge-based question answering where factual accuracy is critical.
Key Insights and Ideas
- Integrity vs. Confidentiality: The system elegantly separates the two. The guardrail must be public so users know what is being proven, but the agent (the prompts and logic) can remain a "black box" inside the TEE, protecting the developer's intellectual property.
- Hardware-Rooted Trust: Trust is shifted away from the developer and onto the hardware manufacturer (e.g., AWS or Intel). As long as the TEE hardware isn't compromised, the proof is unforgeable.
- The "Deception" Gap: A major "aha moment" in the paper is the distinction between executing a guardrail and the guardrail being effective. The authors explicitly state that a malicious developer could still try to "jailbreak" their own guardrail from the inside. Proof-of-guardrail proves the safety code ran, not that the resulting answer is 100% safe.
- Skill-Based Attestation: The authors implemented the proof as an "attestation skill" for the agent. This allows the AI to proactively offer proof for high-stakes questions (like financial advice) without the user needing to ask.
Key Results
- Security: In simulated attacks (modifying guardrail code, tampering with the attestation, or changing the response text), the system detected 100% of the tampering attempts.
- Latency: Running inside a TEE adds a manageable overhead. On average, guardrail execution and response generation saw a 25% to 38% increase in latency. For example, Llama Guard 3 took ~547ms in a TEE vs. ~421ms in a standard environment.
- Cost: This is the primary hurdle. Using TEE-capable instances (like AWS
m5.xlarge) was roughly 18.5x more expensive than the tiny instances typically used for simple bots. The authors argue this cost is a trade-off for high-trust markets. - Performance: The guardrails themselves aren't perfect; Llama Guard 3 achieved an F1-score of 0.56 on unsafe content, highlighting why "proof of execution" shouldn't be confused with "proof of safety."
Limitations and Future Work
- Developer Jailbreaking: Since the developer provides the agent logic, they could theoretically craft prompts designed to bypass the very guardrail they are proving they ran.
- The "Wrapper" Vulnerability: If the open-source wrapper has bugs, a malicious agent might find a way to bypass the guardrail logic entirely within the enclave.
- External API Trust: The system often calls external LLM APIs (like GPT-4). While the TEE proves the request was sent and the result was checked, the user still has to trust the external API provider to some extent.
- Future Directions: The authors suggest moving toward "best-practice" community-standard guardrails and improving the efficiency of TEEs to reduce the currently high deployment costs.
Summary updated