This study examines the quality differences between AI-generated and human-generated code through an evaluation of multiple software quality metrics, including maintainability, complexity, and documentation. Using a d...
详细信息
ISBN:
(数字)9798331529680
ISBN:
(纸本)9798331529697
This study examines the quality differences between AI-generated and human-generated code through an evaluation of multiple software quality metrics, including maintainability, complexity, and documentation. Using a dataset of 5,312 code samples—2,700 human-generated and 2,612 AI-generated—we applied machine learning techniques to classify and analyze the code based on these metrics. The results revealed that AI-generated code tends to excel in maintainability and documentation, demonstrating higher maintainability index scores and a higher ratio of comments. Additionally, AI-generated code often features simpler control structures, reflected in its lower cyclomatic complexity. In contrast, human-generated code showcased greater adaptability and flexibility, particularly in addressing complex problem statements. A neural network classifier achieved 88.05% accuracy in distinguishing between the two code origins, with comments ratio, maintainability index, and cyclomatic complexity being the most significant differentiators. These findings highlight the complementary roles of AI and human contributions in softwaredevelopment, suggesting strategic integration of both for enhanced efficiency and quality.
Adversarial attacks pose a significant challenge to the security and reliability of machine learning models. This paper focuses on detecting black-box adversarial attacks, where attackers operate without access to the...
详细信息
ISBN:
(数字)9798331529680
ISBN:
(纸本)9798331529697
Adversarial attacks pose a significant challenge to the security and reliability of machine learning models. This paper focuses on detecting black-box adversarial attacks, where attackers operate without access to the model's internal parameters or architecture—a scenario more relevant to real-world threats than white-box settings, where such knowledge is assumed. Two novel detection methodologies are introduced: (1) a clustering-based approach that groups input data to identify anomalies and (2) a class-centric method that uses statistical properties of labeled data to compute class centers and boundaries for detecting deviations. These methods utilize thresholds derived from dynamic statistical metrics to ensure robust, efficient, and scalable *** experiments validate the effectiveness of these approaches using the Iris dataset. Results demonstrate that the clustering-based method excels in detecting adversarial samples, achieving high accuracy, while the class-based method offers a conservative alternative by minimizing false positives. Both methodologies provide practical solutions for enhancing model security, particularly in scenarios where model details are unavailable, thereby addressing the limitations of existing defense mechanisms. Future work will explore scalability and application to higher-dimensional datasets.
暂无评论