Traditional Neural Architecture Search (NAS) treats the design of deep neural networks as a brute-force optimization problem. Whether using reinforcement learning, evolutionary algorithms, or differentiable supernets, these methods navigate a discrete space of layers, kernel sizes, and skip connections by evaluating thousands of candidate networks from scratch. This process is computationally ruinous because the search algorithm begins with zero intuition about deep learning design patterns; it must learn from baseline principles that a $3 \times 3$ convolution is generally followed by batch normalization.
A emerging paradigm shifts this burden by employing Large Language Models (LLMs) as intelligent, heuristic search agents. Because LLMs are trained on vast corpuses of machine learning literature and source code, they possess a latent, semantic understanding of architectural design principles. Instead of searching blindly, they can reason about architectural trade-offs, interpret performance feedback, and propose highly optimized configurations in a fraction of the time.
The Iterative Feedback Loop
An LLM cannot successfully design an optimal neural network in a single, zero-shot generation. As observed by Muhammad Umair Nasir et al. in the development of LLMatic, while LLMs excel at code generation, they struggle to autonomously complete NAS tasks because they cannot natively test, validate, or learn from the physical constraints of the architectures they write.
To overcome this, modern frameworks implement an outer loop where the LLM functions as a black-box optimizer or heuristic proxy. The process follows a structured cycle:
┌────────────────────────────────────────────────────────┐
│ │
│ ┌───────────┐ │
│ │ LLM │ │
│ └─────┬─────┘ │
│ │ │
│ Proposes Candidate Architecture │
│ │ │
│ ▼ │
│ ┌───────────┐ │
│ │Evaluation │ │
│ │ Engine │ │
│ └─────┬─────┘ │
│ │ │
│ Returns Performance Metrics │
│ (Accuracy, Latency, Memory) │
│ │ │
│ └────────────────────────────┘
- Proposal: The LLM generates a candidate architecture (often as code or a structural specification) based on the task description and design constraints.
- Evaluation: An external execution engine trains or evaluates the proposed model, measuring empirical metrics such as accuracy, latency, or hardware footprint.
- Feedback: These performance metrics are formatted into a natural language prompt and fed back to the LLM, alongside a historical memory bank of previous attempts.
Wenhao Li et al. demonstrated this mechanism with DiffNAS, using GPT-4 to discover optimal U-Net architectures for diffusion models. By treating the LLM as a proxy that reflects on a memory bank of past results, the framework bypasses the need to train a massive, traditional supernet. Similarly, the authors of Pathology-NAS showed that LLMs can successfully interpret multi-modal performance feedback to navigate complex design spaces for histopathology, converging on near-optimal configurations in significantly fewer iterations than random or evolutionary searches.
Grounding Creativity with Algorithmic Constraints
If left entirely unconstrained, an LLM may propose physically impossible architectures or hallucinate non-existent layers. To prevent this, researchers embed LLMs within formal optimization frameworks, using the model as a creative mutation engine rather than an unconstrained director.
In LLMatic, Muhammad Umair Nasir et al. integrated LLMs procedurally within a Quality-Diversity (QD) framework. Here, the QD algorithm maintains a diverse archive of high-performing architectures, while the LLM is strictly called upon to perform intelligent "crossover" and "mutation" operations on existing code.
For highly specialized domains, such as solving partial differential equations, Qingpo Wuwu et al. introduced PINNsAgent, which uses a tree-based reasoning strategy. By acting as a strategic policy controller within a formal search tree, the LLM's exploration remains strictly grounded by empirical physical constraints, preventing the generation of impractical configurations while automating the design of Physics-Informed Neural Networks (PINNs).
Multi-Objective and Hardware-Aware Co-Design
Traditional NAS struggles when forced to balance conflicting, non-differentiable objectives—such as maximizing accuracy while minimizing memory footprint, maintaining demographic fairness, or adapting to unconventional hardware. Because LLMs process instructions semantically, they can reason about these multi-dimensional trade-offs directly through prompt context.
This flexibility is highly effective when designing models for resource-constrained environments or specialized hardware:
- TinyML and Microcontrollers: Christophe El Zeinaty et al. demonstrated that LLMs acting as search agents within a hierarchical search space can accelerate the discovery of models for microcontrollers by 4x to 8x, successfully satisfying strict SRAM limits under 320KB.
- Unconventional Hardware: In UH-NAS, Tyler King et al. utilized LLMs as evolutionary operators to design architectures for optical chips. The LLM generates hardware-specific system prompts infused with physical design heuristics, guiding the search toward networks that are inherently robust to hardware noise.
- Fairness and Multi-Component Systems: Ruiyang Qin et al. introduced FL-NAS to optimize simultaneously for accuracy, hardware efficiency, and demographic fairness across groups. In a similar vein, the authors of LACER utilized LLMs to design multi-component state encoders for Reinforcement Learning, breaking out of rigid, predefined search spaces by leveraging the model's broad understanding of diverse sensor modalities.
Bootstrapping Search with Structured Knowledge
To further reduce the computational cost of training candidate networks from scratch, LLM-driven optimizers can be augmented with historical data. Instead of forcing the LLM to guess initial architectures blindly, frameworks can feed the model structured historical context.
Hanmo Liu et al. formalized this approach by structuring benchmark data into a Knowledge Benchmark Graph (KBG). This graph maps historical "data-model-performance" relationships. When faced with a new, unseen dataset, the LLM queries the knowledge graph to retrieve highly effective model designs from similar tasks. This allows the system to instantly bootstrap the architecture design process, bypassing the expensive initial trial-and-error phases that plague traditional NAS.
┌────────────────────────────────────────────────────────┐
│ Knowledge Benchmark Graph │
│ ┌─────────────────┐ ┌───────────────────┐ │
│ │ Historical Task │ ──Match──> │ Successful Model │ │
│ └─────────────────┘ └─────────┬─────────┘ │
└───────────────────────────────────────────┼────────────┘
│
Retrieved Context
│
▼
┌───────────────────┐
│ LLM Agent │
└─────────┬─────────┘
│
Refined Design for
New Dataset
│
▼
┌───────────────────┐
│ Optimized Model │
└───────────────────┘
Meta-Engineering: Beyond Macro-Architecture
The capacity of LLMs to reason about neural network structures is not limited to macro-architecture design (such as choosing layer widths or block depths). The same latent architectural knowledge can be applied to meta-engineering tasks, such as discovering optimal model compression strategies.
In AutoPrune, Haidong Kang et al. demonstrated that LLMs can synthesize optimization principles to discover entirely novel pruning metrics for compressing other large models. By utilizing a Graph-driven Chain-of-Thought reasoning engine, the LLM uncovers mathematical heuristics that outperform human-designed pruning rules, solving complex structural issues like outlier value propagation at high sparsity ratios.
Ultimately, LLM-guided architecture optimization works because it replaces blind mathematical exploration with semantic, experience-driven exploitation. By pairing the creative, code-generative capabilities of language models with rigorous evaluation engines, the field moves away from brute-force computation toward automated, intelligent model co-design.
Key Foundational Work
LLMatic: Neural Architecture Search via Large Language Models and Quality-Diversity Optimization (2023) — contributed 3 concept elements to this direction.
DiffNAS: Bootstrapping Diffusion Models by Prompting for Better Architectures (2023) — contributed 2 concept elements to this direction.
FL-NAS: Towards Fairness of NAS for Resource Constrained Devices via Large Language Models : (Invited Paper) (2024) — contributed 2 concept elements to this direction.