لطفا منتظر بمانید ...
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.
لیست مقالات
لیست مقالات بایگانی شده
بررسی روابط توان دوم برای اعداد باینری با تمرکز بر طراحی و پیاده سازی مدار برای ورودی 4 بیت مثبت و منفی در پروسه استاندارد 0.18 µm CMOS
احمد احمدزاده - امیر فتحی - بهبود مشعوفی
Seizure Suppression in a Neural Mass Model via Input-Output Feedback Linearization and Backstepping Control
Mahdi Moltamesi - Hasan Keshtkar
Distributed Data Processing for Multi-Agent Systems Via Wave Model
Saeedreza Tofighi - Masoud Shafiee
Placement and sizing of electric vehicle charging stations in distribution network with stochastic generation
Pooya Tadayonroody - Maryam Ramezani - Mohsen Akafimobarake - Hamid Falaghi - Mozhde Farhangroody
Stray Load Losses Determination Methods of Induction Motors-A Review
Moslem Geravandi - Hassan Moradi CheshmehBeigi
A New Protocol to Improve Effect of repetitive Transcranial Magnetic Stimulation in Treatment of Alzheimer's Disease
Ali Abedi - Gholamreza Moradi - Reza Sarraf Shirazi - Mehran Jahed
Enhancing Disaster Communication: Multi-UAV Optimization for Efficient Coverage
Amirhossein Solati - Javad Zeraatkar Moghaddam - Mehrdad Ardebilipour
Towards Blockchain-based Remote Management Systems for Patients with Movement Disorders
Behnaz Behara - Mehdi Delrobaei
Investigation of Li3P as Electrolyte and Lithium-ion conductor: An Ab-Initio Study
Keyvan Khosh Abady - ََamin Niksirat - Negar Karpourazar - Mahdi Pourfath
Effect of Source Pocket on the Performance of the Zigzag Antimonene Nanoribbon TFETs: A First-Principles Investigation
Amirreza Ghazi - Arash Yazdanpanah Goharrizi
بیشتر
ثمین همایش، سامانه مدیریت کنفرانس ها و جشنواره ها - نگارش 44.7.2