arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.17573cs.LGcs.AIcs.CR
收藏

二进制BPE:用于二进制分析的跨平台分词器家族

Binary BPE: A Family of Cross-Platform Tokenizers for Binary Analysis

Michael J. Bommarito

AI总结:

二进制BPE分词器家族通过跨平台训练,提升二进制分析的上下文效率和压缩效果,适用于恶意软件检测与逆向工程。

摘要:

针对二进制分析中的序列模型,字节级分词存在瓶颈:原始字节浪费了Transformer和其他神经网络架构宝贵的上下文窗口容量,且许多现有文本导向的分词器在任意0x00--0xFF序列上失效。为解决这一问题,我们引入了二进制BPE分词器家族,一组跨平台的字节对编码(BPE)分词器,用于可执行文件,这些分词器在多个平台、架构和操作系统(包括Linux、Windows、macOS、Android和恶意软件源)的大型二进制语料库上进行训练。我们发布了训练好的分词器,词汇量为4K、8K、16K、32K和64K,使系统能够进行系统性的缩放研究和实际部署,从资源受限的边缘设备到高吞吐量的数据中心。这些分词器在发现可解释的模式(ELF/PE头、指令序列、跨平台字符串)的同时,每令牌提供多字节压缩。在代表性未压缩的可执行文件(例如ELF/PE/Mach-O,而非压缩APK)上,二进制BPE分词器通常允许在固定长度的Transformer上下文窗口中获得约2-3倍的二进制内容,从而更高效地进行研究和实际部署,用于内容识别、恶意软件检测、逆向工程和优化。我们已将训练好的二进制BPE分词器发布在HuggingFace上,提供了一个即插即用、开源的基础,用于二进制导向的语言模型和上下文高效代理工具。

英文摘要:

Sequence models for binary analysis are bottlenecked by byte-level tokenization: raw bytes waste precious context window capacity for transformers and other neural network architectures, and many existing text-oriented tokenizers fail on arbitrary 0x00--0xFF sequences. To address this issue, we introduce the Binary BPE tokenizer family, a set of cross-platform Byte Pair Encoding (BPE) tokenizers for executables trained on a large corpus of binaries spanning multiple platforms, architectures, and operating systems, including Linux, Windows, macOS, Android, and malware sources. We release trained tokenizers with vocabularies of 4K, 8K, 16K, 32K, and 64K tokens, enabling both systematic scaling studies and practical deployment from resource-constrained edge devices to high-throughput datacenters. These tokenizers discover interpretable patterns (ELF/PE headers, instruction sequences, cross-platform strings) while yielding multi-byte compression per token. On representative uncompressed executables (e.g., ELF/PE/Mach-O rather than compressed APKs), the Binary BPE tokenizers typically allow for roughly 2-3x more binary content per fixed-length transformer context window than raw bytes, enabling more efficient research and practical deployment for content identification, malware detection, reverse engineering, and optimization. We release the trained Binary BPE tokenizers on HuggingFace, providing a drop-in, open-source foundation for binary-focused language models and context-efficient agentic tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑