Skip to content

RUBAS: A rubric-based reinforcement learning framework for agent safetyRUBAS: Rubric-Based Reinforcement Learning for Agent Safety

arXiv· arXiv:2606.04051· Xian Qi Loye, Qinglin Su, Zhexin Zhang, Shiyao Cui, Qi Zhu, Fei Mi, Hongning Wang, Minlie HuangThe Conversational AI (CoAI) group, DCST, Tsinghua University; Huawei Noah’s Ark LabIndexed by this site · 22 days ago· Originally publishedAlignment

Quick read

Defenses

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

The authors propose RUBAS, which trains agent safety with four-dimensional rubric rewards and GRPO; the authors report that on Qwen3-8B the average risk score drops from 52.7% to 15.9%.

Questions
LLM agents execute tool calls in real environments, and the risks go beyond text safety; the authors argue that existing SFT only learns surface patterns, and rule-based RL rewards are too coarse to balance safety and helpfulness.
Methods
Proposes RUBAS: decomposes agent behavior into four dimensions—tool-use safety, argument safety, response safety, and helpfulness—with GPT-5.1 generating verifiable binary criteria for each instance and aggregating them into a scalar reward, trained online with GRPO.
Experiments and results
Evaluated on Qwen3-8B/14B and GLM-4.7-Flash across four safety benchmarks plus BFCL and TBH; the authors report that RUBAS has the lowest average risk score among non-degenerate methods on all three models, the highest TBH hallucination score, and utility comparable to the base model.
Limitations and future work
The authors note: the training data are synthetic scenarios and need validation on real tools and real user instructions; reward quality depends on the capability and bias of the rubric-generating model; only thinking-mode models were tested; it may still fail on novel adversarial cases outside the training distribution.
Experimental setupQwen3-8B、Qwen3-14B et al. · Agent-SafetyBench (ASB)、InjecAgent et al. · ASR、ASR-valid et al.
Evaluated models
Qwen3-8BQwen3-14BGLM-4.7-Flash
Benchmarks
Agent-SafetyBench (ASB)InjecAgentAgentHarmAgentSecurityBench (ASecBench)Berkeley Function Calling Leaderboard (BFCL)ToolBeHonest (TBH)
Metrics
ASRASR-validHarm ScoreAvg. RiskBFCL Overall AccTBH Overall ScoreW-HMAEW-IMAE
AI summaryResearchers propose RUBAS, a rubric-based reinforcement learning framework that decomposes LLM agent behavior into four dimensions: tool-use safety, parameter safety, response safety and helpfulness, using fine-grained, interpretable rewards to let reinforcement learning optimize safe tool use while maintaining task completion. Experiments on multiple agent safety benchmarks and models show that RUBAS is safer than standard alignment baselines, reduces tool-related hallucinations, and maintains competitive usefulness.

Researchers propose RUBAS, a rubric-based reinforcement learning framework that decomposes LLM agent behavior into four dimensions: tool-use safety, parameter safety, response safety and helpfulness, using fine-grained, interpretable rewards to let reinforcement learning optimize safe tool use while maintaining task completion. Experiments on multiple agent safety benchmarks and models show that RUBAS is safer than standard alignment baselines, reduces tool-related hallucinations, and maintains competitive usefulness.

Related events and news

0 events · 1 news mentions

News that mentions this paper

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to make tool-using agents both safe and helpful under multiple types of risk; the authors argue that existing SFT and coarse-reward RL cannot achieve this.

    Core problem: how to train tool-using LLM agents to be safe across the entire trajectory—tool selection, parameter construction, and response generation—while maintaining task completion capability.

    • Problem setting: the authors note that LLM agents can execute searches, call APIs, and operate file systems, so the safety boundary extends from text content to the full behavioral trajectory; risks come from three sources: risky or ambiguous user instructions, the agent's own errors in tool selection and execution, and untrustworthy feedback returned by tools or external systems.
    • Shortcomings of existing methods (per the authors): SFT-based methods only imitate visible safe patterns, which the authors consider surface-level alignment that degrades across scenarios; rule-based RL rewards are mostly binary or sparse signals that cannot capture the safety-helpfulness trade-off and may induce excessive refusal.
    • Core observation: verifying a response is easier than generating it; by decomposing qualitative safety requirements into checklist-style verifiable criteria, complex behavioral expectations can be converted into fine-grained rewards. The authors also argue that failures across dimensions cascade into one another and require joint modeling.
    • Proposed approach: RUBAS, a rubric-based reinforcement learning framework that decomposes agent behavior into four dimensions—tool-use safety, parameter safety, response safety, and helpfulness—with LLM-generated instance-level rubrics aggregated into a dense scalar reward and used to train with GRPO.
    • Safety dimension specification: the authors propose that safe agent behavior must satisfy four dimensions—avoiding unauthorized tools and unsafe action sequences, passing correct and non-malicious parameters to tools, still giving a safe response when tool outputs are erroneous or unsafe, and completing legitimate user goals without adopting unsafe strategies.
  2. What related research exists?

    Related work falls into three groups: agent safety evaluation, SFT/RL safety alignment, and rubric-based rewards; the authors state that rubric rewards are still rarely used for agent safety.

    Agent safety evaluation benchmarks

    • InjecAgent (Zhan et al., 2024): evaluates indirect prompt injection in tool-integrated agents, covering direct user harm and private data leakage, with 1,054 cases in total.
    • Agent-SafetyBench (Zhang et al., 2024b) and AgentHarm (Andriushchenko et al., 2025), among others: evaluate systemic safety failures (2,000 cases, 10 failure modes) and compliance with explicit malicious instructions, respectively; similar benchmarks include SafeToolBench, ST-WebAgentBench, SafeAgentBench, etc.
    • Shortcomings noted by the authors: the paper states that these benchmarks mostly focus on explicit malicious scenarios (e.g., cyberattacks) and overlook subtle risks in benign, ambiguous everyday scenarios.

    Agent safety alignment methods

    • SFT-based (Zhang et al., 2025b; Xie et al., 2025) and multi-stage SFT+DPO extensions (Xu et al., 2025): supervised fine-tuning on synthesized safety alignment trajectories and CoT data; the authors argue that such methods rely on dense supervision and struggle to reliably elicit safe behavior beyond the supervised trajectories.
    • Rule-based RL (Sha et al., 2025): uses rule rewards to improve safety in interactive tool scenarios; the authors argue that its coarse-grained signals may induce overly conservative refusals when risk is detected, offering limited guidance for balancing safety and helpfulness.

    Rubric-based rewards

    • Rubrics as Rewards (Gunjal et al., 2025), AdvancedIF (He et al., 2025), OpenRubrics (Liu et al., 2025): apply instance-level rubrics to medical and scientific reasoning, checklist-style criteria to instruction following, and expert rubrics to complex multi-turn tasks, respectively.
    • RLVR-based (Wen et al., 2025; Guo et al., 2025): effective on tasks with clear correctness signals such as math and code; the authors note that many real tasks require multi-dimensional evaluation.

    Baselines and benchmarks: the experiments compare four baselines—Rule (reproducing the rule reward of Sha et al., 2025), GuardModel (Qwen3Guard-Gen-8B binary judgment reward), DPO, SFT; safety evaluation uses ASB, InjecAgent, AgentHarm, ASecBench, and utility and hallucination use BFCL, ToolBeHonest.

    Positioning of this paper: the authors state that previously rubric rewards were mostly used for reasoning, instruction following, and multi-turn task completion, and their use for agent safety remains underexplored; RUBAS extends rubrics to the trajectory level, jointly supervising intermediate tool selection, tool parameters, and the final response.

  3. How does the paper address this problem?

    RUBAS uses GPT-5.1 to generate a four-dimensional verifiable rubric for each instance, aggregates them into a scalar reward, and then trains the policy online with GRPO.

    Overall approach: decompose "safe and useful agent behavior" into structured subgoals, use an LLM to generate instance-level rubrics, convert multi-dimensional qualitative feedback into scalar rewards, then optimize the policy with GRPO during online interaction with the environment. The framework is named RUBAS.

    Rubric design (Section 3, Appendix A)

    • Four dimensions: R = {rtool, rarg, rres, rhelp}, namely tool-use safety, argument safety, response safety, and helpfulness, corresponding to the three risk types of user-driven, tool-execution, and environment.
    • Binary criteria: each dimension instantiates a set of binary criteria ci,j (e.g., whether a required tool was called, whether the execution order was followed), generated from reusable templates (e.g., must_call_tool(t)); Figure 5 in Appendix A gives a complete example of the rubric structure.
    • Scorer: all criteria except the refusal judgment are deterministic programmatic checks (tool-set comparison, argument-field checks, regex matching); the only exception, must_refuse, uses Qwen3Guard-Gen-8B's refusal judgment (only its refusal judgment, temperature 0.0).
    • Two mechanisms: when a non-negotiable criterion is violated, that dimension is directly penalized; weighted criterion accountability gives higher-impact behaviors a larger αij weight.

    Reward framework (Section 3.2)

    • Dimension aggregation: Rrubric(τ|x,R) is the weighted average of the dimension scores with fixed weights wi ∈ [0,3]; the score within a dimension is the weighted average of the criteria, mapped to [−1,1] via norm(p) = 2p − 1.
    • Fixed weights: the main experiments use the FIXED strategy, with one weight vector shared per data type (Table 2: Harmful is wtool=3.0, warg=0.5, wresp=2.5, whelp=0.0; Benign has whelp=3.0); the weights were selected by ablation experiments, and dimensions can be disabled via wi=0.

    Data and rubric construction (Sections 4.1–4.2, Appendices B, C)

    • Environment sources: 82 environments and 805 tools are collected; only the environment class names and tool names of Agent-SafetyBench, InjecAgent, SafeToolBench, and AgentAlign are taken, and new tool descriptions and Python implementations are then synthesized; the benchmarks' prompts, trajectories, and labels are not imported (Table 5).
    • Risk taxonomy: 10 risk categories (Table 3) × 6 execution failure modes (Table 4) form a safety grid; harmful/sensitive instances are sampled by category and mode, and benign instances sample a neutral subset of tools.
    • Generation pipeline: GPT-5.1 (temperature 0.6) synthesizes user instructions, execution environments, and instance-level rubrics; after generation, cross-validation is performed, and rubrics that reference nonexistent tool arguments are discarded. Appendix B gives the complete generation prompt template.

    Reward function and training (Sections 4.3–4.4, Appendix D)

    • Completeness gate: when a trajectory does not reach the stopping condition (truncated by the token limit), Rc=0 and the reward is fixed at −0.5; only complete trajectories are scored by the rubric.
    • Anti-reward-hacking: the reasoning reward Rr gives −0.6 when the reasoning trace of the final response is empty, preventing the policy from taking shortcuts by omitting reasoning.
    • GRPO training: N=8 multi-turn trajectories are sampled per prompt, and the policy is updated with group-relative advantages; learning rate 8×10⁻⁶, batch size 32, at most 4 turns per dialogue, max_tokens=1024/turn, trained for 3 epochs, full-parameter updates in BF16 throughout, 8 A800 GPUs.
  4. What experiments did the paper conduct?

    Three models × four safety benchmarks + utility/hallucination benchmarks; the authors report that RUBAS has the lowest average risk score among non-degenerate methods and the highest TBH.

    Experimental Setup

    • Models tested: Qwen3-8B, Qwen3-14B, GLM-4.7-Flash (MoE, 30B total parameters, 3B activated), all trained and evaluated in thinking mode.
    • Training data: RUBAS training set of 2,353 instances (2,000 harmful, 235 sensitive, 118 benign).
    • Safety benchmarks and metrics: ASB (2,000 cases, reporting ASR = 100 − Safety Score), InjecAgent (1,054 cases, reporting ASR-valid), AgentHarm (reporting Harm Score), the DPI setting of ASecBench (reporting ASR); Avg. Risk is the average of the four safety metrics.
    • Utility and hallucination: BFCL (Live + Non-Live, 2,501 cases in total, reporting the average of the two Overall Acc), ToolBeHonest (700 samples, reporting Overall Score).
    • Baselines: Rule, GuardModel, DPO (12 candidates sampled from Qwen3-8B and used to construct preference pairs by the RUBAS reward), SFT (trajectories generated by Gemini 2.5 Flash, filtered by ShieldAgent).
    • Degeneration criterion: BFCL below 0.5% and most samples repeating text or not issuing tool calls is judged as degeneration; two additional seeds are run, and only if all three seeds degenerate is † marked and only the first degenerate run reported.

    Main Results

    According to Table 1 (for the four safety metrics lower is better; for BFCL and TBH higher is better; † denotes training degeneration):

    Swipe horizontally to read the table

    MethodASBInjecAHarmASecBenchAvg. RiskBFCLTBH
    Qwen3-8B61.15.552.991.352.783.733.6
    + Rule29.42.30.065.024.280.853.5
    + GuardModel31.82.82.267.026.079.256.3
    + DPO52.84.06.287.537.660.729.8
    + SFT43.821.98.182.539.157.617.4
    + RUBAS16.30.10.047.315.979.561.6
    Qwen3-14B59.32.957.899.054.885.342.1
    + RUBAS21.00.00.078.024.882.558.6
    GLM-4.7-Flash54.70.423.669.537.168.48.3
    + RUBAS40.40.02.569.828.271.018.5

    (The remaining baseline rows for Qwen3-14B and GLM-4.7-Flash are omitted: on Qwen3-14B, Rule 26.4, GuardModel 27.7, DPO† 11.8, SFT 38.1; on GLM-4.7-Flash, Rule† 24.6, GuardModel† 20.7, DPO† 6.9, SFT 36.8, all as Avg. Risk.)

    • Authors' interpretation (RQ1): RUBAS achieves the lowest Avg. Risk among non-degenerate methods on all three models, with utility comparable to the base model; on GLM-4.7-Flash the safety gain is smaller (37.1%→28.2%), which the authors speculate is related to the MoE activating only 3B parameters and routing drift after fine-tuning.
    • Training stability: on GLM-4.7-Flash, Rule, GuardModel, and DPO all degenerate, while RUBAS does not; the authors state that dense multi-dimensional supervision provides a more stable learning signal.
    • Exception for offline methods: SFT raises the indirect-injection ASR of all three models on InjecAgent (Qwen3-8B from 5.5% to 21.9%); the authors state that static supervision generalizes poorly and that DPO's offline preference pairs become mismatched as the policy changes.

    Ablation: Dimension Weights and Dimension Necessity (Section 6.1)

    • Weight strategy (RQ4, Figure 2): compares GEN (judge-generated instance-level weights) with FIXED (shared heuristic weights); the authors report the two are close, with safety differences of +0.1 to +3.0 points and utility differences within [−1.0, +0.8], FIXED being +3.0 points higher in safety on GLM-4.7-Flash, and the main experiments use FIXED.
    • Dimension ablation (RQ5, Figure 3): remove dimensions one at a time. Removing rres lowers Safety Score by 12.0 points to 72.1%, with utility almost unchanged; removing rtool lowers safety by 5.7 points to 78.4%; removing rarg raises safety to 90.3% (+6.2) but lowers utility by 3.8 points to 75.7%; removing rhelp lowers utility by 2.1 points to 77.4% and slightly raises safety. The authors state that the dimensions play different roles and are not interchangeable.

    Rubric Reliability Validation (Section 6.2, Appendix E)

    • Setup: 200 training instances (50 benign, 50 sensitive, 100 harmful), comparing human-revised references with rubrics generated by GPT-5.1, Gemini-3-Pro, and Qwen3.5-397B-A17B, with 8 rollouts scored per instruction.
    • Human alignment (Table 6): GPT-5.1's W-HMAE against the human-revised reference is 0.1147, lower than Gemini-3-Pro's 0.1273 and Qwen3.5-397B-A17B's 0.1362; the authors state that human revision mainly tightens overly broad criteria.
    • Intra-group consistency (Table 8): GPT-5.1's W-IMAE across five independent generations is 0.1203, with the Harmful category having the lowest distance (0.0701); the authors conclude on this basis that GPT-5.1 rubrics can serve as a basis for scalable annotation.

    Other Analyses

    • Hallucination (RQ3): RUBAS has the highest TBH on all three models (61.6, 58.6, 18.5, Table 1); the authors state that the rubric evaluates both parameter appropriateness and the evidence grounding of responses, rather than relying only on more refusals.
    • Case studies (Section 6.3, Appendix F): in Table 9, most baselines directly delete the application under an ambiguous cleanup request, whereas RUBAS instead confirms with the user; in Table 10, all baselines propagate erroneous geographic information returned by a tool, whereas RUBAS corrects it using internal knowledge. Full cases are given in Appendix F.
    • Negative result: on GLM-4.7-Flash, RUBAS's ASB (40.4) is higher than Rule† (32.3), GuardModel† (29.9), and DPO† (27.7), but these three baselines have all degenerated; the authors offer no separate explanation for this difference among non-degenerate methods.
  5. What are some points that can be further explored?

    The authors list four limitations: synthetic data, generator dependence, thinking mode, and incomplete defenses; the experiments cover three models and six benchmarks.

    Limitations and future directions noted by the authors

    • Synthetic data (Limitations): RUBAS is mainly trained on synthetic agent safety scenarios and may not fully reflect ambiguous or evolving user intent, external states, and domain policies in real deployments; the authors state that further validation with real tools and real human instructions is needed.
    • Reliance on strong LLM generation (Limitations): task instances and rubric criteria are synthesized by strong LLMs, and reward quality depends on the capability, calibration, and bias of the generating model.
    • Only thinking mode tested (Limitations): the experiments focus on thinking-mode models and have not yet examined RUBAS's performance on non-thinking models, or in systems where reasoning traces are unavailable or difficult to separate from the final response.
    • Not a complete safety solution (Limitations): it may still fail on novel adversarial cases outside the training taxonomy; the authors state that real deployment should combine defenses such as runtime monitoring, human confirmation of high-risk actions, and continuous red teaming.
    • Full verifiability (Appendix A): must_refuse is currently the only criterion not verified programmatically, and the authors state that they are continuing to work toward fully verifiable rubrics.

    Scope of experimental coverage

    • Models tested: 3 in total—Qwen3-8B, Qwen3-14B, GLM-4.7-Flash—all in thinking mode (Section 5.1).
    • Evaluation benchmarks: four safety benchmarks (ASB, InjecAgent, AgentHarm, and the DPI setting of ASecBench), utility BFCL, hallucination TBH (Section 5.1).
    • Baselines: 4 in total—Rule, GuardModel, DPO, SFT; two additional seeds were tested for degenerate runs (Sections 5.2, 5.1).
    • Rubric reliability: 200 training instances, 3 generating models plus a human-revised reference, 8 rollouts per instruction, GPT-5.1 repeated generation 5 times (Appendix E).
    • Not reported in the paper: the main results do not report variance across multiple runs or statistical significance tests; the trained models are not reported as evaluated in real tool environments (non-synthetic environments).
  6. Summarize the main content of the paper

    RUBAS decomposes agent safety into four-dimensional verifiable rubric rewards for GRPO training, and the authors claim it achieves safety, hallucination, and utility gains together on three models.

    RUBAS is a rubric-based reinforcement learning framework proposed by the CoAI group at Tsinghua University and Huawei Noah's Ark Lab for the safety alignment of tool-using LLM agents.

    • Problem to solve: agent safety risks span the complete behavior trajectory (tool selection, arguments, response); the authors argue that SFT only learns surface patterns and rule-based RL rewards are too coarse, both making it difficult to jointly optimize safety and helpfulness.
    • Method highlights: decompose behavior into four dimensions—tool-use safety, argument safety, response safety, and helpfulness; GPT-5.1 synthesizes 2,353 training instances and their instance-level rubrics according to 10 risk categories × 6 failure modes; almost all criteria are programmatic binary checks (only the refusal judgment uses Qwen3Guard-Gen-8B), aggregated into a scalar reward by weighted summation and then trained online with GRPO, with a completeness gate and an anti-empty-reasoning penalty added.
    • Main results (Table 1): on Qwen3-8B, Avg. Risk drops from 52.7% to 15.9%, BFCL 79.5 (base 83.7); on Qwen3-14B, from 54.8% to 24.8%; on GLM-4.7-Flash, from 37.1% to 28.2% and BFCL 71.0 is the highest in the whole table; on all three models the TBH hallucination score is the highest (61.6, 58.6, 18.5).
    • Ablation and validation: removing the response safety dimension lowers the Safety Score by 12.0 points (Figure 3); the W-HMAE between GPT-5.1-generated rubrics and the human-revised reference is 0.1147, and the W-IMAE across five generations is 0.1203 (Tables 6, 8).
    • Authors' conclusion: the authors state that the multi-dimensional rubric reward and GRPO are complementary, improving safety and hallucination resistance while maintaining tool-calling ability; they also acknowledge that the method relies on synthetic data and generative models, only tested thinking mode, and cannot replace deployment-time protections such as runtime monitoring.

Related papers

Show 3 more papers
Read originalarxiv.org