Contrastive Masked Autoencoders for Character-Level Open-Set Writer Identification
Xiaowei Jiang, Wenhao Ma, Yiqun Duan, Thomas Do, Chin-Teng Lin · 2025
Read Contrastive Masked Autoencoders for Character-Level Open-Set Writer Identification by Xiaowei Jiang, Wenhao Ma, Yiqun Duan, Thomas Do, Chin-Teng Lin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-11895.txt.
Introduction
Xiaowei Jiang and four colleagues tackle the problem of identifying handwriting authors the system has never seen, in a 2025 paper. This open-set task matters for forensics and document checks, and it hinges on learning features that capture a writer's style at the level of single characters. Their model, CMAE, merges masked autoencoders with contrastive learning.
The masked autoencoder side learns the sequence structure of strokes, while the contrastive side pulls apart different writers' styles. On the CASIA online handwriting data set the model reached 89.7 percent precision, a state-of-the-art result. The authors argue the approach strengthens writer identification for real-world documents whose authors were absent from training.
Catalog record
| CREATOR | Xiaowei Jiang, Wenhao Ma, Yiqun Duan, Thomas Do, Chin-Teng Lin |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 31 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2501-11895
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Contrastive Masked Autoencoders for Character-Level Open-Set Writer Identification Xiaowei Jiang, Wenhao Ma, Yiqun Duan, Thomas Do, Chin-Teng Lin Abstract In the realm of digital forensics and document authentication, writer identification plays a crucial role in determining the authors of documents based on handwriting styles. The primary challenge in writer-id is the ”open-set scenario”, where the goal is accurately recognizing writers unseen during the model training. To overcome this challenge, representation learning is the key. This method can capture unique handwriting features, enabling it to recognize styles not previously encountered during training. Building on this concept, this paper introduces the Contrastive Masked Auto-Encoders (CMAE) for Character-level Open-Set Writer Identification. We merge Masked Auto-Encoders (MAE) with Contrastive Learning (CL) to simultaneously and respectively capture sequential information and distinguish diverse handwriting styles. Demonstrating its effectiveness, our model achieves state-of-the-art (SOTA) results on the CASIA online handwriting dataset, reaching an impressive precision rate of 89.7 % \% . Our study advances universal writer-id with a sophisticated representation learning approach, contributing substantially to the ever-evolving landscape of digital handwriting analysis, and catering to the demands of an increasingly interconnected world. I Introduction In writer identification (writer-id) systems, particularly in forensic sciences, the primary aim is to identify the author of handwritten documents [ 1 ] . A major challenge in these systems arises in open-set scenarios(example is shown in Fig 1 ), where accurately identifying authors not represented in the model’s training data is crucial. Recently, the field of online writer identification has emerged as a more focused area of interest, surpassing traditional methods of digital handwriting analysis [ 2 ] . This shift towards analyzing handwriting trajectory data signifies a major development in the field [ 3 ] . However, addressing open-set scenarios in online writer identification tasks remains an unresolved challenge. This research is significant for its potential to improve security by accurately attributing authorship in legal and forensic cases, even with partial handwriting and without a comprehensive database. Additionally, it has applications in historical document analysis, offering insights into cultural and historical contexts. Fig. 1: This figure depicts the process for open-set scenarios, highlighting the distinction between the training and testing phases. Training is performed using data from one group, while testing is done with individuals not seen during training. Our method involves training the model by creating pairs of trajectories, \tau_{ni} and \tau_{nj} , from the same writer n . This technique is intended to enable the model to learn the similarities within each writer’s handwriting and the differences between writers. Testing is then carried out on data from unknown writers m . The middle subfigure illustrates the normalization process in our method, which scales the character trajectory to the range (0,1]. Contrasting with online systems, offline systems, denoted as O , capture handwritten documents as images and employ image processing techniques to achieve similar identification goals [ 4 , 5 , 6 , 7 ] . In these systems, the matrix O can be represented where each element p_{ij} corresponds to the pixel intensity at the i^{th} row and j^{th} column of the image. This matrix captures essential spatial features of handwriting such as stroke thickness and letter shapes, but offers limited temporal information. Training robust writer-id models is important but challenging. Generally, writer-id is perceived as a multi-class classification problem, where a writer is identified by comparing handwriting samples against reference [ 8 ] . Some progress in both offline [ 5 , 6 , 7 ] , [ 9 , 10 ] and online writer-id [ 2 ] , [ 11 , 12 , 13 , 14 , 15 ] tasks has been made. Traditional online writer-id systems, like those by Schlapbach et al., use hand-crafted features such as direction and curvature [ 16 ] . Recently, Artificial Neural Networks (ANN) have been increasingly used in online writer identification, yet they face certain limitations. Methods by Yang [ 15 ] , Venugopal [ 2 ] , and Uchida [ 6 ] primarily analyze text levels, necessitating lengthy texts. Yang et al. [ 17 ] introduced a character-level method, but it was only evaluated in closed-set scenarios. Chen and Wu [ 11 ] developed a letter-level system requiring minimal data, applicable in both closed and open-set scenarios, with a significant disparity in rank-1 accuracy [ 18 ] across these conditions. Their findings indicate a notable achievement, but addressing the open-set scenario at the character level, particularly for single-character tasks, continues to be a challenge. Fig. 2: Illustration of the CMAE model’s training methodology. Left : Sample images from CASIA-OLHWDB. Right : Depiction of the CMAE encoder’s method for extracting features from handwriting character trajectories. The CMAE encoder receives unmasked segmented patches as input, depicted as a red curve in the character ”geese”, which are randomly chosen and governed by the mask ratio. Our research is driven by the concept of enhancing writer identification in online single-character open-set scenarios. We focus on developing a system capable of accurately identifying writers, particularly in challenging open-set scenarios where the writer’s style may not be present in the training dataset based on only one character. This endeavor is crucial for various applications, from authenticating historical documents to aiding in criminal investigations. To address this challenge, our CMAE framework combines the strengths of Mask Auto-Encoders (MAE) [ 19 ] and Contrastive Learning (CL) [ 20 ] . MAE focuses on intricate feature extraction and reconstruction, which are essential for capturing sequential aspects of handwriting like stroke patterns and speed dynamics. The efficacy of Transformers encoder in the realm of handwriting writer-id has already been established in the field, showcasing its potential [ 6 ] , [ 21 , 22 ] . The MAE paradigm, leveraging the strengths of the Transformer encoder, brings forth a unique approach to handling handwriting data. This process involves masking parts of the handwriting input and then reconstructing them, thereby enabling the model to understand various handwriting styles deeply. Meanwhile, CL enhances the model’s ability to differentiate between styles by comparing handwriting samples. It assesses similarities and differences across samples, sharpening the model’s discriminative capabilities. Furthermore, CL has shown considerable promise in the realm of representation learning, particularly in the context of text recognition [ 23 ] . This integration of MAE and CL allows CMAE to strike a balance between detailed feature analysis and style differentiation, crucial for handling unseen handwriting trajectories with short lengths in open-set scenarios. The contribution could be summarized in fourfold: • It pioneers the use of single characters for writer-id tasks. • It introduces an innovative framework tailored for open-set settings. • It initially integrates MAE with CL to enhance the capacity for representation learning, thereby significantly boosting the accuracy and reliability of the writer-id task. • Our approach achieves a remarkable precision of 89.7% ± 7.4% on the CASIA Online Database dataset (CASIA-OLHWDB) dataset (Fig 2 ), setting a new standard for state-of-the-art (SOTA) models in the domain of open-set online writer identification. II Related Work II-A Writer Identification (writer-id) Writer-id has seen significant breakthroughs in recent years, thanks to numerous studies in the field [ 11 ] , [ 14 ] , [ 24 ] . Numerous methods have emerged as efficient