لطفا منتظر بمانید ...
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.
لیست مقالات
لیست مقالات بایگانی شده
A Robust Hysteresis-Feedforward Control Approach with High Flexibility for a Single-Inductor Multi-Port DC-DC Converter
Aran Shoaei - Karim Abbaszadeh - Hesamodin Allahyari
پیشبینی بلندمدت بار فصلی شبکه برق با استفاده از روش سری زمانی ETS
میلاد حاجی ابوالحسنی - محسن صفرزاده - زهرا عظیمی - سیدمرتضی میرباقری
طراحی و تحلیل یک حسگر پلاسمونیک ضریب شکست بر پایه فیبر بلور فتونی با هدف بهبود مشخصات فنی
علی یاوری - حسن کاتوزیان - سارا قلی نژاد شفق
Dynamic Simplicial Coherence Networks for Resting-State fMRI Gender Classification
Mansooreh Pakravan
Low-Power Fano Resonance-Based MIM Plasmonic Switch Using Kerr-Type Nonlinear Material
Yousef Karimi - Hassan Kaatuzian
Genetic-Algorithm-Based Design of a Variable-Order Fractional PID Controller for Artificial Pancreas Systems
Amir Arzhang - Ehsan Nazemorroaya
Investigation of Statistical and Mathematical Indices for Transformer Frequency Response Analysis and Winding Condition Diagnosis Using Machine Learning Methods
Ali Ghorbani - Hossein Parsadust - Ali Khani - Mohammad Molaei
Experimental Evaluation of Humidity Effects on THz-TDS and the Resulting Improvements Using Local Dehumidification
Hossein Ghani - Mehdi Ahmadi-Boroujeni
بررسی کنترل مغناطیسی پاسخ کایرواپتیکی ساختارهای مگنتوکایرال
کی سیاوش کیکاوسی - حمیده دشتی خویدکی - جواد احمدی شکوه - مجید رشیدی هویه
A Bi-Level Attack-Defense Model for the Forecasting False Data Injection Attacks on the Integrated Energy Systems
Maryam Azimi - Hamed Delkhosh - Mahdi Ghaedi
بیشتر
ثمین همایش، سامانه مدیریت کنفرانس ها و جشنواره ها - نگارش 44.7.2