DocVXQA: Context-Aware Visual Explanations for Document Question Answering
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
MinorEvidence 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 – 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 –).
Thus the validation mask is a function whereas an annotation-free deployment mask must be obtainable from 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.
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
MinorEvidence and reasoning
Problem statement
Inspection subject recorded in the report
Static calls audit plus own two-step Adam arithmetic with gradients+
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 and each minibatch calls `overall_loss.backward()` then `optimizer.step()` at lines – 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 rather than 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 With Adam moments initially zero, and the independent calculation gives
Second step | Gradient supplied | Adaptive update / learning rate
Reset for each minibatch |
Released no-reset pattern |
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.
Possible revision
Clear gradients at intended minibatch/accumulation boundary; retraining unverified.
Problem 3. Matrix norms differ from described sparsity and anisotropic TV
MinorEvidence 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 masks.
All mask values strictlyin(). Unpadded fullgrid and batch. Documented matrix1-norm semantics. TV witness uses identical masks so squeeze retains the batch axis; 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 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 masks and unpadded tokens, the sparsity term is Use with masks and All entries are strictly inside the sigmoid range. The released term is versus 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 for each under the entrywise expression.
Likewise, take a batch of identical, fully valid, unpadded masks, each equal to horizontal absolute differences have entrywise sum but maximum column sum vertical differences vanish. With the code’s common denominator the per-mask terms and their batch means are and respectively. Taking two masks is necessary here: the implementation’s unqualified `squeeze()` would remove the batch axis for so this witness uses 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.
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.