Smart contracts are increasingly targeted by adversaries employing obfuscation techniques such as bogus code injection and control flow manipulation to evade vulnerability detection. Existing multimodal methods often process semantic, temporal, and structural features in isolation and fuse them using simple strategies such as concatenation, which neglects cross-modal interactions and weakens robustness, as obfuscation of a single modality can sharply degrade detection accuracy. To address these challenges, we propose ContractShield, a robust multimodal framework with a novel fusion mechanism that effectively correlates multiple complementary features through a three-level fusion. Self-attention first identifies patterns that indicate vulnerability within each feature space. Cross-modal attention then establishes meaningful connections between complementary signals across modalities. Then, adaptive weighting dynamically calibrates feature contributions based on their reliability under obfuscation. For feature extraction, ContractShield integrates (1) CodeBERT with a sliding window mechanism to capture semantic dependencies in source code, (2) Extended long short-term memory (xLSTM) to model temporal dynamics in opcode sequences, and (3) GATv2 to identify structural invariants in control flow graphs (CFGs) that remain stable across obfuscation. Empirical evaluation demonstrates resilience of ContractShield, achieving a 89 percentage Hamming Score with only a 1-3 percentage drop compared to non-obfuscated data. The framework simultaneously detects five major vulnerability types with 91 percentage F1-score, outperforming state-of-the-art approaches by 6-15 percentage under adversarial conditions.


翻译:智能合约日益受到采用虚假代码注入和控制流操纵等混淆技术的攻击者针对,以规避漏洞检测。现有的多模态方法通常孤立处理语义、时序和结构特征,并通过拼接等简单策略融合,忽略了跨模态交互,且削弱了鲁棒性,因为单模态混淆可急剧降低检测准确率。为应对这些挑战,我们提出ContractShield,一种鲁棒的多模态框架,其新颖的融合机制通过三级融合有效关联多个互补特征。自注意力首先识别每个特征空间内指示漏洞的模式;跨模态注意力随后在模态间的互补信号间建立有意义的连接;最后,自适应权重根据特征在混淆下的可靠性动态校准其特征贡献。在特征提取方面,ContractShield集成:(1) CodeBERT与滑动窗口机制以捕捉源代码中的语义依赖关系,(2) 扩展长短期记忆网络(xLSTM)以建模操作码序列中的时序动态,以及(3) GATv2以识别控制流图中保持稳定的结构不变量。实证评估展示了ContractShield的鲁棒性,其汉明得分达89%,相比未混淆数据仅下降1-3%。该框架同时检测五种主要漏洞类型,F1得分达91%,在对抗条件下比现有最优方法高出6-15%。

0
下载
关闭预览

相关内容

深度多模态数据融合
专知会员服务
55+阅读 · 2024年11月9日
低质量数据的多模态融合综述
专知会员服务
59+阅读 · 2024年5月4日
《深度模型融合》综述
专知会员服务
75+阅读 · 2023年9月28日
专知会员服务
34+阅读 · 2021年5月8日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
【CVPR2021】跨模态检索的概率嵌入
专知
17+阅读 · 2021年3月2日
专家报告|深度学习+图像多模态融合
中国图象图形学报
12+阅读 · 2019年10月23日
FCS 论坛 | 孟德宇:误差建模原理
FCS
15+阅读 · 2017年8月17日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关主题
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 39分钟前
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 41分钟前
美以伊冲突:无人机与人工智能的运用
专知会员服务
2+阅读 · 53分钟前
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员