Hybrid cache-graph retrieval-augmented generation (RAG): enhancing network threat analysis through structural reasoning and memory optimization

The increasing complexity of network threats demands smarter and faster analytical tools. Existing models often struggle with zero-day attacks or high-volume traffic. Retrieval-augmented generation (RAG) offers a promising approach by combining retrieval from knowledge sources with generative reasoning. In this study, we evaluate and improve RAG-based architecture for network packet analysis. We propose a novel Hybrid Cache-Graph RAG framework that merges graph-based structural reasoning with strategic multi-level caching. Four architectures are compared: Traditional RAG, Graph RAG, Cache RAG, and the proposed hybrid model. Evaluation is conducted using intrusion detection evaluation dataset (CIC-IDS2017), the raw network packets (UNSW-NB15), and custom packet capture (PCAP) datasets across multiple metrics including accuracy, latency, and robustness under zero-day and high-load conditions. Results demonstrate that the Hybrid Cache-Graph RAG outperforms all baseline architectures, achieving an 18% improvement in retrieval accuracy (MAP) and a 54% reduction in latency. Ablation studies confirm the importance of adaptive component weighting in realizing these gains. This work underscores the value of integrating structural reasoning with memory optimization for building next-generation, adaptive cybersecurity solutions.

Authors

Institutions

Publication Details

Journal
PeerJ Computer Science
Published
2026-05-22
DOI
https://doi.org/10.7717/peerj-cs.3847
Primary Topic
Network Packet Processing and Optimization
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Hybrid cache-graph retrieval-augmented generation (RAG): enhancing network threat analysis through structural reasoning and memory optimization

Souham Meshoul, Muhammad Mahmoud, Mohamed Hammad, Mohamed Batouche
PeerJ Computer Science
Network Packet Processing and Optimization
article

Hybrid cache-graph retrieval-augmented generation (RAG): enhancing network threat analysis through structural reasoning and memory optimization

Souham Meshoul, Muhammad Mahmoud, Mohamed Hammad, Mohamed Batouche
article en

Abstract

The increasing complexity of network threats demands smarter and faster analytical tools. Existing models often struggle with zero-day attacks or high-volume traffic. Retrieval-augmented generation (RAG) offers a promising approach by combining retrieval from knowledge sources with generative reasoning. In this study, we evaluate and improve RAG-based architecture for network packet analysis. We propose a novel Hybrid Cache-Graph RAG framework that merges graph-based structural reasoning with strategic multi-level caching. Four architectures are compared: Traditional RAG, Graph RAG, Cache RAG, and the proposed hybrid model. Evaluation is conducted using intrusion detection evaluation dataset (CIC-IDS2017), the raw network packets (UNSW-NB15), and custom packet capture (PCAP) datasets across multiple metrics including accuracy, latency, and robustness under zero-day and high-load conditions. Results demonstrate that the Hybrid Cache-Graph RAG outperforms all baseline architectures, achieving an 18% improvement in retrieval accuracy (MAP) and a 54% reduction in latency. Ablation studies confirm the importance of adaptive component weighting in realizing these gains. This work underscores the value of integrating structural reasoning with memory optimization for building next-generation, adaptive cybersecurity solutions.

PeerJ Computer ScienceVol. 12
Princess Nourah bint Abdulrahman University (SA), Prince Sultan University (SA), Egypt Nanotechnology Center (EG)
Openalex Percentile: Top 2%
Network Packet Processing and Optimization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.