لطفا منتظر بمانید ...
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.
لیست مقالات
لیست مقالات بایگانی شده
Learning-Based Routing Policy For Wireless Sensor Networks
Najim Halloum - Yousef Darmani - Ali Ahmadi
Carbon Doping and Defect Engineering in Hexagonal Boron Nitride: Insights from First-Principles Calculations
Matin Bakhtavari Mamagani - Maryam Keshavarz Afshar - Ebrahim Nadimi
An Analysis of Nash Equilibrium Learning through Myopic Decision-making in Incomplete Information Double Sided Auction Games within Markets
Hesam Farzaneh - Parsa Zholideh
Intelligent Filter of $\mathcal{L}_{1}$ Adaptive Controller Using ANFIS System Optimized with Genetic Algorithm
Hossein Ahmadian - HeidarAli Talebi - Iman Sharifi
An Investigation of Hardware Implementation of Multi-Valued Logic Using Different Nanodevices
Abdolah Amirany - Kian Jafari - Mohammad Hossein Moaiyeri
An LMI-based Robust Fuzzy Controller for Blood Glucose Regulation in Type 1 Diabetes
Mohammadreza Ganji Arjenaki - Mahdi Pourgholi
Fragmentation-aware Coordinated Virtual Optical Network Embedding Algorithm Over Elastic Optical Networks
Niusha Sabri Kadijani - Lotfollah Beygi
طراحی یک کنترلکننده غیرخطی تطبیقی غیرمتمرکز برای تنظیم ولتاژ ریزشبکههای DC در حالت جزیرهای
سمیه بهرامی - فاطمه صفایی
مدیریت برنامهریزی هاب انرژی در مواجه با عدم قطعیتهای شدید قیمت برق و بار مصرفکننده با استفاده از روش تئوری تصمیمگیری بر مبنای شکاف اطلاعاتی
رضا غریبی - بهروز وحیدی
Enhancing Kriging with Inductive Spatio-Temporal GraphODE
Amin Sheykhzadeh - Behzad Moshiri - Ebrahim Ghafar-Zadeh
بیشتر
ثمین همایش، سامانه مدیریت کنفرانس ها و جشنواره ها - نگارش 44.7.2