لطفا منتظر بمانید ...
0% Complete
صفحه اصلی
/
سی و چهارمین کنفرانس بین المللی مهندسی برق
A Framework for Enhancing Code Security in LLMs via Hierarchical Security-Context RAG
نویسندگان :
Abbas Mirheidari
1
Amir Jalali Bidgoli
2
Ali Taei Zadeh
3
1- دانشگاه قم
2- دانشگاه قم
3- دانشگاه قم
کلمات کلیدی :
Large Language Models (LLMs)،Secure Code Generation،Retrieval-Augmented Generation (RAG)،Fine-tuning
چکیده :
While Large Language Models (LLMs) are transforming software development, they often generate insecure code, posing significant security risks. Existing methods like fine-tuning can enhance security but are computationally expensive and create static model’s incapable of adapting to the dynamic threat landscape without costly retraining. To address these limitations, we propose HSC-RAG (Hierarchical Security-Context RAG), a novel retrieval-augmented generation framework that dynamically injects security knowledge into LLMs at inference time, eliminating the need for retraining. HSC-RAG leverages a knowledge base of secure/insecure code pairs and employs a multi-stage retrieval and filtering process to construct a highly relevant, security-focused context. Our experiments on models including StarCoder and Deepseek-coder show that HSC-RAG achieves up to 91% of the security performance of a fully fine-tuned model, while preserving the model’s utility on the HumanEval benchmark - all without incurring retraining costs.
لیست مقالات
لیست مقالات بایگانی شده
Joint Space Control of a Deployable Cable Driven Parallel Robot with Redundant Actuators
S. Ahmad Khalilpour - Ali Hassani - Rohollah Khorambakht - A.R. Zahedi - Abbas Bataleblu - Hamid D. Taghirad
Vision Transformer and Parallel Convolutional Neural Network for Speech Emotion Recognition
Saber Hashemi - Mohammad Asgari
Enhancing the Performance of Piezoelectric Sensors Using RTV2 Elastomer Coatings
Amirreza Kamali - Amirhossein Jafari - Ehsan Maani Miandoab
Design and Implementation of a Data-Driven Controller for a Two-Wheeled Self-Balancing Robot
Mohammad Akhavan - Haniye Parvahan - Mojtaba Nouri Manzar
Partial Image Encryption of Faces Based on Chaotic Maps and Elliptic Curve Cryptography
Ali Soleymani - Md Jan Nordin
Integrated strategy for segment BRATS using co-operation of FCM and TL under abnormal behavior of noises
Arman Zafaranchi - Pedram Salehpoor
An Ensemble Model for Sleep Stages Classification
Sahar Hassanzadeh Mostafaei - Jafar Tanha - Amir Sharafkhaneh - Zohair Hassanzadeh Mostafaei - Mohammed Hussein Ali Al-jaf - Alireza Fakhim babaei
Koopman-based Disturbance-Aware Trajectory Tracking via Neural Residual MPC for Autonomous Omnidirectional Wheeled Robots
Ashkan Jelodar - Kevin Babakhanloo - Mohammad Olyai - Khalil Alipour - Bahram Tarvirdizadeh - Mohammad Ghamari
The Comparison of MXene and Graphene-Based Antennas for 5G/6G Communications
Javad Shokri Seyyedi - Gholamreza Moradi - Reza Sarraf Shirazi - Sepehr Sahab - Abolfazl Ebrahimpour
برنامه ریزی احتمالاتی بهینه فیلترهای پسیو در حضور خودروهای برقی متصل به شبکه با قابلیت جبرانسازی هارمونیک در شبکههای توزیع
پریسا انجم شعاع - سعید اسماعیلی
بیشتر
ثمین همایش، سامانه مدیریت کنفرانس ها و جشنواره ها - نگارش 44.7.2