PhysXAI: A Theoretical Framework for Diagnosing Physical Hallucinations in Weather Foundation Models
Organizations: Department of Mechanical Engineering, IIITDM Kancheepuram, Chennai, Tamil Nadu, India · Department of Mechanical Engineering, Indian Institute of Technology Kanpur, Kanpur, Uttar Pradesh, India
Abstract
Modern machine learning models for global weather forecasting achieve remarkable predictive accuracy, yet they frequently produce states that violate fundamental physical laws, including conservation of mass, hydrostatic balance, or spectral energy scaling. We term these outputs physical hallucinations and propose PhysXAI, a rigorous diagnostic framework that detects, localises, and attributes such inconsistencies. Unlike existing post-hoc metric suites, PhysXAI is a learnable system that explicitly decouples forecast error from physical plausibility. We formalise the problem through a novel joint condition on numerical and physical residuals, and introduce a multi-branch encoder that extracts representations from conservation, dynamical, spectral, cross-variable, and spatiotemporal residuals. A key innovation is a physics-consistency contrastive learning objective, which we theoretically show the latent representation to be approximately isometric to the physical residual space, ensuring that diagnostic decisions remain grounded in physically meaningful deviations. We further derive an adaptive multi-objective loss with gradient-based weighting to balance competing diagnostic objectives. The framework produces spatially resolved hallucination maps, violation-type classifications, and calibrated Bayesian uncertainty, enabling both detection and interpretable attribution of physical inconsistencies. We conduct a comprehensive comparative evaluation of PhysXAI across ERA5, WeatherBench 2, and MERRA-2, using forecasts from GraphCast, Pangu-Weather, and NeuralGCM, with Python-written code and a fully reproducible experimental protocol. Our theoretical analysis and empirical evaluation establish PhysXAI as a principled framework for diagnosing physical hallucinations and advancing trustworthy AI for weather forecasting.
Figures & tables
| Variant | AUROC | Drop from Full |
|---|---|---|
| Full PhysXAI | 0.91 | – |
| w/o Contrastive Learning | 0.85 | 0.06 |
| w/o Conservation Branch | 0.86 | 0.05 |
| w/o Dynamics Branch | 0.87 | 0.04 |
| w/o Spectral Branch | 0.88 | 0.03 |
| w/o Cross-Variable Branch | 0.89 | 0.02 |
| Method | Physical Metrics | Learnable | Localised | Attributable | Uncertainty |
|---|---|---|---|---|---|
| PhysMetrics.Weather | Yes | No | No | No | No |
| One-class SVM | No | Yes | Yes | No | No |
| Autoencoder | No | Yes | Yes | No | No |
| Isolation Forest | No | Yes | Yes | No | No |
| MLP Classifier | No | Yes | Yes | No | No |
| PhysMetrics Ensemble | Yes | Partially | No | No | No |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
|---|---|
| True atmospheric state at time | |
| Forecast at lead time | |
| Forecast error | |
| -th physical residual functional | |
| Set of physical residual functionals | |
| Climatological threshold for residual |
| Parameter | Value |
|---|---|
| Encoder base channels | 64 |
| Encoder output channels | 128 |
| Physics latent dimension | 64 |
| Contrastive projection dimension | 128 |
| Number of attention heads | 8 |
| Number of residual classes | 7 |
Hallucination Detection
Hallucination detection identifies unsupported, fabricated, or evidence-inconsistent content in language and multimodal model outputs.
See all 83 papers