Alignment at Pre-training! Towards Native Alignment for Arabic LLMs

Juhao Liang, Zhenyang Cai, Jianqing Zhu, Huang Huang, Kewei Zong, Bang An, Mosen Alharthi, Juncai He, Lian Zhang, Haizhou Li, Benyou Wang, Jinchao Xu

Abstract

This paper introduces Native Alignment, a paradigm shift that moves Large Language Model (LLM) alignment from the final fine-tuning stages to the initial pre-training phase. By systematically rewriting 10 billion tokens of Arabic pre-training data to remove toxicity and improve formatting, the authors produced the LLaMA3-Tamed series. These models achieve state-of-the-art performance on Arabic benchmarks while being inherently safer and more helpful than models aligned only through traditional post-hoc methods.

Introduction

Most Large Language Models (LLMs) follow a "train then fix" pipeline: they are pre-trained on massive, uncurated web scrapes—often containing hate speech, bias, and poor formatting—and then "aligned" using Supervised Fine-Tuning (SFT) or Reinforcement Learning from Human Feedback (RLHF). The authors argue this "post-alignment" is often superficial, teaching the model how to format its output while leaving the underlying "knowledge" rooted in unaligned pre-training data.

This is particularly challenging for Arabic, a language with unique cultural values and religious taboos often misrepresented in raw web data. As a relatively low-resource language, researchers cannot simply discard "bad" data; they require a method to preserve knowledge while correcting values.

Methodology: The Native Alignment Workflow

The core contribution is a four-step workflow designed to "tame" the data before the model ever sees it. This process transforms raw web data into high-quality, aligned pre-training content.

The Native Alignment workflow involves deduplication, expert annotation, training a worker model, and large-scale rewriting.
  1. Deduplication: Standard cleaning of web-crawled data to increase knowledge density.
  2. Annotation: An "alignment expert" (human or GPT-4) rewrites a subset of data based on "Polishing Instructions" (e.g., correcting religious taboos, ensuring fluency, removing advertising).
  3. Training: To scale, the authors train a smaller "Alignment Worker" LLM (Qwen1.5-4B-Chat) on these expert-rewritten pairs.
  4. Rewriting: The worker LLM rewrites a massive corpus (10 billion tokens) of raw Arabic text.

Data Transformation and Quality

Native alignment acts as "deep alignment," where helpfulness and safety are learned as fundamental features of language. By cleaning data upstream, the model retains factual information while stripping away toxic sentiment or poor syntax. This is more economical than filtering for low-resource languages.

Examples of how the Native Alignment process transforms problematic origin data into well-formatted, fair, and moderated content.

Key Results

The resulting models, LLaMA3-Tamed-8B and LLaMA3-Tamed-70B, were trained on a 100-billion-token mix including the 10-billion-token "tamed" Arabic dataset. Key findings include:

  • Toxicity Reduction: Native alignment reduced sexual content by 31.8%, hate speech by 26.9%, and harassment by 20.8% within the pre-training data itself.
  • State-of-the-Art Performance: LLaMA3-Tamed-70B achieved an average score of 69.88 across major benchmarks (ArabicMMLU, EXAMS, ACVA), outperforming the base Llama3-70B (68.96) and significantly beating other open-source Arabic models like Jais-30B.
  • Safety and Helpfulness: In head-to-head comparisons on the BeaverTails dataset, LLaMA3-Tamed-8B showed a 10.4% improvement in harmlessness and a 4.8% improvement in helpfulness over the standard Llama3-8B.

Discussion and Conclusion

The authors propose the Deep Alignment Hypothesis: native alignment integrates values into the model's core knowledge base, whereas post-alignment acts as a "mask." Ablation studies showed that training on a hybrid of original and aligned data outperforms training on either alone, suggesting that native alignment enhances the utility of the existing knowledge base.

While the rewriting process can occasionally introduce factual errors from the worker model, the overall results demonstrate that aligning data at the pre-training stage is a powerful strategy for developing safer, more culturally resonant, and higher-performing LLMs for specific linguistic communities.

Summary updated

BibTeX
@inproceedings{liang2024alignment,
  author = {Juhao Liang and Zhenyang Cai and Jianqing Zhu and Huang Huang and Kewei Zong and Bang An and Mosen Alharthi and Juncai He and Lian Zhang and Haizhou Li and Benyou Wang and Jinchao Xu},
  title = {{Alignment at Pre-training! Towards Native Alignment for Arabic LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=woRFmNJiLp},
}
Figure