When Safety Checks Become Privacy Risks: A Privacy-Preserving Paradigm for LLM Agent Safety Auditing
Organizations: Beijing Jiaotong University, Beijing, China
Abstract
Large language model agents interact with online services through tool calls that may access private data or perform sensitive actions. Specialized providers can supply and maintain pre-execution safety auditing capabilities for agent operators. However, sending task descriptions, call arguments, and interaction histories to an external auditor may expose sensitive user information. In this work, we propose a paradigm for privacy-preserving safety auditing that separates delegated audit computation from plaintext access and execution authority. Grounded in a three-domain auditing model, the paradigm connects trusted representation construction, encrypted audit computation, and trusted decision and execution through explicit interfaces. These interfaces accommodate alternative representations and scorers, while encrypted computation protects audit inputs from a semi-honest auditor. We instantiate this paradigm in SealCall, a framework combining learned audit representations, CKKS-based encrypted similarity computation, and execution control bound to audited tool calls. Evaluated on 1,252 public binary candidates, SealCall achieves a mean F1 score of 0.840 under grouped nested evaluation, while preserving plaintext audit decisions in all measured cases. A representative configuration completes each encrypted scoring operation in 0.176 s.
Figures & tables
| Layer (role) | Interface | Components in the evaluated configuration |
|---|---|---|
| Trusted representation ( ) | Audit context encrypted representation | Source-linked context; BGE and structured features; learned projection. |
| Encrypted computation ( ) | Encrypted representation and audit data encrypted results | CKKS reference dot products; ciphertext response packing. |
| Trusted decision and execution ( ) | Encrypted results call-bound allow or block | Decryption; maximum and threshold; call and state checks. |
| Source | Binary | Roots | Safe | Unsafe | Interm. |
|---|---|---|---|---|---|
| Harm | 399 | 144 | 205 | 194 | 273 |
| Dojo | 853 | 58 | 512 | 341 | 0 |
| Total | 1,252 | 202 | 717 | 535 | 273 |
| Scorer | F1 | Recall | FPR | F1 | FPR | AUROC |
|---|---|---|---|---|---|---|
| SealCall reference set | 0.812 | 0.823 | 0.153 | 0.840 | 0.112 | 0.921 |
| Same-space center | 0.805 | 0.805 | 0.145 | 0.818 | 0.120 | 0.917 |
| Same-input LR | 0.899 | 0.936 | 0.110 | 0.913 | 0.089 | 0.967 |
| Same-input RBF-SVM | 0.889 | 0.948 | 0.137 | 0.905 | 0.052 | 0.970 |
| Direct cosine | 0.627 | 0.540 | 0.137 | 0.666 | 0.449 | 0.736 |
| Representation / readout | Harm F1 | Dojo F1 | Pooled F1 |
|---|---|---|---|
| SealCall full | 0.728 | 0.854 | 0.812 |
| Without text embeddings | 0.599 | 0.857 | 0.769 |
| Without structured features | 0.549 | 0.790 | 0.718 |
| BGE + features / LR | 0.792 | 0.929 | 0.879 |
| TF-IDF + features / LR | 0.808 | 0.919 | 0.878 |
| Features only / LR | 0.742 | 0.939 | 0.870 |
| Scorer | F1 | Time (s) | Packed MB | Raw MB |
|---|---|---|---|---|
| SealCall | 0.895 | 0.176 | 0.131 | 3.761 |
| Center | 0.845 | 0.016 | 0.235 | 0.235 |
| LR | 0.909 | 0.043 | 0.235 | 0.235 |
| RBF-SVM | 0.915 | 15.267 | 0.131 | 93.794 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Harm | Dojo | |||
|---|---|---|---|---|
| Scorer | F1 | FPR | F1 | FPR |
| SealCall | 0.745 | 0.132 | 0.888 | 0.105 |
| Center | 0.689 | 0.122 | 0.878 | 0.119 |
| LR | 0.869 | 0.146 | 0.938 | 0.066 |
| RBF-SVM | 0.841 | 0.102 | 0.941 | 0.031 |
| Direct cosine | 0.621 | 0.527 | 0.689 | 0.418 |
| SealCall | Same-input LR | TF-IDF + features, LR | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Proxy | Roots | Safe | Unsafe | Recall | FPR | Recall | FPR | Recall | FPR |
| Send | 97 | 73 | 163 | 0.896 | 0.260 | 0.939 | 0.274 | 0.969 | 0.411 |
| Write | 72 | 148 | 187 | 0.929 | 0.284 | 0.995 | 0.122 | 0.989 | 0.203 |
| Execute | 5 | 9 | 9 | 0.178 | 0.022 | 0.333 | 0.111 | 0.222 | 0.000 |
| Publish | 57 | 36 | 103 | 0.715 | 0.294 | 0.913 | 0.278 | 0.981 | 0.556 |
| Other | 147 | 451 | 73 | 0.622 | 0.083 | 0.890 | 0.067 | 0.767 | 0.058 |
| Fold | Configuration | Fit | Stop | Cal. | Test | |
|---|---|---|---|---|---|---|
| 1 | bank256 | 16 | 721/115 | 79/12 | 201/32 | 251/43 |
| 2 | hard128 | 16 | 717/117 | 85/12 | 202/32 | 248/41 |
| 3 | hard128 | 1 | 719/118 | 79/13 | 203/32 | 251/39 |
| 4 | bank128 | 1 | 719/116 | 81/13 | 199/34 | 253/39 |
| 5 | hard128 | 8 | 719/117 | 82/13 | 202/32 | 249/40 |
| Meaning preserved | Relation changed | |||||
|---|---|---|---|---|---|---|
| Method | Orig. F1 | Reword. F1 | All 3 correct | Pair 0 | Pair 1 | All 4 correct |
| SealCall | 0.785 | 0.789 | 0.776 | 0.013 | 0.013 | 0.000 |
| Without text embeddings | 0.669 | 0.672 | 0.706 | 0.000 | 0.000 | 0.000 |
| Without structured features | 0.675 | 0.677 | 0.708 | 0.005 | 0.013 | 0.000 |
| TF-IDF + features / LR | 0.876 | 0.887 | 0.870 | 0.013 | 0.013 | 0.000 |
| BGE + features / LR | 0.895 | 0.891 | 0.880 | 0.013 | 0.000 | 0.000 |
| Method | Family | F1 | All-4 |
|---|---|---|---|
| SealCall | recipient_binding | 0.455 | 0.000 |
| SealCall | purpose_scope | 0.171 | 0.000 |
| SealCall | source_authority | 0.607 | 0.000 |
| SealCall | prior_precondition | 0.598 | 0.000 |
| Without text embeddings | recipient_binding | 0.421 | 0.000 |
| Without text embeddings | purpose_scope | 0.323 | 0.000 |
AI Agent Auditing
AI agent auditing examines agents’ actions, tool use, evidence, and outcomes to assess safety, compliance, reliability, and accountability.
See all 286 papers