AI framework improves cosmology algorithms by rewriting its own code

An AI system called MadEvolve writes better astronomy algorithms than humans, beating top baselines in reconstructing early universe conditions. It pairs language models with evolutionary programming to iteratively improve code.

Categorized in: AI News Science and Research
Published on: Mar 23, 2026
AI framework improves cosmology algorithms by rewriting its own code

AI System Outperforms Human Algorithms in Cosmic Data Analysis

Astronomers face a fundamental problem: cosmic data accumulates faster than existing methods can process it. A new AI system called MadEvolve is beginning to solve that problem by writing better algorithms than humans do.

MadEvolve combines two computational approaches-Large Language Models and evolutionary programming-to iteratively improve algorithms used in cosmology. The system starts with human-written code, then systematically modifies and tests variations until it finds superior versions.

In several critical tasks, MadEvolve has beaten the best human-crafted baselines. For reconstructing the universe's initial conditions from observational data, it set a new state-of-the-art result.

How the System Works

Large Language Models excel at understanding and generating code. In MadEvolve, they function as "mutation operators"-they suggest specific modifications to existing programs, much like an experienced programmer would.

Evolutionary programming, borrowed from natural selection concepts, then evaluates these variants. The system samples a parent program, asks the language model for changes, tests the new version against physics-based metrics, and keeps the best performers. This cycle repeats across multiple generations.

The critical safeguard: MadEvolve restricts the language model to well-defined tasks with measurable outcomes. Physics evaluators verify that code changes actually improve performance, preventing the AI from drifting into unfounded theory.

Results in Cosmology

MadEvolve has delivered substantial improvements across multiple domains:

  • Reconstructing early universe conditions from current observations
  • Removing foreground contamination that obscures faint cosmic signals
  • Refining physics simulations of how matter clusters over time

In a separate finding, an AI algorithm recently identified 1,300 anomalies in archival Hubble telescope data. Hundreds of these objects had never been documented before.

Broader Applications Beyond Astronomy

MadEvolve operates as a general framework, not a cosmology-specific tool. The same approach could optimize code generation in software engineering, refine neural networks, and improve other computational tasks across scientific fields.

The system demonstrates that combining language models with evolutionary algorithms produces results neither approach achieves alone. Language models handle creative code suggestions; evolutionary selection ensures those suggestions actually work.

For researchers managing large datasets or complex simulations, this model offers a practical path forward. As data volumes continue growing, automated algorithm improvement may become as routine as peer review.

Learn more: Explore Generative AI and LLM fundamentals, or review AI for Science & Research applications.


Get Daily AI News

Your membership also unlocks:

700+ AI Courses
700+ Certifications
Personalized AI Learning Plan
6500+ AI Tools (no Ads)
Daily AI News by job industry (no Ads)