Llamazip: Leveraging LLaMA for Lossless Text Compression and Training Dataset Detection

📅 2025-11-16
📈 Citations: 0
Influential: 0
📄 PDF

career value

204K/year
🤖 AI Summary
This work addresses two key challenges in large language model (LLM) research: the difficulty of training data provenance attribution and low efficiency in lossless text compression. We propose Llamazip—a unified, LLaMA3-based framework for joint lossless text compression and training set membership inference. Leveraging LLaMA3’s token-level predictive capability, Llamazip encodes only residual tokens that the model fails to predict accurately, achieving high compression efficiency. Crucially, the model’s per-token prediction confidence distribution serves as a discriminative signal for membership inference—marking the first direct use of LLM memorization for training set membership detection. Through quantized compression, context window optimization, and systematic evaluation, Llamazip achieves superior compression ratios over conventional algorithms on standard text corpora and attains high membership detection accuracy (AUC > 0.92). This work establishes a novel paradigm for enhancing model transparency, safeguarding data copyright, and enabling perception-aware LLM compression.

Technology Category

Application Category

📝 Abstract
This work introduces Llamazip, a novel lossless text compression algorithm based on the predictive capabilities of the LLaMA3 language model. Llamazip achieves significant data reduction by only storing tokens that the model fails to predict, optimizing storage efficiency without compromising data integrity. Key factors affecting its performance, including quantization and context window size, are analyzed, revealing their impact on compression ratios and computational requirements. Beyond compression, Llamazip demonstrates the potential to identify whether a document was part of the training dataset of a language model. This capability addresses critical concerns about data provenance, intellectual property, and transparency in language model training.
Problem

Research questions and friction points this paper is trying to address.

Develops lossless text compression using LLaMA3's predictive capabilities
Analyzes quantization and context window impacts on compression performance
Enables detection of documents used in language model training datasets
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses LLaMA model for lossless text compression
Stores only incorrectly predicted tokens for efficiency
Identifies training dataset documents for data provenance
S
Sören Dréano
ML-Labs, Dublin City University
D
Derek Molloy
School of Electronic Engineering, Dublin City University
N
Noel Murphy
School of Electronic Engineering, Dublin City University