atlas

Research map / Large language models / Language, safety and interpretability

Safety Pretraining: Toward the Next Generation of Safe AI

NeurIPS 2025 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 1 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.

Proposes a data-centric safety pretraining framework (safety filtering, synthetic rephrasing, refusal and moral-education data, and harmfulness-tag training with safe beam search) that yields 1.7B SafeLM models with lower attack success rates and robustness to benign finetuning.

Problem

LLMs deployed in high-stakes settings generate harmful content, and post-hoc alignment is brittle because unsafe patterns learned during pretraining are hard to remove.

Approach

Embed safety into pretraining data and training itself: classify and score web data, rephrase unsafe text into educational context, add refusal and moral-education data, and insert a special harmfulness tag that is steered against at decoding time (Safe Beam Search).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train only on score-0 examples instead of raw data (ablation)Safety pretraining · GSM8K after benign finetuningASR: 38.8% -> 43.8%Hurt
Add rephrased score 1–3 data (ablation)Safety pretraining · GSM8K after benign finetuningASR: 38.8% -> 33.6%Helped
Add refusal completions for score-4 and score-5 data (ablation)Safety pretraining with rephrased data · GSM8K after benign finetuningASR: 33.6% -> 25.1%Helped
Add moral education data (ablation)Safety pretraining with rephrased and refusal data · GSM8K after benign finetuningASR: 25.1% -> 20.0%Helped
Annotate unsafe content with a harmfulness tag during pretraining rather than during IFT (ablation)1.7B model · GSM8K after benign finetuningASR: ~30% -> ~8%Helped
Use harmfulness-tag injection at 5% of sequence positions rather than the other tested rates (ablation)Safety pretraining with data-centric interventions · GSM8K after benign finetuningASRHelped
Safety-pretrain rather than use standard pretraining1.7B base model · Base Model Safety EvaluationsASR: 44% -> 11%Helped
Add rephrasing, refusal, and moral education data1.7B model · Standard benchmarksAvg.: 42.8% -> 42.9%No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: FineWeb-Edu StackOverflow FineMath Cosmopedia Ultrachat-200k WildGuardMix WildJailbreak toxigen-data Jigsaw Toxic Comments GSM8K Alpaca

Benchmarks: HarmBench TDC JailbreakBench AdvBench Alpaca arc_challenge arc_easy commonsense_qa gsm8k openbookqa piqa triviaqa

Metrics: attack success rate recall F1 overrefusal rate accuracy

Baselines: LLaMA Guard Profanity Checker SmolLM-1.7B-Instruct Raw-data pretraining

Builds on: SmolLM2 FineWeb-Edu Constitutional AI DPO LitGPT

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