arXiv:2509.23381cs.CL2025-09

用向量组合让大模型安全机制支持多语言,无需额外训练

Guard Vector: Beyond English LLM Guardrails with Task-Vector Composition and Streaming-Aware Prefix SFT

  • 通过参数差值生成安全向量,一键适配目标模型
  • 支持中日韩多语言安全检测,零成本扩展
  • 单令牌输出提升效率,适合实时流式应用

我们提出 Guard Vector,一种通过预训练语言模型与防护模型(Guard Model)的参数差值计算出的安全任务向量。将该向量与目标模型组合,即可得到目标防护模型(TGM)。通过结合前缀式训练与评估及单令牌输出分类器,TGM在标准安全评测中表现优于现有防护模型,并实现对中文、日文、韩文的语言扩展,无需额外训练或目标语言标注。该方法在 Llama 与 Gemma 两大主流防护基座上均具可移植性。经前缀监督微调(prefix SFT)后,TGM 在流式场景下保持分类质量,使前缀输入与全文本输入行为一致。单令牌输出设计显著提升吞吐量并降低延迟。整体方案减少数据与算力需求,推动更负责任的 AI 安全实践。

原文摘要 · Abstract (English)

We introduce Guard Vector, a safety task vector computed as the parameter difference between a guardrail model (Guard Model) and a same-architecture pretrained language model. Composing this vector with a target language model yields a Target Guard Model (TGM). We then adapt TGM with a streaming-aware approach that combines prefix-based training and evaluation with a classifier that produces a single-token output. With this composition alone, TGM improves classification quality over established Guard Models across standard safety suites and enables language extensibility to Chinese, Japanese, and Korean, requiring neither additional training nor target language labels for this composition step. It also demonstrates model portability across two widely used public guardrail backbones, Llama and Gemma. With prefix SFT (supervised fine-tuning), TGM preserves classification quality under streaming by aligning the behavior between prefix inputs and full-text inputs. The single-token output design increases throughput and reduces latency. Together, these components reduce data and compute requirements while promoting streaming-aware evaluation practices, thereby contributing to a more responsible AI ecosystem.

安全防护多语言流式处理模型迁移

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。