AI
New AI Model Captures Type Information Across Function Boundaries in Binary Reverse Engineering
InterType extends neural type inference by incorporating cross-function data flow dependencies, recovering variable types that traditional single-function models miss.
Variable type recovery—identifying what data types variables hold in compiled binaries—has become essential for detecting vulnerabilities, analyzing malware, and enforcing security policies. While recent Transformer-based models have achieved strong results by analyzing instruction-level behavior, they face a fundamental limitation: they work within individual functions in isolation.
The Missing Cross-Function Context#
Prior work has assumed that examining a single function at a time is sufficient for type inference. However, real-world binaries tell a different story. Research shows that approximately 44% of variables propagate across function boundaries as arguments or return values, carrying crucial type information that stays hidden from models confined to single-function analysis.
This gap represents a significant untapped opportunity: the type constraints encoded in how data flows from one function to another contain patterns that could dramatically improve inference accuracy.
InterType: Bridging the Gap#
Researchers have developed InterType, a method that extends CodeArt—an existing state-of-the-art Transformer model for binary analysis—by incorporating inter-procedural analysis. Rather than treating each function independently, InterType trains on caller-callee data flow relationships extracted directly from disassembled binaries.
The approach works by:
- Extracting data flow dependencies between functions at compile time
- Constructing training examples that expose the model to cross-function variable propagation
- Fine-tuning the pre-trained Transformer to recognize and leverage these inter-procedural patterns
Performance Gains#
When tested on the coreutils benchmark across different optimization levels (O0–O3), InterType demonstrates measurable improvements. For binaries compiled at O1, the model's recall improves by 2.76 percentage points—from 89.00% to 91.76%—representing a 25.1% reduction in recall error rate.
This improvement suggests that incorporating function-to-function context allows the model to resolve types that depend on how data moves through call graphs, a capability unavailable to purely intra-procedural approaches.

