ONNX 模型库
返回模型

说明文档

HyPINO:基于 HyperPINN 和构造解法的多物理神经算子

<p> <a href="https://arxiv.org/abs/2509.05117" target="_blank"> <img src="https://img.shields.io/badge/arXiv-2509.05117-b31b1b.svg" alt="arXiv Paper"/> </a> <a href="https://github.com/rbischof/hypino" target="_blank"> <img src="https://img.shields.io/badge/Code-GitHub-181717?logo=github" alt="GitHub Code"/> </a> <a href="https://rbischof.github.io/hypino_web/" target="_blank"> <img src="https://img.shields.io/badge/Web_Demo-Launch-2ea44f" alt="Web Demo"/> </a> </p>

本仓库包含论文 HyPINO: Multi-Physics Neural Operators via HyperPINNs and the Method of Manufactured Solutions 的模型文件。

HyPINO 是一个多物理神经算子框架,能够以零样本方式泛化到各种线性、二维、二阶偏微分方程(PDE)。
它使用基于 Swin Transformer 的超网络来生成以 PDE 规约为条件的物理信息神经网络(PINN),并完全使用**构造解法(MMS)**进行训练。本仓库包含该论文的官方实现。

特性

  • 对线性、二维、二阶 PDE 族(椭圆型、抛物型、双曲型)具有零样本泛化能力
  • 支持混合边界条件: Dirichlet、Neumann 和内部边界
  • 基于的 Swin Transformer 超网络可生成任务特定的 PINN
  • 基于残差的迭代优化可提升测试时精度
  • PINN 初始化可加速收敛并改善微调性能

框架概述

以泊松方程 $-\Delta u(x, y) = 0$ 为例,定义在带有圆形内边界的方形区域上。
下图展示了 HyPINO 期望的输入场及其对应的参考解

<p align="center"> <img src="https://github.com/rbischof/hypino/raw/main/assets/poisson_C/grids.png" width="85%"> </p>

给定 PDE 规约,HyPINO 的 Swin Transformer 超网络生成目标 PINN 的权重,该 PINN 可在空间域 $(x, y) \in [-1, 1]^2$ 上连续求值。

<p align="center"> <img src="https://github.com/rbischof/hypino/raw/main/assets/hypino_framework.png" width="85%"> </p>

安装

HyPINO 在 Python 3.12.1 下测试通过。

安装依赖:

pip install -r requirements.txt

模型权重

HyPINO 预训练模型

直接从 Hugging Face 下载预训练的 HyPINO 模型:

# 方式一:使用 Hugging Face CLI
hf download rabischof/hypino hypino.safetensors --local-dir models/

# 方式二:使用 wget
wget -O models/hypino.safetensors https://huggingface.co/rabischof/hypino/resolve/main/hypino.safetensors

训练

训练模型:

python train.py

日志、检查点和图表保存在:

runs/

评估

评估训练好的模型:

python evaluate.py --model hypino --weights models/hypino.safetensors

示例 Notebook

GitHub 仓库中的 notebooks/ 目录包含探索和扩展 HyPINO 的引导示例:

Notebook 描述
01_visualize_data.ipynb 可视化基准 PDE 输入和参考解。展示有监督(MMS 生成)和无监督样本。
02_inference.ipynb 解释 HyPINO 期望的输入、输出格式,以及如何将预测用于下游任务。
03_iterative_refinement.ipynb 演示如何通过基于残差的迭代优化构建 PINN 集成,并可视化测试时的改进效果。
04_pinn_finetuning.ipynb 展示如何将 HyPINO 生成的 PINN 用作 PDE 特定微调的初始化。

引用

如果您使用本代码或模型,请引用:

@article{bischof2025hypino,
  title={HyPINO: Multi-Physics Neural Operators via HyperPINNs and the Method of Manufactured Solutions},
  author={Bischof, Rafael and Bickel, Bernd},
  journal={arXiv preprint arXiv:2509.05117},
  year={2025}
}

rabischof/hypino

作者 rabischof

other
↓ 0 ♥ 0

创建时间: 2025-10-08 13:09:05+00:00

更新时间: 2025-10-16 13:06:33+00:00

在 Hugging Face 上查看

文件 (4)

.gitattributes
README.md
hypino.onnx ONNX
hypino.safetensors