AIResearch AIResearch
Back to articles
Science

AI Learns to Stop Making Up Physics

A new training method forces neural networks to obey the laws of nature at every step, eliminating the 'hallucinations' that plague scientific AI models.

AI Research
November 06, 2025
3 min read
AI Learns to Stop Making Up Physics

When artificial intelligence systems simulate physical phenomena like fluid dynamics or chemical reactions, they often produce results that look mathematically correct but violate fundamental laws of nature—creating energy from nothing, predicting negative densities, or generating impossible shock waves. This problem, known as 'hallucination,' has limited AI's reliability in scientific applications where accuracy matters less than physical consistency. Now researchers have developed a training framework that eliminates these violations by forcing neural networks to operate within the boundaries defined by physical laws.

The key finding demonstrates that neural networks can be trained to produce physically consistent solutions to partial differential equations without sacrificing accuracy. The Constraint-Projected Learning (CPL) framework ensures that every update during training stays within the 'lawful manifold'—the mathematical space of solutions that obey conservation laws, positivity constraints, and physical admissibility conditions. This approach transforms neural networks from clever approximators into reliable scientific instruments.

The methodology combines geometric projection with standard gradient-based learning. After each training step, the network's outputs are projected onto constraint sets representing physical laws—conservation of mass and momentum, entropy conditions, positivity of densities and pressures, and divergence-free structures for incompressible flows. These projections are differentiable and computationally efficient, adding only about 10% overhead compared to unconstrained training. The framework also incorporates total-variation damping to prevent unphysical oscillations and a short rollout curriculum that teaches networks to maintain consistency across multiple prediction steps.

Results from testing on Burgers' equation systems show dramatic improvements. The CPL framework reduced mass conservation errors to machine precision (approximately 10^-10) and eliminated hard violations like negative densities. When combined with total-variation damping, the system suppressed soft violations—small-scale roughness and oscillations—while maintaining sharp discontinuities where physically appropriate. Over forty prediction steps without retraining, the method maintained physical consistency with per-step mean squared error remaining flat at approximately 6.0×10^-5, demonstrating that the learned behavior persists far beyond the training window.

The implications extend beyond fluid dynamics to any domain where AI must respect physical or logical constraints. In engineering, this could lead to more reliable simulation tools for aircraft design or climate modeling. In medicine, it could improve drug discovery by ensuring predicted molecular interactions obey chemical laws. The approach provides a foundation for building AI systems that don't just approximate data but understand and respect the underlying rules of reality.

Current limitations include the framework's validation primarily on one-dimensional systems with smooth shocks and moderate gradients. Extending the method to higher-dimensional coupled systems like Euler equations and magnetohydrodynamics will require developing additional differentiable projectors. The approach also depends on the geometry of constraint sets—problems with stiff source terms or complex boundary layers may alter convergence behavior and require problem-specific adaptations.

Original Source

Read the complete research paper

View on arXiv

About the Author

Guilherme A.

Guilherme A.

Former dentist (MD) from Brazil, 41 years old, husband, and AI enthusiast. In 2020, he transitioned from a decade-long career in dentistry to pursue his passion for technology, entrepreneurship, and helping others grow.

Connect on LinkedIn