![[Paper Reading]: R2Code: A Self-Reflective LLM Framework for Requirements-to-Code Traceability](https://images.gosomo.app/events/27a38849-fbb6-4f9c-ac64-92edc0bbbba7/20a7f9fc-47ec-40c9-ab95-352ef9c214b7_1080.webp)
[Paper Reading]: R2Code: A Self-Reflective LLM Framework for Requirements-to-Code Traceability
π Weekly Paper Reading Session
Join SupportVectors AI Training Lab for another deep-dive into cutting-edge AI research! This week's session walks through and discusses the paper:
π¬ R2Code: A Self-Reflective LLM Framework for Requirements-to-Code Traceability
Speaker: Krishnan Ramaswamy
π§ About the Paper
Accurate requirement-to-code traceability is a cornerstone of effective software maintenance β yet current IR- and embedding-based approaches lean heavily on lexical similarity, frequently producing incomplete or inconsistent trace links across different projects and programming languages, while also incurring significant costs from long-context retrieval and prompting.
This paper introduces R2Code, an LLM-based semantic traceability framework engineered to boost trace link accuracy while simultaneously cutting inference costs. The framework is built around three core components:
- π Bidirectional Alignment Network (BAN) β A decomposition-enhanced module that aligns four-layer requirement semantics with corresponding code structures, enabling robust cross-level semantic matching
- β Self-Reflective Consistency Verification (SRCV) β An explanation-guided consistency-checking module that calibrates the reliability of trace links
- β‘ Dynamic Context-Adaptive Retrieval (DCAR) β A mechanism that adjusts retrieval granularity and filters contexts via semantic-overlap weighting for efficient context utilization
π Key Results
Experiments conducted across five public datasets spanning multiple domains and two programming languages show that R2Code consistently surpasses the strongest baselines β achieving an average F1 gain of 7.4% while slashing token consumption by up to 41.7% through adaptive context control.
π Attendance Options
This session is open to everyone β attend in person at SupportVectors in Fremont, CA (conveniently located near Tesla and accessible via road and BART), or join remotely via Zoom.
π« About SupportVectors
SupportVectors AI Training Lab delivers high-quality, hands-on, industry-targeted AI training designed to keep professionals at the forefront of the field. Everyone is welcome β whether you're a seasoned ML engineer or just getting started with AI research! π
SupportVectors
Get directionsScan med kameraet β begivenheden Γ₯bnes i Somo-appen.









