LM-Searcher: Cross-domain Neural Architecture Search with LLMs via Unified Numerical Encoding

Yuxuan Hu, Jihao Liu, Ke Wang, Jinliang Zhen, Weikang Shi +5 more
9/6/2025
cs.CLcs.AI

Official code: Ashone3/LM-Searcher (6 stars, last commit 2025-10-15).

Abstract

Recent progress in Large Language Models (LLMs) has opened new avenues for solving complex optimization problems, including Neural Architecture Search (NAS). However, existing LLM-driven NAS approaches rely heavily on prompt engineering and domain-specific tuning, limiting their practicality and scalability across diverse tasks. In this work, we propose LM-Searcher, a novel framework that leverages LLMs for cross-domain neural architecture optimization without the need for extensive domain-specific adaptation. Central to our approach is NCode, a universal numerical string representation for neural architectures, which enables cross-domain architecture encoding and search. We also reformulate the NAS problem as a ranking task, training LLMs to select high-performing architectures from candidate pools using instruction-tuning samples derived from a novel pruning-based subspace sampling strategy. Our curated dataset, encompassing a wide range of architecture-performance pairs, encourages robust and transferable learning. Comprehensive experiments demonstrate that LM-Searcher achieves competitive performance in both in-domain (e.g., CNNs for image classification) and out-of-domain (e.g., LoRA configurations for segmentation and generation) tasks, establishing a new paradigm for flexible and generalizable LLM-based architecture search. The datasets and models will be released at https://github.com/Ashone3/LM-Searcher.

View on arXivView PDF

Code Implementations(1)

[EMNLP 2025] LLMs for Generalizable Neural Architecture Search.

60Jinja, ShellSep 3, 20251 years ago

Similar Papers

Cite this paper

@article{hu2025lmsearcher,
  title  = {LM-Searcher: Cross-domain Neural Architecture Search with LLMs via Unified Numerical Encoding},
  author = {Yuxuan Hu and Jihao Liu and Ke Wang and Jinliang Zhen and Weikang Shi and Manyuan Zhang and Qi Dou and Rui Liu and Aojun Zhou and Hongsheng Li},
  year   = {2025},
  eprint = {2509.05657},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.05657v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.05657.svg)](https://codeofpaper.com/paper/2509.05657)

Discussion