A pooled score can conceal failures on low-quality images, missing text, rare layouts and misleading media pairs.
Multimodal evaluation: subgroup failures and evidence traceability
Split by parent asset
All crops, pages and OCR versions from one receipt belong in the same evaluation group. Otherwise near-copies leak into training and make the test look easier than production. Keep a later time period for final review and check whether merchants, templates or camera devices shifted. Grouped evaluation should be applied to every modality sharing an underlying entity.
Report modality slices
Measure image-only, text-only, both-present, low-light, multilingual text and missing-channel subsets with counts. A combined average dominated by clear single-page receipts says little about folded or multipage failures. For retrieval, include candidate recall, rank quality and index coverage; for classification, include calibration and threshold costs. Do not convert an undefined small slice into a confident pass.
Trace the evidence
For a wrong total, show the original image region, transform version, OCR span, text normalization and model outputs that led to the decision. If the system emits a summary, distinguish extracted facts from inferred descriptions. Coordinate and span preservation allows a reviewer to identify whether the error began in data alignment, extraction or fusion.
Gate a release
Set acceptable error and latency limits by workflow before inspecting the test set. Add a fixture whose OCR says 47.80 while the image visibly contains 47.30, plus one missing image. The evaluation should identify disagreement and fallback route, not average the conflicting evidence into a plausible but false total. Keep the final test untouched during threshold selection.
Implementation
def group_by_parent(media_rows):
groups = {}
for row in media_rows:
groups.setdefault(row["parent_receipt_id"], []).append(row["media_id"])
return groupsPerformance and operating cost
Grouping N media rows is O(N) expected time and O(N) space. Detailed evidence traces add storage and access controls, but they cut investigation time and make deletion or correction of a bad source record possible.
Common Mistakes
- Do not split crops or OCR versions from one receipt across train and test.
- Do not report only a pooled score when missing-modality cases matter.
- Do not state an inferred description as if it were extracted evidence.
