LLM-Evolved Message Functions for Connectome Neuron Classification
Abstract
We apply FunSearch-an LLM-driven evolutionary program synthesis framework-to discover novel message-passing functions for graph neural networks (GNNs) applied to neuron classification in the FlyWire connectome. Using a population-based island model with tournament selection and three open-weight 7B-parameter LLMs (Qwen2.5-Coder, DeepSeek-Coder, and DeepSeek-R1) running locally on CPU, evolution discovers message functions that achieve macro F1 = 0.911 ± 0.043 (95% CI: [0.890, 0.933]) on a synthetic connectome benchmark-substantially outperforming standard baselines (Simple F1 = 0.537, Attention F1 = 0.548) and matching the best hand-designed baseline (Difference F1 = 0.902). The best evolved function combines four distinct computational motifs-absolute differences, feature ratios, Hadamard products, and dual sigmoid gating-none of which appear in combination in the seed population. Comparing three LLM backends, Qwen2.5-Coder 7B reaches peak performance in 13 generations (130 evaluations) while DeepSeek-R1 7B requires 27 generations and DeepSeek-Coder 6.7B fails to improve beyond seed functions, demonstrating that LLM quality significantly affects evolution efficiency. Transfer validation on the real FlyWire connectome reveals a domain shift gap (F1 = 0.47-0.65), highlighting the importance of representative training distributions. Our results show that even modest open-weight LLMs, running without GPUs, can discover effective GNN architectures for neuroscience applications, democratizing neural architecture search for resource-constrained researchers.
Fields of Study & Subjects
Evolutionary Algorithms and Applications
Advanced Graph Neural Networks
Cell Image Analysis Techniques
Publication details
- Publication date
- 27 February 2026
- Language
- EN
- Document type
- Preprint