A two-stage reinforcement learning-based approach for multi-entity task allocation

Aicheng Gong, Kai Yang, Jiafei Lyu, Xiu Li

TL;DR

This paper introduces a two-stage Reinforcement Learning (RL) framework designed to solve dynamic task allocation problems where the number and attributes of entities (like robots or workers) and tasks change constantly. By utilizing a similarity-based pre-assignment strategy and a hypernetwork-driven critic, the approach outperforms traditional heuristic algorithms and demonstrates impressive zero-shot generalization to entirely new scenarios.

What Problem Does This Paper Address?

Task allocation—deciding which "entity" should perform which "task"—is a cornerstone of combinatorial optimization, essential for everything from warehouse robotics to ride-sharing.

Traditional solutions (like the Hungarian algorithm or Genetic Algorithms) often struggle with two real-world realities:

  1. Dynamics: Tasks and entities aren't static; their attributes and even their total numbers fluctuate over time.
  2. Local Optima: Simple sequential assignment (assigning the first available robot to the first task) often traps the system in a "local optimum," leaving no capable robots left for a difficult, high-priority task that appears later.

Standard RL models also fail here because they typically require a fixed input size (a set number of agents). The authors aim to create a flexible, "managerial" RL agent that can handle a variable workforce and evolving task demands.

Methods

The authors propose a two-stage architecture to mimic a sophisticated manager:

  • Stage 1: Pre-assign Module: Instead of picking one entity at a time, the model uses a Two-head Attention Module (TAM). It treats entities as "queries" and tasks as "keys." By calculating the dot-product similarity between their attributes, the model creates a distribution of potential matches. This allows the system to "look ahead" and reserve the right entities for the right tasks.
  • Stage 2: Select Module: Using a structure inspired by PointNet (a neural network designed to handle unordered point sets), this module selects the final group of entities from the pre-assigned candidates. Because it is a sequence-to-sequence (seq2seq) style structure, it can output a variable number of assignments.
  • AMIX (Attention MIXing): To train the system, the "Critic" (the part of the RL agent that estimates value) needs to handle variable inputs. The authors developed a Self-attention-based Hyper Network (SHN) that dynamically generates weights for a mixing network based on the current number of entities.
  • Demand Module: For scenarios involving "selfish" human workers, the authors integrated a DDPG (Deep Deterministic Policy Gradient) module that allows entities to learn their own bidding strategies (wages) based on task difficulty.

Datasets

The model was evaluated across four distinct simulated environments:

  1. Retain the Almighty: A custom "toy" environment designed to test if the model can avoid local optima by saving a highly capable ("almighty") agent for a difficult final task.
  2. Electric Power Transportation (EPT): A grid of 20 power towers where "task" towers at peak usage must be supported by "entity" towers via wire transmissions.
  3. Resource-Based Foraging (RBF): A scaled-up version of Level-Based Foraging involving 100 entities and randomly spawning "apple" tasks with varying attribute requirements.
  4. Material Transportation (MT): A Dynamic Vehicle Routing Problem (DVRP) with 50 trucks carrying various resources to cities with random demands.

Key Insights and Ideas

  • Similarity as a Universal Language: By focusing on the similarity between entity attributes and task requirements rather than fixed IDs, the model learns a general strategy. This is why it can handle a robot it has never "seen" before, as long as it knows that robot's specs.
  • The "Manager" Meta-Strategy: The two-stage process effectively separates matching (who is good for what) from selection (who should we actually send right now). This prevents the greedy behavior that plagues simpler algorithms.
  • Architecture Agnosticism: The use of attention mechanisms and hypernetworks means the neural network doesn't have a "hard-coded" width. It expands or contracts its processing logic based on the number of entities on the map.

Key Results

  • Superiority over Heuristics: In all environments, the two-stage RL approach outperformed Genetic Algorithms (GA), Particle Swarm Optimization (PSO), and Symbiotic Organisms Search (SOS). For example, in the EPT environment, the proposed method achieved a return of 105.4, significantly higher than SOS (89.4) and GA (72.5).
  • Zero-Shot Generalization: This is the "aha" result. When tested on new tasks and entities it wasn't trained on, the model's "zero-shot" performance was nearly as good as a model retrained for 700 epochs.
  • Solving the "Almighty" Trap: In the toy environment, the pre-assign strategy successfully learned to "save" the best agent for the end, whereas sequential methods consistently failed by using the best agent too early.

Limitations and Future Work

  • Attribute Dependency: The model relies heavily on having accurate, quantifiable attributes for both tasks and entities. In messy, real-world human environments, defining these attributes (e.g., "worker competency") can be difficult.
  • Training Complexity: The SHN/AMIX structure introduces a large number of parameters, which increases training time and complexity compared to simpler linear critics.
  • Future Directions: The authors suggest exploring more complex feature extraction methods to better handle high-dimensional entity observations and investigating how this might scale to even larger, city-wide coordination problems.

Summary updated

BibTeX
@article{gong2024two,
  author = {Aicheng Gong and Kai Yang and Jiafei Lyu and Xiu Li},
  title = {{A two-stage reinforcement learning-based approach for multi-entity task allocation}},
  journal = {Engineering Applications of AI},
  year = {2024},
  url = {https://openreview.net/forum?id=n9PyQQsWQD},
}
Figure