In the context of modern software development characterized by increasing complexity and compressed development cycles,traditional static vulnerability detection methods face prominent challenges including high false ...In the context of modern software development characterized by increasing complexity and compressed development cycles,traditional static vulnerability detection methods face prominent challenges including high false positive rates and missed detections of complex logic due to their over-reliance on rule templates.This paper proposes a Syntax-Aware Hierarchical Attention Network(SAHAN)model,which achieves high-precision vulnerability detection through grammar-rule-driven multi-granularity code slicing and hierarchical semantic fusion mechanisms.The SAHAN model first generates Syntax Independent Units(SIUs),which slices the code based on Abstract Syntax Tree(AST)and predefined grammar rules,retaining vulnerability-sensitive contexts.Following this,through a hierarchical attention mechanism,the local syntax-aware layer encodes fine-grained patterns within SIUs,while the global semantic correlation layer captures vulnerability chains across SIUs,achieving synergistic modeling of syntax and semantics.Experiments show that on benchmark datasets like QEMU,SAHAN significantly improves detection performance by 4.8%to 13.1%on average compared to baseline models such as Devign and VulDeePecker.展开更多
With the rapid growth of big data technologies,data analysis skills have become essential across industries.Programming skills are increasingly important.Universities are adding programming courses to their core curri...With the rapid growth of big data technologies,data analysis skills have become essential across industries.Programming skills are increasingly important.Universities are adding programming courses to their core curricula.It is challenging to evaluate students'code assignments in a scientific and efficient way.Traditional test-case evaluation only checks functional correctness.However,it cannot assess code structure,logical rigor,or performance.To address this,our study builds a multi-dimensional automated framework.The framework evaluates student code from four angles:structure analysis,grammar analysis,time complexity analysis,and code similarity analysis.Notably,in code similarity analysis,the framework integrates structural features,with semantic analysis powered by large language models.Teachers can use the evaluation results to fully understand students'progress and dynamically adjust teaching content.展开更多
基金supported by the research start-up funds for invited doctor of Lanzhou University of Technology under Grant 14/062402。
摘要In the context of modern software development characterized by increasing complexity and compressed development cycles,traditional static vulnerability detection methods face prominent challenges including high false positive rates and missed detections of complex logic due to their over-reliance on rule templates.This paper proposes a Syntax-Aware Hierarchical Attention Network(SAHAN)model,which achieves high-precision vulnerability detection through grammar-rule-driven multi-granularity code slicing and hierarchical semantic fusion mechanisms.The SAHAN model first generates Syntax Independent Units(SIUs),which slices the code based on Abstract Syntax Tree(AST)and predefined grammar rules,retaining vulnerability-sensitive contexts.Following this,through a hierarchical attention mechanism,the local syntax-aware layer encodes fine-grained patterns within SIUs,while the global semantic correlation layer captures vulnerability chains across SIUs,achieving synergistic modeling of syntax and semantics.Experiments show that on benchmark datasets like QEMU,SAHAN significantly improves detection performance by 4.8%to 13.1%on average compared to baseline models such as Devign and VulDeePecker.
基金supported,in part,by China-Singapore International Joint Research Institute(CSIJRI)(No.206-A023001)Undergraduate Teaching Reform Project of Shandong University(No.2023Y235)。
摘要With the rapid growth of big data technologies,data analysis skills have become essential across industries.Programming skills are increasingly important.Universities are adding programming courses to their core curricula.It is challenging to evaluate students'code assignments in a scientific and efficient way.Traditional test-case evaluation only checks functional correctness.However,it cannot assess code structure,logical rigor,or performance.To address this,our study builds a multi-dimensional automated framework.The framework evaluates student code from four angles:structure analysis,grammar analysis,time complexity analysis,and code similarity analysis.Notably,in code similarity analysis,the framework integrates structural features,with semantic analysis powered by large language models.Teachers can use the evaluation results to fully understand students'progress and dynamically adjust teaching content.