The proliferation of AI code generation tools necessitates robust detection methods for software development, education, and security applications. We present CodeFusion, a multimodal framework for detecting AI-generated code that analyzes both linguistic patterns and visual formatting across programming languages. Our approach combines Vision Transformers with contrastive learning to align visual code structure with semantic content, evaluated on samples from GPT-3.5 Turbo and GPT-4o across Java, Python, and OCaml. Through systematic comparison of traditional machine learning, deep learning, and transformer-based architectures, we reveal that more sophisticated models like GPT-4o are consistently more detectable than GPT-3.5 Turbo, challenging assumptions about model evolution toward perfect human mimicry. CodeFusion achieves near-perfect detection performance (F1 greater than 0.99) on GPT-4o code across all languages while maintaining robust performance on earlier model generations. Our findings suggest that AI models develop distinctive stylistic signatures rather than converging toward indistinguishable human patterns, providing new insights into AI code generation behaviors and establishing a foundation for reliable detection systems.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

AICodeDetect: A Pipeline for Systematic Detection and Analysis of AI-Generated Code

  • Saranya Vijayakumar,
  • Philip Negrin,
  • Christos Faloutsos

摘要

The proliferation of AI code generation tools necessitates robust detection methods for software development, education, and security applications. We present CodeFusion, a multimodal framework for detecting AI-generated code that analyzes both linguistic patterns and visual formatting across programming languages. Our approach combines Vision Transformers with contrastive learning to align visual code structure with semantic content, evaluated on samples from GPT-3.5 Turbo and GPT-4o across Java, Python, and OCaml. Through systematic comparison of traditional machine learning, deep learning, and transformer-based architectures, we reveal that more sophisticated models like GPT-4o are consistently more detectable than GPT-3.5 Turbo, challenging assumptions about model evolution toward perfect human mimicry. CodeFusion achieves near-perfect detection performance (F1 greater than 0.99) on GPT-4o code across all languages while maintaining robust performance on earlier model generations. Our findings suggest that AI models develop distinctive stylistic signatures rather than converging toward indistinguishable human patterns, providing new insights into AI code generation behaviors and establishing a foundation for reliable detection systems.