Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Transformers Generalize DeepSets and Can be Extended to Graphs and Hypergraphs

About

We present a generalization of Transformers to any-order permutation invariant data (sets, graphs, and hypergraphs). We begin by observing that Transformers generalize DeepSets, or first-order (set-input) permutation invariant MLPs. Then, based on recently characterized higher-order invariant MLPs, we extend the concept of self-attention to higher orders and propose higher-order Transformers for order-$k$ data ($k=2$ for graphs and $k>2$ for hypergraphs). Unfortunately, higher-order Transformers turn out to have prohibitive complexity $\mathcal{O}(n^{2k})$ to the number of input nodes $n$. To address this problem, we present sparse higher-order Transformers that have quadratic complexity to the number of input hyperedges, and further adopt the kernel attention approach to reduce the complexity to linear. In particular, we show that the sparse second-order Transformers with kernel attention are theoretically more expressive than message passing operations while having an asymptotically identical complexity. Our models achieve significant performance improvement over invariant MLPs and message-passing graph neural networks in large-scale graph regression and set-to-(hyper)graph prediction tasks. Our implementation is available at https://github.com/jw9730/hot.

Jinwoo Kim, Saeyoon Oh, Seunghoon Hong• 2021

Related benchmarks

TaskDatasetResultRank
Action RecognitionNTU-60 (xsub)
Accuracy90.8
223
Action RecognitionNTU-120 (cross-subject (xsub))
Accuracy85.2
211
Action RecognitionNTU 120 (Cross-Setup)
Accuracy87.4
203
Action RecognitionNTU-60 (xview)
Accuracy95.8
117
Skeleton-based Action RecognitionKinetics-Skeleton
Top-1 Acc36.7
102
Graph property predictionPCQM4M-LSC (val)
MAE0.1263
48
Set-to-graph predictionJets (B)
RI67
9
Set-to-graph predictionJets (C)
RI75.7
9
Set-to-graph predictionJets (L)
RI97.4
9
Set-to-graph predictionDelaunay 50 points
Accuracy99.4
9
Showing 10 of 15 rows

Other info

Code

Follow for update