Towards Code-Oriented LM Embeddings for Surrogate-Assisted Neural Architecture Search
This paper proposes Code-Oriented LM Embeddings (COLE), a low-cost strategy that leverages off-the-shelf language models to represent neural architectures as PyTorch code, enabling competitive surrogate-assisted Neural Architecture Search without specialized fine-tuning and significantly reducing the evaluation budget required to find optimal models.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: Finding the Best Recipe is Expensive
Imagine you are a chef trying to find the absolute best recipe for a cake. You have a massive cookbook with millions of possible combinations of ingredients (flour, sugar, eggs, spices) and methods (baking time, temperature).
In the world of Artificial Intelligence, this is called Neural Architecture Search (NAS). The "recipes" are neural network designs, and the "taste test" is training the AI to see how well it works. The problem is that "tasting" every single recipe takes forever and costs a fortune in computer power. You can't just bake every cake in the book.
To solve this, scientists use a Surrogate (or a "taste predictor"). This is like a food critic who looks at a recipe on paper and guesses how good the cake will taste, so you don't have to actually bake it. The goal is to find a critic who is fast, cheap, and very accurate.
The Old Way: Translating Recipes into a Foreign Language
Previously, to get a critic to understand a recipe, scientists had to translate the complex code of the neural network into a strange, simplified text format (like turning a recipe into a list of chemical formulas or a weird diagram).
Think of it like this: You have a master chef (a Large Language Model, or LM) who knows how to cook because they have read millions of real cookbooks and recipes. But instead of showing them the actual recipe, you hand them a translation written in a language they've never seen before (like "ONNX-to-text" or "derivation trees").
To make the chef understand this new language, you have to spend weeks fine-tuning them—essentially re-educating them from scratch. This is slow, expensive, and defeats the purpose of having a fast "taste predictor."
The New Idea: Just Show Them the Real Recipe
The authors of this paper, Pranav Somu and his team, had a simple insight: Neural networks are already written in code. They look like Python programming scripts.
Since the "master chefs" (Large Language Models like CodeLlama) were already trained on trillions of lines of real computer code, they already know how to read these recipes perfectly. They don't need to be re-educated.
The Solution (COLE):
Instead of translating the recipe into a weird format, they just feed the raw Python code directly into the pre-trained AI.
- No Fine-Tuning: They use the AI "as is" (frozen). It's like hiring a chef who already knows how to read your specific cookbook without needing a training seminar.
- The Embedding: The AI reads the code and turns it into a mathematical "fingerprint" (an embedding) that captures the essence of the recipe.
- The Predictor: A small, simple calculator (a regression head) looks at that fingerprint and predicts how good the architecture will perform.
What They Found
The team tested this idea using two different "cookbooks" (search spaces) and found some surprising results:
- Raw Code Wins: When they fed the AI the actual Python code, it predicted performance much better than when they fed it the weird, translated text formats. It's like the chef saying, "I understand the real recipe; I don't need you to translate it into chemical formulas for me."
- No Training Needed: They proved you don't need to spend weeks fine-tuning the AI. The "off-the-shelf" models worked great immediately.
- Faster Search: When they used this method to search for the best AI architecture (using an algorithm called BANANAS), they found the best designs much faster.
- For one task (CIFAR-100), they reached the top 1% of the best possible designs using 34% fewer computer evaluations than the old method. It's like finding the best cake recipe by tasting only 66 cakes instead of 100.
Why This Matters
This approach is like giving a universal translator to a search engine. Because every neural network can be written as code, and code is a universal language that these AI models already speak fluently, this method works for almost any type of architecture without needing custom engineering.
In short: Instead of forcing a smart AI to learn a new, weird language to understand neural networks, the authors just spoke to it in the language it already knows: Code. This saves time, money, and gets better results.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.