← Lab /AI/ML

Compact encoder matches large guard models on safety benchmarks

GLiGuard achieves competitive F1 scores to 7B-27B decoder guards while being 0.3B parameters

AI/ML arXiv 8 May 2026 Method Prototype evidence

Published as “GLiGuard: Schema-Conditioned Classification for LLM Safeguard”

Why it matters

The model enables low-latency, low-memory safety filtering for LLM deployments where resources are constrained.

Summary

GLiGuard matches the best large guard models on safety benchmarks while using only 0.3 B parameters, achieving 87.7 % average prompt F1 (within 1.7 points of the top 89.4 %) and 82.7 % average response F1 (second-best). It also runs up to 16× faster and with 17× lower latency than decoder-based guards. The evidence is limited to the reported benchmarks and the auxiliary tasks are weakly supervised.

What they found 2

  1. GLiGuard reaches an average prompt F1 of 87.7, within 1.7 points of the best prompt average (89.4, PolyGuard-Qwen-7B).

    “On prompt harmfulness detection, GLiGuard reaches an average F1 of 87.7, within 1.7 points of the best prompt average (89.4, PolyGuard-Qwen-7B).”

  2. GLiGuard delivers up to 16.2× higher throughput and up to 16.6× lower latency than comparable decoder-based guards.

    “GLiGuard achieves up to 16.2× higher throughput (133 vs. 8.2 samples/s at batch size 4) and up to 16.6× lower latency (26 ms vs. 426 ms at sequence length 64).”

Caveats 4

  • GLiGuard is not the top performer on any benchmark, lagging 1.7 F1 points behind the best prompt model and 1.4 points behind the best response model.
  • The harm-category and jailbreak-strategy labels used for training are generated automatically and are described as weakly supervised, which may limit reliability.
  • Future work includes reducing sensitivity to benign trigger words, improving robustness to roleplay-framed harmful intent, and benchmarking broader generalization across alternative moderation schemas.
  • Because harm category and jailbreak annotations are generated automatically, these auxiliary tasks should be interpreted as weakly supervised; the main harmfulness benchmarks are independent of these generated annotations.

What’s new here 4

  • Encodes safety tasks and label definitions as a schema within the input, enabling arbitrary task composition at inference time.
  • Uses a bidirectional encoder to perform all moderation tasks in a single non-autoregressive forward pass.
  • Delivers comparable F1 scores to models 23-90× larger while using only 0.3 B parameters.
  • Achieves up to 16× higher throughput and 17× lower latency than decoder-based guard models.