TL;DR
Researchers have developed tnGPS, a framework that uses Large Language Models (LLMs) to automatically discover superior algorithms for Tensor Network Structure Search (TN-SS). By mimicking the iterative "research cycle" of human experts, tnGPS generated novel algorithms that outperform existing state-of-the-art heuristics in image and model compression tasks.
The Challenge of Tensor Network Structure Search
Tensor Networks (TNs) are a powerful mathematical tool used to break down massive, high-dimensional problems into smaller, manageable "factors." They are essential in fields ranging from quantum physics to deep learning. However, choosing the right "shape" for these networks—a process called Tensor Network Structure Search (TN-SS)—is incredibly difficult.
TN-SS involves picking hyperparameters like network topology and "ranks" (the dimensions of the connections). Because the search space is discrete and astronomical in size, human researchers have mostly relied on hand-crafted heuristics. These manual algorithms often struggle with the "curse of dimensionality" or get stuck in local optima. Improving them requires a labor-intensive cycle of trial, error, and intuition that can take months of expert effort.
The tnGPS Framework: Automating Innovation
The authors propose tnGPS (tensor-network-purposed GPT-driven structure search), a framework that replaces the human researcher with an LLM agent. To do this effectively, they modeled the standard human research workflow into a multi-stage prompting pipeline:
- Idea Pool: The system starts with a collection of existing TN-SS algorithms (written in Python) and their performance scores.
- Knowledge Categorization (KC): The LLM clusters these algorithms into groups based on their underlying logic to understand the "landscape" of current knowledge.
- Idea Dropout (ID): Using a "roulette" selection method, the system picks promising ideas to evolve, ensuring that high-performing ideas are prioritized while maintaining some diversity.
- Multiple-Stage Innovation: This is where the "aha" moments happen. The framework uses three distinct strategies:
- Knowledge Recombination (KR): Merging successful elements from different algorithm clusters.
- Incremental Innovation (II): Making small, surgical improvements to a single algorithm.
- Diversity Injection (DI): Forcing the LLM to generate "orthogonal" ideas that are methodologically different from anything in the current pool to avoid getting stuck in a rut.
- Sandbox Evaluation: Newly generated code is tested in a safe, automated environment. If it runs successfully, its performance is scored and fed back into the Idea Pool for the next iteration.
Key Insights and Discoveries
The paper demonstrates that LLMs aren't just good at writing code; they can effectively mimic the process of scientific discovery when given the right structural constraints. The LLM-discovered algorithms (named Ho-1, Ho-2, and Ho-3) showcased several fascinating characteristics:
- Non-Markovian Algorithms: Unlike traditional heuristics that only look at the current step, the discovered algorithms tended to incorporate historical information from previous iterations to guide their search.
- Counter-Intuitive Strategies: One discovered algorithm, Ho-1, employed an "inverse annealing" trick. While standard algorithms usually reduce randomness over time (cooling), Ho-1 increased its mutation rate progressively to enhance exploration in later stages.
- Novel Mutation Strategies: Ho-2 introduced a Gaussian perturbation mutation strategy that is unprecedented in existing genetic algorithm literature for TN-SS.
Performance and Results
The algorithms discovered by tnGPS consistently beat human-designed baselines (like TNGA, GREEDY, and TNLS) across two main benchmarks:
- Natural Image Compression: Using images from the BSD500 dataset, the goal was to find TN structures that represent images with the fewest parameters while maintaining high quality. Ho-2 achieved the best balance of compression ratio and error, outperforming all SOTA methods.
- Model Compression for Gaussian Processes: Using the CCPP and MG datasets, the algorithms searched for optimal structures to compress a Tensorial Gaussian Process (TGP) regression model. The discovered algorithms found better model structures using significantly fewer samples than the baselines.
Notably, the authors found that GPT-4 was significantly more capable than GPT-3.5 or Claude models at generating effective, non-trivial algorithm modifications.
Limitations and Future Work
While powerful, the framework has limitations. Because LLMs are probabilistic, the performance of the discovered algorithms can vary between runs. Furthermore, the authors noted that LLMs sometimes misunderstood the objective function (e.g., thinking a higher error score was better).
To combat this "hallucination" and logic failure, the researchers had to provide very precise "interface descriptions" in the prompts to strictly define the inputs, outputs, and goals.
Looking forward, the authors suggest that this "meta-method" could be applied to other complex optimization problems beyond tensor networks, potentially accelerating algorithm discovery across various scientific domains.
Summary updated