[Paper Review] Continual Pretraining on Encrypted Synthetic Data for Privacy-Preserving LLMs
This paper proposes an entity-based, weighted-graph data synthesis framework that encrypts PII with AES to enable continual pretraining of LLMs on encrypted synthetic data, preserving privacy while retaining learning effectiveness.
Preserving privacy in sensitive data while pretraining large language models on small, domain-specific corpora presents a significant challenge. In this work, we take an exploratory step toward privacy-preserving continual pretraining by proposing an entity-based framework that synthesizes encrypted training data to protect personally identifiable information (PII). Our approach constructs a weighted entity graph to guide data synthesis and applies deterministic encryption to PII entities, enabling LLMs to encode new knowledge through continual pretraining while granting authorized access to sensitive data through decryption keys. Our results on limited-scale datasets demonstrate that our pretrained models outperform base models and ensure PII security, while exhibiting a modest performance gap compared to models trained on unencrypted synthetic data. We further show that increasing the number of entities and leveraging graph-based synthesis improves model performance, and that encrypted models retain instruction-following capabilities with long retrieved contexts. We discuss the security implications and limitations of deterministic encryption, positioning this work as an initial investigation into the design space of encrypted data pretraining for privacy-preserving LLMs. Our code is available at https://github.com/DataArcTech/SoE.
Motivation & Objective
- Address the challenge of learning from small, domain-specific corpora without exposing private data during pretraining.
- Develop an encrypted synthetic data generation pipeline guided by a weighted entity graph.
- Enable authorized decryption of outputs while keeping cloud-side data ciphertext-protected.
- Demonstrate the viability of encrypted continual pretraining on privacy-sensitive datasets with limited-scale experiments.
Proposed method
- Extract entities using NER models and LLMs to form a PII-aware entity graph.
- Encrypt PII with deterministic AES in ECB mode and encode as Base64 with a prefix for clarity.
- Generate synthetic data conditioned on encrypted representations using GPT-4o and DeepSeek, then filter for quality.
- Pretrain Llama3-8B and Qwen2.5-7B on the encrypted synthetic data to learn from ciphertext representations.
- Evaluate privacy preservation by masking PII in questions and comparing crypto vs base models in QA tasks.

Experimental results
Research questions
- RQ1Can LLMs acquire domain knowledge through continual pretraining on encrypted synthetic data without exposing plaintext PII?
- RQ2How do entity-related factors (number of entities, relation tuple length) impact downstream QA performance?
- RQ3What is the trade-off in performance between encrypted versus unencrypted synthetic data pretraining?
- RQ4Do encrypted models retain instruction-following and retrieval-augmented generation capabilities?
- RQ5What are the security implications and limitations of deterministic encryption in this setting?
Key findings
- Models pretrained on encrypted synthetic data consistently outperform base models on small-domain QA tasks.
- Increasing the number of entities and longer relation tuples improve performance, with tuple length up to 10 yielding best results.
- Encrypted models show significant privacy protection, with decrypted questions leading to performance drops when PII is masked.
- Retrieval-augmented generation improves performance for encrypted data, though fully encrypted PII can reduce gains compared to unencrypted data.
- Encryption introduces a modest accuracy trade-off relative to unencrypted synthetic data but maintains beneficial knowledge transfer.
- The approach demonstrates feasibility of privacy-preserving continual pretraining for privacy-sensitive domains.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.