🍄 Myco-Opt · arXiv-style pre-print ← Volver a la landing · myco.wagnersolutionsai.com

Myco-Opt: Mycorrhizal-Network-Inspired Priors for LLM-Driven Hyperparameter Optimization

Sebastian Wagner*, Shiva (AI Research Agent)

Wagner Solutions AI — Santiago, Chile
*Corresponding author: sebastian@wagnersolutionsai.com   †Conceptual and computational co-design

v0.2 · Aug 5, 2026 · Draft — not yet submitted
Fórmulas en MathJax · Dataset y experimentos reproducibles con dashAI
Abstract

Hyperparameter optimization (HPO) and neural architecture search (NAS) remain sample-inefficient despite advances in Bayesian optimization (BO) and, more recently, LLM-based optimizers such as OPRO. We introduce Myco-Opt, a framework that uses graph-theoretic properties of mycorrhizal networks — resource-transport networks shaped by millions of years of evolution under uncertainty — as biological priors to constrain the search space of LLM-driven optimizers. Mycorrhizal networks exhibit well-characterized structural features (modular guild organization, scale-free degree distributions, small-world connectivity, and adaptive resource allocation) that map naturally onto the design space of transformer-based language models (mixture-of-experts routing, layer width profiles, attention patterns, depth, and curriculum scheduling).

We build mycorrhizal interaction graphs from GlobalFungi (600M+ fungal observations) and MycoDB (experimental inoculation effects), encode them in a graph database, and extract network metrics that parameterize a biologically-grounded prior over hyperparameter space. An LLM optimizer (OPRO-style) proposes candidate configurations within this constrained space, receives training feedback, and iterates in an evolutionary loop.

On a causal language modeling proxy task (7–30M parameters, Chilean Spanish corpus), we benchmark Myco-Opt against random search, Hyperband, Optuna (BO), and vanilla OPRO. We hypothesize that biological priors reduce the evaluation budget required to reach a target loss by up to 50% relative to agnostic methods, while yielding structurally distinct, more interpretable configurations. We release all code, data pipelines, and the graph-to-hyperparameter mapping as open source.

Keywords: hyperparameter optimization · LLM as optimizer · bio-inspired computing · network science · mycorrhizal networks · neural architecture search

1  Introduction

Training large language models (LLMs) is expensive: a single run of a frontier-scale model can cost millions of dollars in compute. Within this budget, the search for good hyperparameters — depth, number of experts, learning rate, routing topology, dropout — remains a largely trial-and-error process. Modern HPO methods reduce waste but are still sample-inefficient: they require many costly evaluations to converge.

In parallel, a new class of optimizers treats LLMs themselves as optimizers (OPRO; Large Language Models as Optimizers, DeepMind 2023). The optimizer LLM proposes candidate configurations, receives evaluation feedback, and iterates. OPRO and its relatives (FunSearch) have shown that LLMs can discover competitive solutions — but they explore the search space agnostically, without structural priors.

This paper introduces Myco-Opt, which injects a biological prior into the search: the topology of mycorrhizal networks. Mycorrhizal networks are resource-transport systems formed by millions of years of evolution under uncertainty. Their structural properties — modular guilds, scale-free degree distributions, small-world connectivity, and adaptive resource allocation — map naturally onto the design space of transformers. We use these properties to constrain the search space of an LLM-driven optimizer, reducing blind exploration.

2  Related Work

2.1  Sample-inefficient HPO

Bayesian Optimization (BO) builds a surrogate of the objective and queries where improvement is expected. Hyperband uses adaptive resource allocation (successive halving). Both are strong baselines but degrade under small evaluation budgets and high-dimensional search spaces (Bergstra et al., 2011; Li et al., 2017).

2.2  LLMs as optimizers

OPRO (Yang et al., 2023) frames optimization as a prompt: the optimizer LLM proposes solutions from natural-language descriptions of past trials. FunSearch (Romera-Paredes et al., 2024) applies a similar loop to program synthesis. These methods are priors-free: every region of the search space is a priori equally plausible.

2.3  Bio-inspired network optimization

The slime mold Physarum polycephalum reconstructs near-optimal transport networks (Nakagaki et al., 2000; Tero et al., 2010, published in Science), inspiring a literature on organism-to-algorithm transfer. Myco-Opt extends this tradition to hyperparameter optimization of LLMs, using graph-theoretic metrics of real fungal datasets rather than abstract dynamics.

3  Method

3.1  Mycorrhizal networks as priors

A mycorrhizal network is a graph \(G = (V, E)\) where \(V\) contains plants and fungi, and edges represent co-occurrence or resource transfer. Three structural properties are of interest:

Each property has a standard quantitative measure, and each maps to a transformer design knob (Section 3.4).

3.2  Building interaction graphs from real data

We construct three graphs from open datasets:

Graphs are stored in a graph database (MillenniumDB, RDF) and queried via SPARQL to extract the metrics of Section 3.3.

3.3  Network metrics (the "biological prior")

We compute five classical metrics:

\[ \text{Modularity:}\quad Q = \frac{1}{2m}\sum_{ij}\left[A_{ij} - \frac{k_i k_j}{2m}\right]\delta(c_i, c_j) \tag{1} \]
\[ \text{Degree exponent:}\quad P(k) \propto k^{-\gamma} \tag{2} \]
\[ \text{Small-world:}\quad \sigma = \frac{C/C_{\text{rand}}}{L/L_{\text{rand}}} \tag{3} \]
\[ \text{Mean path:}\quad L = \frac{1}{n(n-1)}\sum_{i\neq j} d(i,j) \qquad \text{Clustering:}\quad C = \frac{1}{n}\sum_i \frac{2t_i}{k_i(k_i-1)} \tag{4} \]

where \(A\) is the adjacency matrix, \(k_i\) the degree of node \(i\), \(c_i\) its community label, \(t_i\) the number of triangles at \(i\), and \(d(i,j)\) the shortest-path distance.

3.4  Metric-to-hyperparameter mapping

Each metric constrains one (or more) transformer design knobs. The mapping is a search prior, not a fixed value — the evolutionary loop (Section 3.5) corrects it:

Network metric 🍄Ecological meaningLLM hyperparameter 🧠Example mapping
Modularity \(Q\)Specialized fungal guildsnum_experts (MoE)\(\text{round}(6/Q)\)
Degree exponent \(\gamma\)Hubs concentrate flowtop_k routing\(\text{clamp}(\text{round}(\gamma),1,8)\)
Small-world \(\sigma\)Local signal + global shortcutsnum_heads\(\text{round}(\sigma \cdot 4)\)
Mean path \(L\)How far carbon travelsnum_layers\(\text{round}(L \cdot 1.5)\)
Clustering \(C\)Local redundancydropout\(\text{clamp}(1-C,\,0.1,\,0.3)\)
Resilience to removalSurvives node failureregularization / sparsity
Carbon-flow dynamicsPrioritizes by needcurriculum / LR schedule

⚠️ These mappings are search priors: they restrict the search space toward biologically plausible regions. They do not dictate final values; the evolutionary loop corrects them.

3.5  The optimization loop (OPRO-style with fungal priors)

Algorithm 1: Myco-Opt loop (iteration \(i\))
  1. Query the graph DB → network metrics \(M_i = \{Q, \gamma, \sigma, L, C\}\)
  2. Map \(M_i \to\) search-prior \(P_i\) (ranges per hyperparameter)
  3. Prompt the optimizer LLM with \(P_i\) + trial history + training logs (loss, grad-norm, efficiency)
  4. LLM proposes \(K=8\) candidate configurations within the constrained space
  5. Evaluate: train a mini-model (1–2M params) for 500–2000 steps on a proxy task (causal LM on Chilean Spanish)
  6. Feedback: scores return to the prompt (OPRO protocol), plus a one-line "mycelial hypothesis" per config
  7. Evolve: keep top-2, mutate with Gaussian jitter (analogous to hyphal branching)
  8. Converge when \(\Delta \text{loss} < \epsilon\) or GPU budget exhausted

Differences vs. vanilla OPRO: (1) biological prior restricts the search space; (2) mycelial memory: the optimizer records why configurations worked; (3) fungal curriculum: training-data ordering follows the network's resource-flow dynamics.

4  Empirical Validation with dashAI

Before scaling to full LLM training, we validated the empirical foundation of the pipeline using dashAI (U. de Chile / CENIA): an open-source, local-first machine-learning workbench with a schema-driven UI. This validates the claim that network structure is predictable from node-level features — the basis of the surrogate model used inside the Myco-Opt loop.

4.1  Task: identifying critical nodes in mycorrhizal networks

We generated 48 synthetic mycorrhizal-like networks (Barabási-Albert, Watts-Strogatz, stochastic block model, and hybrid BA+SBM) with biologically realistic topologies. For each node we computed 21 structural features (degree, clustering, betweenness, closeness, eigenvector centrality, PageRank, core number, community size, graph-level metrics, …).

Target: \(\text{es\_critico}\) — whether a node is in the top 15% most damaging to network connectivity if removed (relative drop of the giant component):

\[ \text{damage}(v) = \frac{|GC(G)| - |GC(G - v)|}{|GC(G)|} \tag{5} \]

Dataset: 5,000–8,991 rows · 21 features · 3 model sessions · 7 runs. All experiments ran on a 4-core CPU VPS (Oracle Cloud, 23 GB RAM) — no GPU required, highlighting dashAI's local-first design.

4.2  Experiments (7 runs)

Table 1 — Experiment protocol. Splits: 70/15/15, shuffle + stratify.
#DatasetModelTuningF1 (test)PrecisionRecallROCAUC
2cleanRandomForestfixed1.0001.0001.0001.000
3acleanGradientBoostingOptuna (10)1.0001.0001.0001.000
3bcleanHistGradientBoostingOptuna (10)1.0001.0001.0001.000
5noisyRandomForestbaseline0.6860.8910.5580.772
6noisyGradientBoostingOptuna (10)0.6680.8540.5480.762
7noisyHistGradientBoostingOptuna (10)0.6780.8810.5510.772

Noisy dataset: Gaussian noise (8–20% of feature std) added to all numerical features and 12% of labels flipped, simulating real-world measurement error.

4.3  Key findings

  1. Clean data: all models reach \(F_1 = 1.0\). Node criticality is strongly determined by hub-like features (PageRank \(r = 0.40\), community size \(0.36\), modularity \(0.35\), core number \(0.30\)). This empirically supports the ecological theory that hubs concentrate flow and are critical to network resilience.
  2. Noisy data: \(F_1\) drops to \(0.67\)–\(0.69\). Critically, Optuna with 10 trials did not beat the untuned baseline (RF: 0.686). GB+Optuna even overfits the train split (\(F_1^{\text{train}} = 1.0\), \(F_1^{\text{test}} = 0.668\)).
  3. Interpretation: under low evaluation budgets and noisy data, agnostic optimization is inefficient. This is exactly the regime where a biological prior should help (H3 below).

4.4  The dashAI connection

dashAI was used end-to-end: dataset upload (UI), model sessions, Optuna integration, and metric collection. The schema-driven UI (forms generated from Pydantic schemas) made 7 experimental runs reproducible in minutes. This validates that the surrogate/meta-model component of Myco-Opt can be trained without writing code — democratizing the experimentation pipeline.

5  Proxy-Task Experimental Design (planned)

Table 2 — Benchmark configuration for the full Myco-Opt evaluation.
ComponentValue
Proxy taskCausal LM, 7–30M params, Chilean Spanish corpus (10–50M tokens)
Budget4–8 × H100-equivalent GPU-days
MethodsRandom Search · Hyperband · Optuna (BO) · OPRO vanilla · Myco-Opt
Runs per method30 (with variance reporting)
Metricsfinal loss · budget-to-target · run variance · structural interpretability
AblationMyco-Opt ± biological prior (does the prior add value over OPRO?)

Hypotheses:

6  Discussion & Limitations

7  Future Work

References

  1. Nakagaki, T., Yamada, H., Tóth, Á. (2000). Maze-solving by an amoeboid organism. Nature.
  2. Tero, A., et al. (2010). Rules for biologically inspired adaptive network design. Science.
  3. Bergstra, J., Bardenet, R., Bengio, Y., Kégl, B. (2011). Algorithms for hyper-parameter optimization. NeurIPS.
  4. Li, L., Jamieson, K., DeSalvo, G., Rostamizadeh, A., Talwalkar, A. (2017). Hyperband. JMLR.
  5. Simard, S., Perry, D., Jones, M., Myrold, D., Durall, D., Molina, R. (1997). Net transfer of carbon between ectomycorrhizal tree species. Nature.
  6. Beiler, K., Durall, D., Simard, S., Maxwell, S., Kretzer, A. (2010). Architecture of the wood-wide web. New Phytologist.
  7. Větrovský, T., et al. (2020). GlobalFungi: a global database of fungal occurrences. Scientific Data.
  8. Chaudhary, V.B., et al. (2016). MycoDB: a global database of plant response to mycorrhizal fungi. Scientific Data.
  9. Karst, J., Jones, M., Hoeksema, J. (2023). Positive citation bias and overinterpreted results in fungal network research. Nat. Ecol. Evol.
  10. Yang, C., et al. (2023). Large Language Models as Optimizers. arXiv:2309.03409.
  11. Romera-Paredes, B., et al. (2024). Mathematical discoveries from program search with LLMs. Nature.
Myco-Opt · Wagner Solutions AI · wagnersolutionsai.com · Experimentos con dashAI · Borrador v0.2 — Ago 2026