← Latest papers
💻 computer science

From Heuristics to Transformers: A Comprehensive Survey of Type Inference from Stripped Binaries

This survey comprehensively traces the evolution of type inference for stripped binaries from early rule-based heuristics to modern deep learning architectures like Transformers and GNNs, while analyzing key challenges and proposing future directions in neuro-symbolic inference.

Original authors: Hua Zheng, Yuhang Guo, Kuanishbay Sadatdiynov, Cheng Wen, Muhammad Sadiq, Dugang Liu, Jawwad Ahmed Shamsi, Anam Qureshi

Published 2026-06-24
📖 5 min read🧠 Deep dive

Original authors: Hua Zheng, Yuhang Guo, Kuanishbay Sadatdiynov, Cheng Wen, Muhammad Sadiq, Dugang Liu, Jawwad Ahmed Shamsi, Anam Qureshi

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 delicious, complex cake (the original software code). A baker (the compiler) bakes it, but then, for security or size reasons, they strip away all the labels, the recipe card, and the decorative frosting. All that's left is a plain, unrecognizable block of sponge and crumbs (the "stripped binary").

The Problem:
Security experts and reverse engineers need to know what kind of cake it is. Was it a chocolate cake? A lemon tart? Did it have nuts inside? Without the labels, the cake is just a block of ingredients. In computer terms, this is called Type Inference. The goal is to look at the raw, messy machine code and guess what the original high-level data structures (like "a list of users" or "a bank account") were.

The Journey of the Paper:
This paper is a history book and a roadmap of how experts have tried to solve this "guess the cake" problem over the years. It tracks the evolution from simple guessing games to super-smart AI.

Here is the story in three acts:

Act 1: The "Duck Typing" Era (The Old School)

The Analogy: Imagine you are trying to guess what a mysterious animal is. You see it waddling and quacking. You say, "If it walks like a duck and quacks like a duck, it must be a duck!"
The Reality: Early tools (like IDA Pro) used simple rules. If a piece of code looked like it was accessing a list of numbers, the tool guessed, "Ah, that's an array!"
The Flaw: This was brittle. If a baker (compiler) rearranged the ingredients or used the same bowl for two different things, the rule broke. It couldn't handle complex, modern cakes.

Act 2: The "Language Learner" Era (Neural Networks)

The Analogy: Now, imagine teaching a child to read. You show them thousands of sentences. They learn that words appearing together usually belong to the same topic. If they see "The cat sat on the...", they guess the next word is "mat."
The Reality: Researchers started treating computer code like a language. They used AI models (like RNNs and CNNs) to read lines of assembly code as if they were sentences. They looked at the "context" around a variable. If a variable was used with math instructions, the AI guessed it was a number.
The Flaw: These models were like readers with short attention spans. They could understand a sentence, but if the "story" of the program was long, they forgot the beginning by the time they reached the end. They missed the big picture.

Act 3: The "Super-Reader" Era (Transformers & Graphs)

The Analogy: Enter the "Super-Reader" (Transformers and Graph Neural Networks). This is like a detective who can look at the entire crime scene at once, connecting clues from the kitchen to the garage instantly. They don't just read words; they see the shape of the whole story.
The Reality:

  • Transformers: These models use a mechanism called "Self-Attention." They can link a variable defined at the very top of a program with its use at the very bottom, instantly.
  • Graphs: Instead of reading code in a line, they map it as a web of connections. They see how data flows like water through pipes, making it much easier to spot complex structures like "structs" (groups of related data).
  • The Result: These modern tools are incredibly accurate at reconstructing the original "cake" from the crumbs.

The Big Hurdles (Why it's still hard)

Even with super-smart AI, the paper points out three major obstacles:

  1. The "Moving Target" Problem: Modern compilers are like tricksters. They shuffle the code around to make it run faster. A variable might be in one spot, then move to another, then disappear. The AI gets confused because the clues keep moving.
  2. The "Blind Spot" for Numbers: AI models often treat specific numbers (like 0x8 or 0x10) as meaningless noise. But in code, those numbers are often the "address" to a specific part of a structure. If the AI ignores the number, it can't figure out the layout of the data.
  3. The "Memorization" Trap: Many AI models are trained on datasets where the same code appears over and over. They aren't actually learning to "think"; they are just memorizing the answers. If you give them a new, slightly different cake, they might fail.

The Future: The "Hybrid Chef"

The paper suggests the future isn't just about bigger AI. It's about Neuro-Symbolic Integration.

  • The Analogy: Imagine a team where a creative chef (the AI) guesses what the cake looks like based on intuition, and a strict food safety inspector (the logic engine) checks if that guess is physically possible.
  • The Reality: The AI makes a fast, smart guess about the types, and a mathematical rule-checker verifies that the guess makes sense logically. This combines the "intuition" of AI with the "rigor" of math.

Summary

This paper is a survey of how we went from simple "if it quacks, it's a duck" rules to using massive, brain-like AI systems that can read the entire story of a program at once. While these new tools are amazing, the paper concludes that to truly master the art of reverse engineering, we need to combine the creativity of AI with the strict logic of traditional math to handle the messy, optimized code of the modern world.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →