لطفا منتظر بمانید ...
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.
لیست مقالات
لیست مقالات بایگانی شده
CEU-Net: A Connected EfficientUNet with ASPP for Mammographic Lesion Segmentation
Fatemeh Jafari - Saeed Meshgini - Reza Afrouzian
SWOT Analysis of the Mega Constellation Technology and Satellite Internet
Mohammad Bod - Parvin Sojoodi - Leila Mohammadi
A Consensus-Based Approach for Short-Circuit Fault Type Detection in DC Microgrids Using ANFIS
Mohammadreza Mohammadhasani - Javad Sadeh
Experimental Study of Pick and Place Operation for Packaging Using Delta Parallel Robot with Two-Fingered Gripper
Mona Mohades Mojtahedi - Arvin Mohammadi - Mehdi Tale Masouleh
بازسازی طیف پیوسته به کمک یادگیری عمیق برای حسگرهای CMOS چند کاناله با وضوح پایین
حسن حلاجی علایی - علی عبدالعالی - امیرسامان نورامین
Spotting of a Particular Printed Word in Farsi Handwritten Forms Using Deep Learning
Mohammad jafar Gholami Kenari - Ehsanollah Kabir
An Iterative Post-processing Method for Speech Source Separation in Realistic Scenarios
Iman Shahriari - Hossein Zeinali
چارچوب جامع شناسایی استخراج غیرمجاز رمزارز: پایش چندلایهای حرارتی (IR) و الگوهای انرژی
مهدی عرب صادق - ودود ساجدیفر - نرجس مشهدی
حسگر مایکروویو مبتنی بر کوپلر جهتی تنظیمپذیر برای پایش کیفیت مایعات
محمدمهدی جوانمردی - وحید نیری - ادیب ابریشمی فر - اوغور جم حصار
Medical Ultrasound Image Restoration in Presence of Defective Transducer Elements
Mohammad Saeed Zare Dehabadi - Mehran Jahed
بیشتر
ثمین همایش، سامانه مدیریت کنفرانس ها و جشنواره ها - نگارش 44.7.2