Moving Compliance Policies into Model Weights
SIRF shifts model compliance from external RAG lookups to internal probability distributions via continued pretraining.
SIRF (Spec-Internalized Risk Foundation Model) moves compliance enforcement from external prompt-based or RAG-based systems directly into the model weights. Instead of querying a vector database to retrieve and interpret documentation at inference time, SIRF uses continued pretraining (CPT) to encode policy constraints into the model's token probability distributions. The system predicts a binary verdict of 'reject' or 'accept' as a high-probability token output. This shifts compliance from a post-processing or retrieval step to a fundamental part of the model’s next-token prediction logic.
The Mechanism of Internalization
To bridge the gap between policy text and neural weights, SIRF uses a two-stage synthesis pipeline. First, an automated tool parses hierarchical manuals into structured [Entity, Action, Violation_Category] tuples. These tuples are converted into synthetic training examples where the model is prompted with a context that necessitates a specific 'reject' or 'accept' token. The loss function is modified to penalize any deviation from this target token, forcing the model to map specific input features—like a prohibited entity or action—to a high-probability refusal token.
Rather than treating the policy as general knowledge, this process exploits the model's existing refusal behaviors. By exposing the model to both 'benign' and 'violation' versions of identical requests, the training process forces the model to associate specific semantic markers of a policy violation with the same internal 'refusal' latent space the model naturally uses to decline harmful queries. This allows the model to differentiate policy-constrained logic from its broad training data, relying on a focused set of neurons that trigger a rejection when the input context activates patterns synonymous with a known policy violation.
Performance and Architectural Trade-offs
| Metric | Baseline (Qwen3-8B-SFT) | SIRF-8B-SFT |
|---|---|---|
| Deployment Strategy | Prompt-based / RAG | Policy-grounded CPT |
| Black Recall@P95 | 56.2% | 71.3% |
| Latency Profile | High (Rule retrieval) | Ultra-low (Verdict-only) |
| Policy Adaptation | External injection | Weight internalization |
For a developer, this is a distinct structural trade-off. Because the policies are frozen into the weights, updating them requires a full round of CPT using approximately 70 million tokens rather than a simple database update. You trade operational flexibility for inference efficiency. For applications with strict sub-50ms latency requirements, SIRF eliminates the round-trip overhead of vector database lookups by moving the decision boundary into the forward pass. While this achieves significant gains in raw inference speed, the 70% relative mis-penalization reduction mentioned here is specifically attributed to the tree-model adjudication layer deployment where SIRF acts as the final gatekeeper.
Known Limitations and Auditability
Validation testing shows the limits of this approach. While SIRF improves recall on defined entity-violation tuples, it struggles with adversarial gray-area content not covered during the synthesis phase. Debugging these failures is difficult because the decision-making process is embedded within the model's high-dimensional weights. When a model refuses a valid request or permits a violation, there is no retrieved context document to inspect or debug. Instead, the model's output is an opaque result of the activation state of its internal policy-logic neurons. Because the model lacks a legible rationale or an external trace, identifying why a specific input tripped a violation requires latent-space probing to visualize the activation state of the policy neurons at the point of refusal. Future development will need to solve this lack of auditability to make the system suitable for high-stakes environments where every decision must be explicitly justified.