Conversation
Evolving AI agents
· ChatGPT · 5 messages
Download transcript textSam
- Research Question: "Hybrid Evolutionary Strategies for LoRA Adapters (ES-LoRA)"
Context:
The core hypothesis of this project is that we can evolve the weights of a LoRA adapter (approx. 100k parameters)
rather than training them with backpropagation.
- The Problem: Standard genetic algorithms (like CMA-ES or NEAT) struggle when the parameter count exceeds ~10,000.
They become incredibly slow and sample-inefficient ("Curse of Dimensionality").
- The Gap: We need a mathematical bridge that allows us to evolve 100k+ parameters efficiently without needing a full
gradient descent loop.
Research Directive:
Investigate "Guided Evolutionary Strategies" and "Gradient-Assisted Mutation."
Look for:* Methods where a *approximation* of the gradient (which is cheap to calculate) is used to bias the
random mutations. Instead of mutating in random directions, we mutate in the "likely correct" direction.
Key Papers to Find:* "ES-MAML" (Evolutionary Strategies for Model-Agnostic Meta-Learning) or "Guided ES."
Goal:* Find a specific algorithm that allows a population of 50 agents to optimize a 100k-parameter LoRA adapter
in under 100 generations.
- Research Question: "Few-Shot Learning from Human Intervention (The HOLD Update)"
Context:
The HOLD system allows a human to pause the game and manually override the AI's decision (e.g., "Don't go left, go
right"). Currently, this just fixes the current instance.
- The Problem: How do we propagate this single "Gold Standard" correction to the entire population of agents without
retraining them from scratch?
- The Gap: We need a way to mathematically "inject" this correction into the genome of the population so they all
learn from the mistake instantly.
Research Directive:
Investigate "Inverse Reinforcement Learning (IRL) from Sparse Interventions" and "Population-Based Training (PBT)
with Human Feedback."
Look for:* Techniques where a single human correction is treated as a "constraint" or a heavy penalty term that
is broadcast to the fitness function of the entire species.
Goal:* A mathematical formula to update the FitnessFunction dynamically based on live user overrides (e.g., "Any
agent that takes action X in state Y gets a -50% fitness penalty").
- Research Question: "Evolving Latent Dynamics for World Models"
Context:
The project uses DreamerV3, which builds a "World Model" (a mental simulation of the game). The agent plans inside
this dream.
- The Problem: In a typical setup, the World Model is trained with heavy math (KL Divergence). If we try to evolve
it, the "meaning" of the dream world shifts constantly. If Mutation A changes how the agent sees "Walls," the
Policy (which learned to avoid walls) breaks because "Wall" now looks like "Floor."
- The Gap: How do we evolve the "Eye" (Encoder) and the "Brain" (Controller) simultaneously without them confusing
each other?
Research Directive:
Investigate "Co-Evolution of Morphology and Control" applied to Latent Spaces.
Look for: Research on "Fixing the Latent Basis."* Can we keep the Encoder frozen (or slowly moving) while the
Controller evolves rapidly?
Goal:* A strategy for "Alternating Evolution" (Evolve the World Model for 10 gens, then lock it and evolve the
Controller for 10 gens).
- Research Question: "Token-Free Multi-Modal Fusion (The 'Moneyball' Layer)"
Context:
The Moneyball component wants to fuse Text, Audio, Vision, and Game State into one "Thought Vector."
- The Problem: Standard approaches (like GPT-4) turn everything into "tokens." This is incredibly computationally
expensive and requires massive GPUs.
- The Gap: Since we are using Adapters, can we just fuse the raw "Embeddings" (vectors of numbers) directly?
- Hypothesis: There exists a lightweight "Gating Network" (much smaller than a Transformer) that can decide: "Trust
the Audio encoder right now, ignore the Vision encoder."
Research Directive:
Investigate "Gated Multi-Modal Fusion Encoders" and "Mixture of Experts (MoE) for Embedding Fusion."
Look for:* Lightweight architectures (like Perceiver IO or Gated Attention) that can mix 5 different vectors into
one 512-dim vector efficiently.
Goal:* An architecture diagram for a fusion layer that has fewer than 1M parameters but effectively switches
attention between 5 input modalities.
Summary for Assistant:
Focus on efficiency. The goal is not "State of the Art accuracy" (we have huge GPUs for that). The goal is "State of
the Art Efficiency"—making agents smart with 1/100th the compute and data.
ChatGPT
This is a well-structured research prompt. Just to confirm before I begin: would you like me to investigate and return detailed findings for all four research questions, or are you prioritizing a specific one first? Let me know if you'd like a structured report per topic, with diagrams, tables, and citations.
Sam
all 4
ChatGPT
Great — I’ll begin researching all four questions in parallel, focusing on high-efficiency methods, algorithmic frameworks, and architectural diagrams where appropriate. I’ll let you know as soon as the findings are ready. Feel free to continue chatting in the meantime!
ChatGPT
1. Hybrid Evolutionary Strategies for LoRA Adapters (ES-LoRA)
Evolving ~100K LoRA parameters requires guiding search with cheap gradient information. *Guided Evolutionary Strategies* (GES) is one method that biases random search along surrogate gradients. Maheswaranathan et al. introduce GES, defining the mutation distribution to be elongated along the subspace spanned by approximate gradient directions[source unavailable]. In practice, one computes a cheap “pseudo‑gradient” and then samples mutations mostly along that direction. This can drastically reduce the number of generations needed versus completely blind mutations.
Another line of work combines ES with meta-learning. *ES‑MAML* uses evolution strategies to solve a MAML problem[source unavailable]. It avoids costly second-derivative computations in standard MAML by treating gradient updates as a black-box adaptation. In effect, ES‑MAML evolves initial weights so that a (possibly non‑differentiable) inner-loop update leads to good performance[source unavailable]. While ES‑MAML is a meta-learning algorithm, its core idea – using ES to perform policy (or adapter) updates – can be adapted to evolve LoRA parameters by simulating gradient-like updates within the population. In all cases, these hybrid methods leverage any cheap gradient estimate to focus search.
Recent research shows more sophisticated gradient‑assisted techniques. *EvoGrad/EvoGrad2* (Gupta et al., 2025) integrate global ES statistics into gradient estimation. They train a small neural surrogate to predict the loss gradient, then bias it using CMA‑ES covariance to prioritize descent directions. As the authors note, “we integrate global statistical insights from the evolutionary algorithm CMA‑ES into the gradient learning framework, effectively biasing gradient estimates toward regions with higher optimization potential”[source unavailable]. This yields faster convergence on very high-dimensional problems. Similarly, dimensionality-reduction can help: the ESSA approach (Shaposhnikov et al., 2025) applies ES to LoRA by optimizing only the adapter’s SVD singular values, dramatically reducing the search space[source unavailable]. In ESSA, limiting search to low‑rank components “makes black‑box search practical even for very large models”[source unavailable].
Key techniques: In practice, one would use a population of ~50 and run for ~100 generations. For example, use GES: at each generation compute a surrogate gradient (e.g. via a small forward-backward pass or a finite-difference estimate on a subset of data) and sample mutations preferentially along that direction[source unavailable]. Alternatively, use an ES‑MAML style update: treat each agent’s LoRA as a “meta‑parameter” and apply one or a few ES-based adaptation steps per generation[source unavailable]. Combining these, one could compress the 100K weights via SVD (optimizing only singular values as ESSA does[source unavailable]) and use guided mutations. Such hybrid algorithms have been shown to handle thousands of parameters efficiently[source unavailable][source unavailable].
2. Few-Shot Learning from Human Intervention (HOLD Update)
A single human override (“go right, not left in this state”) can be treated as a hard constraint or reward adjustment for the population. One natural approach is to inject a penalty into the fitness function for any agent violating the rule. In constrained RL this is done via a Lagrangian penalty: maximize expected reward subject to constraints by subtracting a large penalty when constraints are broken. Concretely, define a penalty reward *r* and a constraint indicator. As Brown et al. note, “the Lagrange multiplier…can be viewed as the average penalty that the agent incurs for violating constraints. We assume constraints are ‘soft’ and that each time the agent violates one, the agent incurs a penalty reward *r*”[source unavailable]. Translating to our setting: if the human says “action *A* in state *S* is wrong”, then for every agent we reduce its fitness when it takes (*S*, *A*). For example, one could set
fitness'(agent) = fitness(agent) – (0.5) × I[agent took A in state S],
effectively subtracting 50% of its fitness if it violates the human instruction. This immediately penalizes all agents that made that mistake, without retraining.
Another view is inverse reinforcement learning from a single intervention. The human correction can be treated as a one-off demonstration of the “correct” action in that state. One-shot IRL methods have been developed for this purpose. For instance, Guha et al. (UAI 2024) show that even a single trajectory can suffice to recover a reward function in some settings[source unavailable]. After inferring an updated reward (or constraint) function from that one intervention, one can re-evaluate the entire population under the new reward. In effect, the override updates the hidden “genome” of everyone by shifting the underlying reward function.
In summary, the dynamic fitness update can be as simple as adding a penalty term for the forbidden action. Mathematically: introduce a penalty function \(P(s,a)\) that is 0 normally but \(P(S,A)=0.5\). Then redefine each agent’s fitness \(F' = F - P(S,A)\). This broadcasts the single human correction to all agents. In other words, any agent performing the disallowed action in the specified state loses half of its score. This method leverages standard penalty-function techniques in evolutionary algorithms[source unavailable], and has the advantage of immediate effect without additional training.
3. Evolving Latent Dynamics for World Models
Evolving a world model’s encoder (the “eye”) alongside the policy (“brain”) is tricky because changes in latent representation can invalidate learned behaviors. One solution is to freeze the latent basis while evolving the other component. For example, in Dreamer-like models one could pretrain the encoder and then lock its weights. The ReDRAW framework (Lanier et al., ICML 2025) follows this idea: after pretraining the world-model encoder on simulated data, “its weights are frozen to provide a stable latent representation”[source unavailable]. Only a small latent-space “residual” network is then trained to adapt to new environments. By keeping the encoder fixed, the policy can plan in a consistent latent space even as the world-model dynamics are corrected.
Building on this, we can use an alternating evolution strategy. For example, run 10 generations evolving the world model (updating its latent dynamics, perhaps via a small residual head) while keeping the policy fixed. Then switch: freeze the updated encoder and run 10 generations evolving the policy with that fixed latent input. Alternate these phases repeatedly. This is analogous to co-evolution of morphology and control in evolutionary robotics, where one alternates evolving the body and brain to avoid “chicken-and-egg” mismatches. Indeed, ReDRAW’s ablations even show an alternate method: after freezing the world model, one can train a new dynamics predictor on top of it instead of altering the encoder[source unavailable]. In practice, alternating optimization (model for N gens, then policy for N gens) keeps the latent “language” stable for the controller. This prevents an agent that learned “avoid wall” from suddenly finding that “wall” looks like “floor”. By fixing the encoder periodically (or using slow mutation rates on it) while letting the controller evolve, we maintain a consistent interpretation of the latent space, then periodically update it with the controller’s feedback.
4. Token-Free Multi-Modal Fusion (Moneyball Layer)
Instead of converting everything into discrete tokens, we can fuse raw embeddings from text, audio, vision, etc., using a small gating or expert network. A gated fusion unit can learn to weight each modality’s embedding. For example, the *Gated Multimodal Unit* (GMU) is a simple neural unit that uses multiplicative gates to combine modalities[source unavailable]. Concretely, given five 512-D embeddings \(e_1,\dots,e_5\), a tiny network could compute a gate vector \(g\in(0,1)^5\) (e.g. via a softmax or sigmoid MLP), and output \(\sum_i g_i e_i\). This only requires on the order of \(5\times 512\) weights (for a linear gating layer) plus a few hidden units, far below 1M parameters. Empirically, Arevalo et al. showed that such gating improved multi-modal fusion performance over standard Mixture-of-Experts baselines[source unavailable].
Alternatively, a Mixture-of-Experts (MoE) layer can be used. The recent FuseMoE model (Han et al., NeurIPS 2024) designs a fusion MoE specifically for many modalities[source unavailable]. It uses *sparsely gated* expert networks so that each modality is routed to one or a few small MLP “expert” branches. As the authors describe, “FuseMoE incorporates sparsely gated MoE layers in its fusion component, which are adept at managing distinct tasks and learning optimal modality partitioning”[source unavailable]. In our case, one could instantiate, say, 3–5 experts (each a small 512→512 network) and a gating network that outputs a weight distribution over them conditioned on the inputs. Crucially, we enforce a parameter budget under 1M by keeping each expert very lean (e.g. one hidden layer of a few hundred units) and using a simple softmax or Laplace gating function[source unavailable][source unavailable]. FuseMoE even routes each input modality to designated experts specialized for that type[source unavailable], and can gracefully handle missing modalities by re‑weighting experts dynamically[source unavailable][source unavailable].
Example architecture: One efficient design is to first project each 512-D input into a shared 512-D space (possibly with a separate small MLP per modality), then have a single “gating” MLP that outputs 5 coefficients. The final fused vector is the weighted sum of the modality embeddings. This gating MLP might have only ~512×128×5 ≈ 320K parameters (plus ~256K for modality-specific projections), easily under 1M total. Another design is a tiny MoE: have 3 experts (each with ~100K params) and a 5×3 routing matrix (another ~1500 params). The gating network takes the concatenated embeddings and computes which expert(s) to use. Such structures are much lighter than a full Transformer or Perceiver, yet allow the network to “trust” the most relevant modality at each step.
In summary, both gated units and sparsely-gated MoE layers offer lightweight fusion. The GMU style mechanism adaptively gates each modality[source unavailable], while MoE-style fusion (like FuseMoE) assigns modalities to experts via learned routing[source unavailable]. These approaches can blend five 512-D modalities into one fused vector with far fewer than 1M parameters, satisfying the efficiency goal.
Sources: We draw on recent work in guided evolutionary algorithms and hybrid optimization[source unavailable][source unavailable][source unavailable], on human-in-the-loop RL and inverse reinforcement learning[source unavailable][source unavailable], on world-model adaptation[source unavailable][source unavailable], and on multimodal fusion architectures[source unavailable][source unavailable], which demonstrate the feasibility of these efficiency-driven strategies.