用形式化方法验证小规模傅里叶神经算子的物理一致性
Can We Formally Verify Neural PDE Surrogates? SMT Compilation of Small Fourier Neural Operators
- 将FNO前向传播转为Z3可处理的分段线性模型
- 对10个模型完成正性、质量守恒等性质的严格证明与反例检测
- 平衡验证精度与效率,揭示规模化验证的关键挑战
傅里叶神经算子(FNO)能显著加速偏微分方程(PDE)模拟,但通常缺乏对物理结构保持的形式保证。我们发现,一旦训练权重和网格固定,FNO中的谱卷积即为线性映射,整个前向传播是分段线性的,可在Z3的线性实数算术中精确表示。研究了两种编码:精确编码将谱卷积编译为稠密矩阵乘法,支持严格证明与反例;轻量冻结编码用常数替换谱路径,速度更快但近似。在10个用于一维输运-扩散-反应方程的小型FNO(85~117参数,网格8~32)上,精确编码对无激活函数模型给出2个正性证明、5个反例和10个质量违反反例;带ReLU模型的3个正性查询超时。对于质量非增性,Z3在7/10模型上发现的反例劣于基于梯度的假说检验和蒙特卡洛方法。冻结编码可扩展至64网格,实现亚秒级正性检查,但不再提供原始FNO的证书。结果清晰揭示了形式验证中的保真度-可扩展性权衡,并指明了生产级神经算子验证所需的关键方向。
原文摘要 · Abstract (English)
Fourier Neural Operators (FNOs) can greatly accelerate PDE simulation, but they are often used without formal guarantees that they preserve basic physical structure. We show that, once the trained weights and grid are fixed, the spectral convolution in an FNO is a linear map. As a result, the full forward pass is piecewise-linear and can be represented exactly in Z3's linear real arithmetic. We study two encodings. The exact encoding compiles the spectral convolution into a dense matrix multiplication, which is sound for both proofs and counterexamples. The lighter frozen encoding replaces the spectral path with a constant, making it faster but approximate. On 10 small FNO surrogates for 1D advection-diffusion-reaction (85 to 117 parameters, grids 8 to 32), the exact encoding gives 2 sound positivity proofs on linear (ReLU-free) models, 5 sound positivity counterexamples, and 10 sound mass-violation counterexamples; the remaining 3 positivity queries on ReLU models time out. For mass non-increase, Z3 finds worse counterexamples than both gradient-based falsification and Monte Carlo on 7 of 10 models. The frozen encoding scales to grid size 64 with sub-second positivity checks, but it no longer provides certificates for the original FNO. Overall, the results make the soundness--scalability tradeoff explicit and point to what is needed for formal verification of production-scale neural operators.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。