Skip to main content
QUICK REVIEW

[论文解读] LLMatic: Neural Architecture Search via Large Language Models and Quality Diversity Optimization

Muhammad Umair Nasir, Sam Earle|arXiv (Cornell University)|Jun 1, 2023
Topic Modeling被引用 4
一句话总结

LLMatic 提出了一种新颖的神经架构搜索(NAS)框架,结合大型语言模型(LLMs)进行基于代码的神经架构生成与质量-多样性(QD)优化,以发现多样化且高性能的架构。通过利用基于程序化、提示驱动的方法,结合 QD 提示与网络行为存档,LLMatic 仅用 2,000 次评估便在 CIFAR-10、CIFAR-100 和 ImageNet16-120 上实现了接近最先进水平的准确率,展示了无需事先接触基准模型即可实现高效且有效的 NAS。

ABSTRACT

Large Language Models (LLMs) have emerged as powerful tools capable of accomplishing a broad spectrum of tasks. Their abilities span numerous areas, and one area where they have made a significant impact is in the domain of code generation. Here, we propose using the coding abilities of LLMs to introduce meaningful variations to code defining neural networks. Meanwhile, Quality-Diversity (QD) algorithms are known to discover diverse and robust solutions. By merging the code-generating abilities of LLMs with the diversity and robustness of QD solutions, we introduce exttt{LLMatic}, a Neural Architecture Search (NAS) algorithm. While LLMs struggle to conduct NAS directly through prompts, exttt{LLMatic} uses a procedural approach, leveraging QD for prompts and network architecture to create diverse and high-performing networks. We test exttt{LLMatic} on the CIFAR-10 and NAS-bench-201 benchmarks, demonstrating that it can produce competitive networks while evaluating just $2,000$ candidates, even without prior knowledge of the benchmark domain or exposure to any previous top-performing models for the benchmark. The open-sourced code is available in \url{https://github.com/umair-nasir14/LLMatic}.

研究动机与目标

  • 解决传统神经架构搜索(NAS)方法中因依赖试错评估而存在的效率低下与多样性不足问题。
  • 探究大型语言模型(LLMs)是否可被有效用于生成神经网络的有意义架构变体。
  • 将 LLM 生成的代码与质量-多样性(QD)优化相结合,以发现多样化、高性能且鲁棒的架构。
  • 证明小型高效 LLM(6.1B 参数)可在极小的搜索预算下实现具有竞争力的 NAS 性能。
  • 通过消融研究验证 LLMatic 框架中各组件的必要性与有效性。

提出的方法

  • LLMatic 使用代码生成型 LLM(CodeGen-6.1B)以可搜索的代码片段形式生成神经网络架构,且受限于预定义的操作集合。
  • 采用质量-多样性(QD)算法,具体为 MAP-Elites 变体,维护两个存档:一个用于提示,一个用于训练后的网络架构。
  • 提示存档存储多样化且高质量的提示,以引导 LLM 生成多样化的网络单元;网络存档则存储具有不同行为描述符(如 FLOPS、参数量)的架构。
  • 每代生成过程包括:从 QD 存档中采样提示,使用 LLM 生成新的网络单元,训练并评估所得架构,根据性能和行为多样性更新网络存档。
  • 该方法采用程序化、迭代式循环:提示选择 → 基于 LLM 的架构生成 → 训练与评估 → 存档更新 → 下一代。
  • 该框架设计为计算高效,仅依赖 2,000 次总评估和较小的 LLM,同时仍实现具有竞争力的性能。
Figure 1: The illustration of the best accuracy per generation for LLMatic and all ablation studies. Each experiment is conducted with 10 seeds. The shaded region is the standard deviation while the solid line represents the mean. EfficientNet-B0 is the best-performing EfficientNet on CIFAR-10.
Figure 1: The illustration of the best accuracy per generation for LLMatic and all ablation studies. Each experiment is conducted with 10 seeds. The shaded region is the standard deviation while the solid line represents the mean. EfficientNet-B0 is the best-performing EfficientNet on CIFAR-10.

实验结果

研究问题

  • RQ1大型语言模型能否通过代码生成有效生成多样化且高性能的神经网络架构?
  • RQ2将基于 LLM 的代码生成与质量-多样性优化相结合,如何提升神经架构搜索中的搜索效率与多样性?
  • RQ3在仅 2,000 次试验的极小评估预算下,一个较小的 6.1B 参数 LLM 能在多大程度上实现具有竞争力的 NAS 性能?
  • RQ4LLMatic 在准确率与多样性方面与 Λ-DARTS 和基于 GPT-4 的 GENIUS 等最先进 NAS 方法相比如何?
  • RQ5LLMatic 框架中各组件的贡献是什么?该框架在架构约束和有限计算资源下是否具备鲁棒性?

主要发现

  • 在 NAS-bench-201 基准上,LLMatic 在 CIFAR-10 上实现了 94.26±0.13 的测试准确率,在所有测试方法中排名第二,仅略低于最优的 94.47。
  • 在 CIFAR-100 上,LLMatic 实现了 71.62±1.73 的准确率,排名第二;在 ImageNet16-120 上,准确率为 45.87±0.96,排名 11 位,表明其在不同数据集上均具备强大的泛化能力。
  • LLMatic 在 CIFAR-10 上发现了超过 20 个具有竞争力的网络,其在行为空间中分布广泛,表明架构搜索中具有良好的多样性。
  • 消融研究证实,LLMatic 的每个组件——LLM 生成、提示 QD 存档和网络 QD 存档——均至关重要,移除任一组件均导致性能显著下降。
  • 尽管仅使用 2,000 次评估和一个较小的 6.1B 参数 LLM,LLMatic 的性能仍优于简单的 GPT-4 基 NAS(GENIUS),并达到 Λ-DARTS(一种最先进方法)的性能水平。
  • 该框架表明,通过结合 LLM 与 QD 优化,实现高效、低资源的 NAS 是可行的,即使未事先接触高性能模型或进行大量超参数调优。
Figure 2: The illustration of how many trainable networks are created in a generation. The total number of networks created is 100 per generation.
Figure 2: The illustration of how many trainable networks are created in a generation. The total number of networks created is 100 per generation.

更好的研究,从现在开始

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

无需绑定信用卡

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