GAE: Graph-Augmented Evolution for Scientific Discovery via Reinforcement Optimization

Xuanzhou Chen, Taoli Cheng

TL;DR

GAE (Graph-Augmented Evolution) is a new framework that transforms LLM-guided scientific discovery from a stochastic "guess-and-check" process into a directed, self-improving search. By combining graph neural networks (GNNs) to understand program structure with reinforcement learning to adapt mutation strategies on the fly, GAE achieves state-of-the-art results in discovering complex physical equations.

What Problem Does This Paper Address?

Using Large Language Models (LLMs) to "evolve" code or mathematical formulas has shown great promise in fields like algorithm discovery (e.g., FunSearch). However, these systems typically hit three major bottlenecks:

  1. Reward Sparsity: You only find out if a program is good after running it. If a program is structurally brilliant but numerically slightly off, it’s often discarded, losing valuable "near-miss" information.
  2. Uninformed Selection: Most evolutionary loops treat their population of programs as an unstructured bag, picking parents based on simple fitness scores rather than structural potential.
  3. Static Mutation: The LLM acting as the "mutator" stays the same throughout the search. It doesn't learn from its own successes or failures as the discovery process progresses.

The authors tackle these by making the search "structure-aware" and adaptive.

Methods

GAE introduces a three-pillar architecture integrated into the OpenEvolve backbone:

  • Relational GNN Encoder: Instead of treating code as text, GAE parses programs into typed computation graphs (via Abstract Syntax Trees). A Graph Neural Network then creates "structure-aware embeddings," essentially mapping out the "shape" of the program space.
  • RL Meta-Controller (Discrete SAC): A Soft Actor-Critic (SAC) agent looks at a parent program's embedding and decides which type of mutation to apply (e.g., "replace an operator" or "rewrite a subtree"). This replaces blind sampling with a directed policy.
  • Online GRPO Fine-Tuning: This is the "secret sauce." Using Group Relative Policy Optimization (GRPO), the framework fine-tunes the LLM's weights during the search. It uses the relative performance of a group of generated children to align the LLM’s generation distribution with structural edits that actually yield high fitness.

Datasets

The authors evaluated GAE on the LLM-SRBench, specifically the Nonlinear Oscillators task.

  • The goal is to discover the governing differential equations (symbolic regression) for complex systems like damped harmonic oscillators.
  • The dataset includes In-Distribution (ID) data and Out-of-Distribution (OOD) data to test if the discovered equations can extrapolate to unseen physical regimes.

Key Insights and Ideas

  • Programs are Graphs, Not Strings: By using GNNs, GAE can recognize that two programs might look different as text but perform similar operations. This allows the RL controller to learn which structural "shapes" are promising.
  • Closing the Loop at Test-Time: Most LLM-based search tools use a frozen model. GAE’s ability to fine-tune the LLM while it is searching allows the model to specialize in the specific "language" of the problem it is trying to solve.
  • Directed Mutation Hints: Rather than just asking an LLM to "make this better," the SAC controller provides a structural hint (e.g., "prefer subtree_rewrite"). This guidance helps the LLM navigate the vast search space of possible equations more efficiently.

Key Results

GAE significantly outperformed both non-LLM baselines and state-of-the-art LLM-driven evolution methods:

  • Superior Accuracy: On the Nonlinear Oscillators task, GAE achieved a mean ID NMSE (Normalized Mean Squared Error) of -6.87 (log10 scale), compared to -3.88 for the standard OpenEvolve baseline.
  • Robust Extrapolation: It excelled at OOD performance, reaching a mean OOD NMSE of -7.10, suggesting it discovered the true underlying physics rather than just over-fitting the training data.
  • Efficiency: GAE found near-exact symbolic forms (including complex terms like quadratic drag and Duffing-like restoring forces) within just 150 iterations, a budget where other methods were still struggling to find a basic fit.

Limitations and Future Work

  • Language Dependency: The current implementation relies on Python ASTs. Adapting GAE to other programming languages or domain-specific languages would require redesigning the GNN's node types and relations.
  • Computational Overhead: Training a GNN and running RL updates adds complexity. The authors note that this is most beneficial when the evaluation step (like numerical integration) is itself very expensive, justifying the extra "thinking time" for the controller.
  • Inductive Bias: The graph representation encodes certain domain-specific biases. Future work could explore more general or learned graph representations to improve "out-of-the-box" performance on entirely new domains.

Summary updated

BibTeX
@inproceedings{chen2026gae,
  author = {Xuanzhou Chen and Taoli Cheng},
  title = {{GAE: Graph-Augmented Evolution for Scientific Discovery via Reinforcement Optimization}},
  booktitle = {AI4Science @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=9HAc5Yjf7L},
}
Figure