Erwin: A Tree-based Hierarchical Transformer for Large-scale Physical Systems
Maksim Zhdanov, Max Welling, Jan-Willem van de Meent
Abstract
Large-scale physical systems defined on irregular grids pose significant scalability challenges for deep learning methods, especially in the presence of long-range interactions and multi-scale coupling. Traditional approaches that compute all pairwise interactions, such as attention, become computationally prohibitive as they scale quadratically with the number of nodes. We present Erwin, a hierarchical transformer inspired by methods from computational many-body physics, which combines the efficiency of tree-based algorithms with the expressivity of attention mechanisms. Erwin employs ball tree partitioning to organize computation, which enables linear-time attention by processing nodes in parallel within local neighborhoods of fixed size. Through progressive coarsening and refinement of the ball tree structure, complemented by a novel cross-ball interaction mechanism, it captures both fine-grained local details and global features. We demonstrate Erwin's effectiveness across multiple domains, including cosmology, molecular dynamics, PDE solving, and particle fluid dynamics, where it consistently outperforms baseline methods both in accuracy and computational efficiency.
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.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- MSPT: Efficient Large-Scale Physical Modeling via Parallelized Multi-Scale Attention cites Learning Mesh-Based Simulation with Graph Networks
- MSPT: Efficient Large-Scale Physical Modeling via Parallelized Multi-Scale Attention cites Choose a Transformer: Fourier or Galerkin
- MSPT: Efficient Large-Scale Physical Modeling via Parallelized Multi-Scale Attention cites Fourier Neural Operator for Parametric Partial Differential Equations
- Choose a Transformer: Fourier or Galerkin cites Fourier Neural Operator for Parametric Partial Differential Equations
- OrthoSolver: A Neural Proper Orthogonal Decomposition Solver For PDEs cites Fourier Neural Operator for Parametric Partial Differential Equations
- Revisiting Neural Processes via Fourier Transform and Volterra Series cites Choose a Transformer: Fourier or Galerkin
- Revisiting Neural Processes via Fourier Transform and Volterra Series cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Revisiting Neural Processes via Fourier Transform and Volterra Series cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Revisiting Neural Processes via Fourier Transform and Volterra Series cites Fourier Neural Operator for Parametric Partial Differential Equations
Cited by top-tier papers4
- MSPT: Efficient Large-Scale Physical Modeling via Parallelized Multi-Scale AttentionPedro M. P. Curvo, Jan-Willem van de Meent, Maksim ZhdanovCVPR 2026 · 3 citations
- (Sparse) Attention to the Details: Preserving Spectral Fidelity in ML-based Weather Forecasting ModelsMaksim Zhdanov, Ana Lucic, Max Welling, Jan-Willem van de MeentICML 2026 · 2 citations
- OrthoSolver: A Neural Proper Orthogonal Decomposition Solver For PDEsYing Pang, Jingyuan Wang, Jiahao Ji, Fanhao MuICLR 2026
- Revisiting Neural Processes via Fourier Transform and Volterra SeriesPeiman Mohseni, Nick Duffield, Raymond K WongICML 2026
Builds on27
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- Fourier Neural Operator for Parametric Partial Differential EquationsZongyi Li, Nikola Borislavov Kovachki, Kamyar Azizzadenesheli, Burigede Liu et al.ICLR 2021 · 3,911 citations
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
- Learning Mesh-Based Simulation with Graph NetworksTobias Pfaff, Meire Fortunato, Alvaro Sanchez-Gonzalez, Peter W. BattagliaICLR 2021 · 1,175 citations
- Choose a Transformer: Fourier or GalerkinShuhao CaoNeurIPS 2021 · 516 citations
Related papers
- Scalable Graph Networks for Particle SimulationsKarolis Martinkus, Aurélien Lucchi, Nathanaël PerraudinAAAI 2021 · 11 citations
- Adaptive Physics Transformer with Fused Global-Local Attention for Subsurface Energy SystemsXin Ju, Hadrian Fung, Yuyan Zhang, Carl Jacquemyn et al.ICML 2026 · 2 citations
- Transolver: A Fast Transformer Solver for PDEs on General GeometriesHaixu Wu, Huakun Luo, Haowen Wang, Jianmin Wang et al.ICML 2024 · 228 citations
- PDE-Transformer: Efficient and Versatile Transformers for Physics SimulationsBenjamin J. Holzschuh, Qiang Liu, Georg Kohl, Nils ThuereyICML 2025
- A Hierarchical Spatial Transformer for Massive Point Samples in Continuous SpaceWenchong He, Zhe Jiang, Tingsong Xiao, Zelin Xu et al.NeurIPS 2023 · 20 citations
