[Paper Review] Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binaries
This paper introduces BinT5, a fine-tuned CodeT5 model for summarizing decompiled binary functions, using CAPYBARA—a novel dataset of 214K decompiled function-documentation pairs across compiler optimizations. BinT5 achieves state-of-the-art BLEU-4 scores of 60.83 on decompiled code and 44.21 on obfuscated decompiled code, demonstrating that pre-trained source code models can be effectively extended to binary reverse engineering with minimal performance degradation despite reduced identifiers.
Reverse engineering binaries is required to understand and analyse programs for which the source code is unavailable. Decompilers can transform the largely unreadable binaries into a more readable source code-like representation. However, reverse engineering is time-consuming, much of which is taken up by labelling the functions with semantic information. While the automated summarisation of decompiled code can help Reverse Engineers understand and analyse binaries, current work mainly focuses on summarising source code, and no suitable dataset exists for this task. In this work, we extend large pre-trained language models of source code to summarise decompiled binary functions. Furthermore, we investigate the impact of input and data properties on the performance of such models. Our approach consists of two main components; the data and the model. We first build CAPYBARA, a dataset of 214K decompiled function-documentation pairs across various compiler optimisations. We extend CAPYBARA further by generating synthetic datasets and deduplicating the data. Next, we fine-tune the CodeT5 base model with CAPYBARA to create BinT5. BinT5 achieves the state-of-the-art BLEU-4 score of 60.83, 58.82, and 44.21 for summarising source, decompiled, and synthetically stripped decompiled code, respectively. This indicates that these models can be extended to decompiled binaries successfully. Finally, we found that the performance of BinT5 is not heavily dependent on the dataset size and compiler optimisation level. We recommend future research to further investigate transferring knowledge when working with less expressive input formats such as stripped binaries.
Motivation & Objective
- To address the lack of datasets and models for summarizing decompiled binary functions, a critical gap in binary reverse engineering.
- To extend pre-trained source code language models—specifically CodeT5—to generate natural language summaries of decompiled binary functions.
- To investigate the impact of input format (e.g., decompiled vs. stripped code), compiler optimizations, and data quality (e.g., duplicates, identifier removal) on summarization performance.
- To establish a benchmark dataset, CAPYBARA, for training and evaluating binary code summarization models.
- To explore the feasibility of transferring source code NLP techniques to the low-expressive, syntactically impoverished output of decompilers.
Proposed method
- Constructed CAPYBARA, a large-scale dataset of 214K aligned decompiled function and documentation pairs, collected from open-source projects across multiple compiler optimization levels.
- Enhanced CAPYBARA by removing identifiers and deduplicating entries to create a 'demi-stripped' variant, simulating real-world reverse engineering challenges.
- Fine-tuned the CodeT5 base model on CAPYBARA to train BinT5, a sequence-to-sequence transformer model for code summarization.
- Evaluated BinT5 using standard metrics (BLEU-4, ROUGE, BERTScore) and analyzed performance across input variations, including stripped and obfuscated code.
- Conducted ablation studies on dataset size, duplication levels, and compiler optimization effects to assess model robustness and data efficiency.
- Used transfer learning to adapt a source-code pre-trained model to the decompiled binary domain, leveraging its learned semantic and syntactic patterns.

Experimental results
Research questions
- RQ1Can pre-trained source code language models be effectively fine-tuned to summarize decompiled binary functions?
- RQ2How does the presence or absence of identifiers in decompiled code affect the performance of code summarization models?
- RQ3What is the impact of compiler optimization levels on the quality of decompiled code and subsequent summarization performance?
- RQ4How sensitive is the model to data duplication and dataset size in the context of binary code summarization?
- RQ5To what extent can a model trained on decompiled code generalize to stripped or obfuscated binary code?
Key findings
- BinT5 achieved a state-of-the-art BLEU-4 score of 60.83 on decompiled code, demonstrating strong performance on standard code summarization benchmarks.
- The model achieved a BLEU-4 score of 44.21 on obfuscated decompiled code, indicating that while performance degrades, it remains effective even with reduced syntactic expressiveness.
- Performance on stripped code was significantly lower, but BinT5 achieved a BLEU-4 score of 58.82 on 'demi-stripped' code (decompiled code with identifiers removed), suggesting that identifier recovery is critical for model success.
- The model showed robustness to data duplication, with duplicates having a notable but not decisive impact on performance, indicating that high-quality data is more important than sheer volume.
- BinT5 could be effectively fine-tuned with only a fraction of the CAPYBARA dataset, indicating strong data efficiency and potential for low-resource settings.
- The study confirms that source code pre-trained models can be successfully extended to decompiled binaries, marking the first application of code summarization to binary reverse engineering.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.