arXiv:2604.16377cs.CLcs.CY2026-04中稿 · the International …被引 1

用双模态融合识别代码是人写的还是大模型生成的

GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attribution

论文配图:GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attribution
图 1 · 摘自论文原文
  • 将代码风格与编译后二进制图像结合,用双曲空间建模层级关系
  • 在两个开源数据集上准确率超基线模型10%以上
  • 适合安全审计、版权溯源等需要识别代码来源的场景

训练于海量代码语料的大语言模型生成的代码已难以与人工编写代码区分,引发安全漏洞和许可模糊等问题,也催生了一个取证问题:‘这段代码是谁(或哪个大模型)写的?’ 我们提出 GoCoMA,一种多模态框架,建模代码风格(捕捉高层结构与风格特征)与二进制预执行产物(BPEA)图像表示(捕捉由编译和工具链塑造的低层字节语义)之间的外在层次关系。GoCoMA 将模态嵌入投影至双曲庞加莱球,通过基于测地线-余弦相似度的跨模态注意力(GCSA)机制进行融合,并将融合表示回投影至欧几里得空间以完成大模型源归属判断。在 CoDET-M4 与 LLMAuthorBench 两个开源基准上的实验表明,GoCoMA 在相同评估协议下持续优于单模态及欧几里得多模态基线。

原文摘要 · Abstract (English)

Large Language Models (LLMs) trained on massive code corpora are now increasingly capable of generating code that is hard to distinguish from human-written code. This raises practical concerns, including security vulnerabilities and licensing ambiguity, and also motivates a forensic question: 'Who (or which LLM) wrote this piece of code?' We present GoCoMA, a multimodal framework that models an extrinsic hierarchy between (i) code stylometry, capturing higher-level structural and stylistic signatures, and (ii) image representations of binary pre-executable artifacts (BPEA), capturing lower-level, execution-oriented byte semantics shaped by compilation and toolchains. GoCoMA projects modality embeddings into a hyperbolic Poincaré ball, fuses them via a geodesic-cosine similarity-based cross-modal attention (GCSA) fusion mechanism, and back-projects the fused representation to Euclidean space for final LLM-source attribution. Experiments on two open-source benchmarks (CoDET-M4 and LLMAuthorBench) show that GoCoMA consistently outperforms unimodal and Euclidean multimodal baselines under identical evaluation protocols.

代码溯源多模态双曲空间

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