ELVIA.Evidence Atlas
ICML 2025ELVIA assessment Minor

DocVXQA: Context-Aware Visual Explanations for Document Question Answering

Mohamed Ali Souibgui, Changkyu Choi, Andrey Barsky, Kangsoo Jung, Ernest Valveny, Dimosthenis Karatzas

ELVIA analysis

Independent review pending

The practical information-bottleneck-inspired objective is presented as a heuristic, not a proved mutual-information identity. No substantive error was established in that mathematical interpretation or the displayed preference-count arithmetic. Three implementation/specification concerns are established in the pinned public source: reference answers enter validation-mask construction, training never clears accumulated gradients, and matrix norms implement different penalties from entrywise sparsity and anisotropic total variation. The reference-conditioned route must be distinguished from annotation-free evaluation; the paper also explicitly uses an answer-conditioned ColPali baseline. The demonstrated optimizer and regularizer discrepancies are local to these heuristic choices. These findings are assessed as Minor in that bounded scope; the intended evaluation protocol and historical table correspondence remain Needs Evidence.

Problem 1. Reference answers enter validation-mask construction

Minor
Evidence and reasoning

Problem statement

Inspection subject recorded in the report

Static source trace from dataset answers through labels/shift_right/cross_attention/mask to masked-image generation; parent independently read paths.

Pinned public commit d1545b35220fb928a207166aacbcf7e35d20ab1e. Pix2Struct enc_dec_attn validation. Multi-token answer aggregation can include reference-conditioned positions.

Proof

Assessment: Minor for the evaluator/protocol mismatch under an annotation-free reading; the intended conditioning and historical impact need evidence. Figure 2 and Section 3.1 (pp. 3–4) describe a question/document input that produces a mask and then an answer. Section 4.1 (p. 6) describes comparing the subsequent predicted answer with ground truth. The pinned validation route instead admits ground truth before constructing the mask.

In `data.py:126-134`, the dataset’s reference answer is assigned to `text`; lines 174174–177177 tokenize it into `labels`. In `train.py:164-218`, `eval_masked_doc` shifts those labels into decoder input IDs, obtains cross attentions, aggregates them into mask-head features, thresholds the mask, and only then generates a masked-image answer. The evaluator is called after each epoch and its ANLS selects the best checkpoint (lines 247247–260260).

Thus the validation mask is a function Mθ(X,Q,Yref),M_\theta(X,Q,Y_{\rm ref}), whereas an annotation-free deployment mask must be obtainable from X,QX,Q and model-generated information. For a multi-token reference, the shifted decoder input contains reference tokens after the start symbol. The aggregation includes those later positions whenever its selected length exceeds one; reference-conditioned decoder features can therefore affect the mask. This is a traced dependency, not a measured estimate of score inflation.

The standalone `evaluate.py:49-120` has the same reference-conditioned route, but also a misspelled `attention_m884ask` keyword. We do not claim that file executes unchanged. The training evaluator uses the correctly spelled keyword, so the dataflow finding does not depend on repairing the standalone typo.

□\square

Possible revision

Identify the intended answer-conditioning protocol; compare reference-conditioned and generated-answer routes and bind historical runs.

Problem 2. Training never resets gradients

Minor
Evidence and reasoning

Problem statement

Inspection subject recorded in the report

Static calls audit plus own two-step Adam arithmetic with gradients+1,1,−1.-1.

Ordinary PyTorch backward accumulation. Per-batch AdamW step, no reset/hook in supplied route.

Proof

Assessment: Minor; released training source. The method optimizes the combined loss in Eq. (3); Appendix A.3 specifies AdamW. In `train.py`, AdamW is constructed at line 46,46, and each minibatch calls `overall_loss.backward()` then `optimizer.step()` at lines 133133–134.134. The loop and epoch driver never call `zero_grad`, assign cleared gradients, or invoke a clearing hook. The separate backbone fine-tuning script does clear gradients, but is not called by this training routine.

PyTorch backward adds to gradient buffers; optimizer stepping does not perform that reset [grad]. Consequently, after initially empty gradients, the second step receives g1+g2g_1+g_2 rather than g2,g_2, and subsequent buffers retain still older gradients evaluated at earlier parameter values. This is not ordinary deliberate accumulation over a fixed microbatch group with one later step: the code steps every minibatch and never resets.

For a scalar initialized at zero, take two minibatch losses L1(w)=w,L_1(w)=w, L2(w)=−w.L_2(w)=-w. With Adam moments initially zero, β1=0.9,\beta_1=0.9, β2=0.999,\beta_2=0.999, and ϵ=10−8,\epsilon=10^{-8}, the independent calculation gives

Second step | Gradient supplied | Adaptive update / learning rate

Reset for each minibatch | −1∣+0.0526315784-1 | +0.0526315784

Released no-reset pattern | 0∣−0.67005824470 | -0.6700582447

Both have the same first-step weight, so the second-step decoupled weight-decay contribution is identical and cannot remove the discrepancy. This diagnostic demonstrates a changed optimization update, not a prediction of DocVQA accuracy.

An undocumented intention to use cumulative gradients would define a different optimizer and require justification; none was found in the inspected route. Resetting at the intended accumulation boundary restores ordinary minibatch semantics locally. Historical use, retraining effects and repaired metrics remain unverified.

□\square

Possible revision

Clear gradients at intended minibatch/accumulation boundary; retraining unverified.

Problem 3. Matrix norms differ from described sparsity and anisotropic TV

Minor
Evidence and reasoning

Problem statement

Inspection subject recorded in the report

Sparsity maximum batch-column sum versus entrywise mean; exact TV example with a batch of two identical 2×32\times3 masks.

All mask values strictlyin(0,0,11). Unpadded fullgrid and batch. Documented matrix1-norm semantics. TV witness uses B=2B=2 identical 2×32\times3 masks so squeeze retains the batch axis; B=1B=1 is not the stated executable shape.

Proof

Assessment: Minor; released objective implementation. Section 3.3 (p. 5) describes mask sparsity and anisotropic total variation: entrywise absolute mask values and horizontal/vertical differences. But `utils.py:182-183` calls `torch.linalg.norm` with `ord=1,dim=(1,2)`, and line 199199 applies `ord=1` to a two-dimensional token-by-batch matrix. These are induced matrix 1-norms, namely maximum absolute column sums [norm].

For a fully valid batch with BB masks and NN unpadded tokens, the sparsity term is Lreleased=10BNmax⁡b∑n=1N∣Mbn∣,Lentrywise=10BN∑b∑n∣Mbn∣.L_{\rm released}=\frac{10}{BN}\max_b\sum_{n=1}^{N}|M_{bn}|, \qquad L_{\rm entrywise}=\frac{10}{BN}\sum_b\sum_n|M_{bn}|. Use B=N=2,B=N=2, with masks (0.8,0.8)(0.8,0.8) and (0.1,0.1).(0.1,0.1). All entries are strictly inside the sigmoid range. The released term is 4,4, versus 4.54.5 for the scaled entrywise mean. Since the first sample uniquely maximizes the sum, the released sparsity gradient for both coordinates of the second sample is zero, versus 2.52.5 for each under the entrywise expression.

Likewise, take a batch of B=2B=2 identical, fully valid, unpadded 2×32\times3 masks, each equal to M=(0.10.90.10.10.90.1),M=\begin{pmatrix}0.1&0.9&0.1\\0.1&0.9&0.1\end{pmatrix}, horizontal absolute differences have entrywise sum 3.23.2 but maximum column sum 1.6;1.6; vertical differences vanish. With the code’s common denominator 6−1,6-1, the per-mask terms and their batch means are 0.640.64 and 0.320.32 respectively. Taking two masks is necessary here: the implementation’s unqualified `squeeze()` would remove the batch axis for B=1,B=1, so this witness uses B=2B=2 to retain the required three-dimensional tensor. The discrepancy does not depend on padding or a boundary mask value.

Both losses can still encourage some regularity; this is not proof of failed learning. A deliberately chosen matrix norm is a possible alternative regularizer, but is not the described entrywise penalty, and it changes which samples/edges receive gradients. Explicit absolute sums with a documented normalization would implement that intended penalty. Only the identities and finite examples were verified; no repaired training run or historical-table effect is established.

□\square

Possible revision

Explicit absolute sums with documentednormalizer restore intended entrywise definition; no retraining.

Supporting record & provenance

Work status

Current version

Version 1

Minhao Liu · Initial report · Version 1

Independent review pending

Original claim and review scope

Minimality emphasizes presenting only the most pertinent information for understanding a model’s decision, while sufficiency ensures that explanations remain consistent and contribute decisively to predicting a correct answer.

Published ICML 2025 proceedings PDF (PMLR 267); PDF p. 4

Actual review scope

The recorded inspection concerns these source locations: Fig2/Sec3.1 pp. 3-4;Sec4.1 p. 6;data.py126-177;train.py164-222,247-261; Sec4.2 p. 6 ColPali answer-conditioned baseline; train.py46,133-134,247-264;Eq3 and AppendixA3; Sec3.3p5;utils.py182-199;train.py91-104.

Submit an author revisionContribute a review