査読付き会議論文の一覧へ戻るBack to Peer-reviewed conference papers
Graph Neural PDE Solvers with Conservation and Similarity-Equivariance
- 著者Authors
- M. Horie†, N. Mitsume
- 掲載先Published in
- International Conference on Machine Learning (ICML)
- 年Year
- 2024
- 種類Type
- 査読付き会議論文Peer-reviewed conference papers
- Link
- https://openreview.net/forum?id=WajJf47TUi
- arXiv
- https://arxiv.org/abs/2405.16183
- 研究テーマTopics
- 機械学習・データ科学Machine learning and data science 交通流・歩行者Traffic and pedestrian flow 流体Fluid dynamics
- キーワードKeywords
- グラフニューラル PDE ソルバーGraph neural PDE solver 保存則Conservation law 相似変換に対する同変性Similarity-equivariance グラフニューラルネットワークGraph neural network 偏微分方程式Partial differential equation 同変性Equivariance 物理Physics FluxGNNFluxGNN 局所保存型 GNNLocally conservative GNN 学習にない解析領域への汎化Generalization to unseen spatial domains
- 備考Note
- 採択率 27.5%
概要
偏微分方程式(PDE)で記述される物理現象の予測に機械学習を使う研究が、活発に行われています。既存のデータを活用して予測を速くできるためです。しかし、解析領域とその中の状態は多様で、データに基づく手法だけですべての場合を網羅するのは困難です。さらに、機械学習のモデルは保存則や対称性などの物理法則を破ることが多く、汎化性能と信頼性に懸念があります。
本論文は、保存則を厳密に満たし、相似変換(並進、回転、鏡映、拡大縮小)に対して同変な機械学習のモデル、flux-passing graph neural network(FluxGNN)を提案しています。このモデルは、任意の形状を扱えるグラフニューラルネットワーク(GNN)と、保存則と対称性を本来満たす古典的な数値解析手法である有限体積法(FVM)との類似性に基づいています。論文は、一般的な GNN が任意のグラフで物理量を保存するための条件を数学的に導き、それに基づいて FluxGNN を構成しています。テンポラルバンドリング(temporal bundling)、ニューラル非線形ソルバー、境界エンコーダーなどの既存の機械学習の手法は、わずかな変更か変更なしで取り込めます。移流拡散方程式と混合流体の Navier–Stokes 方程式の実験で、論文は、物理法則を取り入れたことで汎化性能が大きく向上したと報告しています。学習に使っていない解析領域で、他のモデルの精度は下がる一方、FluxGNN では大きな精度の低下は見られませんでした。コードは https://github.com/yellowshippo/fluxgnn-icml2024 で公開されています。
重要点
1. GNN が保存則を満たす条件:局所保存型 GNN
代表的な GNN であるメッセージパッシングニューラルネットワーク(MPNN)は、グラフの各頂点の信号を次のように更新します。
ここで、 は 番目の頂点の信号、 は辺 の信号、 は 番目の頂点に隣接する頂点の集合、 はメッセージ、 は更新後の信号、 は頂点の間の相互作用を表すメッセージ関数、 は頂点ごとの更新を表す更新関数です。どちらの関数もニューラルネットワークです。
論文は、無向グラフについて、連続な活性化関数を持つ MPNN が、任意のグラフと任意の頂点の信号で頂点の信号の和 を保存するのは、2 つの条件が成り立つときであり、またそのときに限ることを証明しています(定理 3.1)。1 つは、メッセージについての次の条件です。
ここで、 と はグラフの頂点の集合と辺の集合です。式 (7) は、頂点 が頂点 から受け取るメッセージと、 が から受け取るメッセージが、大きさが等しく符号が逆であることを表します。もう 1 つは、更新関数についての条件です。定理 3.1 の証明(原論文の付録 C.2)で、論文は、更新関数は恒等写像であり、したがって MPNN は次のように表されることを示しています。
ここで、 は MPNN で更新した後の 番目の頂点の信号です。つまり、更新は、頂点の信号に受け取ったメッセージの和を足すだけです。論文は、これらの条件を満たす GNN を局所保存型 GNN と呼び、その情報のやり取りのしかたが有限体積法の数値流束(重要点 2)に似ていると述べています。証明は、頂点ごとの連続な更新関数が保存則を満たすには線形でなければならない、という補題(補題 3.2)に基づいています。
多くのグラフニューラル PDE ソルバーは、エンコード–処理–デコード型の構成を使います。これは、入力の特徴をエンコーダーで高次元の空間に埋め込み、その空間でメッセージパッシングを行い、結果をデコーダーで出力の空間に変換する構成です。この構成について論文は、モデルが保存則を満たすのは、エンコーダーが線形で、デコーダーがエンコーダーの擬似逆(より正確には左逆)であるときであり、またそのときに限ることを示しています(定理 3.3)。まとめると、局所保存型 GNN では、非線形性をメッセージ関数だけに持たせ、更新関数には持たせません。
2. FluxGNN:有限体積法の定式化に基づく GNN の層
論文は、次の保存形の PDE を対象にしています。
ここで、 は時刻、 は未知のベクトル場、 は既知の作用素(非線形で、空間の微分演算子を含んでもよい)、 は既知の湧き出し項です。たとえば、移流拡散方程式や Navier–Stokes 方程式は、この形で書けます。有限体積法は、解析領域をセルに分け、式 (1) を次のように離散化します。
ここで、 は 番目のセルの体積、 と は 番目のセルの重心での と の値、 は 番目のセルに隣接するセルの集合、 は面 の面積(湧き出し項 とは別の量)、 は 番目のセルの外を向く面 の法線ベクトル、 は面 での の値で、数値流束と呼ばれます。、、 なので、2 つのセルが面を通してやり取りする量の和は 0 になり、面を通した のやり取りは の積分の総量を変えません。このように有限体積法は局所的な保存を満たし、すべてのセルで湧き出し項が 0 なら全体の保存則が成り立ちます。
論文は、式 (3) と、局所保存型 GNN の条件(重要点 1)に基づいて、次の GNN の層 を構成しています(図 1)。
ここで、グラフの頂点はメッシュのセルに対応し、 はすべての頂点の をまとめた頂点の信号、 は 番目の頂点での層の出力、 は面 の特徴(MPNN の辺の特徴に当たる)、 はニューラルネットワークで作る機械学習のモデルです。 は数値流束のためのメッセージ関数なので、論文はこれを流束関数と呼んでいます。

論文は、辺の信号が対称()なとき、式 (9) の層が局所保存型 GNN であるのは、流束関数が第 1 と第 2 の引数について置換不変、すなわち であるときであり、またそのときに限ることを証明しています(定理 3.4)。この条件を満たす式 (9) の形のモデルで、エンコーダーとデコーダーも定理 3.3 の条件を満たすものを、FluxGNN と呼びます。置換不変性は、置換不変な関数の必要十分なクラスを与える Deep Sets(Zaheer ら、2017)で実現できます。論文は、さらに次のように述べています。
- 式 (9) は有限体積法の空間の離散化(式 (3))を含むので、FluxGNN は、空間の情報の伝わり方について、少なくとも有限体積法と同じ表現力を持ちます。
- 面積 、体積 、法線ベクトル は幾何学的な量なので相似変換に対して同変であり、流束関数が相似変換に対して同変なら、FluxGNN も同変です。
- FluxGNN は有限体積法の自然な拡張です。深層学習のフレームワークで実装するので、本質的には、自動微分の機能を加えた純粋な有限体積法の枠組みを含んでいます。
3. 局所的な量で無次元化した、相似変換に対して同変な MLP
流束関数を相似変換に対して同変にするため、論文は、既存の E(n) 同変な層(並進、回転、鏡映に対して同変)と、スケール同変な層を組み合わせています。
ここで、 は相似変換に対して同変な層、 は頂点の特徴、 は多層パーセプトロン、 は ノルム、 は、入力の物理量を無次元化するため、空間の解像度 や時間の解像度 などの局所的な量から決める値です。モデルの局所性を保つため、既存の研究(Wang ら、2021)が使った最小値や最大値のような、全体にわたる演算は使いません。
論文は、この の選び方が、古典的な PDE ソルバーの中心的な概念と強く結び付いていると述べています。たとえば、入力の特徴が速度の次元を持つとき、層は次のようになります。
ここで、 は解析の安定性を特徴付けるクーラン数です。論文は、クーラン数が違う条件では数値的な安定性が違い、効率よく計算するには違う扱いが必要になりうるので、この形は自然であると考えています。拡散現象では、MLP への入力は、数値的な安定性に重要なもう一つの量である拡散数になります。流束関数は、これらの相似変換に対して同変な MLP を部品にして作ります。
4. 保存則を保ったまま、既存の機械学習の手法を取り込む
FluxGNN は多くの既存の手法と組み合わせられるように単純に設計されており、論文は、保存則を保ったままそれらを取り込む方法を示しています。
- テンポラルバンドリング(1 回の順伝播の計算で ステップを同時に予測する手法。Brandstetter ら、2022):エンコーダーとデコーダーは保存則の条件で制約されるので、論文はこの手法を変えています。エンコーダーとデコーダーの重み行列を 個の部分 に分けてそれぞれを適用し、処理した特徴を のように特徴の方向に連結します。擬似逆のデコーダーでデコードした後、時間方向の滑らかさのため、線形の 1 次元 CNN の層(たとえば )を適用します。ここで、 は学習するパラメータ、 は時刻 のデコーダーの出力です。保存則のためにこの演算を線形にする必要があるので、元の手法とは形が違います。
- ニューラル非線形ソルバー(Horie と Mitsume、2022):保存則と対称性を破らないので、変更なしで適用できます。全体にわたる演算を含みますが、その演算は MLP の外にあるので、モデルは局所保存型のままです。
- 境界エンコーダー(Horie と Mitsume、2022):エンコーダーであり、この定式化では線形なので、変更は要りません。
数値実験の結果
すべてのモデルは PyTorch 1.9.1 で実装されています。比較の基準として、論文は、FluxGNN の学習する関数をすべて恒等関数にした有限体積法のソルバーを用意し、実装の大部分を FluxGNN と共有させています。これにより、機械学習による改善が明確になります。この有限体積法の実装の精度は、複数の問題で確かめられています(原論文の付録 D.1)。
移流拡散方程式
中核となる FluxGNN のモデルの表現力を示すため、論文は、保存量の輸送の基本的なモデルである、保存されるスカラー場 の移流拡散方程式を使っています。
ここで、 は既知の速度場、 は既知の拡散係数です。
- データ:学習用 100、検証用 10、テスト用 10 の軌跡を、方程式の厳密解から作っています。一様な速度(0.0 から 0.2)と、正弦波の初期条件の振幅と位相を、ランダムに変えています。拡散係数は で、一般に拡散が支配的な問題より難しい、移流が支配的な問題に当たります。空間と時間の解像度は 、、解析領域の長さは 1 です。
- モデル:与えた初期条件と速度から時系列を自己回帰的に生成する、単純な FluxGNN です(図 2)。CPU(Intel Xeon CPU E5-2695 v2 @ 2.40 GHz)で、MSE の損失と Adam の最適化手法を使って、3 時間学習しています。

テストのデータセットでの結果は次のとおりです(原論文 Table 1。± は平均の標準誤差)。保存誤差は ()で定義されています。ここで、 は解析領域、 は時刻 の頂点の信号です。
| 手法 | MSE の損失() | 保存誤差() |
|---|---|---|
| FVM | 1408.47 ± 32.75 | 1.63 ± 0.19 |
| FluxGNN | 3.08 ± 0.08 | 1.75 ± 0.32 |

- FluxGNN は、同じ空間と時間の解像度で、有限体積法より精度が高くなりました。有限体積法は、低い空間の解像度による数値拡散のため、拡散が強くなる傾向があります(図 3)。
- FluxGNN は、有限体積法とほぼ同等の保存性を保っており、論文はこれを、モデルに組み込んだニューラルネットワークが保存則を壊していないことを示すものとしています。
- 論文は、この機械学習のモデルが優れた表現力を持ち、既存のデータを活用して古典的な手法より高い精度を得られると結論付けています。
混合流体の Navier–Stokes 方程式
実用的な適用性を評価するため、論文は、既存の手法を FluxGNN に取り込んで、より複雑な問題を解いています。この問題では、速度 、圧力 、密度 が複雑に相互作用します(ここでの は速度を表します)。
ここで、 は粘性係数、 は低密度の流体の体積分率で、 を満たします( と は低い密度と高い密度)。 は の拡散係数、 は重力加速度、 は重力の方向の高さ、 は重力のポテンシャルの影響を除いた圧力です。
- データ:学習用 200、検証用 8、テスト用 8 の軌跡で、さまざまな形状と初期条件を含み、広く使われている古典的な PDE ソルバーである OpenFOAM で作っています。形状は学習用 5、検証用 2、テスト用 2 で、それぞれの形状を特徴付ける寸法を変えています。初期条件は、ランダムな数値解析で作っています。課題は、空間と時間の解像度を下げた領域に投影した正解の軌跡を予測することです。時間刻みは 、最大の時刻は学習で 1.6、評価で 3.2 とし、時間方向の外挿の能力も評価しています。
- 追加のデータセット:テストのデータセットに回転と拡大縮小を施した、回転のデータセット(rotation)と拡大縮小のデータセット(scaling)です(それぞれ 8 本の軌跡)。さらに、汎化性能を調べるため、テストのサンプルより背の高い 3 つの形状のデータセット(taller)を作っています。
- モデル:相似変換に対して同変な MLP、テンポラルバンドリング、ニューラル非線形ソルバー、境界エンコーダーを取り込んだ、自己回帰的な FluxGNN です。入力は古典的な数値解析と同じもの(メッシュの形状、初期条件、境界条件、物性値)、出力は速度 、圧力 、体積分率 の時系列です。損失は、物理量ごとの RMSE を、損失の大きさをそろえるため標準偏差で重み付けしたものです。
- 比較の対象:不規則な領域と境界条件を扱える最先端の機械学習のモデルである MP-PDE(Brandstetter ら、2022)と PENN(Horie と Mitsume、2022)、および上の有限体積法の実装です。機械学習のモデルは、すべて GPU(NVIDIA A100 80GB PCIe)で 3 日間学習しています。

各評価データセットでの RMSE の損失と の保存誤差は次のとおりです(原論文 Table 2)。各指標は標準偏差で正規化されており、± は平均の標準誤差です。
| 手法 | データセット | の損失() | の損失() | の損失() | の保存誤差() |
|---|---|---|---|---|---|
| FVM | test | 19.501 ± 0.149 | 37.706 ± 0.194 | 2.896 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | test | 1.532 ± 0.010 | 0.941 ± 0.008 | 1.021 ± 0.010 | 1001.95 ± 120.43 |
| PENN | test | 0.619 ± 0.005 | 0.598 ± 0.005 | 0.358 ± 0.005 | 1356.62 ± 283.00 |
| FluxGNN | test | 1.202 ± 0.008 | 1.143 ± 0.008 | 0.349 ± 0.005 | 0.06 ± 0.03 |
| FVM | rotation | 18.363 ± 0.128 | 22.366 ± 0.123 | 2.930 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | rotation | 11.523 ± 0.075 | 10.883 ± 0.078 | 9.528 ± 0.072 | 5307.85 ± 1009.04 |
| PENN | rotation | 0.622 ± 0.004 | 0.592 ± 0.005 | 0.355 ± 0.005 | 1302.98 ± 153.02 |
| FluxGNN | rotation | 1.207 ± 0.007 | 1.175 ± 0.008 | 0.351 ± 0.005 | 0.01 ± 0.00 |
| FVM | scaling | 19.411 ± 0.149 | 38.106 ± 0.193 | 2.918 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | scaling | 5.072 ± 0.034 | 4.211 ± 0.040 | 5.604 ± 0.046 | 6401.93 ± 1806.50 |
| PENN | scaling | NaN ± NaN | NaN ± NaN | NaN ± NaN | NaN ± NaN |
| FluxGNN | scaling | 1.219 ± 0.009 | 1.228 ± 0.008 | 0.356 ± 0.005 | 0.05 ± 0.01 |
| FVM | taller | NaN ± NaN | NaN ± NaN | NaN ± NaN | NaN ± NaN |
| MP-PDE | taller | 8.377 ± 0.081 | 2.472 ± 0.024 | 2.823 ± 0.033 | 16770.80 ± 3293.59 |
| PENN | taller | 1.476 ± 0.016 | 1.887 ± 0.014 | 0.357 ± 0.006 | 4799.89 ± 1574.43 |
| FluxGNN | taller | 1.184 ± 0.009 | 0.966 ± 0.008 | 0.337 ± 0.006 | 0.02 ± 0.00 |
- すべての機械学習のモデルがテストのデータセットで良い性能を示しており、学習がうまくいったことを示しています。また、どのモデルも、学習で見たものより長い時系列を予測できます。
- FluxGNN は、既存の機械学習の手法の部品を取り込んでも高い保存性を保ちますが、他の機械学習のモデルは保ちません。論文は、保存則を満たすには特別な扱いが必要であることが浮き彫りになったと述べています。
- 回転のデータセットでは、PENN は E(n) 同変性によって良い性能を示し、MP-PDE は精度が下がり始めます。
- 拡大縮小のデータセットでは、PENN は発散します(表の NaN)。主な原因は、入力の値が大きく変わって外挿になることです。FluxGNN は拡大縮小の前後でほぼ同じ性能を示し、スケール同変性を示しています。わずかな違いは、自己回帰的な計算で蓄積した数値誤差によるものと論文は考えています。
- 背の高い形状のデータセットでは、拡大縮小が関係しないにもかかわらず、FluxGNN は良い性能を示しました。論文は、PENN が E(n) 同変性を持っていても性能が下がり、背の高いサンプルの上部に見かけの速度が現れる(図 4)ことから、汎化性能には保存則が不可欠であることが示唆されると述べています。有限体積法は、背の高い形状のデータセットでは、試したすべての設定で発散する傾向があり、収束しませんでした。論文はこれを、FluxGNN がニューラルネットワークの表現力を活かしていることを示すものとしています。
- これらの結果から、論文は、FluxGNN が古典的な PDE ソルバーと機械学習の手法を高い水準で組み合わせ、高い汎化性能と表現力を実現していると主張しています。
図 5 は、各機械学習のモデルのハイパーパラメータを変えて得た、速度と精度のトレードオフです。計算は、移流拡散方程式の例題と同じ CPU の 1 コアで行っています。

- テストのデータセットでは、どのモデルにも明確な優位性はありません。
- 背の高い形状のデータセットでは、FluxGNN は比較のモデルより明確に優位です。さらに、FluxGNN のパレートフロントは損失の方向にほとんど移動しておらず、論文はこれを、FluxGNN が精度を落とさずに空間の外挿に汎化することを意味するとしています。
論文は、さらに長い時間の予測も行っています。
- 論文は、FluxGNN の全体の損失が、 の後、数値的な不安定のため MP-PDE より高くなり始めると述べています(原論文 Fig. 6)。
- FluxGNN は高い保存性を保ちます(図 6)。不安定が目立つようになった後も、その保存誤差は他の機械学習の手法より桁違いに小さく、論文はこれが、FluxGNN がより長い時間の予測に使える可能性を示すとしています。
- 論文は、時系列の予測をより安定にする pushforward trick(Brandstetter ら、2022)を取り込んでおらず、これを取り込むことや、計算物理の分野で安定化に有効とされる流束制限関数と勾配制限関数を取り込むことで、この点を改善できる可能性があるとしています。

今後の展開
- 論文は、本研究は流れと輸送の現象に対応する PDE を対象にしましたが、局所保存型 GNN は汎用的な構造を持つので、最適輸送やグラフ上の交通流など、より広い問題に適用できると述べています。
- 論文は、よく最適化された古典的なソルバーとの性能の比較を行っておらず、これを本研究の限界としています。FluxGNN は実装の大部分を共有する有限体積法に対して明確な改善を示したので、よく最適化されたソルバーの上に FluxGNN を実装することが次の段階の一つであり、速度と精度を大きく改善できる可能性があるとしています。
- もう一つの限界は、長時間の予測で手法をより安定にする必要があることです。論文は、流束制限関数と勾配制限関数を取り込むことで改善できる可能性があると述べ、本研究の焦点は空間的な領域外への汎化に向けた信頼できる手法の構築であるため、これを今後の課題としています。
Overview
Machine learning for predicting physical phenomena described by partial differential equations (PDEs) has been actively studied, because it can speed up predictions by leveraging existing data. However, the variety of analysis domains and of the states within them makes it difficult to cover all scenarios with data-driven approaches alone. Moreover, machine learning models often violate physical laws such as conservation and symmetry, which raises concerns about their generalizability and reliability.
This paper proposes flux-passing graph neural networks (FluxGNNs), a machine learning model that rigorously satisfies conservation laws and is equivariant to similarity transformations (translation, rotation, reflection, and scaling). The model builds on graph neural networks (GNNs), which can handle arbitrary shapes, and on the parallels between GNNs and the finite volume method (FVM), a classical numerical analysis method that inherently respects conservation and symmetries. The paper mathematically derives the conditions under which typical GNNs conserve physical quantities on arbitrary graphs, and constructs FluxGNN on that basis. Existing machine learning techniques, such as temporal bundling, the neural nonlinear solver, and boundary encoders, can be incorporated with minimal or no modifications. In experiments on the convection–diffusion equation and the Navier–Stokes equations with a mixture, the paper reports that including physical laws significantly improves generalizability: FluxGNN shows no significant accuracy degradation for unseen spatial domains, whereas the other models degrade. The code is available at https://github.com/yellowshippo/fluxgnn-icml2024.
Key points
1. Conditions for GNNs to satisfy conservation laws: locally conservative GNNs
A typical GNN, the message passing neural network (MPNN), updates the signal on each vertex of a graph as follows.
Here, is the signal at the -th vertex, is the signal on the edge , is the set of vertices neighboring the -th vertex, is the message, is the updated signal, is the message function expressing the interaction between vertices, and is the update function describing the vertex-wise update. Both functions are neural networks.
For undirected graphs, the paper proves that an MPNN with continuous activation functions conserves the sum of the vertex signals for any graph and any vertex signal if and only if two conditions hold (Theorem 3.1). One is the following condition on the messages.
Here, and are the vertex set and the edge set of the graph. Equation (7) states that the message that vertex receives from vertex and the message that receives from have the same magnitude and opposite signs. The other is a condition on the update function. In the proof of Theorem 3.1 (Appendix C.2 of the paper), the paper shows that the update function is the identity, and thus the MPNN is expressed as follows.
Here, is the signal at the -th vertex after the update by the MPNN. In other words, the update only adds the sum of the received messages to the vertex signal. The paper calls GNNs that satisfy these conditions locally conservative GNNs, and notes that the way they exchange information resembles the numerical flux of the FVM (Key point 2). The proof rests on the lemma that a vertex-wise continuous update function must be linear to achieve conservation (Lemma 3.2).
Most graph neural PDE solvers use the encode-process-decode architecture, which embeds the input features into a higher-dimensional space with an encoder, performs message passing in that space, and converts the result into the output space with a decoder. For this architecture, the paper shows that the model is conservative if and only if the encoder is linear and the decoder is the pseudoinverse (more specifically, the left inverse) of the encoder (Theorem 3.3). In short, a locally conservative GNN confines its nonlinearity to the message function and does not use nonlinearity in the update function.
2. FluxGNN: a GNN layer built on the formulation of the finite volume method
The paper considers PDEs in the following conservation form.
Here, is time, is the unknown vector field, is a known operator that may be nonlinear and contain spatial differential operators, and is a known source term. The convection–diffusion equation and the Navier–Stokes equations, for example, can be written in this form. The FVM divides the analysis domain into cells and discretizes Eq. (1) as follows.
Here, is the volume of the -th cell, and are the values of and at the centroid of the -th cell, is the set of cells neighboring the -th cell, is the area of the face (a different quantity from the source term ), is the normal vector of the face pointing outside of the -th cell, and is the value of at the face , called the numerical flux. Because , , and , the amounts exchanged through a face by the two cells sum to zero, and exchanging through a face does not change its total integral. The FVM thus holds local conservation, and the global conservation law holds when the source term is zero in all cells.
Based on Eq. (3) and the conditions for locally conservative GNNs (Key point 1), the paper constructs the following GNN layer (Figure 1).
Here, the vertices of the graph correspond to the cells of the mesh, is the vertex signal that collects for all vertices, is the output of the layer at the -th vertex, is the feature at the face , corresponding to an edge feature in the MPNN, and is a machine learning model constructed with neural networks. Because is a message function for the numerical flux, the paper calls it a flux function.

The paper proves that, for a symmetric edge signal , the layer of Eq. (9) is a locally conservative GNN if and only if the flux function is permutation-invariant for its first and second arguments, that is, (Theorem 3.4). Models of the form of Eq. (9) that satisfy this condition, with encoders and decoders that also satisfy the condition of Theorem 3.3, are called FluxGNNs. The permutation invariance can be realized with deep sets (Zaheer et al., 2017), which offer the necessary and sufficient class of permutation-invariant functions. The paper also states the following.
- Because Eq. (9) contains the spatial discretization of the FVM (Eq. (3)), FluxGNN has at least the same expressive power as the FVM concerning information propagation in space.
- The area , the volume , and the normal vector are geometrical quantities and are therefore similarity-equivariant, so FluxGNN is similarity-equivariant when the flux function is.
- FluxGNN is a natural extension of the FVM. Thanks to its implementation in a deep learning framework, it essentially encompasses a pure FVM framework enhanced with automatic differentiation.
3. Similarity-equivariant MLPs made dimensionless with local quantities
To make the flux function similarity-equivariant, the paper combines the existing E(n)-equivariant layer (equivariant to translation, rotation, and reflection) with a scale-equivariant layer.
Here, is the similarity-equivariant layer, is the feature at a vertex, is a multilayer perceptron, is the -norm, and is determined from local quantities, such as the spatial resolution and the temporal resolution , to make the input physical quantities dimensionless. The paper avoids global operators, such as the min and max used in an existing study (Wang et al., 2021), to retain the locality of the model.
The paper states that this choice of has a strong connection with central concepts of classical PDE solvers. For example, when the input feature has the dimension of velocity, the layer becomes the following.
Here, is the Courant number, which characterizes the stability of the simulation. The paper considers this formulation natural, because a condition with a different Courant number can require a different treatment for efficient computation owing to its different numerical stability. For diffusion phenomena, the input to the MLP becomes the diffusion number, another essential quantity for numerical stability. The flux functions are constructed with these similarity-equivariant MLPs as building blocks.
4. Incorporating existing machine learning methods while keeping conservation
FluxGNN is designed to be simple enough to be compatible with many existing methods, and the paper shows how to incorporate them while maintaining conservation.
- Temporal bundling (predicting time steps simultaneously with a single forward computation; Brandstetter et al., 2022): because the encoder and decoder are constrained by the conditions for conservation, the paper modifies this method. The weight matrices of the encoder and decoder are divided into segments , each applied separately, and the processed features are concatenated in the feature direction as . After decoding with the pseudoinverse decoder, linear 1D-CNN layers, for example , are applied to facilitate temporal smoothness. Here, is a trainable parameter and is the output of the decoders at time . This form differs from the original method because the operation needs to be linear for conservation.
- Neural nonlinear solver (Horie and Mitsume, 2022): it can be applied without modification because it does not break conservation laws and symmetries. Although it contains global operations, the model remains locally conservative because these operations exist outside of the MLPs.
- Boundary encoders (Horie and Mitsume, 2022): they need no modification because they are encoders, which are linear in this formulation.
Numerical results
All models are implemented with PyTorch 1.9.1. As a baseline, the paper prepares an FVM solver obtained by making all trainable functions of FluxGNN identity functions, so that most of the implementation is shared between the solver and FluxGNN. This setup highlights the improvement brought by machine learning. The accuracy of this FVM implementation was verified on multiple problems (Appendix D.1 of the paper).
Convection–diffusion equation
To demonstrate the expressive capability of the core FluxGNN model, the paper uses the convection–diffusion equation for a conservative scalar field , a fundamental model for the transport of conservative quantities.
Here, is a known velocity field and is a known diffusion coefficient.
- Data: 100 trajectories for training, 10 for validation, and 10 for testing, derived from the exact solution of the equation with random variations in the uniform velocity (from 0.0 to 0.2) and in the amplitude and phase of the sinusoidal initial condition. The diffusion coefficient is , corresponding to a convection-dominant problem, which is generally more challenging than a diffusive one. The spatial and temporal resolutions are and , and the analysis domain is one unit long.
- Model: a straightforward FluxGNN that autoregressively generates a time series from the given initial condition and velocity (Figure 2). It was trained on a CPU (Intel Xeon CPU E5-2695 v2 @ 2.40 GHz) for 3 hours with the MSE loss and the Adam optimizer.

The results on the test dataset are as follows (Table 1 of the original paper; ± is the standard error of the mean). The conservation error is defined as with , where is the analysis domain and is the vertex signal at time .
| Method | MSE loss () | Conservation error () |
|---|---|---|
| FVM | 1408.47 ± 32.75 | 1.63 ± 0.19 |
| FluxGNN | 3.08 ± 0.08 | 1.75 ± 0.32 |

- FluxGNN is more accurate than the FVM at the same spatiotemporal resolution. The FVM tends to be more diffusive because of the numerical diffusion caused by the low spatial resolution (Figure 3).
- FluxGNN maintains a conservation property almost equivalent to that of the FVM, which the paper takes as an indication that the neural networks in the model do not disrupt the conservation law.
- The paper concludes that the machine learning model has superior expressive power and can leverage existing data to achieve higher accuracy than the classical method.
Navier–Stokes equations with a mixture
To evaluate practical applicability, the paper tests a more complex problem with existing methods incorporated into FluxGNN. The problem involves intricate interactions among the velocity , the pressure , and the density (here, denotes the velocity).
Here, is the dynamic viscosity, is the volume fraction of the low-density fluid, which satisfies ( and are the low and high densities), is the diffusion coefficient for , is the gravitational acceleration, is the height in the direction of gravity, and is the pressure without the effect of the gravitational potential.
- Data: 200 trajectories for training, 8 for validation, and 8 for testing, which cover various shapes and initial conditions and were generated with OpenFOAM, a widely recognized classical PDE solver. Five shapes were used for training, two for validation, and two for testing, with variations in the dimensions characterizing each shape, and the initial conditions were created by random numerical analysis. The task is to predict the ground truth trajectories projected onto domains with lower spatiotemporal resolution. The time step is , and the maximum time is 1.6 for training and 3.2 for evaluation, so that the ability for temporal extrapolation is also assessed.
- Additional datasets: a rotation dataset and a scaling dataset (eight trajectories each), created by applying rotation and scaling to the test dataset. In addition, a taller dataset of three shapes taller than the test samples was generated to test generalizability.
- Model: an autoregressive FluxGNN that incorporates similarity-equivariant MLPs, temporal bundling, neural nonlinear solvers, and boundary encoders. The inputs are aligned with those of classical numerical analysis (mesh geometry, initial conditions, boundary conditions, and material properties), and the outputs are time series of the velocity , the pressure , and the volume fraction . The loss is the RMSE of each physical quantity, weighted by its standard deviation to balance the loss magnitudes.
- Comparison: MP-PDE (Brandstetter et al., 2022) and PENN (Horie and Mitsume, 2022), state-of-the-art machine learning models that accommodate irregular domains and boundary conditions, and the FVM implementation described above. All machine learning models were trained on GPUs (NVIDIA A100 80GB PCIe) for three days.

The RMSE loss and the conservation error of on each evaluation dataset are as follows (Table 2 of the original paper). Each metric is normalized using the standard deviation, and ± is the standard error of the mean.
| Method | Dataset | Loss () | Loss () | Loss () | Conservation error () |
|---|---|---|---|---|---|
| FVM | test | 19.501 ± 0.149 | 37.706 ± 0.194 | 2.896 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | test | 1.532 ± 0.010 | 0.941 ± 0.008 | 1.021 ± 0.010 | 1001.95 ± 120.43 |
| PENN | test | 0.619 ± 0.005 | 0.598 ± 0.005 | 0.358 ± 0.005 | 1356.62 ± 283.00 |
| FluxGNN | test | 1.202 ± 0.008 | 1.143 ± 0.008 | 0.349 ± 0.005 | 0.06 ± 0.03 |
| FVM | rotation | 18.363 ± 0.128 | 22.366 ± 0.123 | 2.930 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | rotation | 11.523 ± 0.075 | 10.883 ± 0.078 | 9.528 ± 0.072 | 5307.85 ± 1009.04 |
| PENN | rotation | 0.622 ± 0.004 | 0.592 ± 0.005 | 0.355 ± 0.005 | 1302.98 ± 153.02 |
| FluxGNN | rotation | 1.207 ± 0.007 | 1.175 ± 0.008 | 0.351 ± 0.005 | 0.01 ± 0.00 |
| FVM | scaling | 19.411 ± 0.149 | 38.106 ± 0.193 | 2.918 ± 0.030 | 0.01 ± 0.00 |
| MP-PDE | scaling | 5.072 ± 0.034 | 4.211 ± 0.040 | 5.604 ± 0.046 | 6401.93 ± 1806.50 |
| PENN | scaling | NaN ± NaN | NaN ± NaN | NaN ± NaN | NaN ± NaN |
| FluxGNN | scaling | 1.219 ± 0.009 | 1.228 ± 0.008 | 0.356 ± 0.005 | 0.05 ± 0.01 |
| FVM | taller | NaN ± NaN | NaN ± NaN | NaN ± NaN | NaN ± NaN |
| MP-PDE | taller | 8.377 ± 0.081 | 2.472 ± 0.024 | 2.823 ± 0.033 | 16770.80 ± 3293.59 |
| PENN | taller | 1.476 ± 0.016 | 1.887 ± 0.014 | 0.357 ± 0.006 | 4799.89 ± 1574.43 |
| FluxGNN | taller | 1.184 ± 0.009 | 0.966 ± 0.008 | 0.337 ± 0.006 | 0.02 ± 0.00 |
- All machine learning models perform well on the test dataset, indicating successful training, and all of them can predict time series longer than those observed during training.
- FluxGNN keeps a high level of conservation even when it incorporates components from existing machine learning methods, whereas the other machine learning models do not. The paper states that this highlights the need for special treatment to adhere to conservation laws.
- On the rotation dataset, PENN performs well owing to its E(n)-equivariance, whereas MP-PDE begins to degrade.
- On the scaling dataset, PENN shows divergent behavior (NaN in the table), mainly because the significant changes in the input values lead to extrapolation. FluxGNN performs nearly identically before and after scaling, showing its scale equivariance. The paper attributes the slight variation to numerical errors accumulated during the autoregressive computation.
- On the taller dataset, FluxGNN performs well even though scaling is not involved. The paper states that this implies that conservation is essential for generalizability, because PENN degrades even with E(n)-equivariance and shows a spurious emergence of velocity at the top of the taller sample (Figure 4). The FVM tends to diverge and never reaches convergence on the taller dataset in any of the tested settings, which the paper takes as showing that FluxGNN leverages the expressive power of neural networks.
- From these results, the paper claims that FluxGNN combines the methods of classical PDE solvers and machine learning at a high level, realizing high generalizability and expressibility.
Figure 5 shows the speed–accuracy tradeoff obtained by varying the hyperparameters of each machine learning model, computed on one core of the same CPU as in the convection–diffusion example.

- On the test dataset, none of the models has a clear advantage.
- On the taller dataset, FluxGNN has a clear advantage over the baseline models. Moreover, the Pareto front of FluxGNN does not shift significantly in the direction of the loss, which the paper states means that FluxGNN generalizes for spatial extrapolation without losing accuracy.
The paper also performs predictions for an even longer temporal rollout.
- The paper states that the total loss of FluxGNN starts to become higher than that of MP-PDE after , owing to numerical instability (Fig. 6 of the original paper).
- FluxGNN maintains a high level of conservation (Figure 6). Even after the instability becomes evident, its conservation error is lower than those of the other machine learning methods by orders of magnitude, which the paper states implies the potential of FluxGNN for a more extended temporal rollout.
- The paper did not include the pushforward trick (Brandstetter et al., 2022), which realizes more stable time-series prediction, and suggests that incorporating it, or flux and slope limiters known as effective methods for stability in computational physics, may address this point.

Outlook
- The paper states that, although this study focused on PDEs corresponding to flow and transport phenomena, the locally conservative GNNs have a generic structure and can be applied to a broader class of problems, such as optimal transport and traffic flow on graphs.
- The paper did not analyze performance in comparison with well-optimized classical solvers, which it notes as a limitation of the work. Because FluxGNN showed a clear improvement over the FVM that shares most of its implementation, one possible next step is to implement FluxGNN on top of well-optimized solvers, which may drastically improve speed and accuracy.
- Another limitation is that the method needs to be more stable for long-term prediction. The paper states that this may be addressed by incorporating flux and slope limiters, and leaves it as future work because the focus of this work is to construct a reliable method toward spatially out-of-domain generalization.