Comp-X: On Defining an Interactive Learned Image Compression Paradigm With Expert-driven LLM Agent

Yixin Gao, Xin Li, Xiaohan Pan, Runsen Feng, Bingchen Li, Yunpeng Qi, Yiting Lu, Zhengxue Cheng, Zhibo Chen, Jörn OstermannarXiv 2025 · DOI

Abstract

Learned Image Compression (LIC) has achieved significant performance gains, yet remains inaccessible to non-expert users due to complex parameter tuning and task-specific model fragmentation. We present Comp-X, the first intelligently interactive image compression paradigm that allows users to control compression through natural language instructions. Comp-X integrates a multi-functional codec with a Large Language Model (LLM) agent trained via In-Context Learning with Expert Feedback (ICL-EF). The system employs a three-stage iterative workflow—Planning, Execution, and Evaluation—to automatically select coding modes, generate semantic masks, and refine quality parameters. Our results on the newly introduced IIC-Bench show an 80% instruction success rate while maintaining compression efficiency competitive with state-of-the-art specialized models.

Introduction

Despite the rapid advancement of Learned Image Compression (LIC), these systems remain "unfriendly" to non-experts. Traditional and learned codecs typically require users to manually select specific coding modes—such as Region-of-Interest (RoI) or perception-optimized modes—and tune cryptic hyperparameters to achieve a desired balance between file size and quality.

Furthermore, most LIC models are task-specific: one model is optimized for human viewing, while another is designed for machine vision tasks like object detection. This lack of a unified, intuitive interface creates a significant barrier to real-world deployment where user needs are often multi-faceted and expressed in plain language (e.g., "Keep the dog clear but stay under 100KB").

Comparison between manual usage and the proposed Comp-X interactive paradigm.

The Comp-X Framework

Comp-X operates through a closed-loop iterative workflow designed to bridge the semantic gap between user intent and technical codec parameters. The process is divided into three primary stages:

1. Planning and the Interactive Coding Agent

The "brain" of Comp-X is an LLM agent. Because general-purpose LLMs lack deep domain knowledge of image compression, we propose In-Context Learning with Expert Feedback (ICL-EF). The agent is provided with examples of multi-turn dialogues where a "coding expert" corrects initial reasoning errors. This allows the agent to internalize the complex relationships between bitrates, quality factors ($q$), and RoI priorities.

2. Execution and Multi-functional Coding

Instead of maintaining separate models for different tasks, Comp-X utilizes a single unified codec. This framework employs a semantically structured bitstream that decouples objects from the background using task-specific "adapters"—small, trainable modules inserted into a frozen base model. During execution, the agent can invoke external tools like Grounding-SAM to automatically generate segmentation masks for user-specified objects (e.g., "the car"), which are then processed by the codec's RoI module.

3. Evaluation and Iterative Refinement

After an initial compression pass, the system evaluates the result against the user's constraints. If the file size exceeds a limit or the quality metric is insufficient, the agent reasons about how to adjust the quality factors and re-runs the execution. This iterative approach allows Comp-X to hit precise targets that are typically impossible to achieve in a single pass.

The overall pipeline of Comp-X, illustrating the iterative Planning, Execution, and Evaluation loop.

Experimental Setup and Datasets

The base codec was trained on ImageNet v6 and COCO 2017, with evaluation performed on standard benchmarks including Kodak (distortion), DIV2K (perception), and MS-COCO (machine vision).

To specifically evaluate interactive capabilities, we introduced the Interactive and Intelligent image Compression Benchmark (IIC-Bench). This dataset contains 195 diverse user requests categorized by difficulty, paired with expert-annotated ground truth parameter settings. This benchmark allows for a rigorous assessment of how well an agent understands and executes complex, multi-constraint instructions.

Key Results and Insights

  • Instruction Success: Comp-X achieved an instruction parsing success rate of over 80% on the IIC-Bench, significantly outperforming vanilla GPT-4o and DeepSeek-v3 models.
  • Compression Efficiency: Despite its versatility, Comp-X maintains efficiency comparable to state-of-the-art specialized codecs like VTM 18.2 and HiFiC across PSNR, FID, and mAP metrics.
  • The Power of Iteration: Case studies demonstrate that the agent successfully navigates complex trade-offs, such as selectively increasing quality for foreground objects while aggressively compressing the background to meet strict file size constraints.

Conclusion and Future Work

Comp-X demonstrates that LLMs can serve as a sophisticated control logic for specialized compression tools without requiring full fine-tuning. By treating compression as a closed-loop optimization problem, we provide a user-friendly interface that does not sacrifice technical performance. Future work will focus on reducing the computational overhead of the iterative loop and extending this interactive paradigm to video compression, where temporal consistency and data volume present new challenges.

Summary updated

BibTeX
@misc{gao2025comp,
  author = {Yixin Gao and Xin Li and Xiaohan Pan and Runsen Feng and Bingchen Li and Yunpeng Qi and Yiting Lu and Zhengxue Cheng and Zhibo Chen and Jörn Ostermann},
  title = {{Comp-X: On Defining an Interactive Learned Image Compression Paradigm With Expert-driven LLM Agent}},
  year = {2025},
  eprint = {2508.15243},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.15243},
}
Figure