Project Rosetta Linear Algebraic Compilation, Neural Decompilation, and Semantic Code Surgery in a Unified Latent Space Project Rosetta aligns three modalities — natural language (NL), Python abstract syntax trees (AST), and compiled bytecode (Binary) — into a shared 64-dimensional latent space, revealing that compilation is a linear operator expressible as a single matrix multiplication. Key Discoveries Compilation = Matrix Multiply: AST→Binary captured by a 64×64 matrix (R²=0.965), with 90% of energy in just 4 SVD dimensions. Linear Decompilation: Ridge regression recovers AST from binary (R²=0.862, round-trip cosine=0.956). Generative Decompilation: A GRU decoder reconstructs Python source from latent vectors with 100% semantic accuracy. Compiler Anatomy: SVD axes correspond to interpretable semantic categories (arithmetic, comparison) with 93–100% probe accuracy. Binary Surgery: Manipulating individual SVD axes alters program semantics in 64% of cases — all outputs are valid Python. Semantic Auto-Patching: NL intent vector arithmetic (Buggy − WrongIntent + CorrectIntent) fixes 57% of operator bugs without touching source code. Neural Compiler: NL→Code via matrix multiplication achieves 63% semantic accuracy — no traditional compiler involved. Neural CPU: Function embeddings + argument vectors predict execution results at R²=0.924 without running Python. Code Morphing: Linear interpolation in latent space produces smooth, syntactically valid transitions between programs (e.g., addition → multiplication). Natural Language CPU: Human language vectors fed directly into the Neural CPU yield correlated execution predictions (R²=0.435, correlation=0.731). Interactive Demo The Rosetta Studio (Phase 23) provides a browser-based Gradio UI for exploring the latent space: NL→Code generation, real-time code morphing via slider, semantic bug patching, and Python→JavaScript transpilation. Structure 23 experiment phases across 7 chapters, progressing from alignment and analysis through generative capabilities, applied semantics, neural execution, and interactive tooling. All code, figures, and result data are included in this repository. Acknowledgments This research was conducted entirely independently, without institutional affiliation or corporate funding. The author currently faces financial constraints that make it increasingly difficult to maintain subscriptions to AI services essential for this line of research. To sustain and improve the quality of future work, the author is actively seeking community sponsorship. Details are available at https://github.com/sponsors/hafufu-stack.
Hiroto Funasaki (Tue,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: