Skip to main content
QUICK REVIEW

[Paper Review] XFL: eXtreme Function Labeling

James Patrick-Evans, Moritz Dannehl|arXiv (Cornell University)|Jul 28, 2021
Software Engineering ResearchComputer Science33 references7 citations
TL;DR

This paper proposes XFL, an extreme multi-label learning framework for predicting function names in binary code by treating each token in a function name as a label. It introduces DEXTER, a function embedding that combines static analysis features with local and global code context, achieving 82.5% precision on a 10,000-binary dataset, outperforming state-of-the-art methods.

ABSTRACT

Reverse engineers would benefit from identifiers like function names, but these are usually unavailable in binaries. Training a machine learning model to predict function names automatically is promising but fundamentally hard due to the enormous number of classes. In this paper, we introduce eXtreme Function Labeling (XFL), an extreme multi-label learning approach to selecting appropriate labels for binary functions. XFL splits function names into tokens, treating each as an informative label akin to the problem of tagging texts in natural language. To capture the semantics of binary code, we introduce DEXTER, a novel function embedding that combines static analysis-based features with local context from the call graph and global context from the entire binary. We demonstrate that XFL outperforms state-of-the-art approaches to function labeling on a dataset of over 10,000 binaries from the Debian project, achieving a precision of 82.5%. We also study combinations of XFL with different published embeddings for binary functions and show that DEXTER consistently improves over the state of the art in information gain. As a result, we are able to show that binary function labeling is best phrased in terms of multi-label learning, and that binary function embeddings benefit from moving beyond just learning from syntax.

Motivation & Objective

  • To address the challenge of predicting meaningful function names in binaries where such identifiers are typically missing.
  • To overcome the extreme class imbalance in function naming by framing it as a multi-label learning problem.
  • To improve function embedding quality by incorporating both local (call graph) and global (entire binary) code context.
  • To demonstrate that multi-label learning is more effective than single-label approaches for function labeling in reverse engineering.
  • To show that DEXTER embeddings consistently improve performance across different binary function embedding baselines.

Proposed method

  • XFL treats each word in a function name as a separate label, transforming function naming into a multi-label classification task.
  • DEXTER generates function embeddings by combining static analysis features with local context from the call graph and global context from the entire binary.
  • The model uses a deep neural network to learn representations that capture semantic meaning from code structure and relationships.
  • Label prediction is performed using a multi-label classification head that outputs probabilities for each token in the name.
  • The framework is trained end-to-end on a large-scale dataset of 10,000 binaries from the Debian project.
  • Performance is evaluated using precision at k, with k=1, and information gain to measure label quality.

Experimental results

Research questions

  • RQ1Can function naming in binaries be effectively modeled as an extreme multi-label learning problem?
  • RQ2How does incorporating local and global code context improve function embedding quality for naming prediction?
  • RQ3Does DEXTER outperform existing function embedding methods in predicting meaningful function name tokens?
  • RQ4To what extent does multi-label learning improve function labeling accuracy compared to single-label approaches?
  • RQ5How generalizable is the DEXTER embedding across different binary analysis tasks and datasets?

Key findings

  • XFL achieves a precision of 82.5% on the Debian binary dataset, significantly outperforming state-of-the-art methods.
  • DEXTER embeddings consistently improve information gain across multiple baseline function embeddings, demonstrating robustness and effectiveness.
  • The integration of global binary context enhances function representation, leading to better label prediction than models using only syntax or local context.
  • Multi-label learning formulation leads to more accurate and semantically meaningful function name predictions than single-label alternatives.
  • The use of token-level labels enables the model to predict complex, multi-word function names with high precision.
  • The results show that function labeling is best approached as a multi-label problem, and that semantics must be captured beyond syntactic features.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.