神经算子:从 DeepONet 到 FNO

618 字
3 分钟
神经算子:从 DeepONet 到 FNO

动机#

传统的神经网络学习的是有限维向量到有限维向量的映射 f:RdRkf: \mathbb{R}^d \to \mathbb{R}^k。但在科学计算中,我们经常需要学习函数到函数的映射(算子):

G:AU,G(a)=u\mathcal{G}: \mathcal{A} \to \mathcal{U}, \quad \mathcal{G}(a) = u

例如:

  • 初始条件 → PDE 解
  • 材料参数 → 应力场
  • 边界条件 → 流场

这类映射是无限维的:输入和输出都是函数,而非有限维向量。

DeepONet#

Lu et al. (2021) 提出的 DeepONet 基于广义逼近定理,将算子学习分解为两个子网络:

架构#

G(a)(y)k=1pbk(a)tk(y)trunk+b0\mathcal{G}(a)(y) \approx \underbrace{\sum_{k=1}^{p} b_k(a) \cdot t_k(y)}_{\text{trunk}} + b_0
  • Branch Net b(a)b(a):编码输入函数 a(x)a(x) 为有限维特征向量
  • Trunk Net t(y)t(y):编码输出位置 yy 为基础函数

关键洞察#

DeepONet 的理论基础是 Universal Approximation Theorem for Operators (Chen & Chen, 1995):

任何连续非线性算子都可以被单隐层神经网络以任意精度逼近。

class DeepONet(nn.Module):
def __init__(self, branch_layers, trunk_layers):
super().__init__()
self.branch = MLP(branch_layers) # 输入: a(x) 的采样值
self.trunk = MLP(trunk_layers) # 输入: 位置 y
def forward(self, a, y):
b = self.branch(a) # [batch, p]
t = self.trunk(y) # [batch, p]
return torch.sum(b * t, dim=-1) # 内积

Fourier Neural Operator (FNO)#

Li et al. (2021) 提出的 FNO 采用了完全不同的策略——在 Fourier 空间中进行变换

架构#

FNO 的核心是 Fourier 层,迭代更新:

vt+1(x)=σ(Wvt(x)+F1[RF[vt]](x))v_{t+1}(x) = \sigma\left(W v_t(x) + \mathcal{F}^{-1}[R \cdot \mathcal{F}[v_t]](x)\right)

其中:

  • F\mathcal{F} 是 Fourier 变换
  • RR 是可学习的 Fourier 域权重矩阵
  • WW 是局部线性变换

关键优势#

  1. 离散化不变性:相同的网络参数可用于不同分辨率
  2. 全局感受野:Fourier 变换天然捕捉全局依赖
  3. 快速计算:利用 FFT,复杂度 O(NlogN)O(N \log N)
class SpectralConv2d(nn.Module):
def __init__(self, in_channels, out_channels, modes):
super().__init__()
self.modes = modes
# Fourier 域中的可学习权重
self.weights = nn.Parameter(
torch.randn(in_channels, out_channels, modes, modes, dtype=torch.cfloat)
)
def forward(self, x):
# x: [batch, channels, H, W]
x_ft = torch.fft.rfft2(x)
# 截断高频模式
x_ft[:, :, :self.modes, :self.modes] *= self.weights
return torch.fft.irfft2(x_ft)

对比与适用场景#

特性DeepONetFNO
理论基础算子通用逼近定理Fourier 分析
输入格式函数在传感器位置的采样规则网格上的函数值
网格适应性不要求规则网格默认要求规则网格(可扩展)
高频分量Branch Net 编码通过 Fourier 截断控制
训练效率中等高(FFT 加速)

参考文献#

  1. Lu, L., et al. “Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators.” Nature Machine Intelligence, 2021.
  2. Li, Z., et al. “Fourier Neural Operator for Parametric Partial Differential Equations.” ICLR, 2021.
  3. Kovachki, N., et al. “Neural Operator: Learning Maps Between Function Spaces.” JMLR, 2023.

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

神经算子:从 DeepONet 到 FNO
https://sciml.com.cn/posts/neural-operators/
作者
SciML 研究者
发布于
2026-05-11
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
SciML 研究者
科学机器学习研究笔记 | 频率原理 · PINNs · 神经算子 · 深度学习理论
欢迎
SciML 研究笔记 — 专注于科学机器学习领域的论文阅读、代码复现与理论探索。
分类
标签
站点统计
文章
3
分类
2
标签
12
总字数
3,021
运行时长
0
最后活动
0 天前

文章目录