TL;DR
KnowEvo is a framework that treats scientific knowledge as a collection of modular, executable code blocks that evolve through iterative experimentation. By organizing these blocks into mutation trees and using an agentic sandbox for evidence-driven refinement, it allows Large Language Models (LLMs) to systematically accumulate and improve domain expertise for complex tasks like protein optimization.
What Problem Does This Paper Address?
While LLMs have shown a knack for generating scientific hypotheses, they struggle with the "persistence" of knowledge. In human scientific discovery, progress is iterative: experts develop heuristics, test them, and refine them based on feedback. Current LLM systems, however, usually keep their "expertise" buried in opaque model weights or scattered across transient prompts.
This creates three major hurdles:
- Lack of Structure: Knowledge isn't naturally continuous; it's discrete and compositional, making it hard to optimize like a neural network.
- Entangled Credit Assignment: When a complex design succeeds or fails, it’s difficult to know which specific part of the strategy was responsible.
- Sparse Feedback: Scientific signals (like a single energy score) are often too thin to guide a model toward a structured update of its internal logic.
Methods
The authors propose KnowEvo, which shifts the optimization target from model parameters to externalized knowledge.
- Executable Expertise Blocks: Instead of using natural language prompts, KnowEvo represents knowledge as Python code blocks. Each block encodes a specific design mechanism (e.g., "replace surface glycines to reduce flexibility"). This makes the strategy deterministic, inspectable, and modular.
- Strategy Mutation Trees: These blocks are organized into trees that track the lineage of revisions. As a strategy is refined, new versions are added as child nodes.
- Forward Phase (Budget Allocation): The framework uses a Thompson-sampling-style approach to decide which strategy to test. It balances "exploitation" (using strategies that have worked well) with "exploration" (testing new or uncertain revisions).
- Backward Phase (Agentic Revision): When a strategy accumulates enough data, a "code agent" steps in. Unlike simple prompt-based refinement, this agent operates in a revision sandbox. It can inspect execution traces, run diagnostic scripts, and validate new code before committing it to the mutation tree.
Datasets
The framework was evaluated on protein optimization tasks using enzyme sequences from the BRENDA dataset.
- Stability Task: Evaluated using the Rosetta REF2015 energy function.
- Solubility Task: Evaluated using a SaProt-based solubility predictor.
- Cross-Predictor Evaluation: To ensure the gains weren't just "overfitting" to one simulator, the authors also tested Rosetta-evolved strategies against ThermoMPNN.
Key Insights and Ideas
- Knowledge as Code: By turning heuristics into code, the authors provide the LLM with a "memory" that is structured and executable. This allows for fine-grained updates—changing a specific threshold or adding a conditional check—without rewriting the entire strategy.
- The Power of the Sandbox: The agentic sandbox is a game-changer. It allows the LLM to act more like a human researcher—diagnosing failures by looking at specific cases rather than just guessing based on a summary prompt.
- Learning "Negative" Rules: One of the most interesting findings was the evolution of "veto" rules. In one case study, the system learned not to perform certain mutations in flexible loops because they frequently led to backbone strain, demonstrating that knowing what not to do is as vital as knowing what to do.
Key Results
KnowEvo consistently outperformed monolithic program evolution and prior LLM-guided baselines (like GEPA and AdaEvolve) across all metrics.
- Protein Stability: The framework improved the
pass@1rate (the probability that the top-ranked suggestion is successful) from 42.4% (root blocks) to 50.5%. - Protein Solubility: The gains were even more dramatic, with
pass@1jumping from 31.6% to 51.5%. - Ranking Quality: Metrics like MRR (Mean Reciprocal Rank) and NDCG@5 also saw significant boosts, meaning the system didn't just find more successful mutations—it got much better at putting the best ones at the top of the list.
Limitations and Future Work
- Proxy Rewards: The study relies on computational simulators (Rosetta, SaProt). While these are standard in the field, the ultimate test would be wet-lab validation to see if these evolved strategies hold up in real biological systems.
- Computational Cost: The agentic revision process involves significant LLM token usage, which is more expensive than simple prompting.
- Node Interactions: Currently, the framework treats strategy blocks as somewhat independent. The authors suggest that future work could model these as a compositional graph, allowing the system to learn how different expertise blocks interact or should be sequenced.
Summary updated