International Journal For Multidisciplinary Research
E-ISSN: 2582-2160
•
Impact Factor: 9.24
A Widely Indexed Open Access Peer Reviewed Multidisciplinary Bi-monthly Scholarly International Journal
Home
Research Paper
Submit Research Paper
Publication Guidelines
Publication Charges
Upload Documents
Track Status / Pay Fees / Download Publication Certi.
Editors & Reviewers
View All
Join as a Reviewer
Get Membership Certificate
Current Issue
Publication Archive
Conference
Publishing Conf. with IJFMR
Upcoming Conference(s) ↓
Conferences Published ↓
DePaul-2026
IC-AIRCM-T3-2026
SPHERE-2025
AIMAR-2025
SVGASCA-2025
ICCE-2025
Chinai-2023
PIPRDA-2023
ICMRS'23
Contact Us
Plagiarism is checked by the leading plagiarism checker
Call for Paper
Volume 8 Issue 3
May-June 2026
Indexing Partners
Recursive Decay in AI-Generated Code: An Empirical Study of Security Logic Degradation Through Iterative LLM Refactoring
| Author(s) | Mr. Kaustuv Sharma, Yatu Rani, Naveen Yadav |
|---|---|
| Country | India |
| Abstract | Large language models (LLMs) are increasinglyintegrated into software development workflows for code gen-eration, refactoring, and optimization. Although the productivitybenefits of such tools are well-documented, their long-termimpact on code correctness and security under iterative usehas received limited empirical attention. This paper introducesthe Recursive Code Decay Experiment, an empirical frameworkthat quantifies how security-critical logic erodes when code isrepeatedly processed by generative AI models under variousrefactoring objectives.We evaluate LLM-driven refactoring across seven models—Llama 3.3 70B, Llama 3.1 8B, GPT-OSS 120B, GPT-OSS20B, Gemma 3 4B, Qwen 3 8B, and DeepSeek-R1 8B—usingaggressive, neutral, and preservation-aware prompting strate-gies. Security integrity is audited at each generation usingthe Guardrail Pattern Verification (GPV) algorithm, an AST- based structural analyzer capable of detecting five categories ofdefensive programming patterns. Our findings reveal three dis-inct decay archetypes: monotonic, oscillatory, and paradoxical.Notably, prompt formulation outweighs model size as a predictorof decay resistance. DeepSeek-R1 uniquely exhibited completesecurity collapse even under an explicit preservation directive, highlighting a critical gap between semantic understandingandstructural preservation. These results underscore the necessityof automated structural auditing in AI-assisted developmentpipelines. |
| Keywords | AI Code Generation, LLM Refactoring, Code Security, AST Analysis, Prompt Engineering, Guardrail Pattern Verification, Recursive Decay, Technical Debt |
| Field | Computer > Artificial Intelligence / Simulation / Virtual Reality |
| Published In | Volume 8, Issue 3, May-June 2026 |
| Published On | 2026-05-13 |
Share this

E-ISSN 2582-2160
CrossRef DOI is assigned to each research paper published in our journal.
IJFMR DOI prefix is
10.36948/ijfmr
Downloads
All research papers published on this website are licensed under Creative Commons Attribution-ShareAlike 4.0 International License, and all rights belong to their respective authors/researchers.
Powered by Sky Research Publication and Journals