Lune

NeurIPS2021Top-tier venue

Transformers Generalize DeepSets and Can be Extended to Graphs & Hypergraphs

Jinwoo Kim, Saeyoon Oh, Seunghoon Hong

Abstract

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-kk data (k=2k=2 for graphs and k>2k>2 for hypergraphs). Unfortunately, higher-order Transformers turn out to have prohibitive complexity O(n2k)\mathcal{O}(n^{2k}) to the number of input nodes nn. 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Cell Graph Transformer for Nuclei Classification cites Graph Neural Networks Exponentially Lose Expressive Power for Node Classification
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. On the Feasibility of Simple Transformer for Dynamic Graph ModelingYuxia Wu, Yuan Fang, Lizi LiaoWWW 2024 · 49 citations
  2. Graph Metanetworks for Processing Diverse Neural ArchitecturesDerek Lim, Haggai Maron, Marc T. Law, Jonathan Lorraine et al.ICLR 2024 · 47 citations
  3. High-Order Pooling for Graph Neural Networks with Tensor DecompositionChenqing Hua, Guillaume Rabusseau, Jian TangNeurIPS 2022 · 45 citations
  4. Crystalformer: Infinitely Connected Attention for Periodic Structure EncodingTatsunori Taniai, Ryo Igarashi, Yuta Suzuki, Naoya Chiba et al.ICLR 2024 · 21 citations
  5. Cell Graph Transformer for Nuclei ClassificationWei Lou, Guanbin Li, Xiang Wan, Haofeng LiAAAI 2024 · 17 citations

Builds on8

  1. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  2. On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng et al.ICML 2020 · 1,388 citations
  3. Graph Neural Networks Exponentially Lose Expressive Power for Node ClassificationKenta Oono, Taiji SuzukiICLR 2020 · 864 citations
  4. Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi et al.ICLR 2020 · 481 citations
  5. Hyper-SAGNN: a self-attention based graph neural network for hypergraphsRuochi Zhang, Yuesong Zou, Jian MaICLR 2020 · 228 citations

Related papers

  1. SpeqNets: Sparsity-aware permutation-equivariant graph networksChristopher Morris, Gaurav Rattan, Sandra Kiefer, Siamak RavanbakhshICML 2022 · 47 citations
  2. Even Sparser Graph TransformersHamed Shirzad, Honghao Lin, Balaji Venkatachalam, Ameya Velingker et al.NeurIPS 2024 · 18 citations
  3. Polynormer: Polynomial-Expressive Graph Transformer in Linear TimeChenhui Deng, Zichao Yue, Zhiru ZhangICLR 2024 · 81 citations
  4. Fast and Accurate Temporal Hypergraph Representation for Hyperedge PredictionYuanyuan Xu, Wenjie Zhang, Ying Zhang, Xiwei Xu et al.KDD 2025 · 7 citations
  5. Relational Attention: Generalizing Transformers for Graph-Structured TasksCameron Diao, Ricky LoyndICLR 2023 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines