CAGOCR: A CONTEXT-AWARE GENERATIVE SEQUENCE RECONSTRUCTION FRAMEWORK FOR HANDWRITTEN DOCUMENT RECOGNITION AND ERROR ATTRIBUTION
DOI:
https://doi.org/10.70917/ijcisim-2026-2990Keywords:
Handwritten Text Recognition, Generative Sequence Reconstruction, Context-Adaptive Fusion, Active Semantic Refinement, Error Attribution, Out-of-Vocabulary Handling, Dual-Source Generation, Contrastive Consistency LossAbstract
The Character recognition systems are fundamentally limited by a structural separation between visual recognition and linguistic inference, which guarantees error propagation and prevents recovery of visually degraded or absent characters. CaGOCR (Context-Aware Generative OCR) is a unified end-to-end framework reconceived as a context-aware generative sequence reconstruction system rather than a conventional recognizer. The redesigned architecture introduces six principal novel contributions: (i) an Active Semantic Refinement Module (ASRM) that iteratively refines character hypotheses through multi-round visual-semantic feedback rather than passive scoring; (ii) a Dual-Source Generative Reconstruction Module (DSGRM) that concurrently conditions sequence generation on both visual patch embeddings and a domain-adaptive generative language prior, replacing masked-token completion with a full generative reconstruction paradigm; (iii) Dynamic Context-Adaptive Fusion (DCAF), a non-stationary gating mechanism in which fusion weights are computed as functions of local sequence uncertainty and cross-modal agreement, superseding static scalar gating; (iv) an Error Attribution and Reasoning Module (EARM) that produces interpretable, token-level error provenance annotations distinguishing visual confusion, lexical ambiguity, and contextual inconsistency; (v) a Semantic Reconstruction Consistency Loss (SRCL), a novel training objective that enforces global sequence coherence through contrastive consistency constraints rather than local token-level cross-entropy alone; and (vi) an Adaptive Lexical Memory Bank (ALMB) providing dynamic out-of-vocabulary handling through learnable prototype retrieval, eliminating hallucination of rare terms. On IAM, CVL, and IIIT-HWS benchmarks, we demonstrate state-of-the-art Character Error Rates and Word Error Rates over TrOCR, SCATTER, and VisionLAN. In the first interpretable error attribution pipeline for handwritten OCR, comprehensive ablation studies quantify the independent contributions of each module.