mlsanityData to 14 Oct 2026

Fully Homomorphic Encryption on Llama 3 model for privacy preserving LLM inference

arXiv 2604.12168 ↗First posted 14 Apr 2026cs.CR cs.AIcited by 0

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

The applications of Generative Artificial Intelligence (GenAI) and their intersections with data-driven fields, such as healthcare, finance, transportation, and information security, have led to significant improvements in service efficiency and low latency. However, this synergy raises serious concerns regarding the security of large language models (LLMs) and their potential impact on the privacy of companies and users' data. Many technology companies that incorporate LLMs in their services with a certain level of command and control bear a risk of data exposure and secret divulgence caused by insecure LLM pipelines, making them vulnerable to multiple attacks such as data poisoning, prompt injection, and model theft. Although several security techniques (input/output sanitization, decentralized learning, access control management, and encryption) were implemented to reduce this risk, there is still an imminent risk of quantum computing attacks, which are expected to break existing encryption algorithms, hence, retrieving secret keys, encrypted sensitive data, and decrypting encrypted models. In this extensive work, we integrate the Post-Quantum Cryptography (PQC) based Lattice-based Homomorphic Encryption (HE) main functions in the LLM's inference pipeline to secure some of its layers against data privacy attacks. We modify the inference pipeline of the transformer architecture for the LLAMA-3 model while injecting the main homomorphic encryption operations provided by the concrete-ml library. We demonstrate high text generation accuracies (up to 98%) with reasonable latencies (237 ms) on an i9 CPU, reaching up to 80 tokens per second, which proves the feasibility and validity of our work while running a FHE-secured LLAMA-3 inference model. Further experiments and analysis are discussed to justify models' text generation latencies and behaviours.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 17 of its 48 references that are in the map. First posted on arXiv 14 Apr 2026.

Builds on

17 of 48 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 16

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Longformer: The Long-Document Transformercited by 3,413
  3. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  4. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  5. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  6. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
  7. 2023Scalable Extraction of Training Data from (Production) Language Modelscited by 434
  8. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 387
  9. 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 278
  10. 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 230
  11. 2023Use of LLMs for Illicit Purposes: Threats, Prevention Measures, and Vulnerabilitiescited by 82
  12. 2024Jailbreaking and Mitigation of Vulnerabilities in Large Language Modelscited by 34
4 more
  1. 2023Exploiting Large Language Models (LLMs) through Deception Techniques and Persuasion Principlescited by 17
  2. 2024GuardML: Efficient Privacy-Preserving Machine Learning Services Through Hybrid Homomorphic Encryptioncited by 7
  3. 2025Penetration Testing of Agentic AI: A Comparative Security Analysis Across Models and Frameworkscited by 4
  4. 2023Level Up: Private Non-Interactive Decision Tree Evaluation using Levelled Homomorphic Encryptioncited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025TFHE-Coder: Evaluating LLM-agentic Fully Homomorphic Encryption Code Generation
  2. 2025Private LoRA Fine-tuning of Open-Source LLMs with Homomorphic Encryption
  3. 2025SoK: Can Fully Homomorphic Encryption Support General AI Computation? A Functional and Cost Analysis
  4. 2025PPMI: Privacy-Preserving LLM Interaction with Socratic Chain-of-Thought Reasoning and Homomorphically Encrypted Vector Databases
  5. 2026Large Language Models (LLMs) and Generative AI in Cybersecurity and Privacy: A Survey of Dual-Use Risks, AI-Generated Malware, Explainability, and Defensive Strategies
  6. 2024Security and Privacy Challenges of Large Language Models: A Survey
  7. 2026HE-Guardrail: A Homomorphic Guardrail Against Jailbreak Attacks for Encrypted Large Language Model Inference
  8. 2025Privacy Preservation in Gen AI Applications