Combinatorial optimization problems are widely encountered in real-world applications. A critical research challenge lies in designing high-quality heuristic algorithms that efficiently approximate optimal solutions within a reasonable time. In recent years, many works have explored integrating Large Language Models (LLMs) with Evolutionary Algorithms to automate heuristic algorithm design through prompt engineering. However, these approaches generally adopt a problem-specific paradigm, applying a single algorithm across all problem instances, failing to account for the heterogeneity across instances. In this paper, we propose InstSpecHH, a novel framework that introduces the concept of instance-specific heuristic generation. InstSpecHH partitions the overall problem class into sub-classes based on instance features and performs differentiated, automated heuristic design for each problem subclass. By tailoring heuristics to the unique features of different sub-classes, InstSpecHH achieves better performance at the problem class level while avoiding redundant heuristic generation for similar instances, thus reducing computational overhead. This approach effectively balances the trade-off between the cost of automatic heuristic design and the quality of the obtained solutions. To evaluate the performance of InstSpecHH, we conduct comprehensive experiments on 4,500 subclasses of the Online Bin Packing Problem (OBPP) and 365 subclasses of the Capacitated Vehicle Routing Problem (CVRP). Experimental results show that InstSpecHH demonstrates strong intra-subclass and inter-subclass generalization capabilities. Compared to previous problem-specific methods, InstSpecHH reduces the average optimality gap by 6.06\% for OBPP and 0.66\% for CVRP. These results highlight the potential of instance-aware automatic heuristic design to further enhance solution quality.
翻译:组合优化问题在现实应用中广泛存在。一个关键的研究挑战在于设计高质量的启发式算法,以在合理时间内高效逼近最优解。近年来,许多研究探索将大型语言模型与进化算法相结合,通过提示工程实现启发式算法的自动化设计。然而,这些方法通常采用问题特定的范式,在所有问题实例上应用单一算法,未能考虑不同实例间的异质性。本文提出InstSpecHH,一个引入实例特定启发式生成概念的新框架。InstSpecHH基于实例特征将整体问题类别划分为子类,并对每个问题子类执行差异化的自动化启发式设计。通过为不同子类的独特特征定制启发式算法,InstSpecHH在问题类别层面实现了更优性能,同时避免了对相似实例的冗余启发式生成,从而降低了计算开销。该方法有效平衡了自动启发式设计成本与所得解质量之间的权衡。为评估InstSpecHH的性能,我们在在线装箱问题的4,500个子类和容量约束车辆路径问题的365个子类上进行了全面实验。实验结果表明,InstSpecHH展现出强大的子类内和子类间泛化能力。与先前的问题特定方法相比,InstSpecHH将在线装箱问题的平均最优性差距降低了6.06%,将容量约束车辆路径问题的平均最优性差距降低了0.66%。这些结果凸显了实例感知的自动启发式设计在进一步提升解质量方面的潜力。