atlas

Research map / Large language models / Agents, code and math

Shh, don't say that! Domain Certification in LLMs

ICLR 2025 · Large language models › Agents, code and math · approach: Mathematical and structural reasoning benchmarks · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces domain certification for LLMs and VALID, a rejection-sampling method that uses a small in-domain guide model to give provable upper bounds on the probability of out-of-domain outputs under adversarial prompts.

Problem

LLMs deployed for narrow domains can be adversarially prompted to produce out-of-domain outputs, and existing guardrails offer no provable guarantees against jailbreaks.

Approach

Rejection-sample responses from a general LLM, accepting only those whose length-normalized log-likelihood ratio against a small in-domain guide model is bounded by k; this yields a provable adversarial upper bound 2^{kN} T G(y) on the probability of any out-of-domain output, independent of the prompt.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply VALID with an ε=10^-5 certificateLlama-3-8B · PubMedQAcertified score: 73.4% -> 66.7% (-6.7%)Hurt
Tighten the VALID certificate from ε=10^-5 to ε=10^-10Llama-3-8B with VALID · PubMedQAcertified score: 66.7% -> 47.7%Hurt
Use VALID rejection sampling instead of the unconstrained modelLlama-3-8B · MedicalQA OOD samplesconstriction ratio: 24.23Helped
Set k=5.35 for VALIDLlama-3-8B with VALID · MedicalQA OOD classificationtrue rejection rate: 0.99Helped
Set k=5.35 for VALIDLlama-3-8B with VALID · MedicalQA in-domain samplesfalse rejection rate: 0.01Helped
Use a smaller rejection threshold kVALID · MedicalQAcertificate tightnessHelped
Increase the number of rejection attempts TVALID · MedicalQA in-domain samplesacceptance rateHelped
Increase the number of rejection attempts TVALID · MedicalQA OOD certificationdomain-certificate tightness: linearlyHurt
Use guide model G alone instead of combining it with L through VALID (ablation)MedicalQA · MedicalQAtask performanceHurt
Adjust for the short-sequence confounder in the OOD dataset (ablation)VALID · MedicalQAcertificate disentanglementHelped

Surprising findings

Limitations

Experimental setup

Datasets: TinyShakespeare IMDB RTE SST2 Bible 20 Newsgroups PubMedQA SQuAD CharTask

Benchmarks: PubMedQA PubMedQA@epsilon

Metrics: false rejection rate true rejection rate atomic certificate epsilon constriction ratio PubMedQA accuracy under certificate

Baselines: unconstrained Gemma-2-2b / Llama-3-8B model L guide model G alone

Builds on: Renyi divergence likelihood ratio test for OOD detection PubMedQA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy