BENO
Model Overview
BENO is a boundary-embedded neural operator developed by researchers at Peking University for solving elliptic PDEs subject to complex boundary conditions. It enables rapid prediction of steady-state physical fields across varying geometries and nonhomogeneous boundary conditions.
Paper: BENO: Boundary-embedded Neural Operators for Elliptic PDEs
Model Description
BENO employs a boundary-embedded neural operator architecture that combines a dual-branch graph neural network with a Transformer. Trained on the BENO dataset, it predicts steady-state physical fields governed by elliptic PDEs such as the Poisson and Laplace equations on complex geometries with nonhomogeneous boundary conditions.
Use Cases
| Use Case | Description |
|---|---|
| Elliptic PDE solving | Rapidly approximate steady-state boundary-value problems such as the Poisson and Laplace equations |
| Complex boundary modeling | Capture the effects of free-form boundaries, irregular domains, and nonhomogeneous boundary values on the solution field |
| Steady-state field prediction | Predict equilibrium physical fields determined jointly by source terms and boundary conditions |
| Numerical solver acceleration | Replace or augment conventional FEM, FDM, and FVM workflows to improve inference efficiency |
Usage
1. OneCode
Use the online OneCode environment for an intelligent, one-click AI for Science (AI4S) programming experience:
Launch OneCode for one-click AI4S programming
2. Manual Setup
Hardware Requirements
- A GPU or DCU is recommended.
- A CPU can be used for import checks and small-scale pipeline validation, but full training and inference will be slow.
- DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version for the target cluster, is recommended.
Download the Model Package
hf download OneScience-Group/BENO --local-dir ./BENO
cd BENO
Set Up the Runtime Environment
DCU Environment
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU Environment
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
Training Data
The OneScience community provides the beno dataset for training. Download it with the command below and verify that the data path in config/config.yaml is configured correctly:
hf download --repo-type dataset OneScience-Group/beno --local-dir ./data
The complete dataset is also available from the official download link.
Training
Single GPU:
python scripts/train.py
Multiple GPUs:
torchrun --standalone --nnodes=<num_nodes> --nproc_per_node=<num_GPUs> scripts/train.py
Model Weights
This repository will provide weights trained on the BENO dataset in the weights/ directory. The weights will be uploaded soon.
Inference
python scripts/inference.py
Evaluation and Visualization
python scripts/result.py
Official OneScience Resources
| Platform | OneScience Repository | Skills Repository |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
Citations and License
- Original BENO paper: BENO: Boundary-embedded Neural Operators for Elliptic PDEs
- This repository retains source attribution and has been adapted for automated execution through OneScience and ModelScope. Before public redistribution, verify the applicable licensing requirements of the upstream project.
中文说明
模型概览
BENO 是一种由北京大学研究人员开发的边界嵌入神经算子(boundary-embedded neural operator),用于求解复杂边界条件下的椭圆型 PDE。它支持快速预测不同几何域和非齐次边界条件下的稳态物理场。
模型描述
BENO 采用结合双分支图神经网络和 Transformer 的边界嵌入神经算子架构。模型基于 BENO 数据集训练,可预测由 Poisson 和 Laplace 方程等椭圆型 PDE 支配,在复杂几何域和非齐次边界条件下的稳态物理场。
使用场景
| 使用场景 | 说明 |
|---|---|
| 求解椭圆型 PDE | 快速近似求解 Poisson 和 Laplace 方程等稳态边值问题 |
| 复杂边界建模 | 捕获自由形状边界、不规则区域和非齐次边界值对解场的影响 |
| 稳态场预测 | 预测由源项和边界条件共同决定的平衡物理场 |
| 加速数值求解器 | 替代或补充常规 FEM、FDM 和 FVM 流程,提高推理(inference)效率 |
使用指南
1. OneCode
通过 OneCode 在线环境体验面向科学的人工智能(AI4S)智能一键编程。
2. 手动配置
硬件要求
- 建议使用 GPU 或 DCU。
- CPU 可用于导入检查和小规模流程验证,完整训练和推理速度较慢。
- DCU 用户须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 推荐的适配目标集群的版本。
下载模型包
hf download OneScience-Group/BENO --local-dir ./BENO
cd BENO
配置运行环境
DCU 环境
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU 环境
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
# Installation with uv is also supported
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
训练数据
OneScience 社区提供用于训练的 beno 数据集。使用以下命令下载,并确认 config/config.yaml 中的数据路径配置正确。
hf download --repo-type dataset OneScience-Group/beno --local-dir ./data
也可通过官方下载链接获取完整数据集。
训练
单 GPU
python scripts/train.py
多 GPU
torchrun --standalone --nnodes=<num_nodes> --nproc_per_node=<num_GPUs> scripts/train.py
模型权重
本仓库将在 weights/ 目录中提供基于 BENO 数据集训练得到的权重。权重即将上传。
推理
python scripts/inference.py
评估与可视化
python scripts/result.py
OneScience 官方资源
| 平台 | OneScience 仓库 | Skills 仓库 |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
引用与许可证
- BENO 原始论文:BENO:用于椭圆型 PDE 的边界嵌入神经算子
- 本仓库保留来源署名,并经过适配,可通过 OneScience 和 ModelScope 自动运行。公开再分发前,请核实上游项目适用的许可要求。
- Downloads last month
- 8