Particle Swarm Optimization Algorithm for TSP Based on Dynamic Multi-head Attention Aggregation
摘要
The Traveling Salesman Problem (TSP), as a classic NP-hard problem, holds significant research value in fields such as logistics and path planning. The Particle Swarm Optimization (PSO) algorithm is widely applied to such problems due to its efficiency, but its inherent tendencies for premature convergence and local optima limit its performance in complex scenarios. To fundamentally enhance the global exploration and local exploitation capabilities of PSO, this paper proposes a hybrid algorithm with an innovative structure. The core innovation lies in designing a dual-module architecture that works synergistically: First, a dynamically combined multi-head attention mechanism empowers particles to autonomously adjust their search perspective. By dynamically weighting different attention heads, it adaptively switches between global exploration and local refinement, thereby systematically enhancing population diversity and suppressing premature convergence. Second, a multi-level aggregation module constructs a structured information propagation network. By integrating path information from the current node, neighboring nodes, and globally critical nodes, it significantly improves the cooperative efficiency among particles and the algorithm's global perception capability. Comparative experiments on multiple standard TSP instances demonstrate that the proposed algorithm significantly outperforms mainstream comparative algorithms in both solution accuracy and convergence speed. Its structural design provides a novel and rigorous general framework for addressing the inherent limitations of PSO.