Publications

Back to Peer-reviewed conference papers

Isometric Transformation Invariant and Equivariant Graph Convolutional Networks

Authors
M. Horie†, N. Morita, T. Hishinuma, Y. Ihara, N. Mitsume
Published in
International Conference on Learning Representations (ICLR)
Year
2021
Type
Peer-reviewed conference papers
Link
https://openreview.net/forum?id=FX0vR39SJ5q
arXiv
https://arxiv.org/abs/2005.06316
Topics
Finite element method Large-scale parallel computing Machine learning and data science Structural and solid mechanics
Keywords
Isometric transformation invariance and equivariance Graph convolutional network Isometric transformation Graph neural network Invariance and equivariance Physical simulation Machine learning IsoGCN Isometric adjacency matrix Computational efficiency
Note
採択率 28.7%
グラフィカルアブストラクト
グラフィカルアブストラクト

概要

物体の検出、構造化学の解析、物理シミュレーションなど、多くの分野で、ユークリッド空間に埋め込まれたグラフの構造を持つデータが使われており、こうしたデータを扱うためにグラフニューラルネットワーク(GNN)が導入されてきました。GNN では頂点の置換に対する不変性と同変性が重要ですが、ユークリッド空間の物体の多くの性質は並進や回転で変わらないので、ユークリッド空間のグラフでは、等長変換に対する不変性と同変性も扱う必要があります。物理量と物理法則はすべて等長変換に対して不変か同変なので、物理シミュレーションへの応用では、これは特に欠かせません。また、物理シミュレーションの学習の主な目的は、計算コストの大きいシミュレーションを速い機械学習のモデルで置き換えることなので、計算の効率も求められます。

本論文は、グラフ畳み込みネットワーク(GCN)に基づく、等長変換に対して不変・同変なモデルの一群 IsoGCN を提案しています。隣接行列の定義を変えるだけで等長変換に対する不変性を実現でき、グラフに基づくので、メッシュや点群で表される複雑な形状を扱えます。また、IsoGCN の層の特定の形は、物理法則を記述するのに欠かせない空間の微分演算子とみなせます。論文は、幾何と物理シミュレーションのデータに関する課題で、IsoGCN が最先端の手法と比べて遜色ない性能を示し、100 万頂点のグラフまで拡張でき、従来の有限要素解析より速く推論できると報告しています。既存の同変なモデルでは、これは実現できなかったとしています。実装とデータセットは https://github.com/yellowshippo/isogcn-iclr2021 で公開されています。

重要点

1. テンソル場と、等長隣接行列(IsoAM)

論文は、グラフ G=(V,E)\mathcal{G} = (\mathcal{V}, \mathcal{E})(V\mathcal{V} は頂点の集合、E\mathcal{E} は辺の集合)が dd 次元のユークリッド空間に埋め込まれている場合を扱います。属性は辺ではなく頂点だけにあり、グラフは自己ループを持たないと仮定しています。頂点の上の量は、幾何学的なテンソルとして、pp 階のテンソル場 H(p)∈R∣V∣×f×dp\mathsf{H}^{(p)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d^p} で表します。ここで、∣V∣|\mathcal{V}| は頂点の数、ff は特徴(チャンネル)の数です(図 1 (a))。成分を Hi;g;k1k2…kp(p)\mathsf{H}^{(p)}_{i;g;k_1 k_2 \ldots k_p} と書き、ii は頂点の番号(頂点の並べ替えで入れ替わる)、gg は特徴の番号、k1,…,kpk_1, \ldots, k_p は空間の成分の番号(直交変換で変換される)です。0 階はスカラー場、1 階はベクトル場に当たります。

IsoGCN の中心は、等長隣接行列(isometric adjacency matrix、IsoAM)G∈R∣V∣×∣V∣×d\mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d} で、次のように定義されます。

Gij;;::=∑k,l∈V,k≠lTijkl(xk−xl)(4)\mathsf{G}_{ij;;:} := \sum_{k, l \in \mathcal{V}, k \neq l} \boldsymbol{T}_{ijkl} (\boldsymbol{x}_k - \boldsymbol{x}_l) \tag{4}

ここで、和の kk と ll は頂点の番号、Gij;;:∈Rd\mathsf{G}_{ij;;:} \in \mathbb{R}^d は、ii 番目と jj 番目の頂点の組について G\mathsf{G} を空間の添字の方向に切り出したもの、xi∈Rd\boldsymbol{x}_i \in \mathbb{R}^d は ii 番目の頂点の位置、Tijkl∈Rd×d\boldsymbol{T}_{ijkl} \in \mathbb{R}^{d \times d} は、学習しない、並進に対して不変で直交変換に対して同変な 2 階のテンソルです。G\mathsf{G} の成分は、テンソル場の記法に合わせて Gij;;k\mathsf{G}_{ij;;k} と書きます。この kk は空間の成分の番号で、式 (4) の和の kk とは別の意味です(論文は同じ文字を両方の意味で使っています)。IsoAM の特徴の数は常に 1 なので、特徴の番号の欄は空けてあります。

IsoAM は、方向ごとの重み付きの隣接行列とみなせ、空間の情報を反映します。通常の重み付きの隣接行列は、グラフに 1 つしかないので、空間の情報を反映できません。最も簡単な例は Tijkl=δilδjkAijI\boldsymbol{T}_{ijkl} = \delta_{il} \delta_{jk} A_{ij} \boldsymbol{I} で、このとき Gij;;:=Aij(xj−xi)\mathsf{G}_{ij;;:} = A_{ij} (\boldsymbol{x}_j - \boldsymbol{x}_i) になります(図 1 (b))。ここで、δij\delta_{ij} はクロネッカーのデルタ、AijA_{ij} はグラフの隣接行列 A\boldsymbol{A} の成分、I\boldsymbol{I} は単位行列です。G\mathsf{G} は学習しないパラメータだけでできているので、学習の前に決められます。

テンソル場と IsoAM の模式図
図 1 (a) 特徴の数が 2 の 1 階のテンソル場 H(1)\mathsf{H}^{(1)}(頂点 ii の 2 つの特徴が Hi;1;:(1)\mathsf{H}^{(1)}_{i;1;:} と Hi;2;:(1)\mathsf{H}^{(1)}_{i;2;:})と、(b) 最も簡単な IsoAM Gij;;:=Aij(xj−xi)\mathsf{G}_{ij;;:} = A_{ij}(\boldsymbol{x}_j - \boldsymbol{x}_i) の模式図。出典:原論文 Fig. 1。

論文は、IsoAM が並進に対して不変で、直交変換に対して同変であることを示しています(命題 3.1。証明は原論文の付録 B)。すなわち、任意の等長変換 T:x↦Ux+tT : \boldsymbol{x} \mapsto \boldsymbol{U} \boldsymbol{x} + \boldsymbol{t}(U∈O(d)\boldsymbol{U} \in \mathrm{O}(d) は直交行列、t\boldsymbol{t} は並進のベクトル)について、次が成り立ちます。

T:Gij;;k↦∑lUklGij;;l(5)T : \mathsf{G}_{ij;;k} \mapsto \sum_{l} U_{kl} \mathsf{G}_{ij;;l} \tag{5}

ここで、UklU_{kl} は U\boldsymbol{U} の成分で、kk と ll は空間の成分の番号です(式 (4) の和の kk、ll とは別の意味です)。

2. IsoAM の演算で作る、不変・同変な層

論文は、IsoAM とテンソル場の間に、次の演算を定めています。まず、IsoAM と 0 階のテンソル場の畳み込み G∗H(0)∈R∣V∣×f×d\mathsf{G} * \mathsf{H}^{(0)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d} は、0 階のテンソル場から 1 階のテンソル場を作ります。

(G∗H(0))i;g;k:=∑jGij;;kHj;g;(0)(6)(\mathsf{G} * \mathsf{H}^{(0)})_{i;g;k} := \sum_{j} \mathsf{G}_{ij;;k} \mathsf{H}^{(0)}_{j;g;} \tag{6}

次に、縮約は空間の成分について和をとる演算で、IsoAM と 1 階のテンソル場の縮約 G\mathsf{G} ⊙ H(1)∈R∣V∣×f\mathsf{H}^{(1)} \in \mathbb{R}^{|\mathcal{V}| \times f} は、0 階のテンソル場を作ります。IsoAM どうしの縮約 G\mathsf{G} ⊙ G∈R∣V∣×∣V∣\mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}|} は、IsoAM の成分ごとの内積と解釈でき、等長変換に対して不変です(命題 3.2。縮約の定義は原論文の式 (7))。最後に、テンソル積は階数を上げる演算です。

(G⊗H(p))i;g;km1m2…mp:=∑jGij;;kHj;g;m1m2…mp(p)(8)(\mathsf{G} \otimes \mathsf{H}^{(p)})_{i;g;k m_1 m_2 \ldots m_p} := \sum_{j} \mathsf{G}_{ij;;k} \mathsf{H}^{(p)}_{j;g;m_1 m_2 \ldots m_p} \tag{8} (G⊗G)il;;k1k2:=∑jGij;;k1Gjl;;k2(9)(\mathsf{G} \otimes \mathsf{G})_{il;;k_1 k_2} := \sum_{j} \mathsf{G}_{ij;;k_1} \mathsf{G}_{jl;;k_2} \tag{9}

ここで、m1,…,mpm_1, \ldots, m_p、k1k_1、k2k_2 も空間の成分の番号で、G⊗H(p)∈R∣V∣×f×d1+p\mathsf{G} \otimes \mathsf{H}^{(p)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d^{1+p}}、G⊗G∈R∣V∣×∣V∣×d2\mathsf{G} \otimes \mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d^2} です。IsoAM どうしのテンソル積 G⊗G\mathsf{G} \otimes \mathsf{G} は、2 階のテンソルとして等長変換に対して同変です(命題 3.3)。論文は、IsoAM のテンソル積を繰り返したもの(IsoAM の pp 乗)を使って、これらの演算をより高い階数に一般化しています。これらの演算で、任意の階数のテンソル場を入力し、入力と違ってもよい任意の階数のテンソル場を出力する IsoGCN の層を作れます。論文は、これらの層が頂点の並べ替えに対しても同変であるとしています。

GCN(Kipf と Welling、2017)は、GNN を大きく簡単にしたもので、線形のメッセージパッシングを使い、その層は次のように表されます。

Hout=σ(A^HinW)(1)\boldsymbol{H}_{\mathrm{out}} = \sigma(\hat{\boldsymbol{A}} \boldsymbol{H}_{\mathrm{in}} \boldsymbol{W}) \tag{1}

ここで、Hin\boldsymbol{H}_{\mathrm{in}} と Hout\boldsymbol{H}_{\mathrm{out}} はその層の入力と出力の特徴、A^\hat{\boldsymbol{A}} は自己ループを加えて正規化し直した隣接行列、W\boldsymbol{W} は学習する重み、σ\sigma は活性化関数です。IsoAM どうしの縮約は等長変換に対して不変なので、0 階のテンソル場を入力とする、等長変換に対して不変な層は、Hout(0)=σ(LHin(0)W)\boldsymbol{H}^{(0)}_{\mathrm{out}} = \sigma(\boldsymbol{L} \boldsymbol{H}^{(0)}_{\mathrm{in}} \boldsymbol{W}) と書けます(原論文の第 3.2.1 節)。ここで、L∈R∣V∣×∣V∣\boldsymbol{L} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}|} は IsoAM どうしの縮約(G\mathsf{G} ⊙ G\mathsf{G})、Hin(0)\boldsymbol{H}^{(0)}_{\mathrm{in}} と Hout(0)\boldsymbol{H}^{(0)}_{\mathrm{out}} は入力と出力の 0 階のテンソル場、W∈Rfin×fout\boldsymbol{W} \in \mathbb{R}^{f_{\mathrm{in}} \times f_{\mathrm{out}}} は学習するパラメータの行列(finf_{\mathrm{in}} と foutf_{\mathrm{out}} は入力と出力の特徴の数)です。これは、式 (1) の GCN の A^\hat{\boldsymbol{A}} を L\boldsymbol{L} に置き換えた形です。1 階のテンソル場を入力とする場合はベクトルの内積を使うことになり、論文は、これが頂点の組ごとの相対的な距離と角度を取り出す演算に当たるとしています。

入力と出力の階数がどちらも 0 より大きい層について、論文は、等長変換は非線形の活性化関数やバイアスの加算と一般に可換でないので、これらを適用すると等長性が不適切に歪むと述べています。一方、線形変換、畳み込み、テンソル積だけの変換は非線形性を持たないので、モデルの予測の性能が限られます。そこで論文は、入力のテンソルを一度 0 階のテンソルに変換して非線形の活性化関数を適用し、それを、IsoAM の畳み込みやテンソル積で得た高い階数のテンソルに掛けることで、非線形性を持つ同変な層を作っています(原論文の式 (12)〜(14))。論文は、この層は TFN(Thomas ら、2018)の層と似ているが、球面調和関数と、学習するメッセージパッシングを持たないと述べています。厳密には、この層の出力は並進に対して不変です。変形後の頂点の位置のように並進に対して同変な量を出力するには、グラフごとに参照の位置を決め、並進に対して不変な出力を計算した後に、参照の位置を加えます。

3. メッシュのための IsoAM と、微分演算子との対応

論文は、IsoGCN をメッシュのデータに使うため、IsoAM の具体例 D~\tilde{\mathsf{D}} を定めています。メッシュの点をグラフの頂点とみなし、同じセルを共有する 2 つの頂点はつながっているとみなします。

D~ij;;k=Dij;;k−δij∑lDil;;k(15)\tilde{\mathsf{D}}_{ij;;k} = \mathsf{D}_{ij;;k} - \delta_{ij} \sum_{l} \mathsf{D}_{il;;k} \tag{15} Dij;;:=Mi−1xj−xi∥xj−xi∥2wijAij(m)(16)\mathsf{D}_{ij;;:} = \boldsymbol{M}_i^{-1} \frac{\boldsymbol{x}_j - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_j - \boldsymbol{x}_i \rVert^2} w_{ij} A_{ij}(m) \tag{16} Mi=∑lxl−xi∥xl−xi∥⊗xl−xi∥xl−xi∥wilAil(m)(17)\boldsymbol{M}_i = \sum_{l} \frac{\boldsymbol{x}_l - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_l - \boldsymbol{x}_i \rVert} \otimes \frac{\boldsymbol{x}_l - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_l - \boldsymbol{x}_i \rVert} w_{il} A_{il}(m) \tag{17}

ここで、D~,D∈R∣V∣×∣V∣×d\tilde{\mathsf{D}}, \mathsf{D} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d}、Mi\boldsymbol{M}_i は式 (17) で定める行列、∥⋅∥\lVert \cdot \rVert はノルム、⊗\otimes はテンソル積、wij∈Rw_{ij} \in \mathbb{R} は ii 番目と jj 番目の頂点の間の学習しない重みで、課題に応じて決めます。A(m):=min⁡(∑k=1mAk,1)\boldsymbol{A}(m) := \min(\sum_{k=1}^{m} \boldsymbol{A}^k, 1) は mm ホップまでの隣接行列(Aij(m)A_{ij}(m) はその成分、mm は考慮するホップの数)で、この定義の kk は行列の累乗の回数です。式 (15) の kk は空間の成分の番号、式 (15) と式 (17) の ll は頂点の番号です。論文は、{xl−xi}l\{\boldsymbol{x}_l - \boldsymbol{x}_i\}_l の中の独立なベクトルの数が空間の次元 dd 以上なら Mi\boldsymbol{M}_i は正則で、3 次元のユークリッド空間の立体のメッシュのような一般的なメッシュでは、これが成り立つとしています。

式 (4) で Tijkl=δilδjkMi−1wijAij(m)/∥xj−xi∥2\boldsymbol{T}_{ijkl} = \delta_{il} \delta_{jk} \boldsymbol{M}_i^{-1} w_{ij} A_{ij}(m) / \lVert \boldsymbol{x}_j - \boldsymbol{x}_i \rVert^2 とみなすと、D\mathsf{D} は IsoAM の条件を満たし、IsoAM の線形結合も IsoAM なので、D~\tilde{\mathsf{D}} も IsoAM です。したがって、どちらも並進に対する不変性と直交変換に対する同変性を持ちます。D~\tilde{\mathsf{D}} はメッシュの形状の情報だけから求められるので、前処理で計算できます。

論文は、D~\tilde{\mathsf{D}} を、物理シミュレーションで使われる勾配の演算子のモデル(Tamai と Koshizuka、2014、Swartz と Wendroff、1969)に対応するように設計しています。原論文の付録 C は、least squares moving particle semi-implicit method(Tamai と Koshizuka、2014)の勾配のモデルに基づく偏微分のモデルを使って、D~\tilde{\mathsf{D}} を使った表現が、勾配、発散、ラプラシアン、ヤコビアン、ヘッシアンのモデルに当たることを示しています(図 2)。たとえば、D~\tilde{\mathsf{D}} と 0 階のテンソル場の畳み込みは (D~∗H(0))i;g;k=∑jDij;;k(Hj;g;(0)−Hi;g;(0))(\tilde{\mathsf{D}} * \mathsf{H}^{(0)})_{i;g;k} = \sum_j \mathsf{D}_{ij;;k} (\mathsf{H}^{(0)}_{j;g;} - \mathsf{H}^{(0)}_{i;g;}) となり、各頂点での勾配のモデルに一致します(原論文の付録 C.1 の式 (29)、(30))。このため論文は、この IsoAM が、微分方程式を学習できるニューラルネットワークのモデルを作るうえで本質的な役割を果たすとしています。

微分演算子と IsoAM を使った表現の対応
図 2 微分演算子(左の列)と、IsoAM D~\tilde{\mathsf{D}} を使った表現(右の列)の対応。上から、勾配、発散、ラプラシアン、ヤコビアン、ヘッシアンです。∗* は畳み込み、⊙ は縮約、⊗\otimes はテンソル積です。出典:原論文 Table 1。

4. 計算の効率:球面調和関数と非線形のメッセージパッシングを使わない

論文は、点群に対して回転と並進に同変な既存のモデルである TFN(Thomas ら、2018)と、その変種で自己注意機構を持つ SE(3)-Transformer(Fuchs ら、2020)は、球面調和関数と、非線形のニューラルネットワークによるメッセージパッシングによって高い表現力を得る一方、そのために大きな計算資源を必要とすると述べています。IsoGCN は、球面調和関数と非線形のメッセージパッシングを使わないので、計算コストを大きく減らせ、TFN を簡単にしたものともみなせるとしています。また、3 次元の steerable CNN(Weiler ら、2018)のようにボクセル(規則的な格子)を使う方法は、物体の占める部分と占めない部分の両方を表すので効率がよくなく、ボクセル化した物体は形状の滑らかさを失いやすいので、物理シミュレーションでの振る舞いが大きく変わりうるとしています。

実装では、通常のメッシュでは隣接行列 A\boldsymbol{A} は疎行列で、十分に小さな mm では A(m)\boldsymbol{A}(m) も疎行列なので、IsoGCN の計算に疎行列の積を使えます。論文は、これが IsoGCN の計算が速い主な理由の一つであるとしています(原論文の付録 D.4)。たとえば、IsoAM を kk 回テンソル積したものと 0 階のテンソル場の畳み込みを、IsoAM のテンソル積を順に繰り返して計算すると、計算量は O(n∣V∣fdk)O(n |\mathcal{V}| f d^k)(nn は A(m)\boldsymbol{A}(m) の非零の要素の数、kk はテンソル積の回数)です。これは dd について指数的ですが、論文は、dd と kk は通常小さい(典型的には d=3d = 3、k≤4k \leq 4)ので、現実的な空間の次元とテンソルの階数で、速く、メモリを効率よく使って計算できるとしています。

数値実験の結果

論文は、提案モデルの適用性を確かめるため、格子メッシュの微分演算子のデータセットと、CAD のデータから作ったメッシュの異方性の非線形熱伝導方程式のデータセットの 2 つで実験しています。

  • モデル:重要点 3 の D~\tilde{\mathsf{D}} を使い、エンコード–処理–デコード型の構成(Battaglia ら、2018)を採っています。エンコーダーとデコーダーは、成分ごとの MLP とテンソルの演算でできています。考慮するホップの数の影響を調べるため、式 (16) の mm は 2 と 5 を試しています。
  • 比較の対象:GCN の変種として、GCN、GIN(Xu ら、2018)、SGCN(Wu ら、2019)、Cluster-GCN(Chiang ら、2019)、GCNII(Chen ら、2020)を、同変なモデルとして、TFN と SE(3)-Transformer を選んでいます。
  • 実装と学習:PyTorch 1.6.0 と PyTorch Geometric 1.6.1 で実装しています。TFN と SE(3)-Transformer には、TFN の計算が元の実装よりかなり速い Fuchs ら(2020)の実装を使っています。どの実験でも、Adam で平均二乗誤差の損失を最小化しています。

微分演算子のデータセット

IsoGCN の表現力を示すため、論文は、微分演算子を学習するデータセットを作っています。

  • データ:Z の方向に 1 つ、X と Y の方向に 10〜100 個のセルを持つ擬似 2 次元の格子メッシュをランダムに作り、その上にスカラー場を作って、勾配、ラプラシアン、ヘッシアンの場を解析的に計算しています。学習用、検証用、テスト用に、それぞれ 100 サンプルを作っています。簡単のため、式 (16) の重みは、すべての辺で wij=1w_{ij} = 1 としています。
  • 課題:(1) スカラー場から勾配の場を予測する(0 階 → 1 階のテンソル)、(2) スカラー場からヘッシアンの場を予測する(0 階 → 2 階)、(3) 勾配の場からラプラシアンの場を予測する(1 階 → 0 階)、(4) 勾配の場からヘッシアンの場を予測する(1 階 → 2 階)の 4 つです。
  • 比較の条件:GCN とその変種は、公平に比べるため、IsoGCN の層をそれぞれの層に置き換え、ホップの数 mm を同じにしています。同変なモデルは、パラメータの数が IsoGCN のモデルとほぼ同じになるように、ハイパーパラメータを調整しています。

図 3 と下の表(原論文 Table 2)は、予測の可視化と、予測の性能の比較です。

勾配の場と誤差のベクトルの比較
図 3 テストのデータの 1 つのサンプルの、勾配の場(上)と、予測と正解の誤差のベクトル(下)。上の段は左から正解、Cluster-GCN、SE(3)-Transformer、IsoGCN の予測で、下の段はそれぞれの誤差です。誤差のベクトルは、見やすくするために 2 倍に誇張しています。出典:原論文 Fig. 2。

テストのデータセットでの平均二乗誤差の損失は、次のとおりです(原論文 Table 2。元のスケールでの値で、± は平均の標準誤差)。列の「0 → 1」などは、上の課題の (1)〜(4) です。「位置 x\boldsymbol{x}」が「あり」の行は、頂点の位置 x\boldsymbol{x} も入力の特徴に加えたモデルです。「ホップの数」の列は、考慮するホップの数 mm です。同変なモデル以外は、手法ごとに最も良い設定だけを示しています(全体は原論文の付録 Table 6)。OOM は、使った GPU(32 GiB)のメモリ不足を表します。

手法 ホップの数 位置 x\boldsymbol{x} 0 → 1(×10−5\times 10^{-5}) 0 → 2(×10−6\times 10^{-6}) 1 → 0(×10−6\times 10^{-6}) 1 → 2(×10−6\times 10^{-6})
GIN 5 あり 147.07 ± 0.51 47.35 ± 0.35 404.92 ± 1.74 46.18 ± 0.39
GCNII 5 あり 151.13 ± 0.53 31.87 ± 0.22 280.61 ± 1.30 39.38 ± 0.34
SGCN 5 あり 151.16 ± 0.53 55.08 ± 0.42 127.21 ± 0.63 56.97 ± 0.44
GCN 5 あり 151.14 ± 0.53 48.50 ± 0.35 542.30 ± 2.14 25.37 ± 0.28
Cluster-GCN 5 あり 146.91 ± 0.51 26.60 ± 0.19 185.21 ± 0.99 18.18 ± 0.20
TFN 2 なし 2.47 ± 0.02 OOM 26.69 ± 0.24 OOM
TFN 5 なし OOM OOM OOM OOM
SE(3)-Transformer 2 なし 1.79 ± 0.02 3.50 ± 0.04 2.52 ± 0.02 OOM
SE(3)-Transformer 5 なし 2.12 ± 0.02 OOM 7.66 ± 0.05 OOM
IsoGCN 2 なし 2.67 ± 0.02 6.37 ± 0.07 7.18 ± 0.06 1.44 ± 0.02
IsoGCN 5 なし 14.19 ± 0.10 21.72 ± 0.25 34.09 ± 0.19 8.32 ± 0.09
  • 論文は、すべての設定で、IsoGCN が GCN とその変種を上回ったとしています。その理由として、IsoGCN は隣接する頂点の相対的な位置の情報を持つので勾配の方向を理解できるのに対し、ほかの GCN のモデルは隣接する頂点がどこにあるかを区別できず、勾配の方向を予測することがほぼ不可能だからであると述べています。
  • ほかの GCN のモデルでは、頂点の位置を入力の特徴に加えると性能が向上しましたが、論文は、頂点の位置は並進に対して不変な特徴ではないので、予測の性能を下げうるとしています。このため、IsoGCN とほかの同変なモデルには、等長変換に対する不変性と同変性を保つため、位置 x\boldsymbol{x} を頂点の特徴として入力していません。
  • 論文は、IsoGCN が、ほかの同変なモデルと比べて遜色ない性能を、より短い推論時間で示すとしています(下の表)。また、D~\tilde{\mathsf{D}} が勾配の演算子に当たることが、実際に確かめられたとしています。

テストのデータセットでの推論時間は、次のとおりです(原論文の付録 Table 7。同じ GPU(NVIDIA Tesla V100、32 GiB のメモリ)で計算。OOM は GPU のメモリ不足)。

手法 0 → 1 のパラメータの数 0 → 1 の推論時間 [s] 0 → 2 のパラメータの数 0 → 2 の推論時間 [s]
TFN 5264 3.8 5220 OOM
SE(3)-Transformer 5392 4.0 5265 9.2
IsoGCN 4816 0.4 4816 0.7

異方性の非線形熱伝導方程式のデータセット

論文は、提案モデルを現実の問題に適用するため、異方性の非線形熱伝導方程式を扱っています。支配方程式は、次のとおりです(原論文の付録 F.1)。

∂T(x,t)∂t=∇⋅C(T(x,t))∇T(x,t)in Ω(43)\frac{\partial T(\boldsymbol{x}, t)}{\partial t} = \nabla \cdot \boldsymbol{C}(T(\boldsymbol{x}, t)) \nabla T(\boldsymbol{x}, t) \quad \text{in } \Omega \tag{43}

ここで、TT は温度の場、x\boldsymbol{x} は位置、tt は時刻、Ω⊂R3\Omega \subset \mathbb{R}^3 は解析領域、C∈Rd×d\boldsymbol{C} \in \mathbb{R}^{d \times d} は異方性の拡散テンソルです(重要点 1 の等長変換 TT と並進のベクトル t\boldsymbol{t} とは別の意味です)。C\boldsymbol{C} が温度に依存するので、この方程式は非線形です。境界の条件は断熱(境界で、法線の方向の温度の勾配が 0)です。

  • データ:ABC データセット(Koch ら、2019)の最初の 200 個の形状から 82 個の CAD の形状をランダムに選び、メッシュ生成のプログラム Gmsh(Geuzaine と Remacle、2009)で 1 次の四面体のメッシュを作り、初期の温度と異方性の熱伝導率をランダムに設定して、有限要素解析(FEA)のプログラム FrontISTR(Morita ら、2016、Ihara ら、2017)で解析しています。付録 F.1 によると、1 つの CAD の形状から最大 3 つのメッシュ(メッシュの特性長さを制御するパラメータを 0.20、0.25、0.30 にしたもの)を作り、1 つのメッシュに、2〜10 次のフーリエ級数でランダムに作った 3 つの初期条件を与えて、時間刻み Δt=0.01\Delta t = 0.01 の陰解法で解析しています。学習用、検証用、テスト用のデータセットは、それぞれ 439、143、140 の FEA の結果です。
  • 課題:初期の温度の場、材料の特性、メッシュの形状の情報を入力として、温度の場の時間発展を予測します。性能は t=1.0t = 1.0 の温度の場だけで評価しています(付録 F.1)。
  • モデル:重みは wij=Vjeffective/Vieffectivew_{ij} = V^{\mathrm{effective}}_j / V^{\mathrm{effective}}_i(VieffectiveV^{\mathrm{effective}}_i は ii 番目の頂点の有効体積。原論文の式 (46))としています。ホップの数は m=2,5m = 2, 5 を試しています。1 つのモデルに IsoAM の演算を 4 つ入れているので、モデルから見えるホップの数は 8(m=2m = 2)か 20(m=5m = 5)です。GCN とその変種は、IsoGCN の層をそれぞれの層に置き換えています。
  • 同変なモデル:IsoGCN と同じパラメータの数では GPU(NVIDIA Tesla V100、32 GiB のメモリ)のメモリを超えたので、ホップの数が 2 の場合は、パラメータの数を IsoGCN より少なくしています。ホップの数が 5 の場合は、パラメータの数を 10 にしても、TFN と SE(3)-Transformer は GPU のメモリに入らなかったとしています。

図 4 と下の表(原論文 Table 3)は、テストのデータセットでの定性的な比較と定量的な比較の結果です。

温度の場と誤差の比較
図 4 テストのデータの 1 つのサンプルの、温度の場(上:正解と推論の結果)と、予測と正解の誤差(下)。上の段は左から正解、SGCN、SE(3)-Transformer、IsoGCN で、下の段はそれぞれの誤差です。誤差は、見やすくするために 2 倍に誇張しています。出典:原論文 Fig. 3。

テストのデータセットでの平均二乗誤差の損失は、次のとおりです(原論文 Table 3。元のスケールでの値で、± は平均の標準誤差)。同変なモデル以外は、手法ごとに最も良い設定だけを示しています(全体は原論文の付録 Table 9)。OOM は、使った GPU(32 GiB)のメモリ不足です。Cluster-GCN の行は、原論文の Table 3 では「Gluster-GCN」と書かれていますが、値は付録 Table 9 の Cluster-GCN の行(ホップの数 2、位置 x\boldsymbol{x} なし)と同じです。

手法 ホップの数 位置 x\boldsymbol{x} 損失(×10−3\times 10^{-3})
GIN 2 なし 16.921 ± 0.040
GCN 2 なし 10.427 ± 0.028
GCNII 5 なし 8.377 ± 0.024
Cluster-GCN 2 なし 7.266 ± 0.021
SGCN 5 なし 6.426 ± 0.018
TFN 2 なし 15.661 ± 0.019
TFN 5 なし OOM
SE(3)-Transformer 2 なし 14.164 ± 0.018
SE(3)-Transformer 5 なし OOM
IsoGCN 2 なし 4.674 ± 0.014
IsoGCN 5 なし 2.470 ± 0.008
  • 論文は、IsoGCN が、比べたすべての基準のモデルを上回ったとしています。
  • 付録 F.4 で、論文は、基準のモデルの入力の特徴に位置 x\boldsymbol{x} を加えても性能は向上せず、加えると学習のデータセットより大きな形状への汎化の能力を失うかもしれないと述べ、メッシュの形状に関する本質的な特徴は D~\tilde{\mathsf{D}} に含まれていると結論しています。
  • 論文は、IsoGCN が、計算の効率のよい等長変換に対する不変な性質によって、学習のデータセットよりかなり大きなグラフのメッシュでも高い予測の性能を示し、100 万頂点まで拡張できたとしています(図 5)。これは実用的な規模で、Sanchez-Gonzalez ら(2020)が報告した規模よりかなり大きいとしています。このことから論文は、IsoGCN を比較的小さなメッシュ(ただし、形状と場を表せる十分な大きさのもの)で学習して学習の時間を節約し、性能を大きく下げずに、より大きなメッシュの推論に使えると結論しています。
100 万頂点のメッシュでの温度の場の予測
図 5 (左)学習のデータセットのサンプル、(中央)FEA で計算した正解、(右)IsoGCN の推論の結果の比較。正解と推論の結果は、どちらも頂点の数が 1,011,301 のメッシュです。論文は、IsoGCN が、学習のデータセットよりずっと大きなメッシュの温度の場を予測できるとしています。出典:原論文 Fig. 7(付録 F.4)。

計算時間の比較は、次のとおりです(原論文 Table 4)。TFN、SE(3)-Transformer、IsoGCN は、ホップの数 m=2m = 2 の同変なモデルで、時間は前処理と推論の時間です。FEA には FrontISTR 5.0.0 を使い、t=1.0t = 1.0 までの時間発展を、時間刻み Δt=1.0\Delta t = 1.0 と 0.50.5 で計算しています(正解は Δt=0.01\Delta t = 0.01 の FEA)。テストのデータは、テストのデータセットから CAD のデータを選び、要素の体積をほぼ同じ大きさに保ったままグラフが大きくなるようにメッシュを作り、初期の温度の場と材料の特性を、データセットと同じ方法でランダムに設定したものです。公平に比べるため、どの計算も同じ CPU(Intel Xeon E5-2695 v2 @ 2.40 GHz)の 1 コアで行い、ファイルの入出力の時間は除いています。損失(平均二乗誤差)の単位は ×10−4\times 10^{-4}、時間の単位は秒で、OOM はメモリ不足(500 GiB)です。

手法 損失(21,289 頂点) 時間 [s](21,289 頂点) 損失(155,019 頂点) 時間 [s](155,019 頂点) 損失(1,011,301 頂点) 時間 [s](1,011,301 頂点)
FrontISTR(Δt=1.0\Delta t = 1.0) 10.9 16.7 6.1 181.7 2.9 1656.5
FrontISTR(Δt=0.5\Delta t = 0.5) 0.8 30.5 0.4 288.0 0.2 2884.2
TFN 77.9 46.1 30.1 400.9 OOM OOM
SE(3)-Transformer 111.4 31.2 80.3 271.1 OOM OOM
IsoGCN 8.1 7.4 4.9 84.1 3.9 648.4
  • 表では、IsoGCN の計算時間は、どの大きさのメッシュでも、比べた手法の中で最も短くなっています。損失は、FrontISTR(Δt=1.0\Delta t = 1.0)と比べて、21,289 頂点と 155,019 頂点では IsoGCN の方が小さく、1,011,301 頂点では IsoGCN の方が大きくなっています。TFN と SE(3)-Transformer は、1,011,301 頂点ではメモリ不足でした。
  • 論文は、IsoGCN の計算時間は FEA より大幅に短く、これはほかの同変なモデルにはできないとしています。そして、計算の効率と、等長変換に対する不変性と同変性から、物理シミュレーションの学習では IsoGCN を第一の選択にすべきであると結論しています。

今後の展開

  • 論文の実験は、FEA の結果に基づく、メッシュの構造を持つデータセットで行っています。論文は、IsoGCN が、物体の検出、分子の性質の予測、粒子を使う物理シミュレーションなど、さまざまな分野に適用されることを期待するとしています。
Graphical abstract
Graphical abstract

Overview

Graph-structured data embedded in Euclidean spaces are used in many fields, such as object detection, structural chemistry analysis, and physical simulations, and graph neural networks (GNNs) have been introduced to deal with such data. Permutation invariance and equivariance are crucial properties of GNNs; however, because many properties of objects in a Euclidean space do not change under translation and rotation, isometric transformation invariance and equivariance must also be addressed for graphs in Euclidean spaces. They are particularly indispensable in applications to physical simulations, because every physical quantity and physical law is either invariant or equivariant to such a transformation. Computational efficiency is also required, because the primary objective of learning a physical simulation is to replace a computationally expensive simulation method with a faster machine learning model.

This paper proposes IsoGCNs, a set of isometric transformation invariant and equivariant models based on graph convolutional networks (GCNs). Isometric transformation invariance is realized by simply tweaking the definition of an adjacency matrix, and because the approach relies on graphs, it can deal with complex shapes represented by meshes or point clouds. In addition, a specific form of the IsoGCN layer can be regarded as a spatial differential operator, which is essential for describing physical laws. The paper reports that IsoGCNs achieve competitive performance compared with state-of-the-art methods on tasks related to geometrical and physical simulation data, scale up to graphs with 1M vertices, and conduct inference faster than a conventional finite element analysis. According to the paper, the existing equivariant models cannot achieve this. The implementation and the dataset are available at https://github.com/yellowshippo/isogcn-iclr2021.

Key points

1. Tensor fields and the isometric adjacency matrix (IsoAM)

The paper considers a graph G=(V,E)\mathcal{G} = (\mathcal{V}, \mathcal{E}) (V\mathcal{V} is the vertex set and E\mathcal{E} is the edge set) embedded in a dd-dimensional Euclidean space. It assumes that attributes are associated only with vertices and not with edges, and that graphs do not contain self-loops. Quantities on the vertices are represented, as geometric tensors, by a rank-pp tensor field H(p)∈R∣V∣×f×dp\mathsf{H}^{(p)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d^p}. Here, ∣V∣|\mathcal{V}| is the number of vertices and ff is the number of features (channels) (Figure 1 (a)). The components are written as Hi;g;k1k2…kp(p)\mathsf{H}^{(p)}_{i;g;k_1 k_2 \ldots k_p}, where ii is the vertex index (which permutes under the permutation of vertices), gg is the feature index, and k1,…,kpk_1, \ldots, k_p are the indices of the spatial components (which are transformed by orthogonal transformations). Rank 0 corresponds to a scalar field and rank 1 to a vector field.

At the core of IsoGCN is the isometric adjacency matrix (IsoAM) G∈R∣V∣×∣V∣×d\mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d}, defined as follows.

Gij;;::=∑k,l∈V,k≠lTijkl(xk−xl)(4)\mathsf{G}_{ij;;:} := \sum_{k, l \in \mathcal{V}, k \neq l} \boldsymbol{T}_{ijkl} (\boldsymbol{x}_k - \boldsymbol{x}_l) \tag{4}

Here, kk and ll in the sum are vertex indices, Gij;;:∈Rd\mathsf{G}_{ij;;:} \in \mathbb{R}^d is the slice of G\mathsf{G} in the spatial index for the pair of the iith and jjth vertices, xi∈Rd\boldsymbol{x}_i \in \mathbb{R}^d is the position of the iith vertex, and Tijkl∈Rd×d\boldsymbol{T}_{ijkl} \in \mathbb{R}^{d \times d} is an untrainable, translation invariant, and orthogonal transformation equivariant rank-2 tensor. The components of G\mathsf{G} are written as Gij;;k\mathsf{G}_{ij;;k}, consistent with the notation of the tensor fields. This kk is the index of a spatial component and has a different meaning from the kk in the sum of Equation (4) (the paper uses the same letter for both meanings). The slot of the feature index is left empty because the number of features of an IsoAM is always 1.

An IsoAM can be viewed as a weighted adjacency matrix for each direction and reflects spatial information, which the usual weighted adjacency matrix cannot reflect because a graph has only one adjacency matrix. In the simplest case, Tijkl=δilδjkAijI\boldsymbol{T}_{ijkl} = \delta_{il} \delta_{jk} A_{ij} \boldsymbol{I}, which gives Gij;;:=Aij(xj−xi)\mathsf{G}_{ij;;:} = A_{ij} (\boldsymbol{x}_j - \boldsymbol{x}_i) (Figure 1 (b)). Here, δij\delta_{ij} is the Kronecker delta, AijA_{ij} is a component of the adjacency matrix A\boldsymbol{A} of the graph, and I\boldsymbol{I} is the identity matrix. Because G\mathsf{G} is composed of only untrainable parameters, it can be determined before training.

Schematic diagrams of a tensor field and an IsoAM
Figure 1. Schematic diagrams of (a) a rank-1 tensor field H(1)\mathsf{H}^{(1)} with the number of features equal to 2 (the two features at vertex ii are Hi;1;:(1)\mathsf{H}^{(1)}_{i;1;:} and Hi;2;:(1)\mathsf{H}^{(1)}_{i;2;:}) and (b) the simplest IsoAM, Gij;;:=Aij(xj−xi)\mathsf{G}_{ij;;:} = A_{ij}(\boldsymbol{x}_j - \boldsymbol{x}_i). Source: Fig. 1 of the original paper.

The paper shows that an IsoAM is translation invariant and orthogonal transformation equivariant (Proposition 3.1; the proof is in Appendix B of the original paper). That is, for any isometric transformation T:x↦Ux+tT : \boldsymbol{x} \mapsto \boldsymbol{U} \boldsymbol{x} + \boldsymbol{t} (U∈O(d)\boldsymbol{U} \in \mathrm{O}(d) is an orthogonal matrix and t\boldsymbol{t} is a translation vector), the following holds.

T:Gij;;k↦∑lUklGij;;l(5)T : \mathsf{G}_{ij;;k} \mapsto \sum_{l} U_{kl} \mathsf{G}_{ij;;l} \tag{5}

Here, UklU_{kl} is a component of U\boldsymbol{U}, and kk and ll are indices of spatial components (different meanings from kk and ll in the sum of Equation (4)).

2. Invariant and equivariant layers built from IsoAM operations

The paper defines the following operations between IsoAMs and tensor fields. First, the convolution of an IsoAM and a rank-0 tensor field, G∗H(0)∈R∣V∣×f×d\mathsf{G} * \mathsf{H}^{(0)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d}, produces a rank-1 tensor field from a rank-0 tensor field.

(G∗H(0))i;g;k:=∑jGij;;kHj;g;(0)(6)(\mathsf{G} * \mathsf{H}^{(0)})_{i;g;k} := \sum_{j} \mathsf{G}_{ij;;k} \mathsf{H}^{(0)}_{j;g;} \tag{6}

Next, the contraction is an operation that sums over the spatial components; the contraction of an IsoAM and a rank-1 tensor field, G\mathsf{G} ⊙ H(1)∈R∣V∣×f\mathsf{H}^{(1)} \in \mathbb{R}^{|\mathcal{V}| \times f}, produces a rank-0 tensor field. The contraction of IsoAMs, G\mathsf{G} ⊙ G∈R∣V∣×∣V∣\mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}|}, can be interpreted as the inner product of each component of the IsoAMs and is isometric transformation invariant (Proposition 3.2; the contraction is defined in Equation (7) of the original paper). Finally, the tensor product is an operation that raises the rank.

(G⊗H(p))i;g;km1m2…mp:=∑jGij;;kHj;g;m1m2…mp(p)(8)(\mathsf{G} \otimes \mathsf{H}^{(p)})_{i;g;k m_1 m_2 \ldots m_p} := \sum_{j} \mathsf{G}_{ij;;k} \mathsf{H}^{(p)}_{j;g;m_1 m_2 \ldots m_p} \tag{8} (G⊗G)il;;k1k2:=∑jGij;;k1Gjl;;k2(9)(\mathsf{G} \otimes \mathsf{G})_{il;;k_1 k_2} := \sum_{j} \mathsf{G}_{ij;;k_1} \mathsf{G}_{jl;;k_2} \tag{9}

Here, m1,…,mpm_1, \ldots, m_p, k1k_1, and k2k_2 are also indices of spatial components, and G⊗H(p)∈R∣V∣×f×d1+p\mathsf{G} \otimes \mathsf{H}^{(p)} \in \mathbb{R}^{|\mathcal{V}| \times f \times d^{1+p}} and G⊗G∈R∣V∣×∣V∣×d2\mathsf{G} \otimes \mathsf{G} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d^2}. The tensor product of IsoAMs, G⊗G\mathsf{G} \otimes \mathsf{G}, is isometric transformation equivariant in terms of the rank-2 tensor (Proposition 3.3). The paper generalizes these operations to higher ranks using repeated tensor products of IsoAMs (the ppth tensor power of an IsoAM). With these operations, IsoGCN layers can be constructed that take a tensor field of any rank as input and output a tensor field of any rank, which can differ from that of the input. The paper states that these layers are also equivariant under the vertex permutation.

The GCN (Kipf and Welling, 2017) is a considerable simplification of a GNN that uses a linear message passing scheme, and its layer is expressed as follows.

Hout=σ(A^HinW)(1)\boldsymbol{H}_{\mathrm{out}} = \sigma(\hat{\boldsymbol{A}} \boldsymbol{H}_{\mathrm{in}} \boldsymbol{W}) \tag{1}

Here, Hin\boldsymbol{H}_{\mathrm{in}} and Hout\boldsymbol{H}_{\mathrm{out}} are the input and output features of the layer, A^\hat{\boldsymbol{A}} is a renormalized adjacency matrix with self-loops, W\boldsymbol{W} is a trainable weight, and σ\sigma is the activation function. Because the contraction of IsoAMs is isometric transformation invariant, an isometric transformation invariant layer with a rank-0 input tensor field can be written as Hout(0)=σ(LHin(0)W)\boldsymbol{H}^{(0)}_{\mathrm{out}} = \sigma(\boldsymbol{L} \boldsymbol{H}^{(0)}_{\mathrm{in}} \boldsymbol{W}) (Section 3.2.1 of the original paper). Here, L∈R∣V∣×∣V∣\boldsymbol{L} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}|} is the contraction of IsoAMs (G\mathsf{G} ⊙ G\mathsf{G}), Hin(0)\boldsymbol{H}^{(0)}_{\mathrm{in}} and Hout(0)\boldsymbol{H}^{(0)}_{\mathrm{out}} are the input and output rank-0 tensor fields, and W∈Rfin×fout\boldsymbol{W} \in \mathbb{R}^{f_{\mathrm{in}} \times f_{\mathrm{out}}} is the trainable parameter matrix (finf_{\mathrm{in}} and foutf_{\mathrm{out}} are the numbers of input and output features). This has the same form as the GCN in Equation (1), with A^\hat{\boldsymbol{A}} replaced with L\boldsymbol{L}. With a rank-1 input tensor field, the layer uses inner products of vectors, which, according to the paper, correspond to extracting the relative distance and angle of each pair of vertices.

For layers whose input and output tensor ranks are both greater than 0, the paper states that nonlinear activation and bias addition cannot be applied, because isometric transformation does not commute with them in general and they would cause an inappropriate distortion of the isometry. On the other hand, a conversion that uses only linear transformation, convolution, and tensor product has no nonlinearity, which limits the predictive performance of the model. The paper therefore constructs equivariant layers with nonlinearity by first converting the input tensors to rank-0 ones, applying nonlinear activations, and then multiplying them to the higher-rank tensors obtained by convolutions and tensor products with IsoAMs (Equations (12) to (14) of the original paper). The paper states that this layer is similar to that in the TFN (Thomas et al., 2018), while it has no spherical harmonics and no trainable message passing. To be exact, the output of this layer is translation invariant. To output translation equivariant variables, such as the vertex positions after deformation, a reference vertex position is defined for each graph, the translation invariant output is computed, and the reference position is then added to the output.

3. An IsoAM for meshes and its correspondence to differential operators

To apply IsoGCNs to mesh-structured data, the paper defines a concrete instance of IsoAM, D~\tilde{\mathsf{D}}. The points in a mesh are regarded as vertices of a graph, and two vertices are regarded as connected when they share the same cell.

D~ij;;k=Dij;;k−δij∑lDil;;k(15)\tilde{\mathsf{D}}_{ij;;k} = \mathsf{D}_{ij;;k} - \delta_{ij} \sum_{l} \mathsf{D}_{il;;k} \tag{15} Dij;;:=Mi−1xj−xi∥xj−xi∥2wijAij(m)(16)\mathsf{D}_{ij;;:} = \boldsymbol{M}_i^{-1} \frac{\boldsymbol{x}_j - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_j - \boldsymbol{x}_i \rVert^2} w_{ij} A_{ij}(m) \tag{16} Mi=∑lxl−xi∥xl−xi∥⊗xl−xi∥xl−xi∥wilAil(m)(17)\boldsymbol{M}_i = \sum_{l} \frac{\boldsymbol{x}_l - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_l - \boldsymbol{x}_i \rVert} \otimes \frac{\boldsymbol{x}_l - \boldsymbol{x}_i}{\lVert \boldsymbol{x}_l - \boldsymbol{x}_i \rVert} w_{il} A_{il}(m) \tag{17}

Here, D~,D∈R∣V∣×∣V∣×d\tilde{\mathsf{D}}, \mathsf{D} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{V}| \times d}, Mi\boldsymbol{M}_i is the matrix defined by Equation (17), ∥⋅∥\lVert \cdot \rVert is the norm, ⊗\otimes is the tensor product, and wij∈Rw_{ij} \in \mathbb{R} is an untrainable weight between the iith and jjth vertices that is determined depending on the task. A(m):=min⁡(∑k=1mAk,1)\boldsymbol{A}(m) := \min(\sum_{k=1}^{m} \boldsymbol{A}^k, 1) is the adjacency matrix up to mm hops (Aij(m)A_{ij}(m) is its component and mm is the number of hops considered), where kk in this definition is the exponent of the matrix power. In Equation (15), kk is the index of a spatial component, and ll in Equations (15) and (17) is a vertex index. The paper states that Mi\boldsymbol{M}_i is invertible when the number of independent vectors in {xl−xi}l\{\boldsymbol{x}_l - \boldsymbol{x}_i\}_l is greater than or equal to the space dimension dd, which is true for common meshes, e.g., a solid mesh in a 3D Euclidean space.

By regarding Tijkl=δilδjkMi−1wijAij(m)/∥xj−xi∥2\boldsymbol{T}_{ijkl} = \delta_{il} \delta_{jk} \boldsymbol{M}_i^{-1} w_{ij} A_{ij}(m) / \lVert \boldsymbol{x}_j - \boldsymbol{x}_i \rVert^2 in Equation (4), D\mathsf{D} is qualified as an IsoAM, and because a linear combination of IsoAMs is also an IsoAM, D~\tilde{\mathsf{D}} is an IsoAM as well. Thus, both provide translation invariance and orthogonal transformation equivariance. Because D~\tilde{\mathsf{D}} can be obtained only from the mesh geometry information, it can be computed in the preprocessing step.

The paper designs D~\tilde{\mathsf{D}} such that it corresponds to the gradient operator model used in physical simulations (Tamai and Koshizuka, 2014; Swartz and Wendroff, 1969). Using a partial derivative model based on the gradient model of the least squares moving particle semi-implicit method (Tamai and Koshizuka, 2014), Appendix C of the original paper shows that expressions using D~\tilde{\mathsf{D}} correspond to the models of the gradient, divergence, Laplacian, Jacobian, and Hessian (Figure 2). For example, the convolution of D~\tilde{\mathsf{D}} and a rank-0 tensor field becomes (D~∗H(0))i;g;k=∑jDij;;k(Hj;g;(0)−Hi;g;(0))(\tilde{\mathsf{D}} * \mathsf{H}^{(0)})_{i;g;k} = \sum_j \mathsf{D}_{ij;;k} (\mathsf{H}^{(0)}_{j;g;} - \mathsf{H}^{(0)}_{i;g;}), which coincides with the gradient model at each vertex (Equations (29) and (30) in Appendix C.1 of the original paper). The paper therefore states that this IsoAM plays an essential role in constructing neural network models that are capable of learning differential equations.

Correspondence between differential operators and expressions using an IsoAM
Figure 2. Correspondence between the differential operators (left column) and the expressions using the IsoAM D~\tilde{\mathsf{D}} (right column). From the top: gradient, divergence, Laplacian, Jacobian, and Hessian. ∗* denotes the convolution, ⊙ the contraction, and ⊗\otimes the tensor product. Source: Table 1 of the original paper.

4. Computational efficiency: no spherical harmonics and no nonlinear message passing

The paper states that existing rotation and translation equivariant models for point clouds, the TFN (Thomas et al., 2018) and its variant with self-attention, the SE(3)-Transformer (Fuchs et al., 2020), achieve high expressibility based on spherical harmonics and message passing with nonlinear neural networks, but for this reason require considerable computational resources. Because IsoGCN eliminates spherical harmonics and nonlinear message passing, it allows a significant reduction in computational costs and can also be regarded as a simplification of the TFN. The paper also states that methods using voxels (regular grids), such as 3D steerable CNNs (Weiler et al., 2018), are not efficient because they represent both occupied and non-occupied parts of an object, and that a voxelized object tends to lose the smoothness of its shape, which can lead to drastically different behavior in a physical simulation.

In the implementation, the adjacency matrix A\boldsymbol{A} is usually a sparse matrix for a regular mesh, and A(m)\boldsymbol{A}(m) is also sparse for a sufficiently small mm, so sparse matrix multiplication can be used in the IsoGCN computation. The paper states that this is one major reason why IsoGCNs can compute rapidly (Appendix D.4 of the original paper). For example, when the convolution of the kkth tensor power of an IsoAM and a rank-0 tensor field is computed by repeating tensor products with the IsoAM, the computational complexity is O(n∣V∣fdk)O(n |\mathcal{V}| f d^k) (nn is the number of nonzero elements in A(m)\boldsymbol{A}(m) and kk is the number of tensor products). This is an exponential order regarding dd; however, the paper states that, because dd and kk are usually small (typically d=3d = 3 and k≤4k \leq 4), an IsoGCN layer can be computed fast and memory efficiently with a realistic spatial dimension and tensor rank.

Numerical results

To test the applicability of the proposed model, the paper conducts experiments on two datasets: a differential operator dataset of grid meshes and an anisotropic nonlinear heat equation dataset of meshes generated from CAD data.

  • Model: The model uses D~\tilde{\mathsf{D}} of Key point 3 and adopts an encode-process-decode configuration (Battaglia et al., 2018). The encoder and decoder are composed of component-wise MLPs and tensor operations. To investigate the effect of the number of hops considered, mm in Equation (16) is set to 2 and 5.
  • Baselines: GCN, GIN (Xu et al., 2018), SGCN (Wu et al., 2019), Cluster-GCN (Chiang et al., 2019), and GCNII (Chen et al., 2020) are chosen as GCN variants, and the TFN and SE(3)-Transformer as equivariant models.
  • Implementation and training: The models are implemented using PyTorch 1.6.0 and PyTorch Geometric 1.6.1. For the TFN and SE(3)-Transformer, the implementation of Fuchs et al. (2020) is used, in which the computation of the TFN is considerably faster than the original implementation. In every experiment, the mean squared loss is minimized using the Adam optimizer.

Differential operator dataset

To demonstrate the expressive power of IsoGCNs, the paper creates a dataset for learning differential operators.

  • Data: Pseudo-2D grid meshes with only one cell in the Z direction and 10 to 100 cells in the X and Y directions are generated randomly, scalar fields are generated on them, and the gradient, Laplacian, and Hessian fields are calculated analytically. 100 samples are generated for each of the training, validation, and test datasets. For simplicity, the weight in Equation (16) is set to wij=1w_{ij} = 1 for all edges.
  • Tasks: (1) predicting the gradient field from the scalar field (rank-0 → rank-1 tensor), (2) predicting the Hessian field from the scalar field (rank-0 → rank-2), (3) predicting the Laplacian field from the gradient field (rank-1 → rank-0), and (4) predicting the Hessian field from the gradient field (rank-1 → rank-2).
  • Comparison conditions: For a fair comparison, the GCN and its variants replace the IsoGCN layers with their own layers while keeping the number of hops mm the same. For the equivariant models, the hyperparameters are adjusted so that the number of parameters is almost the same as that of the IsoGCN model.

Figure 3 and the table below (Table 2 of the original paper) present a visualization of the predictions and a comparison of the predictive performance.

Comparison of gradient fields and error vectors
Figure 3. The gradient field (top) and the error vector between the prediction and the ground truth (bottom) of a test data sample. The top row shows, from the left, the ground truth and the predictions of Cluster-GCN, SE(3)-Transformer, and IsoGCN, and the bottom row shows their errors. The error vectors are exaggerated by a factor of 2 for clear visualization. Source: Fig. 2 of the original paper.

The test losses (mean squared error) are as follows (Table 2 of the original paper; values in the original scale, ± is the standard error of the mean). Columns such as "0 → 1" correspond to tasks (1) to (4) above. Rows with "Yes" in "Position x\boldsymbol{x}" are models in which the vertex position x\boldsymbol{x} is also in the input feature. The column "Hops" is the number of hops mm considered. Only the best setting for each method is shown, except for the equivariant models (the full results are in Table 6 in the appendix of the original paper). OOM denotes the out-of-memory on the applied GPU (32 GiB).

Method Hops Position x\boldsymbol{x} 0 → 1 (×10−5\times 10^{-5}) 0 → 2 (×10−6\times 10^{-6}) 1 → 0 (×10−6\times 10^{-6}) 1 → 2 (×10−6\times 10^{-6})
GIN 5 Yes 147.07 ± 0.51 47.35 ± 0.35 404.92 ± 1.74 46.18 ± 0.39
GCNII 5 Yes 151.13 ± 0.53 31.87 ± 0.22 280.61 ± 1.30 39.38 ± 0.34
SGCN 5 Yes 151.16 ± 0.53 55.08 ± 0.42 127.21 ± 0.63 56.97 ± 0.44
GCN 5 Yes 151.14 ± 0.53 48.50 ± 0.35 542.30 ± 2.14 25.37 ± 0.28
Cluster-GCN 5 Yes 146.91 ± 0.51 26.60 ± 0.19 185.21 ± 0.99 18.18 ± 0.20
TFN 2 No 2.47 ± 0.02 OOM 26.69 ± 0.24 OOM
TFN 5 No OOM OOM OOM OOM
SE(3)-Transformer 2 No 1.79 ± 0.02 3.50 ± 0.04 2.52 ± 0.02 OOM
SE(3)-Transformer 5 No 2.12 ± 0.02 OOM 7.66 ± 0.05 OOM
IsoGCN 2 No 2.67 ± 0.02 6.37 ± 0.07 7.18 ± 0.06 1.44 ± 0.02
IsoGCN 5 No 14.19 ± 0.10 21.72 ± 0.25 34.09 ± 0.19 8.32 ± 0.09
  • The paper states that IsoGCN outperforms the GCN and its variants in all settings. As the reason, it explains that the IsoGCN model has information on the relative positions of the adjacent vertices and thus understands the direction of the gradient, whereas the other GCN models cannot distinguish where the adjacent vertices are, making it nearly impossible to predict the gradient directions.
  • Adding the vertex positions to the input features of the other GCN models improved their performance; however, the paper states that, because the vertex position is not a translation invariant feature, it could degrade the predictive performance. Therefore, the position x\boldsymbol{x} is not input as a vertex feature to IsoGCN or the other equivariant models, to retain their isometric transformation invariant and equivariant natures.
  • The paper states that IsoGCN performs competitively against the other equivariant models with a shorter inference time (table below). It also states that the correspondence of D~\tilde{\mathsf{D}} to the gradient operator is confirmed in practice.

The inference time on the test dataset is as follows (Table 7 in the appendix of the original paper; each computation was run on the same GPU (NVIDIA Tesla V100 with 32 GiB memory); OOM denotes the out-of-memory of the GPU).

Method Number of parameters for 0 → 1 Inference time [s] for 0 → 1 Number of parameters for 0 → 2 Inference time [s] for 0 → 2
TFN 5264 3.8 5220 OOM
SE(3)-Transformer 5392 4.0 5265 9.2
IsoGCN 4816 0.4 4816 0.7

Anisotropic nonlinear heat equation dataset

To apply the proposed model to a real problem, the paper adopts the anisotropic nonlinear heat equation. The governing equation is as follows (Appendix F.1 of the original paper).

∂T(x,t)∂t=∇⋅C(T(x,t))∇T(x,t)in Ω(43)\frac{\partial T(\boldsymbol{x}, t)}{\partial t} = \nabla \cdot \boldsymbol{C}(T(\boldsymbol{x}, t)) \nabla T(\boldsymbol{x}, t) \quad \text{in } \Omega \tag{43}

Here, TT is the temperature field, x\boldsymbol{x} is the position, tt is time, Ω⊂R3\Omega \subset \mathbb{R}^3 is the analysis domain, and C∈Rd×d\boldsymbol{C} \in \mathbb{R}^{d \times d} is an anisotropic diffusion tensor (different meanings from the isometric transformation TT and the translation vector t\boldsymbol{t} in Key point 1). Because C\boldsymbol{C} depends on temperature, the equation is nonlinear. The boundary condition is adiabatic (the gradient of the temperature in the normal direction is 0 on the boundary).

  • Data: 82 CAD shapes are randomly selected from the first 200 shapes of the ABC dataset (Koch et al., 2019), first-order tetrahedral meshes are generated using a mesh generator program, Gmsh (Geuzaine and Remacle, 2009), the initial temperature and the anisotropic thermal conductivity are set randomly, and a finite element analysis (FEA) is conducted using the FEA program FrontISTR (Morita et al., 2016; Ihara et al., 2017). According to Appendix F.1, up to three meshes are generated from one CAD shape (with a control parameter of the mesh characteristic lengths of 0.20, 0.25, and 0.30), three initial conditions generated randomly using a Fourier series of the 2nd to 10th orders are given to each mesh, and the analysis uses an implicit method with a time step of Δt=0.01\Delta t = 0.01. The training, validation, and test datasets consist of 439, 143, and 140 FEA results, respectively.
  • Task: The time evolution of the temperature field is predicted from the initial temperature field, the material property, and the mesh geometry information as inputs. The performance is evaluated only with the temperature field at t=1.0t = 1.0 (Appendix F.1).
  • Model: The weight is set to wij=Vjeffective/Vieffectivew_{ij} = V^{\mathrm{effective}}_j / V^{\mathrm{effective}}_i (VieffectiveV^{\mathrm{effective}}_i is the effective volume of the iith vertex; Equation (46) of the original paper). The numbers of hops m=2,5m = 2, 5 are tested. Because four IsoAM operations are put in one model, the number of hops visible from the model is 8 (m=2m = 2) or 20 (m=5m = 5). The GCN and its variants replace the IsoGCN layers with their own layers.
  • Equivariant models: Because they exceeded the memory of the GPU (NVIDIA Tesla V100 with 32 GiB memory) with the same number of parameters as IsoGCN, the number of parameters is reduced to fewer than that of the IsoGCN model in the case of 2 hops. In the case of 5 hops, the paper states that neither the TFN nor the SE(3)-Transformer fits into the memory of the GPU even with the number of parameters equal to 10.

Figure 4 and the table below (Table 3 of the original paper) present the results of the qualitative and quantitative comparisons for the test dataset.

Comparison of temperature fields and errors
Figure 4. The temperature field (top: the ground truth and inference results) and the error between the prediction and the ground truth (bottom) of a test data sample. The top row shows, from the left, the ground truth, SGCN, SE(3)-Transformer, and IsoGCN, and the bottom row shows their errors. The error is exaggerated by a factor of 2 for clear visualization. Source: Fig. 3 of the original paper.

The test losses (mean squared error) are as follows (Table 3 of the original paper; values in the original scale, ± is the standard error of the mean). Only the best setting for each method is shown, except for the equivariant models (the full results are in Table 9 in the appendix of the original paper). OOM denotes the out-of-memory on the applied GPU (32 GiB). The row of Cluster-GCN is written as "Gluster-GCN" in Table 3 of the original paper, but its values are the same as those of the Cluster-GCN row (2 hops, without the position x\boldsymbol{x}) in Table 9 in the appendix.

Method Hops Position x\boldsymbol{x} Loss (×10−3\times 10^{-3})
GIN 2 No 16.921 ± 0.040
GCN 2 No 10.427 ± 0.028
GCNII 5 No 8.377 ± 0.024
Cluster-GCN 2 No 7.266 ± 0.021
SGCN 5 No 6.426 ± 0.018
TFN 2 No 15.661 ± 0.019
TFN 5 No OOM
SE(3)-Transformer 2 No 14.164 ± 0.018
SE(3)-Transformer 5 No OOM
IsoGCN 2 No 4.674 ± 0.014
IsoGCN 5 No 2.470 ± 0.008
  • The paper states that IsoGCN outperforms all the other baseline models considered.
  • In Appendix F.4, the paper states that the inclusion of the position x\boldsymbol{x} in the input features of the baseline models did not improve the performance and could result in a loss of the generalization capacity for shapes larger than those in the training dataset, and concludes that the essential features regarding the mesh shapes are included in D~\tilde{\mathsf{D}}.
  • The paper states that, owing to its computationally efficient isometric transformation invariant nature, IsoGCN achieved high prediction performance also for meshes with significantly larger graphs than those in the training dataset, and scaled up to 1M vertices (Figure 5). It states that this is a practical scale and considerably greater than that reported in Sanchez-Gonzalez et al. (2020). From this, the paper concludes that IsoGCN models can be trained on relatively smaller meshes (which should still be sufficiently large to express sample shapes and fields) to save the training time and then used for inference on larger meshes without significant performance deterioration.
Prediction of the temperature field on a mesh with 1M vertices
Figure 5. Comparison between (left) samples in the training dataset, (center) the ground truth computed through FEA, and (right) the IsoGCN inference result. Both the ground truth and the inference result are on a mesh with 1,011,301 vertices. The paper states that IsoGCN can predict the temperature field for a mesh much larger than those in the training dataset. Source: Fig. 7 of the original paper (Appendix F.4).

The comparison of the computation time is as follows (Table 4 of the original paper). The TFN, SE(3)-Transformer, and IsoGCN are equivariant models with m=2m = 2 as the number of hops, and their times are the preprocessing and inference computation times. The FEA uses FrontISTR 5.0.0 and computes the time evolution up to t=1.0t = 1.0 with time steps of Δt=1.0\Delta t = 1.0 and 0.50.5 (the ground truth is the FEA with Δt=0.01\Delta t = 0.01). The test data were generated by sampling CAD data from the test dataset, generating meshes for the graph to expand while retaining the element volume at almost the same size, and setting the initial temperature field and the material properties randomly using the same methodology as the dataset. For a fair comparison, each computation was run on the same CPU (Intel Xeon E5-2695 v2 @ 2.40 GHz) using one core, and the file I/O time was excluded. The loss (mean squared error) is in units of ×10−4\times 10^{-4} and the time in seconds; OOM denotes the out-of-memory (500 GiB).

Method Loss (21,289 vertices) Time [s] (21,289 vertices) Loss (155,019 vertices) Time [s] (155,019 vertices) Loss (1,011,301 vertices) Time [s] (1,011,301 vertices)
FrontISTR (Δt=1.0\Delta t = 1.0) 10.9 16.7 6.1 181.7 2.9 1656.5
FrontISTR (Δt=0.5\Delta t = 0.5) 0.8 30.5 0.4 288.0 0.2 2884.2
TFN 77.9 46.1 30.1 400.9 OOM OOM
SE(3)-Transformer 111.4 31.2 80.3 271.1 OOM OOM
IsoGCN 8.1 7.4 4.9 84.1 3.9 648.4
  • In the table, the computation time of IsoGCN is the shortest among the compared methods for every mesh size. Compared with FrontISTR (Δt=1.0\Delta t = 1.0), the loss of IsoGCN is smaller for 21,289 and 155,019 vertices and larger for 1,011,301 vertices. The TFN and SE(3)-Transformer ran out of memory for 1,011,301 vertices.
  • The paper states that the computation time of IsoGCN is significantly shorter than that of the FEA, which other equivariant models cannot achieve. It then concludes that IsoGCN must be the first choice to learn physical simulations because of its computational efficiency as well as isometric transformation invariance and equivariance.

Outlook

  • The experiments in the paper were conducted on mesh-structured datasets based on FEA results. The paper expects IsoGCNs to be applied to various domains, such as object detection, molecular property prediction, and physical simulations using particles.