[论文解读] Less Is More -- On the Importance of Sparsification for Transformers and Graph Neural Networks for TSP
本文针对旅行商问题(TSP)中的Transformer模型与图神经网络(GNNs),提出了一种基于稀疏化的数据预处理方法,结合k-NN与1-Tree图稀疏化技术及注意力掩码机制。通过聚焦于结构上有意义的边,并对多种稀疏化层级进行模型集成,该方法显著提升了模型的泛化能力与性能,使TSP-100与TSP-50的误差差距降至0.00%,达到当前最优水平。
Most of the recent studies tackling routing problems like the Traveling Salesman Problem (TSP) with machine learning use a transformer or Graph Neural Network (GNN) based encoder architecture. However, many of them apply these encoders naively by allowing them to aggregate information over the whole TSP instances. We, on the other hand, propose a data preprocessing method that allows the encoders to focus on the most relevant parts of the TSP instances only. In particular, we propose graph sparsification for TSP graph representations passed to GNNs and attention masking for TSP instances passed to transformers where the masks correspond to the adjacency matrices of the sparse TSP graph representations. Furthermore, we propose ensembles of different sparsification levels allowing models to focus on the most promising parts while also allowing information flow between all nodes of a TSP instance. In the experimental studies, we show that for GNNs appropriate sparsification and ensembles of different sparsification levels lead to substantial performance increases of the overall architecture. We also design a new, state-of-the-art transformer encoder with ensembles of attention masking. These transformers increase model performance from a gap of $0.16\%$ to $0.10\%$ for TSP instances of size 100 and from $0.02\%$ to $0.00\%$ for TSP instances of size 50.
研究动机与目标
- 为解决GNNs与Transformer在密集TSP图上的泛化能力差的问题,其中所有节点均相连,信息流动变得无序。
- 通过稀疏化方法,使编码器聚焦于TSP实例中最相关、结构上有意义的边,从而提升模型性能。
- 探究对不同稀疏化层级训练的模型进行集成,是否能提升性能与鲁棒性。
- 证明稀疏化可通过减少无关的长距离信息传递,促进更好的节点表征学习。
- 在仅进行最小架构修改与高效预处理的前提下,实现TSP基准测试的最先进性能。
提出的方法
- 对TSP图应用k-NN与1-Tree稀疏化,生成稀疏邻接矩阵,在保留结构相关性的同时减少边的数量。
- 在Transformer中使用注意力掩码,限制自注意力机制仅作用于稀疏TSP图表示中存在的边。
- 设计在多个稀疏化层级(如k=3,10,50)上训练的模型集成,以融合多样化的结构推理。
- 通过归一化并翻转得分后应用softmax,为更近的邻居分配更高的注意力权重。
- 采用数据增强(翻转与旋转)将训练数据从100万增加至1600万实例,无需重复处理。
- 采用标准编码器-解码器框架,固定解码器以确保公平比较与端到端训练。
实验结果
研究问题
- RQ1对TSP图进行稀疏化是否能提升GNNs与Transformer在求解TSP问题上的性能?
- RQ2在Transformer中,注意力掩码是否能有效限制注意力机制仅关注稀疏TSP图中的有意义边?
- RQ3对不同稀疏化层级训练的模型进行集成,是否能带来更好的泛化能力与性能?
- RQ4稀疏化如何影响节点表征的质量以及后续解码性能?
- RQ5在不修改架构的前提下,稀疏化能否将误差差距降至最先进水平?
主要发现
- 所提出的稀疏化方法将TSP-100的误差差距从0.16%降低至0.00%,达到最先进性能。
- 对于TSP-50,误差差距从0.02%降至0.00%,表现出近乎最优的性能。
- 在不同稀疏化层级(如k=3,10,50)上训练的模型集成显著提升了性能,尤其对GCN模型而言,在TSP-100上实现了1.16%的误差率。
- 采用集成稀疏化的GCN模型优于单一层级集成与标准密集模型,表明结构多样性带来了显著优势。
- 1-Tree稀疏化方法耗时最长,但提供了最佳的结构保真度,单次处理10,000个TSP-100实例在M1 MacBook Air上耗时3.6分钟。
- 数据增强将训练集从100万增至1600万实例,预处理仅对每个实例执行一次,并在所有增强版本中复用。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。