RZ-NAS: Enhancing LLM-guided Neural Architecture Search via Reflective Zero-Cost Strategy

Zipeng Ji, Guanghui Zhu, Chunfeng Yuan, Yihua Huang

TL;DR

RZ-NAS (Reflective Zero-cost NAS) is a novel framework that combines the reasoning power of Large Language Models (LLMs) with "zero-cost" proxies to automate neural network design. By using a human-like "reflective" loop—where the LLM critiques its own architecture designs based on training-free performance metrics—it achieves state-of-the-art results across major benchmarks at a fraction of the usual computational cost (as low as 0.03 GPU days).

What Problem Does This Paper Address?

Neural Architecture Search (NAS) aims to automate the design of optimal neural networks, but it traditionally faces a "Goldilocks" problem. Traditional methods are either incredibly computationally expensive (requiring the full training of thousands of candidate models) or rely on "one-shot" supernets that are difficult to tune.

Recent attempts to use LLMs for NAS (LLM-to-NAS) have struggled with three main issues:

  1. High Costs: Many still require full training for evaluation.
  2. Limited Scope: They often only work on tiny, simplified search spaces.
  3. Lack of Interpretability: Text-only prompts often fail to capture the structural nuances of complex code, leading to "hallucinated" architectures that don't actually work.
Comparison of RZ-NAS with existing LLM-based NAS algorithms, highlighting its superior search efficiency (0.03 GPU days) and comprehensive understanding capabilities.

RZ-NAS tackles these limitations by introducing a training-free evaluation strategy and a structured, code-aware reflection mechanism, drastically reducing search time while supporting both micro and macro search spaces.

Methods

The RZ-NAS framework operates as an iterative evolutionary loop built on three core pillars:

Overview of the RZ-NAS framework, illustrating the iterative loop between structured prompting, LLM generation, zero-cost evaluation, and the reflection module.
  1. Structured Multi-Level Prompting: Instead of simple text descriptions, the authors provide the LLM with four distinct inputs:
  2. Search Space Description: Definitions of available operations.
  3. Network Construction Code: Actual Python code showing how the network is built.
  4. Zero-Cost Proxy Description: Explanation and code for the evaluation metric.
  5. Text-based Genotype: A string representation of the current architecture. This "text + code" approach helps the LLM understand both the logic and the implementation of the search task.

  6. Zero-Cost (ZC) Evaluation: To avoid the massive cost of training, RZ-NAS uses "proxies" (like Gradnorm, Synflow, or ZiCo). These metrics estimate a model's potential by analyzing gradients or weights at initialization, taking only seconds to compute.

  7. The Reflective Module: This is the "aha" feature. After a mutation is scored, the LLM is given the results (score and any errors) and asked to "reflect." It generates linguistic feedback—essentially a design critique—to guide the next iteration. This turns a random search into an informed, goal-oriented optimization process.

Datasets

The authors evaluated RZ-NAS across a wide variety of standard benchmarks to prove its scalability and robustness:

  • NAS-Bench-201: Evaluated on CIFAR-10, CIFAR-100, and ImageNet-16-120.
  • DARTS Search Space: A more complex space used for CIFAR-10 and CIFAR-100.
  • MobileNet Search Space: Used for large-scale ImageNet classification under various FLOP budgets (450M, 600M, 1000M).
  • COCO: Used to test the framework's ability to search for efficient backbones for object detection.

Key Insights and Ideas

  • Code is Context: The paper finds that providing the LLM with the actual Python implementation of the network and the evaluation proxies significantly reduces "hallucinations" and invalid architectures.
  • Reflection as a Heuristic: Traditional evolutionary algorithms use random mutations. RZ-NAS uses the LLM to perform intelligent mutations. If a proxy score drops, the reflection module identifies why (e.g., "too many skip connections reducing expressiveness") and suggests a specific fix.
  • Efficiency Breakthrough: By replacing full training with ZC proxies, the search cost drops from days or weeks to roughly 43 minutes (0.03 GPU days) for a standard search.
  • Humanoid Reasoning: The reflection module allows the system to handle errors gracefully. If the LLM generates a model that exceeds a memory limit, the reflection module catches the exception and tells the LLM to "reduce the number of layers" in the next try.

Key Results

  • Superior Accuracy: On the DARTS search space (CIFAR-10), RZ-NAS achieved a test error of 2.41%, outperforming traditional SOTA methods like P-DARTS and previous LLM-based methods.
  • ImageNet Performance: In the MobileNet search space (450M FLOPs), RZ-NAS reached 79.0% Top-1 accuracy. This is higher than the leading specialized NAS approach (DONNA) while being 62x faster to find.
  • Better Proxies: The study showed that LLM-guided search actually improves the correlation between zero-cost proxies and actual test accuracy, making these "cheap" metrics more reliable than they are in random search.
  • Cost: The total API cost for a full search (1500 iterations) was approximately $75, making it accessible for researchers without massive compute clusters.

Limitations and Future Work

  • Proxy Dependency: RZ-NAS is still tethered to the quality of the Zero-Cost proxy. If a proxy is fundamentally unsuited for a specific task, the LLM's reflections—based on that proxy's scores—may lead the search in the wrong direction.
  • LLM Choice: While the framework works with Llama 3.1 and Claude 3.5, GPT-4o consistently provided the best results. The authors suggest that as open-source models improve, the cost and dependency on proprietary APIs will decrease.
  • Future Directions: The authors plan to integrate more cost-efficient open-source models and explore even more diverse downstream tasks beyond classification and detection.

Summary updated

BibTeX
@inproceedings{ji2025rz,
  author = {Zipeng Ji and Guanghui Zhu and Chunfeng Yuan and Yihua Huang},
  title = {{RZ-NAS: Enhancing LLM-guided Neural Architecture Search via Reflective Zero-Cost Strategy}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=9UExQpH078},
}
Figure