mlsanityData to 14 Oct 2026

A Retrieval-Augmented Generation Approach to Extracting Algorithmic Logic from Neural Networks

arXiv 2512.04329 ↗First posted 3 Dec 2025cs.CV cs.SEcited by 11

On the map: Retrieval-augmented generation → RAG pipeline design and evaluation

Abstract (arXiv)

Reusing existing neural-network components is central to research efficiency, yet discovering, extracting, and validating such modules across thousands of open-source repositories remains difficult. We introduce NN-RAG, a retrieval-augmented generation system that converts large, heterogeneous PyTorch codebases into a searchable and executable library of validated neural modules. Unlike conventional code search or clone-detection tools, NN-RAG performs scope-aware dependency resolution, import-preserving reconstruction, and validator-gated promotion -- ensuring that every retrieved block is scope-closed, compilable, and runnable. Applied to 19 major repositories, the pipeline extracted 1,289 candidate blocks, validated 941 (73.0%), and demonstrated that over 80% are structurally unique. Through multi-level de-duplication (exact, lexical, structural), we find that NN-RAG contributes the overwhelming majority of unique architectures to the LEMUR dataset, supplying approximately 72% of all novel network structures. Beyond quantity, NN-RAG uniquely enables cross-repository migration of architectural patterns, automatically identifying reusable modules in one project and regenerating them, dependency-complete, in another context. To our knowledge, no other open-source system provides this capability at scale. The framework's neutral specifications further allow optional integration with language models for synthesis or dataset registration without redistributing third-party code. Overall, NN-RAG transforms fragmented vision code into a reproducible, provenance-tracked substrate for algorithmic discovery, offering a first open-source solution that both quantifies and expands the diversity of executable neural architectures across repositories.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in RAG pipeline design and evaluation, one of 15 directions in Retrieval-augmented generation. Builds on 26 of its 84 references that are in the map. First posted on arXiv 3 Dec 2025.

Builds on

26 of 84 references.

References · 26

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  2. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,183
  3. 2017Squeeze-and-Excitation Networkscited by 4,789
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  5. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,884
  6. 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,269
  7. 2016Identity Mappings in Deep Residual Networkscited by 1,965
  8. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
  9. 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,601
  10. 2019MMDetection: Open MMLab Detection Toolbox and Benchmarkcited by 1,385
  11. 2016Deep Networks with Stochastic Depthcited by 979
  12. 2019Making Convolutional Networks Shift-Invariant Againcited by 391
14 more
  1. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  2. 2020Improving Reproducibility in Machine Learning Research (A Report from the NeurIPS 2019 Reproducibility Program)cited by 322
  3. 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 203
  4. 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
  5. 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 99
  6. 2024CodeR: Issue Resolving with Multi-Agent and Task Graphscited by 91
  7. 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learningcited by 70
  8. 2015SourcererCC: Scaling Code Clone Detection to Big Codecited by 40
  9. 2025GitTaskBench: A Benchmark for Code Agents Solving Real-World Tasks Through Code Repository Leveragingcited by 25
  10. 2025Optuna vs Code Llama: Are LLMs a New Paradigm for Hyperparameter Tuning?cited by 21
  11. 2025LEMUR Neural Network Dataset: Towards Seamless AutoMLcited by 20
  12. 2025Preparation of Fractal-Inspired Computational Architectures for Advanced Large Language Model Analysiscited by 11
  13. 2025AugmentGest: Can Random Data Cropping Augmentation Boost Gesture Recognition Performance?cited by 10
  14. 2021Manas: Mining Software Repositories to Assist AutoMLcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 9.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  2. 2025RAG Without the Lag: Interactive Debugging for Retrieval-Augmented Generation Pipelines
  3. 2026NeSy-RAG: Neuro-Symbolic RAG for Explainable Question Answering
  4. 2025On The Reproducibility Limitations of RAG Systems
  5. 2024EVOR: Evolving Retrieval for Code Generation
  6. 2026LLM as a Tool, Not an Agent: Code-Mined Tree Transformations for Neural Architecture Search
  7. 2024Toward General Instruction-Following Alignment for Retrieval-Augmented Generation
  8. 2026Reason and Verify: A Framework for Faithful Retrieval-Augmented Generation