# m4: A Learned Flow-level Network Simulator

arXiv: https://arxiv.org/abs/2503.01770 · HTML: https://mlsanity.com/paper/2503.01770/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 69 references that are in the map.
- First posted on arXiv 3 Mar 2025.

## Builds on (most cited first, 15 of 15)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Inductive Representation Learning on Large Graphs](https://mlsanity.com/paper/1706.02216/) (2017)
- [Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling](https://mlsanity.com/paper/1412.3555/) (2014)
- [Heterogeneity-Aware Cluster Scheduling Policies for Deep Learning Workloads](https://mlsanity.com/paper/2008.09213/) (2020)
- [RouteNet: Leveraging Graph Neural Networks for network modeling and optimization in SDN](https://mlsanity.com/paper/1910.01508/) (2019)
- [ASTRA-sim2.0: Modeling Hierarchical Networks and Disaggregated Systems for Large-model Training at Scale](https://mlsanity.com/paper/2303.14006/) (2023)
- [CASSINI: Network-Aware Job Scheduling in Machine Learning Clusters](https://mlsanity.com/paper/2308.00852/) (2023)
- [RouteNet-Erlang: A Graph Neural Network for Network Performance Evaluation](https://mlsanity.com/paper/2202.13956/) (2022)
- [A new hope for network model generalization](https://mlsanity.com/paper/2207.05843/) (2022)
- [PowerTCP: Pushing the Performance Limits of Datacenter Networks](https://mlsanity.com/paper/2112.14309/) (2021)
- [Solving Max-Min Fair Resource Allocations Quickly on Large Graphs](https://mlsanity.com/paper/2310.09699/) (2023)
- [RouteNet-Gauss: Hardware-Enhanced Network Modeling with Machine Learning](https://mlsanity.com/paper/2501.08848/) (2025)
- [QT-Routenet: Improved GNN generalization to larger 5G networks by fine-tuning predictions from queueing theory](https://mlsanity.com/paper/2207.06336/) (2022)
- [GPU Cluster Scheduling for Network-Sensitive Deep Learning](https://mlsanity.com/paper/2401.16492/) (2024)
- [Credence: Augmenting Datacenter Switch Buffer Sharing with ML Predictions](https://mlsanity.com/paper/2401.02801/) (2024)

## Built on by (most cited first, 1 of 1)

- [Forecasting Individual NetFlows using a Predictive Masked Graph Autoencoder](https://mlsanity.com/paper/2604.20483/) (2026)

## Abstract (arXiv)

Flow-level simulation is widely used to model large-scale data center networks due to its scalability. Unlike packet-level simulators that model individual packets, flow-level simulators abstract traffic as continuous flows with dynamically assigned transmission rates. While this abstraction enables orders-of-magnitude speedup, it is inaccurate by omitting critical packet-level effects such as queuing, congestion control, and retransmissions. We present m4, an accurate and scalable flow-level simulator that uses machine learning to learn the dynamics of the network of interest. At the core of m4 lies a novel ML architecture that decomposes state transition computations into distinct spatial and temporal components, each represented by a suitable neural network. To efficiently learn the underlying flow-level dynamics, m4 adds dense supervision signals by predicting intermediate network metrics such as remaining flow size and queue length during training. m4 achieves a speedup of up to 104× over packet-level simulation. Relative to a traditional flow-level simulation, m4 reduces per-flow estimation errors by 45.3% (mean) and 53.0% (p90). For closed-loop applications, m4 accurately predicts network throughput under various congestion control schemes and workloads.
