---
title: 'DeQA-Doc: Document Image Quality Assessment'
url: https://www.emergentmind.com/topics/deqa-doc
type: topic
---

# DeQA-Doc: Document Image Quality Assessment

DeQA-Doc is a framework for **Document Image Quality Assessment (DIQA)** that adapts **DeQA-Score**, a Multi-modal Large Language Model (MLLM)-based image quality scorer, to the document domain. It formulates DIQA as **continuous score regression** from a document image to a scalar quality value, but does so indirectly: the model predicts a soft distribution over five text-defined quality levels—**bad**, **poor**, **fair**, **good**, and **excellent**—and recovers a continuous score as the expectation of that distribution. The framework is motivated by document-processing settings in which image quality directly affects **OCR**, **digitization workflows**, **archival systems**, and broader **document understanding** pipelines [2507.12796].

## 1. Problem setting and conceptual basis

In DeQA-Doc, DIQA is treated as a problem of estimating how readable, usable, or visually acceptable a document image is. The paper emphasizes that this is not merely a low-level distortion-detection task. For documents, quality is tied to **text legibility**, **layout preservation**, and whether degradations impair downstream use. The motivating degradation patterns include **blur**, **low contrast**, **shadows**, **moiré**, **compression artifacts**, **uneven lighting**, and related distortions that can reduce recognition accuracy or distort document structure [2507.12796].

The framework is explicitly positioned against two prior classes of DIQA methods. First, **traditional handcrafted-feature or shallow-model methods** are said to rely on manually designed signals such as gradients or image statistics and to “often fail to capture high-level semantic and structural information.” Second, more recent **deep-learning-based methods** improve over handcrafted methods but are argued to “struggle to generalize across diverse document layouts and degradation types.” DeQA-Doc therefore adopts an MLLM-based formulation because document quality is presented as a **semantically structured visual reasoning problem** rather than only a generic image-regression task [2507.12796].

A central conceptual inheritance comes from **DeQA-Score**, originally developed for natural-image quality assessment. DeQA-Doc retains the idea of replacing direct scalar regression with prediction of a **soft distribution over discrete quality levels**. The model is trained to emit a templated response such as *“The quality of this image is \<level\>”*, and the probability assigned to the quality token becomes the basis for the final continuous score. This means that DeQA-Doc is best understood not as a wholly new DIQA formulation, but as a **document-specific extension** of DeQA-Score to high-resolution, text-centric, structurally constrained images [2507.12796].

## 2. Score-distribution formulation and soft-label construction

The core scoring mechanism uses five ordered quality levels with numeric centers
\[
c_i \in \{1,2,3,4,5\}.
\]
If \(p_i^{pred}\) denotes the model’s predicted probability for level \(i\), the continuous prediction is
\[
\mu^{pred} = \sum\nolimits_i p_i^{pred} c_i.
\]
This is the central regression mechanism in DeQA-Doc: the model does not attach a separate regression head to the backbone, but instead derives a scalar score from a language-aligned categorical distribution [2507.12796].

The main technical obstacle in transferring DeQA-Score to documents is that **DIQA-5000 provides only MOS**, not variance. DeQA-Score’s original soft-label construction assumes a Gaussian quality distribution
\[
x \sim \mathcal{N}(\mu,\sigma^2),
\]
discretized into five bins centered at \(c_i\), with raw bin probabilities
\[
p_i^{raw} = \int_{c_i - d/2}^{c_i + d/2}f(x)\,{\rm dx},
\]
followed by an adjustment so that the recovered mean matches the MOS. Because DIQA-5000 lacks \(\sigma^2\), this procedure cannot be applied directly in the document setting [2507.12796].

DeQA-Doc therefore introduces **two complementary soft-label constructions without variance information**. The first is **pseudo variance**. It draws on an empirical observation from DeQA-Score that, on IQA datasets such as **KonIQ**, **SPAQ**, and **KADID**, the average standard deviation is roughly **20% of the full score range**. DeQA-Doc thus sets the pseudo standard deviation to
\[
0.2 \times (\text{max} - \text{min}),
\]
normalizes scores to \([1,5]\), and then reuses the Gaussian-to-discrete labeling pipeline. The second is **linear interpolation between adjacent quality levels**. For a mean score \(\mu\) between adjacent centers \(c_j\) and \(c_{j+1}\), the target mass is assigned only to those two bins, yielding a sparse two-level target distribution [2507.12796].

Training combines ordinary autoregressive **cross-entropy** over the response template with a **KL divergence** on the quality-level token. The paper’s printed KL formula is malformed, but its intended role is clear: the predicted level distribution is matched against the soft target distribution. The result is a hybrid training objective in which ordinary language modeling constrains the response form, while the quality token receives explicit soft-label supervision [2507.12796].

## 3. Document-specific adaptations

The paper identifies **three document-specific adaptations** required to make DeQA-Score work well on DIQA.

The first is precisely the **soft-label redesign without variance annotations**. This is not a minor implementation detail. In the document domain, the lack of variance in DIQA-5000 makes the original DeQA-Score label construction infeasible, so DeQA-Doc’s pseudo-variance and linear-interpolation schemes are foundational rather than optional. Empirically, the paper prefers pseudo variance, which suggests that a broader target distribution better captures perceptual uncertainty than the limiting two-bin interpolation case [2507.12796].

The second is **high-resolution document support**. DeQA-Score’s original mPLUG-Owl2 configuration assumes fixed image resolution, typically \(448 \times 448\), which is problematic for documents because aggressive downsampling can destroy small text, layout boundaries, and subtle quality cues. DeQA-Doc addresses this in two ways. One option is to modify **mPLUG-Owl2-7B** by **removing the absolute position embeddings** from the CLIP-based vision encoder, thereby relaxing the fixed-resolution constraint. The other is to use **Qwen2.5-VL-7B**, which natively accepts **dynamic and original resolutions**. The paper is explicit that this adaptation is achieved through **resolution-flexible vision encoding**, not through tiling, multi-scale fusion, sliding windows, OCR extraction, or explicit cropping pipelines [2507.12796].

The third is **ensemble design for robustness**. DeQA-Doc studies both **model ensemble** and **prompt ensemble**. Model ensemble averages the predicted five-way score distributions from multiple models element-wise before taking the expectation-based score. Prompt ensemble averages predictions over **10 semantically equivalent prompts**. The empirical outcome is asymmetric: model ensemble yields substantial gains, whereas prompt ensemble contributes little. This suggests that, in this task, the dominant uncertainty lies in **model variance** rather than prompt phrasing [2507.12796].

## 4. Architecture, training procedure, and inference

DeQA-Doc is instantiated with two MLLM families: **mPLUG-Owl2-7B** and **Qwen2.5-VL-7B**. The architecture follows a standard MLLM decomposition into **vision encoder**, **vision-to-text connector**, and **LLM**. The model receives a document image, encodes it visually, projects visual tokens into the language embedding space, and then generates a templated textual answer whose critical token is one of the five quality levels [2507.12796].

The principal dataset is **DIQA-5000**. The paper uses its training split for optimization, its validation split for ablations and development, and its hidden test split for final evaluation. The labels cover **overall quality**, **sharpness**, and **color fidelity**. The official benchmark score combines **PLCC** and **SRCC** for these dimensions into a weighted final score, with **overall quality** weighted more heavily than **sharpness** and **color fidelity**; the printed equations in the paper are corrupted, but the weighting structure is described clearly [2507.12796].

Training explores both **full parameter tuning** and **LoRA fine-tuning**. The reported optimization setup uses **AdamW**, an initial learning rate of **\(2\times10^{-5}\)**, **cosine decay**, and **3 epochs**, on **8 NVIDIA RTX A100 GPUs**. For mPLUG-Owl2-based runs, the paper studies input resolutions of **\(448 \times 448\)**, **\(1024 \times 1024\)**, and **\(1536 \times 1536\)**; for Qwen2.5-VL, it also uses **original resolution**. Batch sizes are **64** at \(448 \times 448\), **8** at \(1024 \times 1024\), and **2** at \(1536 \times 1536\). The paper also studies optional pretraining on **KonIQ**, a natural-image IQA dataset, before adapting to DIQA-5000 [2507.12796].

At inference time, the model extracts the predicted probabilities for the five level tokens, computes the expected score \(\mu^{pred}\), and, if desired, averages score distributions across prompts and/or models. The response template remains tightly constrained; the task is not open-ended captioning but a controlled quality-assessment response whose semantics are then mapped back into a continuous DIQA score [2507.12796].

## 5. Empirical performance and ablation results

The paper reports a sequence of ablations that isolate the contribution of each design choice. On DIQA-5000 validation, **Q-Align** attains a final score of **0.8523**, whereas **DeQA-Score (w/o fidelity loss)** reaches **0.8630**, and **DeQA-Score (with fidelity loss)** reaches **0.8849**. This establishes that DeQA-Doc benefits from the **score-distribution formulation** rather than from generic MLLM prompting alone [2507.12796].

Resolution matters substantially. Validation performance improves from **0.8849** at \(448 \times 448\) to **0.8989** at \(1024 \times 1024\), but drops to **0.8861** at \(1536 \times 1536\). The paper interprets this as indicating that higher resolution is beneficial up to a point, after which redundant detail or overfitting may become harmful. The soft-label ablation shows **pseudo variance** outperforming **linear interpolation**, with final scores of **0.8989** versus **0.8714**. The fine-tuning ablation shows **LoRA** slightly outperforming **full fine-tuning**, with **0.9033** versus **0.8989** on validation [2507.12796].

The test-set results are the paper’s principal performance claims.

| Configuration | Final score |
|---|---:|
| m0: mPLUG-Owl2-7B, 1024, Full | 0.9098 |
| m1: mPLUG-Owl2-7B, 1024, LoRA | 0.9108 |
| m3: mPLUG-Owl2-7B, KonIQ pretrain, 1024, LoRA | 0.9112 |
| Q0: Qwen2.5-VL-7B, single model | 0.9054 |
| Q1: Qwen2.5-VL-7B, 5-fold ensemble | 0.9235 |
| m0 + m1 + m3 + Q0 + Q1 average | 0.9288 |

The best reported system is the final multi-model ensemble, which achieves **Final Score = 0.9288**, with **Sharpness = 0.9275**, **Color Fidelity = 0.9198**, and **Overall = 0.9339**. The progression of results indicates that the largest gains arise from four sources: moving from **Q-Align** to **DeQA-Score-style soft distribution learning**, increasing effective input resolution to **1024**, choosing **pseudo variance** over interpolation, and applying **model ensemble** across backbones and training variants. Prompt ensemble, by contrast, adds almost no improvement [2507.12796].

The paper also reports that pretraining on **KonIQ** improves DIQA-5000 performance, which suggests some transferability of quality-related representations from natural-image IQA to document images. This suggests cross-domain quality knowledge can be useful, even though DIQA remains a document-specific problem [2507.12796].

## 6. Relation to the DIQA literature, scope, and limitations

Within the emerging DIQA literature, DeQA-Doc occupies a distinct position. It is an **MLLM-based score-distribution regressor** for document quality, whereas later work such as **“DocIQ: A Benchmark Dataset and Feature Fusion Network for Document Image Quality Assessment”** emphasizes a specialized no-reference DIQA model with **layout fusion**, **feature fusion**, and **multi-rater prediction** on **DIQA-5000** [2509.17012]. A plausible implication is that these works represent complementary design points: DeQA-Doc pushes **language-aligned MLLM scoring**, while DocIQ pushes **document-structure-aware DIQA architecture**.

Another relevant comparison is **“Q-Doc: Benchmarking Document Image Quality Assessment Capabilities in Multi-modal Large Language Models”**, which evaluates MLLMs on DIQA at **coarse**, **middle**, and **fine** granularity levels and reports **inconsistent scoring**, **distortion misidentification**, and **severity misjudgment**, while also showing that **Chain-of-Thought prompting** can improve performance [2511.11410]. This context is important because it situates DeQA-Doc not simply as another DIQA model, but as part of a broader attempt to determine whether MLLMs can become reliable document-quality assessors rather than only general multimodal reasoners.

The paper also has clear limitations. It does not report a full cross-dataset generalization benchmark over multiple document-quality datasets. Its best performance depends on **ensembles**, which increase computational cost. The soft labels remain approximations because **DIQA-5000 lacks variance annotations**. The paper does not present a dedicated failure-case section, and it notes that **prompt ensemble is not effective** and that **\(1536 \times 1536\)** can hurt performance. More broadly, the work is about **document image quality assessment**, not **document-grounded question answering**. This distinction matters because the phrase “DeQA-Doc” also appears descriptively in work on document-grounded QA over specialized technical documentation, particularly EDA tool manuals, where it denotes retrieval-backed question answering rather than image quality assessment [2407.15353]. In the named framework discussed here, however, DeQA-Doc specifically denotes an adaptation of DeQA-Score for DIQA [2507.12796].

Taken together, these results position DeQA-Doc as a document-specific extension of MLLM-based image quality scoring whose key innovations are the **soft-label redesign without variance annotations**, **resolution-flexible visual encoding for high-resolution document images**, and **ensemble-based robustness**. Its empirical record indicates that score-distribution-based MLLM regression can transfer effectively from natural-image IQA to DIQA when adapted carefully for the structural and annotation peculiarities of document images [2507.12796].

Source: https://www.emergentmind.com/topics/deqa-doc