Phi-4-reasoning Technical Report

Marah I Abdin, Sahaj Agarwal, Ahmed Awadallah, Vidhisha Balachandran, Harkirat S. Behl, Lingjiao Chen, Gustavo de Rosa, Suriya Gunasekar, Mojan Javaheripi, Neel Joshi, Piero Kauffmann, Yash Lara, Caio César Teodoro Mendes, Arindam Mitra, Besmira Nushi, Dimitris Papailiopoulos, Olli Saarikivi, Shital Shah, Vaishnavi Shrivastava, Vibhav Vineet, Yue Wu, Safoora Yousefi, Guoqing ZhengarXiv 2025 · DOI

Introduction

The pursuit of advanced reasoning capabilities in artificial intelligence has traditionally been associated with massive parameter counts. However, Microsoft’s Phi-4-reasoning, a 14-billion parameter model, challenges this paradigm by rivaling frontier models 50x its size on complex logic and mathematics tasks. By integrating high-quality "teachable" data distillation with a novel length-aware reinforcement learning strategy, Phi-4-reasoning demonstrates that meticulous data curation and algorithmic refinement can bridge the gap between compact open-weight models and proprietary giants.

Methodology

The development of Phi-4-reasoning followed a rigorous two-stage post-training pipeline designed to maximize reasoning efficiency and minimize redundant output.

Supervised Fine-Tuning (SFT)

The base Phi-4 model was initially trained on 1.4 million prompts. The core innovation in this stage was the selection of "teachable" samples—prompts positioned at the edge of the base model's existing capabilities. Reasoning traces were distilled from OpenAI’s o3-mini, serving as a high-performance teacher. Architecturally, the team repurposed placeholder tokens for <think> and </think> tags and doubled the RoPE base frequency to support a 32k context window, facilitating longer chains of thought (CoT).

Reinforcement Learning (Phi-4-reasoning-plus)

Following SFT, the model underwent outcome-based reinforcement learning using the Group Relative Policy Optimization (GRPO) algorithm. A key contribution is the Length-Aware Reward Function. Unlike standard RL, which might inadvertently encourage "yapping" (excessive, redundant tokens), this function rewards the model for conciseness when correct while encouraging deeper "thinking effort" (more tokens) only when initial attempts fail. This balance ensures compute is allocated where it is most needed.

Experimental Results

Phi-4-reasoning was evaluated against a comprehensive battery of benchmarks, including AIME 2024/2025, HMMT, OmniMath, GPQA, and LiveCodeBench.

Comparison of Phi-4-reasoning variants against frontier models across key benchmarks.

As shown in the evaluation results, Phi-4-reasoning-plus achieved a staggering 78% accuracy on AIME 2025, a massive leap from the base model's 12.9%. This performance places the 14B model in the same tier as DeepSeek-R1 (671B) and o1-mini. Furthermore, it consistently outperformed the DeepSeek-R1-Distill-Llama-70B model across most reasoning benchmarks, highlighting the efficiency of the Phi-4 architecture and training methodology.

Inference-Time Scaling

A critical aspect of modern reasoning models is their ability to scale performance with additional compute at inference time. Phi-4-reasoning demonstrates strong scaling behavior when using techniques like Majority Voting (Maj@N).

AIME 2025 accuracy scaling with parallel test-time compute (N).

Key Insights

  • Additive Data Properties: The researchers observed that domain-specific data mixtures (e.g., math and code) could be optimized independently and merged without catastrophic forgetting, allowing for a robust composite model.
  • The Value of Teachable Moments: Scaling data volume is less effective than filtering for "meaningful gaps" between the base model and a stronger teacher. This targeted learning provides a superior signal for complex reasoning.
  • Generalization to NP-Hard Tasks: Despite not being explicitly trained on them, the model showed 30-60 percentage point improvements on out-of-domain algorithmic tasks like the Traveling Salesman Problem (TSP) and 3SAT.

Conclusion and Future Work

Phi-4-reasoning proves that 14B parameter models can achieve state-of-the-art reasoning performance through sophisticated data engineering and RL. While the model currently faces limitations regarding its 32k context window and English-centric optimization, future work will focus on extending outcome-based RL to broader domains like creative reasoning and multi-lingual support. The success of Phi-4-reasoning underscores a shift toward data-centric scaling as a viable path to frontier-level AI.

Summary updated

BibTeX
@misc{abdin2025phi,
  author = {Marah I Abdin and Sahaj Agarwal and Ahmed Awadallah and Vidhisha Balachandran and Harkirat S. Behl and Lingjiao Chen and Gustavo de Rosa and Suriya Gunasekar and Mojan Javaheripi and Neel Joshi and Piero Kauffmann and Yash Lara and Caio César Teodoro Mendes and Arindam Mitra and Besmira Nushi and Dimitris Papailiopoulos and Olli Saarikivi and Shital Shah and Vaishnavi Shrivastava and Vibhav Vineet and Yue Wu and Safoora Yousefi and Guoqing Zheng},
  title = {{Phi-4-reasoning Technical Report}},
  year = {2025},
  eprint = {2504.21318},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.21318},
}
Figure