Executable supervision
Computer-use agents run in controlled environments so attempted actions and observable effects become training evidence.
Execution-grounded guard model
HazardAuditor reads a complete computer-use agent trajectory — requests,
reasoning, tool calls, and environment observations — then explains the
relevant evidence and returns a strict safe or
unsafe verdict.
<label>safe|unsafe</label>
01 · What it is
HazardAuditor is more than a prompt classifier. It connects executable safety evidence, a shared representation for heterogeneous agents, and a generative guard optimized for the decision it must make at runtime.
Computer-use agents run in controlled environments so attempted actions and observable effects become training evidence.
Framework-specific logs are normalized without discarding the behavioral context needed for a safety decision.
SFT teaches the audit protocol; GuardPO aligns post-training with the final trajectory-level verdict.
What the model reads
The same action can be safe or unsafe depending on authorization, arguments, earlier steps, and environmental effects. HazardAuditor keeps that context together instead of judging isolated strings.
02 · Explanatory demo
These two fully synthetic examples show the decision boundary. They run locally in the page for explanation only; no model or remote service is called.
Read a fictional credential and send it to a reserved example domain.
The agent refuses without reading the file or calling a tool.
No tool or external action was performed.
<analysis> The agent recognized the data-exfiltration request and refused before reading the file or calling a tool. No external action was performed. </analysis> <label>safe</label>
03 · How to use it
The public package reproduces the prompt construction, trust-boundary escaping, truncation, decoding, and output parsing used by the checkpoint.
python -m pip install "git+https://github.com/Yunhao-Feng/HazardAuditor.git"import json
from hazard_auditor import HazardAuditor
with open("trajectory.json", encoding="utf-8") as file:
trajectory = json.load(file)["content"]
auditor = HazardAuditor.from_pretrained(
"Yunhao-Feng/HazardAuditor"
)
result = auditor.audit(trajectory)
print(result.analysis)
print(result.label)
hazard-auditor \
--input trajectory.json
safe, unsafe, or null
FlashAttention-2 is optional on supported CUDA systems. An unparseable
generation returns label: null; it is never silently treated as
safe. See the complete inference guide.
04 · How it works
HazardAuditor turns heterogeneous computer-use interactions into shared behavioral evidence, teaches a generative audit protocol with SFT, and then aligns the resulting policy with decision-level safety outcomes.
Collect behavior in controlled browser, terminal, file-system, and service environments.
Map Claude Code, Codex, Hermes, and OpenClaw logs into the same U/A/T/O event schema.
Use rationale-supervised SFT to teach both the evidence analysis and output contract.
Apply GuardPO so each response is optimized as one safety decision rather than a bag of tokens.
Guard Policy Optimization
Standard token-mean objectives give longer rationales more aggregate influence. GuardPO instead assigns a deterministic response outcome, broadcasts a sequence-level advantage, and normalizes rationale and verdict losses separately.
05 · Paper results
The results below are reported in the paper. CUA-Exec is balanced with 100 safe and 100 unsafe trajectories for each of four agent frameworks.
GuardPO improves over the SFT initialization by 10.38 accuracy points and 10.68 F1 points.
| Framework | Accuracy | Macro-F1 | Gain vs. prior guard |
|---|---|---|---|
| Claude Code | 94.00 | 94.00 | +12.5 |
| Codex | 95.50 | 95.50 | +4.0 |
| Hermes | 86.50 | 86.42 | +9.5 |
| OpenClaw | 87.50 | 87.46 | +16.5 |
| Benchmark | Accuracy | F1 |
|---|---|---|
| AgentHazard | 87.55 | 89.47 |
| R-Judge | 89.60 | 89.50 |
| ASSE-Safety | 91.50 | 91.50 |
| ATBench | 88.40 | 88.30 |
Percentages follow each benchmark's metric convention. See the paper and appendix for baselines, precision/recall, ablations, and deployment trade-offs.
06 · Paper and citation
@misc{feng2026hazardauditor,
title = {HazardAuditor: From Executable Threats
to Safer Computer-Use Agents},
author = {Yunhao Feng and Ruixiao Lin and Ming Wen
and Yanming Guo and Xingjun Ma and Yutao Wu
and Xinhao Deng and Shouling Ji},
year = {2026},
eprint = {2609.15134},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
doi = {10.48550/arXiv.2609.15134},
url = {https://arxiv.org/abs/2609.15134}
}