Skip to content

UniGuard: Multi-View Guardrail Learning for Cross-Interface Safety GeneralizationUniGuard: Multi-View Guardrail Learning for Cross-Interface Safety Generalization

arXiv: Alignment, Deception & Oversight· arXiv:2610.30742· Viet-Thanh Pham, Thuy-Trang Vu, Junae Kim, Rollin Omari, Dinh Phung, Gholamreza Haffari, Lizhen QuDepartment of Data Science & AI, Monash University; Defence Science and Technology GroupIndexed by this site · 2026-10-23· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose the multi-view guardrail training framework UniGuard; the 0.6B model improves over the base model by an average of 45.12 F1 on three unseen-interface benchmarks.

Threat modelThe defender trains a guardrail model that judges inputs from interfaces such as prompt, response, multi-turn dialogue, agent trajectories, and multi-agent trajectories as SAFE/UNSAFE, and routes by confidence (automatic block, allow, or escalation to human review). Evaluation targets unseen interfaces: schema-unseen (ATBench) and policy-unseen (PolicyGuardBench, DynaBench). The paper does not posit an attacker.

Questions
Existing guardrail models work only on the prompt or response interfaces they were trained on; the same safety case, when changed to dialogue, agent trajectories, or policy-conditioned inputs, fails, and confidence is unreliable when the interface changes.
Methods
The same latent safety case is rendered into five aligned views—prompt, response, multi-turn dialogue, agent trajectory, and multi-agent trajectory—and Qwen3Guard-Gen-0.6B is jointly fine-tuned with three objectives: classification, supervised contrastive learning, and asymmetric confidence calibration.
Experiments and results
On the three unseen-interface benchmarks ATBench, PolicyGuardBench, and DynaBench, UniGuard-0.6B improves over the base model by an average of 45.12 F1 and reduces ECE by an average of 35.41; on 8 standard benchmarks, average F1 drops by only 0.35.
Limitations and future work
The authors note: this targets cross-interface generalization only and does not guarantee new safety domains, tools, or multi-agent failure modes; the training data is synthetic and limited in scale (1,000 base cases). The experiments cover only three scales, 0.6B/4B/8B, and three unseen-interface benchmarks.
Experimental setupUniGuard-0.6B、UniGuard-4B et al. · ATBench、PolicyGuardBench et al. · F1、ECE et al.
Evaluated models
UniGuard-0.6BUniGuard-4BUniGuard-8B
Benchmarks
ATBenchPolicyGuardBenchDynaBenchToxicChatOpenAI ModerationWildGuard TestAegis 2.0BeaverTailsSafeRLHF
Metrics
F1ECESame-Case@kCross-View@kSelective F1Coverage
AI summaryThe UniGuard framework achieves cross-interface safety generalization through multi-view guardrail learning, and its UniGuard-0.6B model improves over pretrained guardrails by an average of 45.12 F1 and reduces expected calibration error by 35.41 points on three unseen-interface benchmarks including ATBench. The framework's UniGuard-FT dataset converts 1,000 public safety cases into five views: prompt, response, multi-turn dialogue, agent trajectory, and multi-agent trajectory. Trained only on synthetic data, the model is comparable to larger guardrails such as Claude-Sonnet-4.5 and GPT-5.2.

The UniGuard framework achieves cross-interface safety generalization through multi-view guardrail learning, and its UniGuard-0.6B model improves over pretrained guardrails by an average of 45.12 F1 and reduces expected calibration error by 35.41 points on three unseen-interface benchmarks including ATBench. The framework's UniGuard-FT dataset converts 1,000 public safety cases into five views: prompt, response, multi-turn dialogue, agent trajectory, and multi-agent trajectory. Trained only on synthetic data, the model is comparable to larger guardrails such as Claude-Sonnet-4.5 and GPT-5.2.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Guardrail models fail when the interface changes, and their confidence is inaccurate; the authors use multi-view learning to address both problems at once.

    Guardrail models fail on input forms outside the training interface, and confidence is unreliable when the interface changes.

    • Problem setting: The same safety case (e.g., intent to leak protected data) may appear as a direct prompt, a tool call in an agent trajectory, or an unauthorized disclosure by one agent in a multi-agent system; guardrails trained on a single interface often fail on other interfaces (Introduction).
    • Shortcomings of existing methods: The authors point out two — first, generalization is fragmented; most guardrails only do prompt/response classification, and specialized models (DynaGuard, AgentDoG, PolicyGuard-4B) each anchor only to their own training interface and fail on other interfaces; second, confidence is unreliable under interface drift; the authors report that the public guardrails tested all exceed 30 points of ECE on at least one unseen interface (Table 2).
    • Core observation: After rendering the same latent safety case into multiple alignment views, cross-view consistency can serve both as a supervision signal for interface-invariant representations and as a reliability target for calibration.
    • What the paper proposes: A multi-view guardrail training framework UniGuard; a multi-view training set UniGuard-FT (1,000 public safety cases rendered into five views); and UniGuard-0.6B trained with three objectives: classification, supervised contrastive, and asymmetric confidence calibration.
    • Threat model:
      • This is a defense paper and does not posit an attacker; the defense target is the guardrail model itself.
      • Guardrail inputs: prompt, response, multi-turn dialogue, single-agent trajectory, multi-agent trajectory, and inputs with an external safety policy.
      • Guardrail outputs: SAFE/UNSAFE binary classification and confidence, used for routing (automatic block, automatic allow, or escalation to human/stronger model review).
      • Generalization forms evaluated: schema-unseen (new serialization format) and policy-unseen (externally specified policy).
  2. What related research exists?

    Related work falls into three categories: general guardrails, agentic/policy guardrails, and contrastive learning and calibration methods.

    General prompt/response guardrails

    • Llama Guard (Fedorov et al., 2024), ShieldGemma (Zeng et al., 2024), Qwen3Guard (Zhao et al., 2025) — perform safety classification on prompts and responses, some supporting natural-language policy judgment at inference time.
    • WildGuard (Han et al., 2024), Aegis 2.0 (Ghosh et al., 2025), ToxicChat (Lin et al., 2023), HarmBench (Mazeika et al., 2024) — safety classification models and datasets. The paper notes that most of this work is fixed to the prompt or response format.

    Safety evaluation/guardrails under agentic and policy conditions

    • ToolEmu (Ruan et al., 2024), R-Judge (Yuan et al., 2024), AgentHarm (Andriushchenko et al., 2024), AgentDoG (Liu et al., 2026b) — extend safety evaluation to tool use and multi-step trajectories. The paper notes that this work usually targets only a single interface.
    • DynaGuard (Hoover et al., 2026), PolicyGuard-4B (Wen et al., 2025) — detect violations according to user-defined policies. The paper notes that each anchors only to its own training interface.

    Contrastive representation learning and confidence calibration

    • SimCLR (Chen et al., 2020), Sentence-BERT (Reimers and Gurevych, 2019), SimCSE (Gao et al., 2021) — learn representations invariant to semantics-preserving transformations; this paper adapts this idea to align guardrail views of the same case with the same label.
    • Temperature Scaling (Guo et al., 2017), Contextual Calibration (Zhao et al., 2021), Thermometer (Shen et al., 2024) — post-hoc calibration methods; the paper notes that unlike these post-hoc methods, UniGuard regularizes confidence with multi-view reliability during training.

    Baselines and benchmarks: Comparison baselines are LlamaGuard-3-8B, Qwen3Guard-Gen-0.6B/4B, AgentDoG-4B, PolicyGuard-4B, DynaGuard-4B, and proprietary models Claude-Sonnet-4.5 and GPT-5.2; evaluation benchmarks are ATBench, PolicyGuardBench, DynaBench, and 6 standard prompt/response benchmarks (Sections 4.1, 4.3).

    The authors position this paper as: rather than treating each interface as an independent task, treat prompt, response, dialogue, agent trajectory, and multi-agent trajectory as aligned views of the same safety case for training.

  3. How does the paper address this problem?

    Render the same safety case into five alignment views, and fine-tune the guardrail with three objectives: classification + contrastive + asymmetric calibration.

    Overall approach: guardrail training is formalized as multi-view representation learning—the same latent safety case is serialized into multiple views via different interfaces, and cross-view consistency is used to jointly supervise cross-interface generalization and confidence calibration; the framework is named UniGuard.

    View ontology and problem formalization

    • A latent safety case s is serialized via an interface specification vs(m) = (τs(m), ρs(m), γs(m), χs(m), πs(m), κs(m)) into a view xs(m); the six dimensions are target entity, interaction structure, agent structure, context span, policy condition, and serialization mode (Table 1).
    • The label space is Y = {SAFE, UNSAFE}; "unseen views" are divided by dimension difference into family-unseen, schema-unseen, policy-unseen, composition-unseen, and content-unseen (Table 4).

    Architecture

    • A pretrained guardrail LLM (Qwen3Guard-Gen-0.6B) serves as the shared encoder; the last-layer hidden state is taken, attention pooling yields a view-level representation, and a linear classifier is attached (Eqs. 1–4).
    • A separate projection head maps the pooled representation to a 256-dimensional normalized embedding for contrastive learning (Eq. 5).

    Three training objectives

    • Classification loss: standard cross-entropy, preserving single-view SAFE/UNSAFE classification ability (Eq. 6).
    • Multi-view contrastive loss: supervised contrastive loss, with positives being views of the same case with the same label and negatives being views of different cases or with different labels, temperature τ=0.07 (Eqs. 7–10).
    • Asymmetric confidence calibration loss: the average probability assigned to the correct label by the group of views of the same case with the same label is used as the reliability target ri, and the anchor confidence ci is calibrated toward ri; Lasym-cal penalizes overconfidence (ci above ri beyond tolerance δ+) with weight λover=0.2, greater than λunder=0.1 for underconfidence, on the grounds that the authors consider overconfidence on unfamiliar formats more harmful than conservative underestimation that can be escalated to a human (Eqs. 11–14).
    • Total objective L = Lcls + α·Lctr + Lasym-cal, α=0.3; batches are sampled by positive-sample group so that each batch contains multiple views of the same case (2 views per group, 16 groups per batch, Table 9).

    UniGuard-FT data construction

    • Samples were collected from WildGuard, Aegis 2.0, BeaverTails, and ToxicChat; a generative model scored clarity and difficulty, and stratified sampling retained 1,000 base safety cases.
    • Each case is rendered into prompt, response, multi-turn dialogue, agent trajectory, and multi-agent trajectory views; prompt/response views are taken directly from the source samples, while the rest are synthesized by the generative model in the style of frameworks such as LangChain/CrewAI/AutoGen and cover multiple failure modes (Tables 13 and 14 in Appendix F.2 give the failure-mode definitions).
    • Data scale: 8,482 samples in total, of which 3,992 are agentic trajectories, 1,994 are multi-agent trajectories, and 1,000 are multi-turn dialogues (Table 5); generation used the uncensored version of GLM-4.7-Flash to avoid refusals (Appendix F.1).

    Training configuration

    • Full-parameter fine-tuning from Qwen3Guard-Gen-0.6B, with no frozen parameters and no LoRA; 2 epochs, learning rate 1×10⁻⁴, maximum sequence length 16K tokens, AdamW + cosine schedule (Appendix C, Table 9).
  4. What experiments did the paper conduct?

    On three unseen-interface benchmarks, an average improvement of 45.12 F1 and a 35.41 reduction in ECE, with essentially no drop on standard benchmarks.

    Experimental setup

    • Guardrail under test: UniGuard-0.6B (base Qwen3Guard-Gen-0.6B); baselines LlamaGuard-3-8B, Qwen3Guard-Gen-0.6B/4B, AgentDoG-4B, PolicyGuard-4B, DynaGuard-4B, and proprietary models Claude-Sonnet-4.5 and GPT-5.2 (Table 2).
    • Unseen-interface benchmarks: ATBench (schema-unseen long-horizon agent trajectories), PolicyGuardBench and DynaBench (policy-unseen, judged according to an external policy); the paper does not report the sample size of each benchmark.
    • Retention benchmarks: ToxicChat, OpenAI Moderation, WildGuard Test, Aegis 2.0 (prompt-level) and WildGuard Test, Aegis 2.0, BeaverTails, SafeRLHF (response-level), 8 in total (Table 3).
    • Metrics: F1 (UNSAFE as the positive class) and ECE (binned comparison of average confidence and empirical accuracy); ECE is not reported for proprietary models because the API has no logprobs.
    • Evaluation method: Binary labels are mapped to SAFE/UNSAFE and then F1 is computed; the paper does not state that an LLM judge is used; decoding parameters for baselines are set according to each model author's recommendation.
    • Number of repetitions: Not reported in the paper.

    Main results

    According to Table 2 (F1↑ / ECE↓):

    Swipe horizontally to read the table

    ModelATBench F1ATBench ECEPolicyGuardBench F1DynaBench F1
    LlamaGuard-3-8B7.3038.8559.5313.19
    Qwen3Guard-Gen-0.6B (base)9.8349.204.2656.67
    Qwen3Guard-Gen-4B8.2834.988.0270.41
    AgentDoG-4B71.1033.6260.6465.92
    PolicyGuard-4B7.0544.9887.5972.00
    DynaGuard-4B60.4722.0359.2575.50
    Claude-Sonnet-4.561.89–62.9675.32
    GPT-5.266.52–81.7976.90
    UniGuard-0.6B66.407.9364.7874.93
    • The authors report: UniGuard-0.6B improves over the base model by 56.57 F1 on ATBench, 60.52 on PolicyGuardBench, and 18.26 on DynaBench, averaging +45.12 F1 and -35.41 ECE.
    • The authors state that UniGuard-0.6B is stable across all three settings, whereas specialized guardrails are strong only on their respective interfaces (e.g., PolicyGuard-4B scores 87.59 on PolicyGuardBench and 7.05 on ATBench).
    • Note: On PolicyGuardBench and DynaBench, UniGuard-0.6B's F1 is lower than PolicyGuard-4B, DynaGuard-4B, and GPT-5.2; "competitive with larger guardrails" is the authors' claim.

    Retention and ablation

    • Retention (Table 3): On 8 standard benchmarks, average F1 changes by -0.35, with each difference within about 1 F1 point; average ECE changes by -0.04. The authors state that no catastrophic forgetting occurred.
    • Core component ablation (Table 2): Removing contrastive learning (α=0) lowers average F1 by 20.50 (ATBench -23.82, PolicyGuardBench -27.17); removing asymmetric calibration leaves F1 roughly unchanged but raises ECE on the three benchmarks by 18.51, 28.10, and 19.42 respectively; removing both lowers average F1 by 12.97 and raises ECE by 24.90.
    • Calibration method comparison (Table 2): Asymmetric calibration gives an average ECE of 7.94, lower than Temperature Scaling 18.46, Thermometer 10.25, and Contextual Calibration 15.34, with comparable F1.

    Representation and deferred-decision analysis

    • t-SNE (Figure 2): The authors state that the base model can separate Safe/Unsafe on the prompt/response views, but the multi-turn, agentic, and multi-agent views are scattered with mixed labels; in the full UniGuard-0.6B representations, Safe/Unsafe are better separated and same-label views are more clustered. The converted text does not contain the figure's coordinates; the above is the authors' interpretation.
    • Cross-view retrieval (Table 12): UniGuard-0.6B's Same-Case@1 rises from 0.030 for the base model to 0.431, and Cross-View@5 from 0.110 to 0.589; the variant without contrastive learning has Same-Case@1 of 0.181.
    • Calibration-aware deferred decision (Table 11): After tuning thresholds on the dev set for coverage ≥80%, the uncalibrated variant's coverage on ATBench/PolicyGuardBench/DynaBench drops to 34.11%/41.92%/40.67% (selective F1 87.54/79.87/85.43), while after calibration coverage is 73.26%/78.35%/75.92% (selective F1 74.95/67.20/82.26). The authors state that calibrated confidence transfers better to unseen interfaces.

    Other ablations and analyses

    • Adding policy data from the PolicyGuardBench training subset: PolicyGuardBench F1 rises from 64.78 to 70.26, with little change on the other two benchmarks (Table 10).
    • Scaling the backbone to 4B/8B: gains are small, e.g., UniGuard-4B scores 67.05 on ATBench and 65.80 on PolicyGuardBench (Table 10).
    • Removing views: removing the agent trajectory view lowers ATBench from 66.40 to 62.35 and PolicyGuardBench from 64.78 to 60.45; removing the prompt/response/dialogue views causes smaller drops (Table 10).
    • Replacing the contrastive loss: Triplet Loss gives 68.85 on ATBench but is lower on the other two benchmarks; Prototypical (class-wise) drops to 49.02/46.03/53.79 (Table 10).
  5. What are some points that can be further explored?

    The authors note two limitations — synthetic data and generalization scope — and propose directions such as expanding the data with real trajectories.

    Limitations and future directions noted by the authors

    • The paper targets cross-interface generalization only and does not claim robustness to entirely new safety domains, tools, policies, or multi-agent failure modes not covered by UniGuard-FT; results on benchmarks such as ATBench should not be read as safety guarantees in arbitrary deployment environments (Limitations).
    • UniGuard-FT uses synthetic data and is limited in scale; synthetic trajectories may simplify real agents and multi-agent systems; the authors plan to extend the data with real deployment trajectories, broader policy specifications, and more diverse agent frameworks (Limitations).
    • The conclusions state that future work will extend UniGuard-FT with real-world trajectories, broader policies, and stronger domain-generalization evaluation (Conclusions).
    • The ethical statement notes that synthetic views may carry biases from the source datasets, the generative model, and the failure-mode prompts, and may not represent the complexity of real deployment systems; the authors encourage future audits of guardrails across different domains, languages, communities, and agent frameworks, and evaluation of over-refusal, under-refusal, and downstream harm (Ethical Statement).
    • The ethical statement also notes that stronger guardrails could be used by attackers to study decision boundaries and develop evasion strategies, and that guardrails have false-negative and false-positive errors and should not be treated as a complete safety solution (Ethical Statement).

    Scope of experiments

    • 9 guardrails were tested: UniGuard-0.6B and 8 baseline/proprietary models; there is also a scale ablation with 4B and 8B backbones (Table 2, Table 10).
    • Unseen-interface evaluation covers two types, schema-unseen (ATBench) and policy-unseen (PolicyGuardBench, DynaBench); retention evaluation covers 8 prompt/response benchmarks (Table 3).
    • The training data consists of 8,482 view samples synthesized from 1,000 base cases, sourced from WildGuard, Aegis 2.0, BeaverTails, and ToxicChat (Section 3, Table 5).
    • The paper does not report the sample size of each evaluation benchmark, the number of evaluation repetitions, or statistical significance tests.
    • Data generation used the uncensored version of GLM-4.7-Flash; the paper does not report manual quality spot-check results for the generated views.
  6. Summarize the main content of the paper

    UniGuard trains a 0.6B guardrail with multi-view alignment, improving average F1 by 45.12 and reducing ECE on unseen interfaces.

    UniGuard is a guardrail training framework addressing the problem that guardrail models fail outside the training interface (dialogue, agent trajectories, multi-agent trajectories, policy-conditioned inputs), and that confidence is unreliable when the interface changes.

    • Method: Render the same latent safety case into five alignment views — prompt, response, multi-turn dialogue, agent trajectory, and multi-agent trajectory — and jointly fine-tune Qwen3Guard-Gen-0.6B with a classification loss, a supervised contrastive loss, and an asymmetric confidence calibration loss (penalizing overconfidence more heavily); the training set UniGuard-FT is synthesized from 1,000 public safety cases, totaling 8,482 view samples.
    • Main results: On three unseen-interface benchmarks, ATBench, PolicyGuardBench, and DynaBench, the authors report that UniGuard-0.6B improves over the base model by an average of 45.12 F1 and reduces ECE by an average of 35.41 (Table 2).
    • Retention: On 8 standard prompt/response benchmarks, average F1 changes by only -0.35 (Table 3).
    • Ablation: Removing contrastive learning lowers average F1 by 20.50; removing asymmetric calibration raises ECE on the three benchmarks by 18.51–28.10; after calibration, deferred-decision coverage is 73.26%–78.35%, versus only 34.11%–41.92% without calibration (Tables 2, 11).
    • Boundary: On PolicyGuardBench and DynaBench, its F1 is still lower than PolicyGuard-4B, DynaGuard-4B, and GPT-5.2; the authors state its value lies in cross-interface stability rather than being highest at any single point.
    • Authors' conclusion: With only 600M parameters and synthetic data, it can compete with larger proprietary guardrails; the authors also note that the scale of synthetic data is limited, that generalization to new safety domains is not guaranteed, and that they plan to expand the data with real trajectories.

Related papers

Read originalarxiv.org