arXiv:2610.30443cs.AIOct 2026

Manuscript Offprint

arXiv:2610.30443

SpecMAGIC: Specification-Guided Multi-Task Generalization in Multi-Agent Reinforcement Learning

Zijian Guo, İlker Işık, H. M. Sabbir Ahmad, Wenchao Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Multi-task generalization is an important yet underexplored problem in multi-agent reinforcement learning (MARL). Many real-world applications require multi-agent systems to generalize across complex, temporally extended tasks with diverse inter-agent coordination requirements. We introduce a specification language that combines temporal-logic task specifications with operators for expressing such requirements. We propose SpecMAGIC, a hierarchical framework that leverages the automaton structure of task specifications for subtask decomposition. A centralized high-level planner identifies and allocates compatible subtask sequences across agents, while decentralized low-level policies execute individual subtasks. This enables zero-shot generalization to new tasks by composing reusable subtask policies according to new specifications, without retraining. We establish soundness and probabilistic completeness of the high-level planner. Experiments on multi-agent navigation tasks show that SpecMAGIC substantially outperforms existing approaches on unseen task specifications and maintains strong performance as the number of agents increases. The code is available at https://github.com/BU-DEPEND-Lab/SpecMAGIC.

1 INTRODUCTION

Multi-task multi-agent reinforcement learning (MTMARL) aims to learn multi-agent policies that generalize across diverse tasks (Omidshafiei et al., 2017; Chai et al., 2025). Recent methods have explored this setting in applications including multi-robot systems (Wang et al., 2023; Li et al., 2024a; Zhu et al., 2025) and autonomous driving (Berahman et al., 2025; Wu et al., 2026). However, zero-shot generalization to complex, temporally extended tasks with diverse inter-agent coordination requirements, as arise in many real-world applications, remains largely underexplored. To capture this setting, we consider multi-agent systems where each agent is assigned individual tasks, while the team must additionally satisfy coordination requirements such as dependency and count constraints. Moreover, at test time, both the individual tasks and the coordination structure among agents can differ from those encountered during training. For example, warehouse robots that have learned to deliver packages need to follow different user-specified delivery sequences, where some deliveries must precede others and certain deliveries require a specified number of robots.

Temporal logic provides a principled framework for specifying multi-agent behaviors over time. In particular, linear temporal logic (LTL) has been widely used to express complex temporally extended tasks and to guide the learning of policies that satisfy them (León & Belardinelli, 2020; Liu et al., 2025; Yalcinkaya et al., 2025). Recent approaches exploit the structure of automata corresponding to LTL specifications (Vardi & Wolper, 1986) to decompose them into subtasks or subtask sequences (Vaezipoor et al., 2021; Qiu et al., 2023; Jackermeier & Abate, 2025), enabling generalization to unseen specifications by composing previously learned subtask policies according to the structure of a new specification. This paradigm can, in principle, be extended to multi-agent specifications by combining individual tasks and inter-agent coordination requirements into a global specification and applying the same decomposition procedure. However, the automaton corresponding to a global specification can be exponential in the size of the specification, and composing agent-specific requirements can further induce a combinatorial blow-up in the joint state space. Consequently, explicit automaton construction and planning become increasingly intractable as the number of agents and specification complexity grow.

In this work, we propose SpecMAGIC, a hierarchical framework for zero-shot Specification-guided Multi-Agent task Generalization with Inter-agent Coordination requirements. We introduce specification operators for dependency and count constraints that can be translated into standard LTL formulas. allowing individual tasks and coordination requirements to be represented within a unified specification framework. To avoid constructing a global automaton over all agents and coordination requirements, SpecMAGIC decomposes the specifications into reach-avoid subtask sequences and plans directly over the resulting subtask space. A centralized sampling-based high-level planner then identifies, allocates and sequences compatible subtasks across agents. The resulting plan is executed by decentralized subtask-conditioned RL policies, compatible with a variety of goal-conditioned RL policies with subtask embeddings (Vaezipoor et al., 2021; Qiu et al., 2023; Jackermeier & Abate, 2025; Guo et al., 2026a). This hierarchical approach enables learned subtask policies to be recombined at test time to satisfy unseen individual tasks and coordination constraints, including both finite- and infinite-horizon specifications. Our main contributions are summarized as follows:

• We study zero-shot generalization to complex multi-agent LTL specifications that combine individual tasks with inter-agent coordination requirements, and introduce new specification operators to conveniently express these coordination constraints.

• We develop a scalable task-allocation approach that avoids the exponential complexity associated with explicit global product-automaton construction, and establish soundness and probabilistic completeness of the proposed planner.

• We conduct comprehensive experiments on diverse multi-agent task specifications with varying numbers of agents in a navigation environment, demonstrating consistent improvements over state-of-the-art baselines in zero-shot task generalization and scalability.

References (56)