NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Solve Compositional Geometry Routing Problems

Mingfeng Fan, Jianan Zhou, Jiaqi Cheng, Yifeng Zhang, Jie Zhang, Guillaume Adrien Sartoretti

TL;DR

Real-world routing problems rarely involve just points; they frequently mix points, lines, and areas. This paper introduces the Compositional Geometry Routing Problem (CGRP) and proposes DiCon, a plug-and-play neural framework that uses differential attention and double-level contrastive learning to efficiently solve these complex, hybrid routing challenges.

What Problem Does This Paper Address?

Traditional Neural Combinatorial Optimization (NCO) models excel at node-centric routing, such as the classic Traveling Salesman Problem (TSP). However, real-world missions—like a drone inspecting infrastructure or conducting search-and-rescue—require navigating a messy mix of points (landmarks), lines (roads/cracks), and areas (fields/lakes).

The authors formalize this as the Compositional Geometry Routing Problem (CGRP). Non-point tasks introduce severe challenges for standard deep learning solvers:

  1. Asymmetry: Traveling from a point to a line/area task costs a different amount of time or energy than leaving it.
  2. Coupled Decisions: Choosing a specific entry/exit pair for a region alters the remaining global route, tightly coupling local servicing with global planning.
  3. Exploding Action Space: Each line or area task offers multiple valid entry/exit paths, creating a massive, noisy action space filled with geometrically valid but strategically irrelevant choices.
Figure 1: The characteristics of CGRP.

Methods

The authors propose DiCon (Differential attention-assisted solver with Contrastive learning), an architecture-agnostic framework designed to augment existing neural routing backbones (such as POMO or RELD). DiCon tackles CGRP from two complementary angles:

  1. Multi-head Differential Attention (MHDA): Standard attention mechanisms often waste probability mass on sub-optimal actions. DiCon replaces standard attention in the decoder with a differential mechanism that subtracts a secondary attention map from the primary one. This acts as an attention-denoising filter, actively suppressing less competitive candidate actions.
  2. Double-level Contrastive Learning (CL):
  3. Instance-level CL: Uses spatial rotations and reflection augmentations to ensure the model learns global representations invariant to coordinate system transformations.
  4. Intra-task-level CL: Clusters the embeddings of different entry/exit pairs belonging to the same task. This forces the model to recognize their shared semantic identity while preserving distinct boundaries between different tasks.
Figure 2: An overview of DiCon. DiCon incorporates two mechanisms: 1) a multi-head differential attention module that replaces the standard MHA in the decoder to facilitate decision-making, and 2) a double-level contrastive objective to enhance representation learning.

Datasets

The model was trained and evaluated using both synthetic benchmarks and real-world geographic data:

  • Synthetic CGRP Data: Generated with problem sizes ranging from 20 to 100 tasks, mixing points, lines, and areas. Scalability was tested on larger instances of up to 300 tasks.
  • Specialized Generalization Sets: Out-of-distribution test sets consisting of pure Point-only (TSP), Line-only, Area-only, and extreme hybrid mixes (e.g., Area20 + Line80).
  • Real-World Scenarios:
  • Urban Monitoring: Based on OpenStreetMap data from Hangzhou, China, featuring irregular polygon water bodies, road networks, and point facilities.
  • Electric Power Line Inspection: Based on a substation region in Jiaxing, China, involving 20 high-voltage towers, 7 transmission lines, and a substation area.

Key Insights and Ideas

  • Denoising via Subtraction: Instead of trying to find better features to highlight good paths, actively subtracting a low-saliency attention map effectively "cleans" the action space, making the model's final policy outputs much more confident and focused.
  • Semantic Coherence: Treating every entry/exit candidate as an independent node hurts representation learning. Forcing the network to realize that "entering a field from the north" and "entering from the south" belong to the same underlying task significantly boosts generalization.
  • Zero-Shot Compositional Generalization: Even though the model was trained primarily on point-dominant hybrid instances, it successfully generalized to pure line-only or area-only configurations at test time without any retraining.

Key Results

  • Consistent Backbone Improvements: DiCon consistently boosted the performance of its underlying neural baselines (POMO and RELD).
  • Outperforming Traditional Toolkits: On larger scales (200 and 300 tasks), DiCon variants significantly outperformed traditional optimization toolkits like Google OR-Tools and Adaptive Large Neighborhood Search (ALNS).
  • Massive Speedups: Compared to strong traditional heuristics like LKH3, DiCon achieved highly competitive solution quality while executing orders of magnitude faster (e.g., fractions of a second vs. hours of CPU time for LKH3 on large instances).
  • Real-World Robustness: In zero-shot testing on real-world maps, DiCon successfully handled irregular polygon shapes and distribution shifts that completely differed from its synthetic training setup.

Limitations and Future Work

  • Single-Agent Focus: The current formulation assumes a single robot or agent is performing the entire mission. Real-world deployments often rely on multi-robot teams.
  • Simplified Operational Constraints: The framework does not yet account for complex, real-world constraints like time windows, vehicle capacity limits, battery recharge schedules, or dynamic obstacles.
  • Future Directions: The authors plan to extend DiCon to multi-agent CGRP settings using hierarchical or decentralized reinforcement learning, alongside introducing constraint-aware modules.

Summary updated

BibTeX
@inproceedings{fan2026learning,
  author = {Mingfeng Fan and Jianan Zhou and Jiaqi Cheng and Yifeng Zhang and Jie Zhang and Guillaume Adrien Sartoretti},
  title = {{Learning to Solve Compositional Geometry Routing Problems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=kvdydED2s3},
}
Figure