Preserving privacy without compromising accuracy: Machine unlearning for handwritten text recognition

• Encoder-only Transformer baseline for handwriting text recognition (HTR). • Added writer-style head tracks & controls user-identifiable memorization. • Neural-activation pruning removes writer clues while preserving HTR accuracy. • Writer-ID Confusion (WIC) enforces uniform IDs, boosting efficient machine unlearning. • Membership-inference tests confirm privacy gains without costly retraining. Handwritten Text Recognition (HTR) is crucial for document digitization, but handwritten data can contain user-identifiable features, like unique writing styles, posing privacy risks. Regulations such as the “right to be forgotten” require models to remove these sensitive traces without full retraining. We introduce a practical encoder-only transformer baseline as a robust reference for future HTR research. Building on this, we propose a two-stage unlearning framework for multihead transformer HTR models. Our method combines neural pruning with machine unlearning applied to a writer classification head, ensuring sensitive information is removed while preserving the recognition head. We also present Writer-ID Confusion (WIC), a method that forces the forget set to follow a uniform distribution over writer identities, unlearning user-specific cues while maintaining text recognition performance. We compare WIC to Random Labeling, Fisher Forgetting, Amnesiac Unlearning, and DELETE within our prune-unlearn pipeline and consistently achieve better privacy and accuracy trade-offs. This is the first systematic study of machine unlearning for HTR. Using metrics such as Accuracy, Character Error Rate (CER), Word Error Rate (WER), and Membership Inference Attacks (MIA) on the IAM and CVL datasets, we demonstrate that our method achieves state-of-the-art or superior performance for effective unlearning. These experiments show that our approach effectively safeguards privacy without compromising accuracy, opening new directions for document analysis research. Our code is publicly available at https://github.com/leitro/WIC-WriterIDConfusion-MachineUnlearning .

Authors

Institutions

Publication Details

Journal
Pattern Recognition
Published
2025-09-09
DOI
https://doi.org/10.1016/j.patcog.2025.112411
Citations
1
Primary Topic
Handwritten Text Recognition Techniques
Type
article
Field-Weighted Citation Impact
1.28
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Preserving privacy without compromising accuracy: Machine unlearning for handwritten text recognition

Ernest Valveny, Lluís Gómez, Dìmosthenis Karatzas, Xuanshuo Fu et al.
1 citations
Pattern Recognition
Handwritten Text Recognition Techniques
1.28
article

Preserving privacy without compromising accuracy: Machine unlearning for handwritten text recognition

Ernest Valveny, Lluís Gómez, Dìmosthenis Karatzas, Xuanshuo Fu, Lei Kang, Alícia Fornés
article en
1 citations

Abstract

• Encoder-only Transformer baseline for handwriting text recognition (HTR). • Added writer-style head tracks & controls user-identifiable memorization. • Neural-activation pruning removes writer clues while preserving HTR accuracy. • Writer-ID Confusion (WIC) enforces uniform IDs, boosting efficient machine unlearning. • Membership-inference tests confirm privacy gains without costly retraining. Handwritten Text Recognition (HTR) is crucial for document digitization, but handwritten data can contain user-identifiable features, like unique writing styles, posing privacy risks. Regulations such as the “right to be forgotten” require models to remove these sensitive traces without full retraining. We introduce a practical encoder-only transformer baseline as a robust reference for future HTR research. Building on this, we propose a two-stage unlearning framework for multihead transformer HTR models. Our method combines neural pruning with machine unlearning applied to a writer classification head, ensuring sensitive information is removed while preserving the recognition head. We also present Writer-ID Confusion (WIC), a method that forces the forget set to follow a uniform distribution over writer identities, unlearning user-specific cues while maintaining text recognition performance. We compare WIC to Random Labeling, Fisher Forgetting, Amnesiac Unlearning, and DELETE within our prune-unlearn pipeline and consistently achieve better privacy and accuracy trade-offs. This is the first systematic study of machine unlearning for HTR. Using metrics such as Accuracy, Character Error Rate (CER), Word Error Rate (WER), and Membership Inference Attacks (MIA) on the IAM and CVL datasets, we demonstrate that our method achieves state-of-the-art or superior performance for effective unlearning. These experiments show that our approach effectively safeguards privacy without compromising accuracy, opening new directions for document analysis research. Our code is publicly available at https://github.com/leitro/WIC-WriterIDConfusion-MachineUnlearning .

Pattern RecognitionVol. 172
Universitat Autònoma de Barcelona (ES)
Openalex Percentile: Top 16%
Handwritten Text Recognition Techniques
1.28
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.