AMR-Transformer: Enabling Efficient Long-range Interaction for Complex Neural Fluid Simulation
Zeyi Xu, Jinfan Liu, Kuangxu Chen, Ye Chen, Zhangli Hu, Bingbing Ni
TL;DR
AMR-Transformer tackles the challenge of modeling long-range interactions in high-resolution CFD by coupling an adaptive mesh refinement (AMR) tokenizer with a constraint-aware pruning heuristic and an encoder-only Transformer solver. The AMR tokenizer creates multi-scale patches guided by Navier-Stokes constraints, enabling focused computation on dynamically rich regions, while the Transformer captures global dependencies across patches. Extensive experiments on CFDBench, PDEBench, and a new 128×128 shockwave dataset show state-of-the-art accuracy with dramatically reduced token counts (2–10×) and substantial FLOP reductions (up to 60× vs ViT), demonstrating strong efficiency-accuracy tradeoffs for complex fluid phenomena. This approach enables high-fidelity, long-range CFD simulations at scale, with practical impact for turbulence, shocks, and other multi-scale flow regimes.
Abstract
Accurately and efficiently simulating complex fluid dynamics is a challenging task that has traditionally relied on computationally intensive methods. Neural network-based approaches, such as convolutional and graph neural networks, have partially alleviated this burden by enabling efficient local feature extraction. However, they struggle to capture long-range dependencies due to limited receptive fields, and Transformer-based models, while providing global context, incur prohibitive computational costs. To tackle these challenges, we propose AMR-Transformer, an efficient and accurate neural CFD-solving pipeline that integrates a novel adaptive mesh refinement scheme with a Navier-Stokes constraint-aware fast pruning module. This design encourages long-range interactions between simulation cells and facilitates the modeling of global fluid wave patterns, such as turbulence and shockwaves. Experiments show that our approach achieves significant gains in efficiency while preserving critical details, making it suitable for high-resolution physical simulations with long-range dependencies. On CFDBench, PDEBench and a new shockwave dataset, our pipeline demonstrates up to an order-of-magnitude improvement in accuracy over baseline models. Additionally, compared to ViT, our approach achieves a reduction in FLOPs of up to 60 times.
