MARA: Flow-Matching-Guided Multi-Agent Resource Allocation for Computational Resource Efficient Learning

Hanye Zhao, Muning Wen, Yong Yu, Weinan ZhangarXiv 2026

TL;DR

MARA is a novel resource-allocation framework that optimizes how deep learning training jobs are scheduled onto discrete compute nodes. By combining generative flow matching to predict future training loss curves with a cooperative multi-agent transformer policy, MARA significantly boosts the number of tasks that successfully hit their target loss before their deadlines.

What Problem Does This Paper Address?

In shared machine learning clusters, multiple training tasks arrive dynamically over time. Each task comes with its own architecture, dataset, target loss threshold, and strict deadline. The core challenge of Computational Resource Efficient Learning (CoRE-Learning) is that a scheduler doesn't know in advance how much training effort (i.e., how many optimization batches) a specific task will actually need to reach its target loss.

Prior approaches like LARA assume that computational throughput is continuously divisible. However, real-world clusters consist of discrete compute nodes (like individual GPUs), where a node can only serve one task at a time, and a task can only occupy one node per time step. This turns resource allocation into a complex, constrained sequential matching problem under high uncertainty. Schedulers must continuously decide which tasks to prioritize and, crucially, when to stop wasting resources on tasks that are mathematically impossible to finish before their deadlines.

Figure 1: Resource allocation for dynamically arriving task streams. The streams have overlapping availability windows and different durations. A scheduling policy repeatedly assigns active tasks to discrete compute nodes or leaves them waiting.

Methods

The authors propose MARA (Flow-Matching-Guided Multi-Agent Resource Allocation), which splits the problem into a two-stage prediction and allocation pipeline:

  1. Future-Loss Prediction via Conditional Flow Matching (FM): Instead of using rigid parametric curve-fitting (like Weighted Least Squares) which struggles with loss plateaus, MARA trains a generative flow-matching model. Given a short prefix of a task's observed loss history, the model generates a distribution of plausible future loss trajectories. A threshold decoder then calculates when these trajectories cross the target loss to estimate the remaining training demand.
  2. Autoregressive Multi-Agent Allocation: MARA treats each compute node as an individual agent. A Multi-Agent Transformer (MAT) policy coordinates these nodes to select tasks sequentially. Feasibility masks are applied at each step to ensure that no two nodes select the same task and no invalid allocations are made.
  3. Objective-Preserving Progress Shaping: To overcome the sparsity of rewards (which normally only occur when a task successfully completes), the authors introduce a potential-based reward shaping function based on the log-progress of the loss. This provides dense intermediate feedback during reinforcement learning training without altering the true optimization objective.
Figure 2: Overview of MARA. Observed loss histories condition the flow-matching predictor, while decoded resource estimates and task state enter the autoregressive MAT allocator. Simulator transitions provide new loss observations and shaped training rewards.

Datasets

The framework was evaluated using a simulator calibrated on real deep learning workloads across image, text, speech, and reinforcement learning domains:

  • In-Distribution (ID): Four CIFAR-10 image classifiers (CNN, ResNet-18, ResNet-34, LSTM), two Transformer models trained on the YESNO speech corpus, and two attention-LSTM classifiers on the IMDB text dataset.
  • Out-of-Distribution (OOD) Task Families: Used to test generalization. This included an RL OOD task (a DAgger-style CNN trained on Atari Montezuma's Revenge) and a ViT OOD task (a SimpleViT classifier on CIFAR-10).

Key Insights and Ideas

  • Distributional Forecasting Beats Curve Fitting: Traditional curve fitting assumes a single deterministic future. Flow matching captures the multimodal nature of early-stage training, where a task might plateau or suddenly converge. This provides much more accurate remaining-resource estimates when data is sparse.
  • Coordinated Multi-Agent Sequential Decisions: By formulating the scheduler autoregressively, earlier node decisions naturally constrain and inform later node choices. This effectively sidesteps the combinatorial explosion of trying to evaluate all possible task-node matchings simultaneously.
  • Knowing When to Quit: In stress tests with intentionally unfeasible tasks, naive schedulers (like FIFO or EDF) suffer from "congestion collapse" because they keep serving doomed tasks. MARA quickly identifies unfeasible tasks and cuts them off, freeing up discrete nodes for tasks that can actually succeed.
Figure 3: Prediction behavior on ID tasks as observations accumulate. (a) A representative curve, selected by the median curve- level WLS-minus-FM MAE improvement, at its fourth query prefix. (b) Capped remaining-batch MAE at eight deterministic query ranks. The horizontal coordinate is the median observed fraction of the scheduling budget.

Key Results

  • Better Predictions: Flow matching reduced the remaining-resource prediction error (MAE) by 52.1% on in-distribution tasks and 41.6% on RL OOD tasks compared to Weighted Least Squares.
  • Higher Completion Rates: At the standard training load, MARA achieved an average task completion rate of 63.46%, outperforming the strong LARA baseline by 8.54 percentage points.
  • Workload Generalization: When tested zero-shot under much heavier task arrival loads (increasing task volume by ~61%), MARA maintained a stable 8.43 to 8.84 percentage point lead over the closest baseline.

Limitations and Future Work

The authors note several simplifying assumptions in their current simulator that present opportunities for future research:

  • Homogeneous Nodes & Zero Overhead: The current model assumes all compute nodes are identical and that pausing, resuming, or migrating tasks between nodes incurs zero time or computational cost. Real clusters have heterogeneous GPUs and non-trivial preemption overhead.
  • Fairness Constraints: The current objective strictly maximizes the total number of completed tasks. This can cause the scheduler to systematically starve or delay inherently "difficult" task families, highlighting a need for future group-level fairness audits.

Summary updated

BibTeX
@misc{zhao2026mara,
  author = {Hanye Zhao and Muning Wen and Yong Yu and Weinan Zhang},
  title = {{MARA: Flow-Matching-Guided Multi-Agent Resource Allocation for Computational Resource Efficient Learning}},
  year = {2026},
  eprint = {2608.09130},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.09130},
}
Figure