Microsoft · Filed Oct 13, 2025 · Published Sep 17, 2026 · verified — real USPTO data

Microsoft Patents a Two-Step System for Translating Code Between Programming Languages

Rewriting a codebase in a different programming language is one of the most expensive, error-prone jobs in software engineering. Microsoft is patenting a method that breaks the problem in two, using a neutral intermediate format to reduce the chance that meaning gets lost in translation.

A source code snippet is parsed into an abstract syntax tree, then distilled into a simplified tree, and reassembled into distilled code. Drawing from patent filing US 2026/0277576 A1.
A source code snippet is parsed into an abstract syntax tree, then distilled into a simplified tree, and reassembled into distilled code.
See all 9 drawings from this filing ↓
Publication number US 2026/0277576 A1
Applicant MICROSOFT TECHNOLOGY LICENSING, LLC
Filing date Oct 13, 2025
Publication date Sep 17, 2026
Inventors Colin Bruce CLEMENT, Neelakantan SUNDARESAN, Yufan HUANG, Mengnan QI, Maoquan WANG, Yongqiang YAO
CPC classification 717/137
Grant likelihood Medium
Examiner CENTRAL, DOCKET (Art Unit OPAP)
Status Docketed New Case - Ready for Examination (Jun 30, 2026)
Parent application is a National Stage Entry of PCTCN2023101039 (filed 2023-06-19)
Document 20 claims

What Microsoft's code-translation 'distillation' actually does

A developer writes software in one programming language, then years later the company wants that software rewritten in a completely different one. The process is tedious, slow, and full of opportunities for subtle mistakes that change how the program actually behaves.

Microsoft's patent describes a system that tackles this in two stages. First, it strips the original code down to a language-neutral blueprint, something like a plain-language outline that captures what the program does without being tied to any particular coding style or syntax. Then a second AI component reads that blueprint and writes fresh code in the target language.

The idea is that by separating understanding the original from writing the translation, the system is less likely to carry over quirks or mistakes from the source language. You end up with a translation that reflects the logic of the program, not just a word-for-word swap of one syntax for another.

From the filing · CLAIM 1
… transform the first source code snippet into distilled code, wherein the distilled code comprises language-independent code elements; provide the distilled code to a decompiler for translation into a second high-level programming language; …

Translation: The system converts original code into an intermediate format before sending it to a decompiler to output the final language.

How the distiller and decompiler divide the translation job

The system has two main components working in sequence.

The first is a distiller, which takes source code written in a high-level programming language (Python, Java, C#, and so on) and converts it into what the patent calls distilled code. This distilled form is described as language-independent: it keeps the core logic, the flow of decisions, and how data moves through the program, but drops everything specific to the original language's grammar and conventions.

The second component is a decompiler, which reads that distilled code and produces working source code in a different target language. The decompiler is built as a neural transformer model (an AI architecture similar to the kind used in large language models like GPT) with an attention mechanism (a technique that lets the model weigh which parts of the input matter most at each step). It was trained using three techniques:

  • Masked language modeling: the model learns by predicting missing words or tokens in code
  • Denoising auto-encoding: the model learns to reconstruct correct code from corrupted versions
  • Multilingual program generation: the model trains across many programming languages at once

The result is a decompiler that can write output in several different high-level languages, not just one fixed target.

From the filing · THE ABSTRACT
The decompiler is configured as a neural transformer model with attention pre-trained for translation using masked language modeling, denoising auto-encoding and multilingual program generation.

Translation: The translation engine uses advanced artificial intelligence that was heavily trained on various programming languages.

What this means for developers stuck with legacy software

For companies running old software written in languages that are hard to find developers for today, automated code translation would be a significant time and cost saver. The two-stage approach here is designed to reduce semantic drift, meaning the risk that translated code behaves differently from the original even when it looks correct at a glance.

This fits into a broader category of tools that Microsoft keeps filing around AI-assisted developer tooling, especially as its GitHub Copilot business grows. For everyday developers, the practical promise is a faster migration path when a company decides to move a legacy system to a modern language, without the months of manual line-by-line rewriting that currently comes with that kind of project.

Microsoft's 61st filing in the Language AI patents we cover since May follows one on sectioned document reading and one on self-rewriting prompts.

Editorial take

The core idea here, using a neutral intermediate representation to decouple understanding from generation, is not brand new in compiler theory. What the patent adds is a trained neural model on both ends, which is a reasonable engineering bet for handling the messiness of real-world code that formal compilers struggle with.

The ship path is not short. You need the distiller to reliably preserve semantics across a wide range of code patterns (a hard unsolved problem), and the decompiler to then write idiomatic, maintainable code in the target language (also hard). The patent describes an architecture and a training approach, not a finished product, and there is no indication of evaluation results or a specific deployment context.

That said, the filing is pointing at a real and expensive pain point. If the distillation step holds up in practice, it could meaningfully reduce the error rate in automated migration tools compared to direct language-to-language AI translation. That would be useful enough to matter commercially, even if it arrives as a back-end service rather than something developers interact with directly.

There are more where this came from

We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.

The drawings

9 drawing sheets from US 2026/0277576 A1 · click any drawing to enlarge

Patent filing page

Source. Full patent text and figures from the official USPTO publication PDF.