Regulated industries have to classify every document. The data can't leave the building, and new layouts keep arriving.
Retraining a classifier for every drift is slow, costly and has to be re-validated each time.
People already review the hard cases. HIRA turns each review into immediate learning with no retraining.
Say:A correction a reviewer makes this morning should change the system's next decision, not wait for the next training cycle.
How HIRA works
Tier 1, retrieval: BM25 on the OCR text, MiniLM text embeddings and SigLIP2 image embeddings, fused with weighted RRF into a per-class score. Accept if s(c) ≥ τ1 (0.675).
Tier 2, LLM verifier: the model sees the document, retrieved exemplars, and terms that separate pairs Tier 1 often confuses. It gives a 5-level confidence. Accept if its label is in Tier 1's shortlist and confidence ≥ τ2.
Human queue: everything else goes to a person.
EDRM: each human label is written back into the index: at full seed weight if Tier 1 got it wrong, faded toward 0.1 the more confidently Tier 1 was already right. Entries decay over time and get pruned, and each label also updates the confusion graph.
EDRM: what a human label changes
Margin: m = s(true class) − best other s(c), from Tier 1's scores. It is negative when Tier 1 got the document wrong.
Exemplar weight: w = clip(exp(−m/0.1), 0.1, 1). Every miss goes in at 1, the same as a seed. A correct but low-margin label lands between 0.1 and 1, and a confident one (m ≥ 0.23) only at 0.1.
Decay and pruning: after each correction, older corrections lose a little weight. Every 50 corrections, any below 0.05 are removed. The 100 seeds never decay.
Confusion graph: counts of "predicted i, truly j", smoothed as P(j | i) = (Cij + 0.1) / (row sum + 0.1·K). Pairs above 0.15 become high-confusion pairs. Counts decay too, so stale confusions fade.
Distinguishing terms: for each high-confusion pair, the 8 OCR terms per side with the strongest log-odds from past corrections. When Tier 1's top two are such a pair, they go into the verifier prompt.
Say:A correction does two things: it becomes a retrieval exemplar, and it teaches the verifier which words separate the classes people keep confusing. No weights are trained.
What the paper claims (Tobacco-3482)
0.882 → 0.942Macro-F1, from 0 to 518 corrections
≈60%of test docs settled at Tier 1
18.6%late-stream queue rate
+2.8 ptsEDRM vs naive insertion at Tier 1
24.8% of the stream gets a human label; the rest is automated.
The dashed line on the replay's F1 panel is this paper curve.
How we checked it
An independent Go re-implementation, written from the paper text (in the repo under hira/).
Real Tobacco-3482 with corrected labels (Lim et al., 2024), using the published split (Ronnie-hp/tobacco3482): 2,737 docs, 100 seeds / 2,086 stream / 272 val / 279 test, the paper's sizes.
Image encoder: SigLIP2 large-patch16-384. The paper doesn't name the variant; we picked it from a sweep of 11.
Verifier: DeepSeek V4.1 Flash on Fireworks. The paper used R1-Distill-32B on-prem, which Fireworks doesn't offer.
Two HITL runs: V3 and naive insertion.
Say:Every number on the replay comes from these runs. The only paper numbers are the dashed line and the grey references.
What reproduces
0.941V3 final Macro-F1 (paper 0.942)
0.946accuracy at the final checkpoint
0.899cascade at N=0 (paper 0.882)
0.790RRF fusion alone (paper 0.774)
The cascade beats either tier on its own: 0.899 against 0.790 (retrieval) and 0.819 (LLM zero-shot).
Learning from corrections with no retraining works: +4.2 pts from 477 labels, and Tier 1 alone rises from 0.790 to 0.879.
Image-only 1-NN: 0.792 (paper 0.772).
The learning curve
N
V3 (EDRM)
naive
paper V3
0
0.899
0.899
0.882
100
0.914
0.915
0.913
200
0.924
0.926
0.916
300
0.918
0.937
—
400
0.939
0.953
—
final
0.941 (477)
0.953 (467)
0.942 (518)
V3 tracks the paper's dashed line from the first checkpoint on.
Naive insertion, every correction at w = 1, ends higher: 0.953. The paper's EDRM-over-naive gain (+2.8 pts at Tier 1) does not show here: Tier 1 alone is 0.898 naive against 0.879 V3.
What still differs
Tier-1 share: 51% of test at the end, against the paper's ≈60%; the test queue is 20%, against ≈13%.
Late-stream queue: 22.7% of the last 256 stream docs, against the paper's 18.6%.
EDRM vs naive: naive ends 1.1 pts higher (0.953 against 0.941), where the paper has EDRM ahead.
Verifier: a different model. Ours is stronger zero-shot (0.819 against 0.768).
OCR: the dataset's Tesseract hOCR. A pure-Go PaddleOCR run moved the final score by under a point.
Limits: one stream order, and the provider's temperature 0 is not bit-exact (≈ ±1 pt).
Takeaways
The results reproduce: 0.941 against 0.942, on a different stack and a different verifier.
Retrieval memory learns without retraining: human labels written back into the index give a steady gain.
Equal weights did at least as well: naive insertion at w = 1 ended at 0.953, so the margin weighting is not where the gain comes from on this stack.
The image encoder matters: large-patch16-384 adds ≈2 pts over base-patch16-512.
Say:The system works as published: the headline reproduces on a different stack, and the memory learns from every human label without retraining.
Demo script (≈3 min)
Open V3, press Space to play at 5×, and point at the routes in panel 1 and the live rates above it.
Jump to N=100. The F1 curve sits on the dashed paper line, and every weight is at or below 1.
Jump to the end: 0.941 against the paper's 0.942.
Confusion panel: the H pairs that light up, and the terms mined to tell them apart.
Backup: presentation/hira_sim.html opens offline from disk.
Likely questions
Is the re-implementation faithful? It reproduces the headline (0.941 against 0.942) and the N=0 point (0.899 against 0.882). Every deviation is listed in hira/README.md.
Why a different LLM? R1-Distill-32B isn't offered on Fireworks. Ours is stronger zero-shot, so the verifier isn't the bottleneck.
Does EDRM beat naive insertion? Not on this stack: 0.941 against 0.953. The gain the paper reports doesn't show up in our runs.
Data residency? Tobacco is public. For regulated data the verifier runs on-prem (the Ollama backend is supported).
Cost? About 2k verifier calls per run, all cached; Tier 1 handles ≈51% with no LLM call.