1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
title: "A 2,500-Layer Neural Network that Turns Out to Be MD5: What It Teaches About Senior Debugging"
date: 2026-03-11T19:00:00+01:00
draft: false
slug: "reverse-engineer-neural-network-senior-debugging"
description: "Jane Street hid MD5 inside a neural network with integer weights. The process to uncover it is a masterclass in debugging that every senior engineer should study."
tags: ["ai", "machine-learning", "debugging", "interpretability", "career-development"]
categories: ["opinion"]

translation:
  hash: ""
  last_translated: ""
  notes: |
    - "in plain language": "dicho en cristiano". No religious connotation.
    - "pulling the thread" — investigating step by step: "tirando del hilo".
    - "textbook" — exemplary, classic: "de libro".
    - "downstream" — later in the process: "cascada abajo".

Jane Street, one of the most selective quantitative trading firms in the world, published a few weeks ago a mechanistic interpretability puzzle. They handcrafted a neural network with approximately 2,500 linear layers, integer weights, and released it to the public with one question: What function does this network compute?

The answer: MD5. A cryptographic hash algorithm from 1992, implemented entirely using matrix multiplications and ReLU functions.

The fascinating part isn’t the answer itself; it’s the path the winner followed to get there. That journey, without exaggeration, is a textbook guide for debugging opaque systems that extends far beyond machine learning.

The Experiment

This wasn’t your typical black-box puzzle. Participants were given the complete model specification: all the weight matrices, all the biases, all the architecture. There was no guessing about the structure. The challenge was to understand what it did.

The network took a string of text as input and returned either 0 or 1. In the example provided, “vegetable dog” produced 0.

With ~2,500 linear layers, about 2 million nodes, and no documentation, the question was: what’s the relationship between the input and the output?

How It Was Solved: A Debugging Case Study

The winner, Alex, followed a process that any senior engineer would recognize. Not because of specific tools, but because of the structure of the reasoning.

Phase 1: Observe Before You Act

The first thing Alex did was visualize the weight matrices. He didn’t run the model. He didn’t try to train it. He simply looked at the data.

What he saw: all the weights were integers. No decimals, no floating points. Just integers.

This was a massive clue. Neural networks trained via gradient descent produce weights with lots of decimal places. Integer weights mean someone manually designed this network with a specific purpose. It wasn’t a learned model. It was a program in disguise.

This is the first pattern of senior debugging: observe the shape of the data before interpreting its content. A log file with perfectly spaced timestamps every 100ms isn’t real traffic. A JSON file where every field has exactly three elements didn’t come from production. The shape reveals the origin.

Phase 2: Narrow the Problem Space

Alex attempted to convert the network into a satisfiability (SAT) problem. The idea: if each neuron is a logical constraint, maybe a SAT solver could find input strings that produced an output of 1.

The reduction process was methodical:

  • He eliminated 80% of the neurons that were identity operations.
  • He merged nodes with a single input and a weight of 1.
  • He collapsed nodes with identical input vectors.

From 2 million nodes, he reduced it to 75,000. From there to 200,000 SAT variables.

And it didn’t work. The problem was still intractable by brute force.

Here’s a core lesson: properly reducing a problem and it still being unsolvable isn’t failure—it’s information. If, after removing all accidental complexity, the problem remains hard, the difficulty is inherent. That tells you something about the system’s nature. In this case, it suggested the function was likely irreversible—you couldn’t deduce the input from the output.

Phase 3: Recognize the Pattern

Alex noticed the network had 32 computational blocks repeating periodically. Thirty-two identical rounds. An irreversible function.

He asked ChatGPT: “What cryptographic algorithms use 32 rounds?”

MD5.

This was the eureka moment. But notice what made it possible—it wasn’t a random intuition. It was the accumulation of three prior observations (integer weights → manually designed, irreversibility → cryptography, 32 rounds → specific protocol) converging into a testable hypothesis.

This pattern—accumulating constraints until the possibility space collapses—is exactly how a senior engineer diagnoses a bug in production. It’s not that they knew the answer beforehand. It’s that each observation eliminated whole categories of possibilities until only one remained.

Phase 4: The Bug

Here’s where the story gets interesting. Alex tested his hypothesis by calculating the MD5 hash of several inputs and comparing it to the network’s output. For inputs up to 32 characters, they matched perfectly.

For longer inputs, they didn’t.

The network had a bug. The designers had made an error in how they encoded the message length—a buffer overflow in the first seven layers that diverged from the MD5 standard for longer inputs.

Alex traced the error, layer by layer, until he found the exact deviation.

This is textbook: test your hypothesis at the edges. If your mental model says, “This is MD5,” it’s not enough for it to work for the happy path. You need to test it with long inputs, empty strings, special characters. And when it breaks, the divergence tells you exactly where the problem lies.

Phase 5: Solve It

With the function identified (MD5 with a known bug), Alex extracted the target hash from the biases of the second-to-last layer. Then he brute-forced the solution with a dictionary: the answer was two English words separated by a space.

What This Reveals About Debugging

Alex’s process had nothing to do with machine learning. It was pure debugging:

PhaseIn the PuzzleIn Real Debugging
Observe the FormInteger weights → manual designUniform logs → synthetic data
Reduce the Problem2M nodes → 75K → SATFull stack trace → isolated component
Accumulate ConstraintsIrreversible + 32 rounds → cryptoOnly fails in production on Mondays → cron job
Test the EdgesWorks <32 chars, fails >32 → overflowWorks with ASCII, fails with UTF-8 → encoding
Use the Bug as a ClueOverflow points to the exact layerStack trace reveals exact line

The structure is identical. The domain changes, but the reasoning doesn’t.

Meta-Reasoning as a Competitive Edge

Here’s a crucial point: Alex used ChatGPT during Phase 3. Not to solve the puzzle, but to expand his search space. He had the constraints (irreversible, 32 rounds). He needed a catalog of candidates that fit those constraints.

This is significant. The tool didn’t do the heavy intellectual lifting—the observation, reduction, and hypothesis-formulating phases were entirely human. What the tool did was act as an external associative memory: “Given what I know, what matches?”

This pattern is going to define senior work in the coming years. The valuable skill isn’t knowing MD5 has 32 rounds—anyone can look that up. The valuable skill is knowing to search for “cryptographic algorithm with 32 rounds,” not “2,500-layer neural network.” The ability to ask the right question is the skill that can’t be automated.

Interpretability: The Debugging of the Future

Jane Street’s challenge is an exercise in mechanistic interpretability—a field that seeks to understand what neural networks compute, not just evaluate whether their results are correct.

It’s a research area today. In just a few years, it will become an operational necessity.

As more critical systems incorporate ML models—from medical diagnoses to financial decisions—the question “why did the model make this decision?” stops being academic. European regulators are already demanding it (AI Act). Product teams need it to debug false positives. Legal teams need it to handle claims.

The professional profile emerging from this is fascinating: someone who combines systems engineering thinking (layers, reduction, component isolation) with ML knowledge (architectures, activation functions, internal representations). Not a pure ML researcher. A model debugger.

In plain language: if you know how to diagnose why a distributed system fails every Monday at 3:00 AM, you already have 80% of the skills needed to diagnose why a model misclassifies images with blue backgrounds. The mental discipline is the same. The tools are different.

What This Means for Seniors Today

The temptation when seeing a puzzle like this is to think, “This is for ML researchers, not for me.” But the skills to solve it are the same ones that separate a senior from a mid-level engineer in any domain:

1. Knowing What to Look At. Alex didn’t try running the network millions of times to map inputs to outputs. He examined the weights. A senior doesn’t look for the bug in the code that changed yesterday—they start with the logs, the infrastructure, the context.

2. Knowing When to Change Strategy. The SAT approach didn’t work. Alex didn’t keep pounding on it. He switched to pattern recognition. A senior who spends two hours on a dead-end hypothesis pivots to a new approach.

3. Knowing What to Ask. “What algorithm has 32 rounds and is irreversible?” is a precise question that yields a useful answer. “Why doesn’t my network work?” is not. The quality of your questions determines the quality of the answers—whether you’re asking LLMs or human colleagues.

4. Using Failures as Data. The overflow bug wasn’t an obstacle. It was proof the hypothesis (MD5) was correct and a clue to pinpoint the divergence. In production, an intermittent 500 error isn’t the problem—it’s a symptom revealing the deeper issue.

Conclusion

Jane Street designed this puzzle as a recruiting tool. They’re looking for people who combine disciplines, think in layers, and know when brute force won’t cut it.

But what it really underscores is something broader: debugging skills are transferable across domains. Anyone who can diagnose an opaque system—pulling the thread, accumulating constraints, testing the edges—can debug any opaque system. It doesn’t matter if it’s a data pipeline, a Kubernetes cluster, or a 2,500-layer neural network.

The question for any senior isn’t whether you need to learn ML. It’s whether your debugging methodology is rigorous enough to work when you switch domains. Because domains will change. A good method will not.


The original puzzle is available on Hugging Face, and a second challenge is now open where the network layers are scrambled, and you need to reorder them. If you’re up for the challenge, the full write-up from Jane Street details the solution process.