Structuring Benchmark into Knowledge Graphs to Assist Large Language Models in Retrieving and Designing Models

Hanmo Liu, Shimin Di, Jialiang Wang, Zhili Wang, Jiachuan Wang, Xiaofang Zhou, Lei Chen

Overview

Designing neural networks from scratch is computationally expensive. While Large Language Models (LLMs) can suggest architectures, they often lack the precise, structured knowledge needed for optimal performance. This paper introduces a Knowledge Benchmark Graph (KBG) that organizes historical "data-model-performance" records, allowing systems to instantly retrieve highly effective model designs for new, unseen datasets based on dataset similarity. This approach supercharges LLM-driven model design without the need for expensive training.

Introduction

Finding the perfect neural network architecture for a specific dataset is traditionally a tedious trial-and-error process. Automated Machine Learning (AutoML) and Neural Architecture Search (NAS) attempt to solve this, but they usually require training and evaluating thousands of candidate models, costing massive amounts of GPU time.

Recently, researchers have tried asking LLMs (like GPT-4) to design models. However, LLMs tend to suggest generic, commonplace architectures and struggle with fine-grained hyperparameter tuning because they lack deep, structured knowledge of what specific configurations work on specific types of data.

Meanwhile, the AI community has generated massive "benchmark" datasets—tables recording how thousands of models perform on various datasets. The authors recognized a missed opportunity: this tabular data is hard to query and use for new datasets. The challenge is figuring out how to structure this historical knowledge and use it to predict which models will work on a dataset the system has never seen before.

Overview of the KBG framework

Methodology

To bridge this gap, the authors propose a training-free retrieval and design framework:

  1. Knowledge Benchmark Graph (KBG) Construction: Instead of rigid tables, the authors convert benchmark data into a graph. Nodes represent datasets, models, and categorical features (like hardware or task type). Edges represent relationships, most notably has_performance, which stores the accuracy and loss of a specific model on a specific dataset.
Schema of the Knowledge Benchmark Graph
  1. Data Similarity & Model Retrieval: To find a model for an unseen dataset, the system extracts the new dataset's statistical features (e.g., number of nodes/edges for a graph dataset) and compares them to the benchmark datasets in the KBG. It then retrieves the models that performed best on the most similar historical datasets, operating on the intuition that "similar datasets prefer similar models."
  2. Evaluating Similarity (RLS): Because measuring dataset similarity is an open problem, the authors propose a novel metric called the Relevance Linearity Score (RLS). It evaluates a similarity metric based on transferability—if a metric claims Dataset A and Dataset B are similar, a top-performing model on A should reliably perform well on B.
  3. LLM Integration: Finally, the system feeds the retrieved candidate models, their historical performance, and the unseen dataset's profile into an LLM. The LLM acts as an expert controller, using this grounded context to select or refine the final architecture.

Datasets & Evaluation

  • NAS-Bench-Graph (Primary): Used to construct the main KBG. It contains performance records for 26,206 Graph Neural Network (GNN) architectures evaluated across 9 graph datasets (Cora, Citeseer, Pubmed, CS, Physics, Photo, Computers, Arxiv, Proteins). The resulting graph contains over 2.5 million facts.
  • NATS-Bench (Appendix): Used to prove the framework generalizes to computer vision. It contains architectures evaluated on image datasets (ImageNet16-120, CIFAR-10, CIFAR-100).

Key Insights

  • Zero-shot AutoML is viable: You can achieve state-of-the-art model designs without training a single network during the search phase. By cleverly querying past benchmark data, you can skip the computationally heavy steps of traditional NAS.
  • LLMs need grounding, not just prompting: LLMs are decent at reasoning but bad at guessing exact hyperparameters from scratch. Giving them a curated "shortlist" of what worked on similar data turns them into highly effective model selectors.
  • Dataset similarity is about model transferability: The authors highlight that comparing datasets shouldn't just be about looking at their statistical shapes. True similarity in the context of machine learning means that a good model for one is a good model for the other.

Results

  • Retrieval Competes with Heavy Compute: Simply retrieving the best model from the most similar dataset in the KBG (without any LLM refinement or model training) achieved the best or second-best accuracy on 4 out of 8 GNN datasets when compared to heavy-duty AutoML baselines and manually designed models.
  • LLM + KBG is the Winning Combo: Combining the KBG retrieval with GPT-4 for refinement pushed performance even higher. For example, on the "Physics" dataset, the KBG+LLM approach achieved 92.61% accuracy, outperforming standard LLM-based AutoML methods.
  • Cross-Domain Generalization: The authors showed the exact same KBG retrieval method successfully identified top-performing image classification models for unseen datasets in the NATS-Bench computer vision benchmark.

Limitations & Future Directions

  • Imperfect Similarity Metrics: The authors acknowledge that their current method for calculating dataset similarity (relying on basic statistical features) is somewhat simplistic. It doesn't perfectly correlate with actual model transferability, leaving room for improvement.
  • Future Directions: The authors suggest developing more sophisticated similarity functions. They also plan to merge multiple existing benchmarks into a massive, cross-domain KBG to support universal model design across entirely different fields of AI.

Summary updated

BibTeX
@inproceedings{liu2025structuring,
  author = {Hanmo Liu and Shimin Di and Jialiang Wang and Zhili Wang and Jiachuan Wang and Xiaofang Zhou and Lei Chen},
  title = {{Structuring Benchmark into Knowledge Graphs to Assist Large Language Models in Retrieving and Designing Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=49fIu0yDJ4},
}
Figure