Learning to Think in Physics: Breaking Shortcut Learning in Scientific Diffusion via Representation Alignment

Haozhe Jia, Pengyu Yin, Wenshuo Chen, Shaofeng Liang, Lei Wang +4 more
5/20/2026
cs.LGcs.CV

Official code: Hxxxz0/REPA-P (17 stars, MIT, last commit 2026-05-20).

Abstract

Physics-informed diffusion models typically enforce PDE constraints only on final outputs, leaving intermediate representations unconstrained and prone to shortcut learning under shifted boundary conditions. We introduce **REPA-P**, a teacher-free, architecture-agnostic framework that aligns intermediate features with physical states using first-principles residuals. REPA-P attaches lightweight $1{\times}1$ projection heads to selected layers, decodes hidden activations into physical quantities, and applies PDE residual losses during training. These heads are discarded at inference, introducing **zero overhead**. Across four PDE tasks, including Darcy flow, topology optimization, electrostatic potential, and turbulent channel flow, REPA-P accelerates convergence by up to $2{\times}$, reduces physics residuals by up to $66.4\%$, and improves out-of-distribution robustness by up to $49.3\%$, with consistent gains on both U-Net and Diffusion Transformer backbones. Ablations show that supervising a small set of intermediate layers captures most benefits and complements output-level physics losses. Code is available at [https://github.com/Hxxxz0/REPA-P](https://github.com/Hxxxz0/REPA-P).

View on arXivView PDF

Code Implementations(1)

Hxxxz0/REPA-POfficial100%
MIT
172PythonNov 13, 20255 months agoMIT

Similar Papers

Cite this paper

@article{jia2026learning,
  title  = {Learning to Think in Physics: Breaking Shortcut Learning in Scientific Diffusion via Representation Alignment},
  author = {Haozhe Jia and Pengyu Yin and Wenshuo Chen and Shaofeng Liang and Lei Wang and Bowen Tian and Xiucheng Wang and Nanqian Jia and Yutao Yue},
  year   = {2026},
  eprint = {2605.20780},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.20780v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.20780.svg)](https://codeofpaper.com/paper/2605.20780)

Discussion