Skip to main content
QUICK REVIEW

[论文解读] Dependency Injection for Programming by Optimization

Zoltan A. Kocsis, Jerry Swan|arXiv (Cornell University)|Jul 13, 2017
Evolutionary Algorithms and Applications参考文献 18被引用 3
一句话总结

本文提出 ContainAnt,一种基于依赖注入的框架,取代了编程优化(PbO)中传统的织入工具,实现了高效、在线的算法配置。通过将组件连接建模为上下文无关文法的语法优化,该框架引入了新型进化启发式算法——GrAnt 和 GrEvo,其在优化速度和解的质量方面相比 SMAC 最快提升两个数量级。

ABSTRACT

Programming by Optimization tools perform automatic software configuration according to the specification supplied by a software developer. Developers specify design spaces for program components, and the onerous task of determining which configuration best suits a given use case is determined using automated analysis tools and optimization heuristics. However, in current approaches to Programming by Optimization, design space specification and exploration relies on external configuration algorithms, executable wrappers and fragile, preprocessed programming language extensions. Here we show that the architectural pattern of Dependency Injection provides a superior alternative to the traditional Programming by Optimization pipeline. We demonstrate that configuration tools based on Dependency Injection fit naturally into the software development process, while requiring less overhead than current wrapper-based mechanisms. Furthermore, the structural correspondence between Dependency Injection and context-free grammars yields a new class of evolutionary metaheuristics for automated algorithm configuration. We found that the new heuristics significantly outperform existing configuration algorithms on many problems of interest (in one case by two orders of magnitude). We anticipate that these developments will make Programming by Optimization immediately applicable to a large number of enterprise software projects.

研究动机与目标

  • 为解决现有基于织入工具在编程优化(PbO)中的局限性,这些工具依赖脆弱的语言扩展和外部命令行配置。
  • 通过用依赖注入容器替代语法扩展,实现 PbO 在现有软件项目中的无缝集成。
  • 利用依赖注入与上下文无关文法之间的结构同构性,推导出一类新型的用于自动化算法配置的进化元启发式算法。
  • 在真实世界的优化问题上,评估这些新启发式算法与 SMAC 等成熟工具的性能表现。
  • 证明所提出的方法在速度、可靠性与可扩展性方面均优于当前的 PbO 流程。

提出的方法

  • 将软件组件设计空间表示为上下文无关文法,其中每个产生式规则对应依赖图中的一个配置选择。
  • 利用依赖注入容器在不修改源代码的前提下实例化组件配置,支持运行时和在线优化。
  • 应用一种新型基于语法的遗传算法(GrAnt)和蚁群优化算法(GrEvo),通过演化有效的语法推导来探索设计空间。
  • 将优化问题映射为在上下文无关文法中对推导路径的搜索,其中适应度由在给定基准上的性能决定。
  • 采用一种配置感知的映射机制,将抽象语法树映射为具体的组件实例,同时保持类型安全与模块化。
  • 引入一种基于启发式的搜索策略,避免对额外织入工具或命令行包装器的依赖,从而实现实时配置。

实验结果

研究问题

  • RQ1依赖注入能否作为编程优化中语法织入的原生、轻量级替代方案?
  • RQ2依赖注入与上下文无关文法之间的结构同构性是否能有效支持算法配置的元启发式搜索?
  • RQ3基于语法的进化启发式算法(GrAnt 与 GrEvo)在真实世界优化问题上,与 SMAC 等成熟工具相比,在性能与鲁棒性方面表现如何?
  • RQ4在实际企业级软件场景中,所提出的方法能否实现显著的速度提升与解质量改进,超越 SMAC?
  • RQ5现有语法演化方法(如早期收敛)在应用于软件配置时存在哪些局限性?

主要发现

  • GrAnt 启发式算法在五个基准问题中的四个上显著优于其他所有方法,在 Branin 函数和两个子集和实例中均找到了全局最优解。
  • 在 Branin 函数上,GrAnt 的平均适应度为 0.87,而 SMAC 为 1.47,p 值 < 0.001,表明统计上显著的性能提升。
  • 在子集和 P02 问题中,GrAnt 的平均适应度为 0.65,优于 SMAC 的 1.47 和随机搜索的 0.03,p 值 < 0.001。
  • 在 DHeap 问题中,GrAnt 的平均适应度为 46,801,方差为零,优于 SMAC 的 46,752 和随机搜索的 46,594。
  • 将原本需四小时的 SMAC 任务优化时间缩短至 46 秒,实现了 50 倍的速度提升,同时提升了解的质量。
  • GrEvo 表现较差,因多样性过早丧失,最快在五代内收敛,表明标准语法演化在实时软件配置中存在局限性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。