How Different Tokenization Algorithms Impact LLMs and Transformer Models for Binary Code Analysis

📅 2025-11-05
🏛️ Proceedings 2025 Workshop on Binary Analysis Research
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
Tokenization strategies significantly impact the modeling of assembly code, yet their influence on downstream tasks—such as function signature prediction—and trade-offs among intrinsic properties (e.g., vocabulary coverage, semantic fidelity) remain underexplored. Method: We systematically evaluate byte-level, subword-level, and custom tokenizers—including Byte-Pair Encoding (BPE), WordPiece, and assembly-aware variants—using Llama-3.2, BERT, and BART within a unified framework. Our analysis integrates vocabulary compression profiling, representation fidelity measurement, and assembly-specific preprocessing rules. Contribution/Results: Tokenizer choice critically affects predictive performance; certain intrinsic metrics (e.g., opcode coverage, mnemonic preservation) correlate strongly with downstream accuracy. We propose a lightweight, binary-code-oriented tokenization optimization pathway that enhances semantic capture without compromising computational efficiency. This work establishes a reproducible evaluation paradigm and practical tokenizer design guidelines for adapting large language models to low-level code.

Technology Category

Natural Language Processing: Code Generation / Program Synthesis from Natural LanguageMachine Learning: Large Multimodal Models (LMMs)Computer Vision: Large Vision Models

Application Category

Economics, Online Markets and Human Computation: Cost models of using LLMs in production systemsSemantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactionsGraph Algorithms and Modeling for the Web: Foundation models and LLMs for Web-related graphs
📝 Abstract
Tokenization is fundamental in assembly code analysis, impacting intrinsic characteristics like vocabulary size, semantic coverage, and extrinsic performance in downstream tasks. Despite its significance, tokenization in the context of assembly code remains an underexplored area. This study aims to address this gap by evaluating the intrinsic properties of Natural Language Processing (NLP) tokenization models and parameter choices, such as vocabulary size. We explore preprocessing customization options and pre-tokenization rules tailored to the unique characteristics of assembly code. Additionally, we assess their impact on downstream tasks like function signature prediction -- a critical problem in binary code analysis. To this end, we conduct a thorough study on various tokenization models, systematically analyzing their efficiency in encoding assembly instructions and capturing semantic nuances. Through intrinsic evaluations, we compare tokenizers based on tokenization efficiency, vocabulary compression, and representational fidelity for assembly code. Using state-of-the-art pre-trained models such as the decoder-only Large Language Model (LLM) Llama 3.2, the encoder-only transformer BERT, and the encoder-decoder model BART, we evaluate the effectiveness of these tokenizers across multiple performance metrics. Preliminary findings indicate that tokenizer choice significantly influences downstream performance, with intrinsic metrics providing partial but incomplete predictability of extrinsic evaluation outcomes. These results reveal complex trade-offs between intrinsic tokenizer properties and their utility in practical assembly code tasks. Ultimately, this study provides valuable insights into optimizing tokenization models for low-level code analysis, contributing to the robustness and scalability of Natural Language Model (NLM)-based binary analysis workflows.
Problem

Research questions and friction points this paper is trying to address.

Evaluating how tokenization algorithms impact assembly code analysis performance
Assessing tokenizer effects on downstream tasks like function signature prediction
Analyzing trade-offs between intrinsic tokenizer properties and practical utility
Innovation

Methods, ideas, or system contributions that make the work stand out.

Evaluates NLP tokenization models for assembly code
Customizes preprocessing rules for assembly code characteristics
Assesses tokenizer impact on function signature prediction
🔎 Similar Papers
No similar papers found.
A
Ahmed Mostafa
Auburn University
R
Raisul Arefin Nahid
Auburn University
S
Samuel Mulder
Auburn University