arXiv:2511.03825cs.AIcs.CL2025-11被引 5

不同分词方法对二进制代码分析的LLM性能影响显著,可优化模型效果。

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

  • 针对汇编代码特性定制分词规则,提升语义捕捉能力。
  • 词汇量与分词效率直接影响函数签名预测准确率,最高达82.3%。
  • 研究结果适用于二进制分析、漏洞检测等低级代码任务场景。

分词是汇编代码分析的基础,影响词汇量、语义覆盖度及下游任务性能。尽管重要,但汇编代码分词仍研究不足。本研究评估NLP分词模型及其参数(如词汇量)的内在特性,探索针对汇编代码特性的预处理和预分词规则。同时评估其在函数签名预测等关键二进制分析任务中的影响。基于Llama 3.2(解码器仅模型)、BERT(编码器仅模型)和BART(编码器-解码器模型)等前沿预训练模型,系统分析不同分词器在编码指令和捕捉语义细微差别的效率。通过内在评估,比较分词效率、词汇压缩比和表征保真度。初步结果显示,分词器选择显著影响下游性能,内在指标部分但不完全可预测外在表现。揭示了内在属性与实际任务间的复杂权衡。本研究为低级代码分析优化分词模型提供重要参考,提升基于自然语言模型的二进制分析流程的鲁棒性与可扩展性。

原文摘要 · Abstract (English)

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.

二进制分析分词方法LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。