Evaluating Fine-Tuning and Metrics for Neural Decompilation of Dart AOT Binaries
This paper presents a systematic empirical study on neural decompilation of Dart AOT binaries, revealing that fine-tuning often fails to improve functional correctness (pass@k) despite superficial metric gains, while introducing a new HumanEval-Dart benchmark and demonstrating that assembly sequence length is the primary predictor of task difficulty.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a secret recipe written in a highly compressed, coded language (machine code) that a computer understands perfectly, but a human chef cannot read. Your goal is to translate this code back into a readable, delicious recipe (source code) that anyone can follow. This process is called decompilation.
Recently, scientists have started using "AI chefs" (Large Language Models) to do this translation. But there's a big problem: How do we know if the AI chef actually recreated the dish correctly, or if it just made something that looks like a recipe but tastes terrible?
This paper is a rigorous taste-test of these AI chefs, specifically trying to translate Dart code (used in apps like Flutter) from its machine form back to human-readable form. Here is what they found, explained simply:
1. The "Smell Test" vs. The "Taste Test"
The researchers discovered a dangerous trap in how we usually judge these AI chefs.
- The Smell Test (Surface Metrics): They used tools like CodeBLEU and compile@k. These check if the AI's output looks like a recipe (correct grammar, correct structure) and if it can be "cooked" (compiled) without the kitchen exploding.
- The Taste Test (Functional Correctness): They used a metric called pass@k. This actually runs the recipe to see if it produces the correct dish (does the math work? does the logic hold?).
The Shocking Finding: The AI chefs often passed the "Smell Test" perfectly but failed the "Taste Test."
- Analogy: Imagine an AI writes a recipe that looks perfect, uses the right ingredients, and follows the steps. But if you actually cook it, the cake collapses. The "Smell Test" said "Great job!" but the "Taste Test" said "This is inedible."
- In fact, for some AI models, the "Smell Test" scores went up after training, while the actual ability to cook the dish correctly went down significantly.
2. The "Training Trap" (Fine-Tuning)
The researchers tried to make the AI chefs better by giving them extra practice (fine-tuning) on specific examples of Dart code. They expected this to help.
- The Result: It mostly made things worse.
- Analogy: Imagine a brilliant, general-purpose chef (a large AI model) who can figure out how to cook almost anything by understanding the principles of cooking. You then force them to memorize 1,000 specific recipes by rote.
- What happened: The chef stopped using their brain to understand why a dish works and started just memorizing patterns. They became great at simple, short recipes but forgot how to handle complex, long ones.
- The Irony: The strongest, smartest chef (the 8-billion-parameter model) actually got worse after this specific training. Their ability to solve hard problems dropped by nearly 6 percentage points, while the "Smell Test" scores barely changed. The training essentially "overwrote" their natural reasoning with rigid patterns.
3. The "Language Clash" (Cross-Lingual Interference)
They also tried training the AI on a mix of Dart and another language, Swift, to see if it could learn both at once.
- The Result: For the smaller, less powerful AI chefs (4-billion parameters), mixing in Swift was a disaster. It confused them, and their Dart translation skills tanked.
- The Silver Lining: For the bigger, smarter chefs (8-billion parameters), the confusion disappeared. They were big enough to handle both languages without mixing them up.
- Analogy: If you teach a small child to speak two very different languages at once, they might get confused and speak neither well. But a teenager (the larger model) can handle both languages easily without mixing them up.
4. The "Length Limit"
The researchers analyzed why the AI failed. They found one major culprit: Length.
- The Cliff: If the machine code was short (under 50 lines), the AI could often translate it. But once the code got longer (over 200 lines), the AI hit a "cliff" and stopped working almost entirely.
- Analogy: It's like asking someone to translate a short sentence versus a whole novel. The AI could handle the sentence, but the moment the story got long and complex, it got lost. Traditional measures of "complexity" (like how many loops or variables were in the code) didn't matter as much as the sheer length of the machine instructions.
Summary of the Takeaways
- Don't trust the "Smell Test": Just because AI-generated code looks good or compiles doesn't mean it works. You must test if it actually does the job (pass@k).
- More training isn't always better: For smart AI models, forcing them to memorize specific tasks can actually make them dumber at solving new problems.
- Size matters for multitasking: If you want an AI to learn multiple languages at once, it needs to be big enough to handle the confusion.
- Short is sweet: Current AI can only reliably translate short snippets of code. Long, complex machine code is still too difficult for them.
The paper concludes that we need to stop relying on superficial metrics and start testing AI decompilers by actually running the code to see if it works, just like you wouldn't judge a restaurant solely by how pretty the menu looks.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.