Source-linked AI summary

Closed-Loop LLM Discovery of Non-Standard Channel Priors in Vision Models

Tolgay Atinc Uzun, Dmitry Ignatov, Radu Timofte

arXiv:2601.08517v2cs.CV

TL;DR

The paper asks whether LLMs can optimize channel configurations for NAS despite scarce domain-specific data and strict tensor-shape constraints. It uses AST-generated valid architectures to bootstrap conditional code generation and iteratively fine-tunes the LLM using performance feedback. On CIFAR-100, the best generated model improves accuracy by 24.1% relative to the initial AST-generated population, while validity remains low and evaluation is limited in scope.

  • Problem

    LLM-based NAS lacks sufficient domain-specific executable architectures, while channel-width changes must satisfy coupled tensor-shape constraints.

  • Method

    The framework bootstraps valid architectures with AST mutations, then conditionally generates channel configurations from baseline code and target performance while fine-tuning on successful generations.

  • Results

    The best model achieves a 24.1% relative improvement, increasing accuracy from 0.250 to 0.311 over the strongest initial AST-generated model under the same proxy protocol.

  • Takeaways & Limitations

    Generated models exhibit unconventional channel priors, including irregular non-power-of-two widths and late-stage expansion patterns.

  • Takeaways & Limitations

    The study covers one dataset, one CNN backbone, and channel-width search, does not establish superiority over standard NAS baselines, and reports low validity under strict shape constraints.

Abstract

from arXiv · show

Channel-configuration search, the optimization of layer specifications such as channel widths in deep neural networks, presents a combinatorial challenge constrained by tensor-shape compatibility and computational budgets. We investigate whether large language models (LLMs) can support neural architecture search (NAS) by reasoning over architectural code structures in ways that complement traditional search heuristics. We apply an LLM-driven NAS framework to channel-configuration search, formulating the task as conditional code generation in which the LLM refines architectural specifications using performance feedback. To address data scarcity, we generate a corpus of valid, shape-consistent architectures through abstract syntax tree (AST) mutations. Although these mutated networks are not necessarily optimized for performance, they provide structural examples that help the LLM learn executable architectural patterns and relate channel configurations to model performance. Experimental results on CIFAR-100 show that the closed-loop LLM improves upon the initial AST-generated architecture population under the same proxy-evaluation protocol. Our analysis further shows that the generated architectures reflect domain-specific design patterns, including non-standard channel widths and late-stage expansion, highlighting the potential of language-driven design for code-level NAS. The code and prompts are publicly available at https://github.com/ABrain-One/NN-GPT, and the generated deep neural networks are published at https://github.com/ABrain-One/NN-Dataset under model names with the prefix ast-dimension-.

1 Introduction

The paper explores LLMs as code-level NAS optimizers that can iteratively refine channel configurations. It addresses scarce domain-specific training data by generating valid architecture variants with AST manipulation.

  • LLMs can modify neural-network programs directly using code syntax and logical flow for iterative architectural refinement.
  • The central challenge is insufficient domain-specific executable architectures for training LLMs on structural neural-network design.
  • AST manipulation generates syntactically valid and tensor-consistent network variants to initialize the LLM-driven search.
  • Channel configuration search tests closed-loop code generation because layer-width changes must preserve consistency across coupled components such as residual connections.

2 Related Work

Prior NAS methods commonly operate within fixed graphs, vocabularies, or search spaces, whereas LLM-based approaches generate and optimize executable code. The paper positions AST-generated synthetic architectures and feedback-driven generation as responses to validity and data limitations.

  • Conventional NAS often uses reinforcement learning or differentiable search within restrictive predefined supernets or search spaces.
  • The proposed code-oriented view treats channel counts as tokens, allowing syntax and program logic to complement numerical optimization signals.
  • LLM-based evolutionary methods use code-aware recombination or executable-program feedback to replace conventional mutation and optimization operators.
  • Prompt-only NAS methods can produce invalid candidates under residual channel constraints because they rely on pretrained knowledge for validity.
  • Related validity-focused systems combine LLM search with quality-diversity optimization, compiler feedback, or closed-loop fine-tuning on successful discoveries.
  • Synthetic code corpora motivate using AST-generated architectures as training data for program-generation behavior.

3 Methodology

The method bootstraps a database of valid architectures, then frames channel search as conditional code generation driven by performance targets and iterative fine-tuning. AST and graph analysis enforce shape consistency before candidates enter the loop.

  • The pipeline has three phases: AST bootstrapping, conditional generative optimization, and iterative fine-tuning on high-performing code structures.
  • The LLM synthesizes a new model from a baseline model, its performance, and a higher target performance.
  • The objective is to favor models whose performance improves over the baseline rather than merely maximizing code likelihood.
  • LEMUR stores executable PyTorch models, metadata, and evaluation metrics for dynamically constructing training pairs.
  • The database is populated with generated examples to address the cold-start need for channel-configuration training data.
  • AST parsing, TorchFX dependency analysis, constraint-aware editing, and dummy-tensor verification produce valid seed models.
  • The mutation engine selects channel widths while propagating changes across dependent layers and enforcing grouped-convolution constraints.
  • Verification checks shape consistency, gradient integrity, and trainability before adding models to the database.

4 Experiments and Results

On CIFAR-100, the closed-loop search evaluates channel-configured vision models with one-epoch validation accuracy and shows improvement over the initial AST-generated population. Later valid candidates have higher accuracy, but valid generation remains difficult.

  • Experimental setup: The CIFAR-100 experiment restricts search to convolutional and fully connected layer widths and evaluates each candidate after one training epoch.
  • Generative validity: 220 candidate architectures were generated across 22 initial epochs, but only 20 passed all structural checks, yielding a 9.09% validity rate.
  • Search trajectory: 0.311 was the global maximum accuracy at epoch 19, a 24.1% relative improvement over the initial population’s best model at 0.250.
  • Search trajectory: The search trajectory combines raw mean accuracy, rolling averages, generation success rate, and best-so-far performance to characterize exploration and discrete improvements.
  • Statistical analysis: β = +0.0019 with p = 0.083 indicates a positive epoch-wise maximum-accuracy slope, although the result is marginally above the standard 0.05 threshold.
  • Statistical analysis: Mean accuracy increased from 0.226 in epochs 0-5 to 0.273 in epochs 16-21, with a one-tailed t-test p-value of 0.0033.
  • Statistical analysis: The permutation test found a +0.0474 gap with p = 0.0077, while caution remains warranted because the late-stage population contained N = 4 valid models.

5 Discussion

The closed-loop process learned architectural patterns beyond uniform scaling, including resource reallocation toward later layers, irregular channel widths, and parameter-efficient late-stage expansion.

  • 5.1 Efficacy of AST-Based Bootstrapping: 1129 syntactically verified examples provided a syntactic prior that helped the LLM refine channel configurations rather than learn valid code generation from scratch.Although the seed examples used only AlexNet channel configurations, the LLM extrapolated the structural knowledge to AirNet’s block-level architecture.
  • 5.2 Structured Prompting: The prompt-removal ablation produced only 9 executable candidates out of 220 attempts, while jointly removing task, metric, and dataset conditioning prevented component-level attribution.Five of the nine valid models also drifted unintentionally in domain.
  • 5.3 Architectural Priors and Late-Stage Expansion: Layer-width correlations indicate resource reallocation: accuracy correlates negatively with second-layer width (ρ = −0.47) but positively with fourth-layer width (ρ = +0.53).The pattern is consistent with compressing early feature extraction layers and expanding later representations.
  • 5.3 Architectural Priors and Late-Stage Expansion: 40.9% of generated layer widths were not powers of two, including values such as 99 and 308 in high-performing models.These configurations treat channel count as a continuous hyperparameter rather than restricting it to a power-of-two grid.
  • 5.3 Architectural Priors and Late-Stage Expansion: The accuracy–parameter landscape contains a Pareto frontier where efficient high-performing models use narrow early layers followed by expanded final layers.The most efficient model reportedly achieves comparable performance to the global maximum with fewer parameters, although the figure passage does not provide the exact values.

6 Conclusion

The study presents a closed-loop LLM framework that searches channel configurations through executable source-code generation, bootstrapped with AST mutations. On CIFAR-100, it improves the initial AST-generated population while revealing unconventional channel priors, although the evaluation remains limited in scope.

  • 6 Conclusion: The framework uses an LLM to optimize vision-network channel configurations directly in executable source code under structural constraints.Channel search is formulated as conditional code generation rather than graph-based or numerical NAS.
  • 6 Conclusion: A 24.1% relative improvement raises accuracy from 0.250 to 0.311 over the strongest initial AST-generated model under the same proxy-evaluation protocol.Population-level and non-parametric analyses also support an upward shift among valid candidates.
  • 6 Conclusion: The discovered models exhibit unconventional channel priors, including irregular non–power-of-two widths.
  • 6 Conclusion: The study is limited to one dataset, one CNN backbone, and channel-width search, without establishing superiority over standard NAS baselines.Unconstrained LLM generation also remains inefficient because of a low validity rate under strict tensor-shape constraints.
Loading 2601.08517v2…