---
id: 16657
lang: en
title: "JetBrains Compiled Maven's Logic Into a Neural Network: The Build Runs 1.49× Slower Than Python"
published_at: "2026-10-27 20:02:01"
source_name: "JetBrains AI"
source_url: "https://blog.jetbrains.com/ai/2026/10/can-you-bake-maven-into-a-neural-network/"
canonical_url: "https://news.hamidun.com/en/news/16657"
categories: ["llm", "research"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# JetBrains Compiled Maven's Logic Into a Neural Network: The Build Runs 1.49× Slower Than Python

> **Краткая суть (BLUF):** JetBrains encoded Maven's logic into neural network weights without training. The model decides which library version wins and whether a failing test stops the build. The ZXing JAR files matched Apache Maven's output byte for byte, and all 549 tests passed. A full build with tests took 1.49× longer than the same logic written in Python, because javac and JUnit run identically in both cases. The project won't speed up builds, but it produced an exact, verifiable piece of code in the form of weights.  • Weight table: 26,626 rows instead of 29,625 after a compiler fix • Steps to build ZXing: 3.68 million instead of 4.80 million, 23% fewer • On GPU it is even slower: instructions run strictly one at a time

Can Maven's build tool become a neural network that doesn't guess but executes its decisions without a single error? JetBrains tested this. The team took the part of Maven that makes decisions, wrote it into a fixed weight matrix, and used it to build ZXing, a real Java library for generating and reading barcodes. The output matched Apache Maven byte for byte. A full build with tests took 1.49× longer than the same logic written as ordinary Python code (95% confidence interval: 1.4 to 1.54×, 30 paired runs). So the "neural Maven" works correctly, but it runs roughly one and a half times slower than a conventional implementation. It was never meant to speed up builds. This is an experiment about accuracy and verifiability.

## What exactly was written into the weights

Every Java developer has seen how Maven "thinks": it resolves dependencies, compiles, runs tests, and packages. Most of the time goes to javac and JUnit, but between them runs a small, fiddly layer of logic. It decides which library version wins when two modules conflict, which files to pass to the compiler and with which flags, and whether a failing test should stop the build.

An important caveat: this is not a model trained to guess what Maven will do next. Such a model would be right "mostly," and a build tool that is right mostly is broken. Here, the weights were not trained. They were compiled from a program. The team wrote a small Maven-compatible build controller in a restricted subset of Python and converted it into a table of 29,625 × 7 numbers plus 7,382 constant cells. There is no gradient descent and no optimizer step.

It works as a loop. At each step, the network finds one row of the table using two matrix multiplications, performs the arithmetic encoded in that row over a small set of registers, and writes the result to memory. The network cannot open files or run javac itself. When it needs to, it places a request in a memory cell, and a thin bridge executes it and returns the raw response. The bridge decides nothing; all decisions are made by the weights.

The verification was rigorous. The team built ZXing in a sandbox with no Maven, no network, and no access to the Python version of the logic. The JAR files matched Apache Maven's output byte for byte, all 549 project tests passed, and the freshly built JARs encoded and decoded QR codes in 27 of 27 checks. To confirm that the work actually happens in the weights, the CPU and GPU versions processed the same 1,731 requests in the same order, while deleting or corrupting the weights file caused the build not to run at all.

## Why it is slower, and how the team partly fixed it

The network spends a full round of matrix arithmetic on every small instruction, and building ZXing takes it 4,796,191 steps. On the decision logic alone, without any Java work, it falls far behind Python. In a full build, however, the gap narrows to 1.49×, because most of the time in both cases goes to the same javac and JUnit. On GPU it got worse: a program that executes instructions strictly one at a time gives the graphics card nothing to parallelize.

The team analyzed where the steps went. Of the 4.8 million steps, 652,773 (14%) simply copied a value from one register to another, and another 553,333 (12%) loaded a constant or jumped back to the start of a loop. This was compiler overhead, not build logic. The team did not change the network. Instead, they improved the compiler: results are now written directly to the target register, constants are embedded in the instruction, conditions become jumps, and loops are checked at the end.

The result: 3,676,728 steps (about 23% fewer), and 26,626 table rows instead of 29,625. The same 1,731 requests run in the same order, and all checks were passed again. On GPU, the decisions-only mode sped up from 27.97 to 21.61 seconds. The gain on a full build is more modest, because the Java tools still dominate.

To show that the compiler is not tailored to a single project, the team gave it a maze solver (breadth-first search). It occupied 279 rows of weights and produced the same cell sequences as ordinary Python. But on CPU it runs 161–168 times slower than Python, and on GPU 791–812 times slower.

## Why do this if it is slow

The authors are candid: this will not speed up builds. They see the value elsewhere.

First, interpretability. Trained models have no answer key, but here each of the 26,626 rows (apart from a seven-row launch stub) corresponds to one of 249 known functions. If an analysis tool claims it found a "dependency resolution scheme," that claim can be checked.

Second, exact subroutines alongside trainable models in the same tensor format. A model that picks the right library version 99% of the time fails once in a hundred builds. Combining such a piece with a trained model has not been tried yet; that is the next experiment.

Third, a policy stored in a single file of numbers can be hashed, signed, and reproduced decision by decision. That said, ordinary code with a lock file already provides much of this.

## Limitations

This is not all of Maven. It covers one build of one project, without Enforcer, Checkstyle, Javadoc, or source JARs. Signing and publishing are out of scope, and javac, JUnit, bnd, and zip run as ordinary programs. This is also not machine learning in the usual sense: the trained version was not tested, and the authors expect it would perform poorly on unfamiliar projects. The weights, runtime, and raw measurements are published on Hugging Face, so every figure can be recalculated.

---
- **Первоисточник:** [JetBrains AI](https://blog.jetbrains.com/ai/2026/10/can-you-bake-maven-into-a-neural-network/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/16657
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
