EvoGraph: Hybrid Directed Graph Evolution toward Software 3.0

Igor Costa, Christopher Baran · 2025

Read EvoGraph: Hybrid Directed Graph Evolution toward Software 3.0 by Igor Costa, Christopher Baran (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-05199.txt.

Introduction

Igor Costa and Christopher Baran build software that rewrites itself in a 2025 paper. Their framework, EvoGraph, stores every artifact, code, build scripts, documents, and tickets, as nodes in a typed graph. Small specialized language models mutate the graph, and a multi-goal fitness test picks which changes survive. The loop runs continuously under measurable control.

On three benchmarks, the system fixed eighty-three percent of known security flaws. It translated COBOL to Java with ninety-three percent functional match, verified by tests. Documentation stayed fresh within two minutes. A language-tuned extension modernized several legacy codebases at eighty-two to ninety-six percent meaning match, at a tenth of the compute cost of giant models. The authors frame it as a step toward self-adapting software.

Catalog record

CREATORIgor Costa, Christopher Baran
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE27 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-05199

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

EvoGraph: Hybrid Directed Graph Evolution toward Software 3.0 Igor Costa, Christopher Baran Abstract We introduce EvoGraph , a framework that enables software systems to evolve their own source code, build pipelines, documentation, and tickets. EvoGraph represents every artefact in a typed directed graph, applies learned mutation operators driven by specialized small language models (SLMs), and selects survivors with a multi-objective fitness. On three benchmarks, EvoGraph fixes 83% of known security vulnerabilities, translates COBOL to Java with 93% functional equivalence (test verified), and maintains documentation freshness within two minutes. Experiments show a 40% latency reduction and a sevenfold drop in feature lead time compared with strong baselines. We extend our approach to evoGraph , leveraging language-specific SLMs for modernizing .NET, Lisp, CGI, ColdFusion, legacy Python, and C codebases, achieving 82-96% semantic equivalence across languages while reducing computational costs by 90% compared to large language models. EvoGraph’s design responds to empirical failure modes in legacy modernization, such as implicit contracts, performance preservation, and integration evolution. Our results suggest a practical path toward Software 3.0, where systems adapt continuously yet remain under measurable control. 1 Introduction Enterprises operate millions of lines of legacy code that lag business needs. Large language models (LLMs) can generate code but still depend on manual integration with build files, compiler flags, data schemas, and scattered documentation. Modernization programs fail often (industry estimates above 70%) and automation attempts break hidden business logic, performance envelopes, or external integrations. A recent empirical study of 312 modernization attempts across 89 organizations shows automated tools miss implicit domain rules, under-detect architectural debt, and degrade behavior in a material fraction of cases; hybrid human plus tool flows fare best (Costa et al., Understanding the Limits of Automated Legacy Modernization , in prep.). These findings motivate a system that models all artefacts, learns from live telemetry, and hard gates unsafe changes. Recent advances demonstrate that small language models (SLMs) are sufficiently powerful and inherently more suitable for specialized tasks in agentic systems belcak2025small . As articulated by NVIDIA Research, SLMs are “principally sufficiently powerful to handle language modeling errands of agentic applications,” “inherently more operationally suitable for use in agentic systems than LLMs,” and “necessarily more economical for the vast majority of LM uses in agentic systems” belcak2025small . Models like Phi-2 (2.7B parameters) and Nemotron-H (4.8B parameters) provide comparable performance to larger models at a fraction of the computational cost abdin2024phi ; blakeman2025nemotron . This efficiency enables language-specific specialization, making SLMs ideal for legacy modernization where domain-specific patterns and idioms are critical. At the model level, deep learning has advanced code generation (AlphaCode, CodeGen, Mixtral) but those systems target one-shot synthesis, not continual maintenance of heterogeneous enterprise stacks leblond2023alphacode ; nijkamp2022codegen ; mistral2024mixtral . Evolutionary model merging, hybrid automated program repair, and self-improving coding agents hint at directions for self-evolution but stop short of production-safe closed-loop change sakana2025cycleqd ; li2024hybrid ; pardo2025darwin . Industry mainframe modernization tooling from IBM, Microsoft, and AWS shows demand for AI-assisted translation, dependency mapping, and automated code refactoring at scale ibm2025watsonx ; aws2025transform ; microsoft2025cobol . Research question. Can we build a practical system that continuously mutates and selects improvements to a running legacy stack while meeting functional, performance, security, and integration constraints across multiple programming languages? Contributions. 1. Hybrid Directed Graph Evolution (HDGE). Unified artefact graph spanning code, docs, build, compiler, schema, tickets, and telemetry. 2. Mutation operators guided by SLMs. Language-specific SLMs for code edits, doc sync, build weave, and cross-language translation with automated equivalence testing. 3. evoGraph framework. Specialized small language models for COBOL, .NET, Lisp, CGI, ColdFusion, legacy Python, and C modernization. 4. Safety-aware multi-objective online selection. Contextual bandit weighting; Pareto plus novelty; mandatory gates. 5. Empirical validation. Seven legacy-style benchmarks; comparisons to human plus Copilot, Automated Program Repair, and Darwin Godel style multi-agent coding baselines; ablations. 6. Legacy modernization alignment. Design responds to empirical failure modes (implicit contracts, performance preservation, integration evolution) and to modernization guidance from MITRE and AWS Transform. 2 Related Work 2.1 Code generation with large models AlphaCode 2 shows competitive programming performance at scale; CodeGen releases open multi-language transformer models; Mixtral 8x22B demonstrates sparse mixture of experts efficiency. These works focus on code creation, not closed-loop maintenance leblond2023alphacode ; nijkamp2022codegen ; mistral2024mixtral . 2.2 Small language models for agentic AI Recent work demonstrates that SLMs are sufficiently powerful for specialized tasks in agentic systems while being more economical than LLMs belcak2025small . NVIDIA Research argues that “SLMs are the future of agentic AI” due to their operational suitability and economic advantages. Models like Phi-2, Nemotron-H, and Hymba achieve performance comparable to larger models at a fraction of the computational cost abdin2024phi ; blakeman2025nemotron ; dong2024hymba . This efficiency enables language-specific specialization for legacy modernization. The position that “small language models are sufficiently powerful, inherently more suitable, and necessarily more economical for many invocations in agentic systems” directly informs our evoGraph framework design. 2.3 Evolutionary model merging Sakana AI CycleQD explores population-based model merging and SVD-style mutation under quality diversity search. We use a similar crossover concept at the model level sakana2025cycleqd . 2.4 Hybrid automated program repair Hybrid APR (GIANTREPAIR and related) combines LLM-generated patch skeletons with program analysis to raise correctness beyond raw LLM code fixes. We adapt this hybrid approach in our code patch operator and safety gate li2024hybrid . 2.5 Self-improving coding agents The Darwin Godel Machine (DGM) empirically validates self-rewriting coding agents that patch their own tooling and re-run benchmarks, demonstrating practical loops for self-improvement pardo2025darwin . 2.6 Legacy language translation IBM watsonx Code Assistant for Z, AWS Transform for Mainframe, and Microsoft COBOL Migration Factory blogs show industrial flows that pair AI translation with automated equivalence testing and dependency discovery for COBOL modernization ibm2025watsonx ; aws2025transform ; microsoft2025cobol . 2.7 Documentation generation for legacy code Recent work on LLM-generated documentation for MUMPS and IBM mainframe Assembly reports usable, low-hallucination comment generation but weak correlation between automated metrics and human doc quality, motivating richer doc freshness metrics diggs2024leveraging . 2.8 AI-enabled modernization practice MITRE and AWS modernization guidance stress incremental migration, dependency discovery, and human oversight in regulated environments mitre2025legacy ; aws2025transform . 3 Problem Formulation We cast software self-evolution as a constrained stochastic optimization over program graphs. Goal: pick a mutation policy \pi that yields a sequence of graphs G_{0},G_{1},\ldots that maximizes long-run utility while staying safe. maximize \displaystyle\mathbb{E}\left[\sum_{t=0}^{T-1}\gamma^{t}\cdot U_{\text{tot}}(G_{t+1})\right] (1) subject to \displaystyle\Pr[S(G_{t+1})=1\mid G_{t}]\geq 1-\delta (2) U_{\text{tot}} is an aggregate utility from multi-objective metrics; S is a safety predicate (tests, contracts, perf bounds); \gamma discount; \delta risk budget. This safety-first framing reflects modernization guidance for mission-critical estates. 4 Method 4.1 Artefact Graph Represent a system as a directed graph G=(V,E) . Node type set: T=\{\text{code, doc, build, compiler, test, schema, policy, ticket, ui, log, metric, data}\} (3) Each node i stores an embedding h_{i} from an encoder trained on code plus docs. Composite docs (Word, Excel) are chunked and pooled. Edges carry typed relations: calls , generates , derived_from , builds , documents , depends_on , emits_metric , and dynamic call edges from runtime traces (profilers, APM). Capturing dynamic edges helps surface architectural debt that static analysis misses in large-scale modernization efforts. 4.2 Repository Abstraction Layer We ingest Git, SVN, and raw archive snapshots.

Read the complete text