Skip to content
Enrique Tomás Martínez Beltrán
HomeResearchPublicationsTopicsTeachingBlog
Contact
EN/ES
HomeResearchPublicationsTopicsTeachingBlogContact
EN/ES

Enrique Tomás Martínez Beltrán

Postdoctoral research in AI, cybersecurity and federated learning, spanning threat analysis, closed-loop cyberdefense and trustworthy decentralized learning.

  • Privacy Policy
  • Terms of Service
  • Accessibility Statement
  • Google Scholaropens in a new tab
  • ORCIDopens in a new tab
  • LinkedInopens in a new tab
  • GitHubopens in a new tab
All profiles
  • ResearchGateopens in a new tab
  • Scopusopens in a new tab
  • DBLPopens in a new tab
  • Web of Scienceopens in a new tab

Enrique Tomás Martínez Beltrán. All rights reserved.

Back to top

This site loads optional analytics from Google and external analytics providers only if you accept. You can decline and continue using the site normally.

  1. Home
  2. Research Notes on Federated Learning, Cybersecurity and Cyberdefense
  3. Parametric RAG: Moving Security Knowledge Into the Model
Parametric RAGP-RAGRAGLLMsKnowledge AugmentationTrustworthy AI

Parametric RAG: Moving Security Knowledge Into the Model

A precise comparison between context injection, parameterized knowledge and hybrid retrieval

Enrique Tomás Martínez Beltrán

Postdoctoral Researcher in Computer Science

August 13, 20269 min read
  • LinkedInopens in a new tab
  • Xopens in a new tab
Parametric RAG: Moving Security Knowledge Into the Model

Parametric RAG, or P-RAG, changes the location of retrieved knowledge. Standard RAG places selected documents in the model context at inference time. Parametric approaches try to encode external documents into model parameters, often through a parameterization or adaptation stage, and can be combined with ordinary retrieval.

That distinction matters when a domain corpus is used repeatedly and the cost of sending the same long context is high.

1. Two memory paths

Let MθM_\thetaMθ​ be the base model and DDD a domain corpus. Contextual RAG computes:

y∼Mθ(q,Ck(q;D)).y \sim M_\theta(q, C_k(q;D)).y∼Mθ​(q,Ck​(q;D)).

Parametric augmentation produces adapted parameters θD\theta_DθD​ and then generates:

y∼MθD(q).y \sim M_{\theta_D}(q).y∼MθD​​(q).

A hybrid system can use both. The first path is easier to update and cite. The second can reduce repeated context and make common domain patterns easier to access.

2. What moves into the parameters

Encoding knowledge into parameters does not create a perfect database. It changes the model's statistical behavior. A parameterized memory may compress facts, relations and style while losing exact provenance or blending old and new versions.

In security, this raises a strict requirement: the model must not be treated as the authoritative source for a changing policy, indicator or incident fact. A current document retriever may still be required at answer time.

3. Evaluation questions

Compare P-RAG and contextual RAG on:

  • answer quality and domain adaptation,
  • update time after a source changes,
  • provenance and citation coverage,
  • interference with unrelated knowledge,
  • refusal behavior when a fact is absent,
  • inference cost and context length,
  • privacy and memorization risk.

The key question is not simply whether the adapted model answers more questions correctly. It is whether the gain survives updates and remains inspectable.

4. A safer hybrid pattern

Use parameterized knowledge for stable, repeated concepts and retrieve current evidence for volatile claims. The response should state which facts came from current documents and which capabilities reflect model adaptation.

P-RAG is therefore best understood as a memory design choice, not as a replacement for retrieval governance.

This note is an original synthesis of Parametric RAG concepts for security knowledge.

Further reading

  • Parametric Retrieval Augmented Generation

Related Research

Large Language Models for Cybersecurity: A Careful Starting Point

August 13, 2026

Large Language Models for Cybersecurity: A Careful Starting Point

A practical map of LLM roles in cyberdefense, from threat-intelligence support to alert triage and explanation, with explicit limits and controls.

Autonomous Cyberdefense Needs More Than an LLM

August 13, 2026

Autonomous Cyberdefense Needs More Than an LLM

How to frame autonomous cyberdefense as a bounded control loop with evidence, policies, recovery paths and accountable human intervention.