[論文レビュー] ReSIM: Re-ranking Binary Similarity Embeddings to Improve Function Search Performance
ReSIM は埋め込みベースのバイナリ関数類似性に基づく評価の上に動作するニューラル再ランクャを導入し、複数の埋め込みモデルとデータセットに渡ってクエリ–候補対を共同で評価することで Recall と nDCG を向上させる。
Binary Function Similarity (BFS), the problem of determining whether two binary functions originate from the same source code, has been extensively studied in recent research across security, software engineering, and machine learning communities. This interest arises from its central role in developing vulnerability detection systems, copyright infringement analysis, and malware phylogeny tools. Nearly all binary function similarity systems embed assembly functions into real-valued vectors, where similar functions map to points that lie close to each other in the metric space. These embeddings enable function search: a query function is embedded and compared against a database of candidate embeddings to retrieve the most similar matches. Despite their effectiveness, such systems rely on bi-encoder architectures that embed functions independently, limiting their ability to capture cross-function relationships and similarities. To address this limitation, we introduce ReSIM, a novel and enhanced function search system that complements embedding-based search with a neural re-ranker. Unlike traditional embedding models, our reranking module jointly processes query-candidate pairs to compute ranking scores based on their mutual representation, allowing for more accurate similarity assessment. By re-ranking the top results from embedding-based retrieval, ReSIM leverages fine-grained relation information that bi-encoders cannot capture. We evaluate ReSIM across seven embedding models on two benchmark datasets, demonstrating consistent improvements in search effectiveness, with average gains of 21.7% in terms of nDCG and 27.8% in terms of Recall.
研究の動機と目的
- 関数を独立に埋め込む bi-encoder BFS システムの制約と限界を動機づけ、解決する。
- 高速な埋め込み検索とクロスエンコーダ再ランクャを組み合わせた二段階の関数探索パイプラインを提案する。
- 共同のクエリ–候補処理が埋め込みベースの検索だけよりランキング精度を向上させることを示す。
- ReSIM アプローチのデータセットとツールチェーンを横断したモデル間の頑健性と転移性を示す。
提案手法
- 埋め込みモデルがトップ W の候補を取得する二段階パイプライン。
- ニューラル再ランクャ(クロスエンコーダ)が(クエリ、候補)ペアを共同で処理し、類似度をスコアして W を再ランクして top-k 結果を生成する。
- 再ランクャは複数モデルからの難易度の高いネガティブを用いたペアワイズ対比/マージンランキング目的で訓練。
- ファインチューニングは DeepSeek-R1-Qwen3-8B(8B パラメータ)を LoRA アダプターと 4-bit QLoRA 量子化で実施。
- 前処理はクロスエンコーダ入力の連結とトークン化の前に二つのアセンブリ関数を正規化する。
- 本アプローチは基盤となる埋め込みモデル φ に対してモデル非依存であり、複数の φ をアンサンブルすることが可能である。
実験結果
リサーチクエスチョン
- RQ1ReSIM は多様な BFS 埋め込みモデルとツールチェーンでどのように性能を発揮するか?
- RQ2ウィンドウサイズ w は ReSIM の性能と効率にどう影響するか?
- RQ3埋め込みモデルを ReSIM と組み合わせることで単一モデル設定より追加の利益が得られるか?
- RQ4事前学習済みの再ランクャモデルをアセンブリ関数探索に適用した場合、転用効果はあるか?
主な発見
- ReSIM は seven 埋め込みモデルと二つのデータセット全体で nDCG@k と Recall@k を一貫して改善する。
- 評価設定全体での平均利得は nDCG が 21.7%、Recall が 27.8%。
- 古い埋め込みモデル(例:Gemini、SAFE)はより大きな利得を示し、トランスフォーマーベースのモデルも顕著な改善を得ている。
- 埋め込みモデルを ReSIM と組み合わせることでマルチツールチェーンデータセットで追加の Recall 増加(約 3%)を得られる。
- 事前訓練済みの再ランクャ(DeepSeek-R1-Qwen3-8B)から知識の転移が見られるが、アセンブリ言語で訓練されていなくても有効。
- ReSIM は様々な k 値(5,10,15,20,25,30)をサポートし、データセットを跨いで堅牢な改善を示す。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。