نموذج اللغة الكبير لضغط الصور بدون فقدان مع تلميحات بصرية Large Language Model for Lossless Image Compression with Visual Prompts

شارك:
المجلة: IEEE Transactions on Circuits and Systems for Video Technology
DOI: https://doi.org/10.1109/tcsvt.2026.3726407
تاريخ النشر: 2026-01-01
المؤلف: Junhao Du وآخرون
الموضوع الرئيسي: تقنيات ضغط البيانات المتقدمة

نظرة عامة

لقد حسنت التقدمات الحديثة في التعلم العميق بشكل كبير من ضغط الصور بدون فقدان، خاصة من خلال دمج نماذج اللغة الكبيرة (LLMs). تتناول هذه الورقة التحدي المتمثل في استخدام المعرفة النصية المدمجة في LLMs لتحسين نمذجة الإنتروبيا في ضغط الصور بدون فقدان. تتضمن الطريقة المقترحة إنشاء إعادة بناء بفقدان للصور المدخلة لإنشاء تلميحات بصرية، يتم من خلالها استخراج الميزات كتمثيلات بصرية لـ LLM. ثم تتم معالجة الفروقات بين الصور الأصلية والمُعاد بناؤها بواسطة LLM، مما يسمح له بالتنبؤ بتوزيع الاحتمالات لهذه الفروقات بشكل فعال.

تظهر التجارب الواسعة على مجموعات بيانات مرجعية متنوعة أن هذه الطريقة تحقق أداء ضغط متقدم، متفوقة على كل من الترميز التقليدي والمعتمد على التعلم. كما أن الإطار قابل للتكيف مع مجالات الصور الأخرى، مثل الصور الطبية وصور محتوى الشاشة، مما يظهر مرونته. تشير النتائج إلى أن LLMs يمكن أن تلعب دورًا تحويليًا في ضغط الصور بدون فقدان، مما يمهد الطريق للبحوث والتطبيقات المستقبلية في هذا المجال.

مقدمة

تناقش مقدمة ورقة البحث أهمية ضغط الصور بدون فقدان، والذي يهدف إلى تقليل حجم الصورة دون تشويه، وهو أمر حاسم لتخزين البيانات ونقلها. لقد أظهرت الترميزات التقليدية مثل PNG وWebP وJPEG-XL أداءً قويًا من خلال خوارزميات مصممة يدويًا، بينما شهدت التقدمات الحديثة ظهور الترميزات المعتمدة على التعلم، مثل L3C، التي تستخدم أطر توقع احتمالية هرمية. تسلط الورقة الضوء على إمكانيات نماذج اللغة الكبيرة (LLMs) في تعزيز ضغط الصور بدون فقدان من خلال نمذجة توزيعات البيانات بدقة، على غرار ترميز الإنتروبيا في الطرق التقليدية. ومع ذلك، لم تستفد الأساليب الحالية بالكامل من العلاقات المكانية داخل الصور، مما أدى إلى كفاءة ضغط دون المستوى الأمثل.

يقترح المؤلفون إطارًا جديدًا يدمج LLMs مع تلميحات بصرية، حيث يقوم ترميز بفقدان أولاً بضغط الصورة، وتكون إعادة البناء الناتجة مدخلاً لـ LLM للتنبؤ بتوزيع احتمالات الفروقات. تستخدم هذه الطريقة نموذج مزيج غاوسي (GMM) لنمذجة بكسلات الفروقات، مع توقع المعلمات من الميزات التي تم إنشاؤها بواسطة LLM. تحقق الطريقة المقترحة، التي تم تحسينها باستخدام التكيف منخفض الرتبة (LoRA)، أداءً متقدمًا (SOTA) عبر مجموعات البيانات المرجعية، متفوقة على الترميزات التقليدية مثل JPEG-XL وطرق التعلم الأخرى. تشير النتائج إلى أن دمج LLMs مع تلميحات بصرية يعزز بشكل كبير ضغط الصور بدون فقدان، مما يوضح قابليتها للتطبيق عبر مجالات الصور المتنوعة، بما في ذلك محتوى الشاشة والصور الطبية.

طرق

تنطوي المنهجية المقترحة لضغط الصور بدون فقدان على خط أنابيب من مرحلتين يبدأ بتطبيق ترميز بفقدان على الصورة الأصلية $x$، مما يؤدي إلى صورة مُعاد بناؤها بفقدان $x_l$. تُقسم هذه الصورة، جنبًا إلى جنب مع صورة الفروقات $r$، إلى قطع غير متداخلة بحجم $p \times p$، تُعرف بـ $\{x_{1l}, \ldots, x_{Nl}\}$ و$\{r_1, \ldots, r_N\}$، حيث $N$ هو العدد الإجمالي للقطع. تتم معالجة كل قطعة بشكل مستقل، حيث يتم توقع توزيع الاحتمالات لكل بكسل في قطعة الفروقات بطريقة تلقائية ويتم ترميزها باستخدام الترميز الحسابي. تُستخدم إعادة البناء بفقدان $x_l$ وقطعتها المقابلة $x_{nl}$ كتلميحات بصرية لاستخراج تمثيلات لنموذج اللغة الكبير (LLM)، الذي يقدر توزيعات البكسلات لقطع الفروقات.

في إعداد التجربة، يتم تدريب الإطار على مرحلتين. في البداية، يتم تجميد LLM أثناء تحسين وحدات أخرى باستخدام مجموعة بيانات ImageNet2012 مع مُحسن AdamW بمعدل تعلم قدره $1 \times 10^{-4}$. تتضمن المرحلة الثانية تحسين LLM باستخدام تقنية LoRA على مجموعة بيانات DIV2K. يتم ضغط الصور الأصلية بفقدان باستخدام ترميز BPG عند معلمة جودة $Q = 28$، وتُقص الصور الناتجة إلى أزواج قطع بحجم $16 \times 16$. يتم استخدام نموذج مزيج غاوسي مع $K = 5$ لنمذجة التوزيعات. يتم تنفيذ النموذج بالكامل في PyTorch ويتم تدريبه على مدى ثلاثة أيام على أربعة وحدات معالجة رسومات NVIDIA A100، مع تنفيذ الترميز الحسابي عبر مكتبة أدوات yaecl.

مناقشة

تسلط قسم المناقشة في الورقة الضوء على التقدمات الكبيرة في تقنيات ضغط الصور بفقدان وبدون فقدان، مع التأكيد على الدور المتطور للأساليب المعتمدة على التعلم. تستخدم الترميزات التقليدية بفقدان مثل JPEG وBPG وحدات مصممة يدويًا للضغط، بينما أظهرت الأساليب الحديثة المعتمدة على التعلم، وخاصة تلك التي تستخدم نماذج هايبر برايور والهياكل المتقدمة (مثل آليات الانتباه)، أداءً متفوقًا على الأساليب المتقدمة مثل VVC. لقد أدى دمج المكونات التلقائية مع نماذج هايبر برايور إلى تحسين ضغط الكود الخفي بدون فقدان، مما يبرز الاعتماد المتبادل بين تقنيات الضغط بفقدان وبدون فقدان.

في مجال الضغط بدون فقدان، تعتمد الترميزات التقليدية مثل PNG وJPEG-XL على طرق مصممة يدويًا، بينما تستفيد النماذج المعتمدة على التعلم الناشئة من الهياكل التوليدية العميقة لتعزيز النمذجة الإحصائية. يستخدم الإطار المقترح نماذج اللغة الكبيرة (LLMs) كمقدرات احتمالية شرطية، مستخدمًا تلميحات بصرية لتحسين دقة توقعات توزيع صورة الفروقات. يسمح دمج التمثيلات العالمية والمحلية بفهم أكثر دقة لبيانات الصورة، مما يؤدي في النهاية إلى تحسين كفاءة الضغط. تشير النتائج التجريبية إلى أن الطريقة المقترحة تتفوق على كل من الترميزات التقليدية والمعتمدة على التعلم، خاصة في سياق ضغط الصور الطبية، حيث يعتبر الحفاظ على سلامة البيانات أمرًا حاسمًا. بشكل عام، تشير النتائج إلى أن LLMs قد تمثل نهجًا تحويليًا لضغط الصور، مع تطبيقات محتملة تمتد إلى ما هو أبعد من النطاق الحالي.

Journal: IEEE Transactions on Circuits and Systems for Video Technology
DOI: https://doi.org/10.1109/tcsvt.2026.3726407
Publication Date: 2026-01-01
Author(s): Junhao Du et al.
Primary Topic: Advanced Data Compression Techniques

Overview

Recent advancements in deep learning have significantly enhanced lossless image compression, particularly through the integration of Large Language Models (LLMs). This paper addresses the challenge of utilizing the textual knowledge embedded in LLMs to improve entropy modeling in lossless image compression. The proposed method involves generating a lossy reconstruction of the input image to create visual prompts, from which features are extracted as visual embeddings for the LLM. The residuals between the original and reconstructed images are then processed by the LLM, allowing it to predict the probability distribution of these residuals effectively.

Extensive experiments on various benchmark datasets demonstrate that this approach achieves state-of-the-art compression performance, outperforming both traditional and learning-based codecs. The framework is also adaptable to other image domains, such as medical and screen content images, showcasing its versatility. The findings suggest that LLMs can play a transformative role in lossless image compression, paving the way for future research and applications in this area.

Introduction

The introduction of the research paper discusses the significance of lossless image compression, which aims to minimize image size without distortion, crucial for data storage and transmission. Traditional codecs like PNG, WebP, and JPEG-XL have demonstrated strong performance through hand-crafted algorithms, while recent advancements have seen the rise of learning-based codecs, such as L3C, which utilize hierarchical probability prediction frameworks. The paper highlights the potential of Large Language Models (LLMs) in enhancing lossless image compression by accurately modeling data distributions, akin to entropy coding in traditional methods. However, existing approaches have not fully leveraged the spatial relationships within images, resulting in suboptimal compression efficiency.

The authors propose a novel framework that integrates LLMs with visual prompts, where a lossy codec first compresses the image, and the resulting reconstruction serves as input for the LLM to predict the probability distribution of the residuals. This method employs a Gaussian Mixture Model (GMM) for modeling the residual pixels, with parameters predicted from LLM-generated features. The proposed approach, fine-tuned using Low-Rank Adaptation (LoRA), achieves state-of-the-art (SOTA) performance across benchmark datasets, outperforming traditional codecs like JPEG-XL and other learning-based methods. The findings suggest that the integration of LLMs with visual prompts significantly enhances lossless image compression, demonstrating its applicability across diverse image domains, including screen content and medical images.

Methods

The proposed methodology for lossless image compression involves a two-stage pipeline that begins with the application of a lossy codec to the original image $x$, resulting in a lossy reconstructed image $x_l$. This image, along with the residual image $r$, is divided into non-overlapping patches of size $p \times p$, denoted as $\{x_{1l}, \ldots, x_{Nl}\}$ and $\{r_1, \ldots, r_N\}$, where $N$ is the total number of patches. Each patch is processed independently, with the probability distribution of each pixel in the residual patch being predicted in an autoregressive manner and encoded using arithmetic coding. The lossy reconstruction $x_l$ and its corresponding patch $x_{nl}$ serve as visual prompts to extract embeddings for the large language model (LLM), which estimates the pixel distributions for the residual patches.

In the experimental setup, the framework is trained in two stages. Initially, the LLM is frozen while optimizing other modules using the ImageNet2012 dataset with the AdamW optimizer at a learning rate of $1 \times 10^{-4}$. The second stage involves fine-tuning the LLM using the LoRA technique on the DIV2K dataset. The original images are lossy compressed with the BPG codec at a quality parameter $Q = 28$, and the resulting images are cropped into patch pairs of size $16 \times 16$. A Gaussian Mixture Model with $K = 5$ is employed to model the distributions. The entire model is implemented in PyTorch and trained over three days on four NVIDIA A100 GPUs, with arithmetic coding executed via the yaecl tool library.

Discussion

The discussion section of the paper highlights significant advancements in both lossy and lossless image compression techniques, emphasizing the evolving role of learning-based methods. Traditional lossy codecs like JPEG and BPG utilize manually designed modules for compression, while recent learning-based approaches, particularly those employing hyperprior models and advanced architectures (e.g., attention mechanisms), have demonstrated superior performance over state-of-the-art methods such as VVC. The integration of autoregressive components with hyperprior models has further optimized lossless latent coding, underscoring the interdependence of lossy and lossless compression techniques.

In the realm of lossless compression, traditional codecs like PNG and JPEG-XL rely on handcrafted methods, while emerging learning-based models leverage deep generative architectures to enhance statistical modeling. The proposed framework utilizes large language models (LLMs) as conditional probability estimators, employing visual prompts to improve the accuracy of residual image distribution predictions. The incorporation of global and local embeddings allows for a more nuanced understanding of image data, ultimately leading to improved compression efficiency. The experimental results indicate that the proposed method outperforms both traditional and learning-based codecs, particularly in the context of medical image compression, where maintaining data integrity is crucial. Overall, the findings suggest that LLMs could represent a transformative approach to image compression, with potential applications extending beyond the current scope.