[Paper Review] FASER: Binary Code Similarity Search through the use of Intermediate Representations
FASER proposes a cross-architecture binary function similarity search method using intermediate representations (ESIL) and a Longformer-based transformer model, eliminating the need for manual feature engineering, pre-training, or dynamic analysis. It achieves state-of-the-art performance on both general function search and vulnerability detection tasks, with strong zero-shot transfer potential between similar architectures like MIPS and RISC-V.
Being able to identify functions of interest in cross-architecture software is useful whether you are analysing for malware, securing the software supply chain or conducting vulnerability research. Cross-Architecture Binary Code Similarity Search has been explored in numerous studies and has used a wide range of different data sources to achieve its goals. The data sources typically used draw on common structures derived from binaries such as function control flow graphs or binary level call graphs, the output of the disassembly process or the outputs of a dynamic analysis approach. One data source which has received less attention is binary intermediate representations. Binary Intermediate representations possess two interesting properties: they are cross architecture by their very nature and encode the semantics of a function explicitly to support downstream usage. Within this paper we propose Function as a String Encoded Representation (FASER) which combines long document transformers with the use of intermediate representations to create a model capable of cross architecture function search without the need for manual feature engineering, pre-training or a dynamic analysis step. We compare our approach against a series of baseline approaches for two tasks; A general function search task and a targeted vulnerability search task. Our approach demonstrates strong performance across both tasks, performing better than all baseline approaches.
Motivation & Objective
- To enable cross-architecture binary function similarity search without manual feature engineering or dynamic analysis.
- To evaluate the effectiveness of intermediate representations (specifically ESIL) as input for deep learning models in binary code analysis.
- To investigate whether direct training on the binary function search objective outperforms traditional pre-training paradigms.
- To assess zero-shot transfer performance across unseen instruction set architectures, particularly RISC-V.
- To explore the semantic similarity between different ISAs when represented in a common intermediate form.
Proposed method
- The method uses radare2’s Evaluable String Intermediate Language (ESIL) as a cross-architecture, semantics-preserving representation of binary functions.
- ESIL strings are tokenized and fed into a Longformer transformer model to capture long-range dependencies in function representations.
- The model is trained via deep metric learning to minimize triplet loss, directly optimizing for function similarity.
- Training is end-to-end with no pre-training or architectural fine-tuning, relying solely on the IR input and metric learning objective.
- The approach supports zero-shot search by leveraging semantic similarity in the ESIL representation across architectures.
- Datasets are constructed from binaries across ARM, MIPS, and RISC-V, with functions lifted to ESIL and normalized for training.

Experimental results
Research questions
- RQ1Can intermediate representations like ESIL enable effective cross-architecture binary function search without manual feature engineering?
- RQ2Does direct training on the function similarity objective outperform pre-training-based baselines in binary code search?
- RQ3How well does the model generalize to unseen architectures, such as RISC-V, in zero-shot settings?
- RQ4Is there a semantic similarity bias between certain ISAs (e.g., MIPS and RISC-V) when represented in ESIL?
- RQ5Can the model achieve strong performance on vulnerability detection tasks without dynamic analysis or additional data sources?
Key findings
- FASER outperforms all baseline approaches on both general function search and targeted vulnerability detection tasks.
- The FASER RN model achieves the best performance on the vulnerability search task, matching or exceeding GMN without pairwise comparison overhead.
- Mean and median rank for RISC-V → MIPS search are significantly lower (154 and 101.5) than for RISC-V → ARM (251 and 172), indicating stronger semantic similarity between MIPS and RISC-V in ESIL.
- Zero-shot search across unseen architectures performs poorly overall, with high mean and median ranks, suggesting limited generalization to dissimilar ISAs.
- The results suggest that including RISC-V binaries in training data may help balance data imbalances due to inherent semantic similarities with MIPS.
- The study demonstrates that pre-training is not necessary for strong performance, as direct metric learning on the similarity objective yields superior results.

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.