Computer Science ›› 2026, Vol. 53 ›› Issue (8): 156-164.doi: 10.11896/jsjkx.250600092

• Computer Graphics & Multimedia • Previous Articles     Next Articles

Handwriting Gender Recognition Method Based on Multi-scale Directional Attention Transformer

CAI Yi1, WANG Xiaobin1, CHEN Ruili1, XU Jinfeng2   

  1. 1 School of Investigation, People’s Public Security University of China, Beijing 100038, China
    2 School of Police Training, People’s Public Security University of China, Beijing 100038, China
  • Received:2025-06-13 Revised:2025-09-22 Online:2026-08-15 Published:2026-08-17
  • About author:CAI Yi,born in 2001,master.His main research interest is document verification.
    WANG Xiaobin,born in 1989,Ph.D,associate professor.His main research interest is document verification.
  • Supported by:
    Key Laboratory of Intelligent Policing of Sichuan Province Project of China(ZNJW2023KFMS007) and Special Project Research of Double First-Class Innovation in Criminal Science and Technology of People’s Public Security University of China(2023SYL06).

Abstract: Handwriting gender recognition,as an important branch of biometric recognition,has broad application prospects in identity verification and criminal investigation.Traditional methods mainly rely on manual feature extraction,which has limitations such as incomplete feature representation and poor cross-language adaptability.To address these problems,a multi-scale directional attention Transformer for handwriting gender recognition(MSDAttFormer) is proposed.This method innovatively combines the global modeling capability of Transformer with the directional features unique to handwriting,integrates handwriting features at different levels through a multi-scale feature fusion module,introduces a handwriting directional attention module to accurately capture gender-related directional differences,and employs an improved Transformer encoder to establish long-range dependencies between features.A Chinese handwriting gender recognition dataset(CHAP) containing 1 620 writers is constructed,and comprehensive experimental validation is conducted on both CHAP and Hebrew handwriting dataset(HHD).The results show that MSDAttFormer achieves an accuracy of 84.46%,F1-Score of 83.97%,and ROC AUC of 90.25% on the CHAP dataset,and an accuracy of 85.71% on the HHD dataset,significantly outperforming existing methods and validating the effectiveness and cross-language generalization capability of the proposed method.

Key words: Handwriting gender recognition, Transformer, Multi-scale feature fusion, Directional attention, Deep learning

CLC Number: 

  • TP391
[1] HUBER R A,HEADRICK A M.Handwriting identification[M].Boca Raton,FL,USA:CRC Press,1999.
[2] GOODENOUGH F L.Sex differences in judging the sex ofhandwriting[J].The Journal of Social Psychology,1945,22(1):61-68.
[3] HAMID S,LOEWENTHAL K M.Inferring gender from handwriting in Urdu and English[J].The Journal of Social Psychology,1996,136(6):778-782.
[4] UPADHYAY S,SINGH J,SHUKLA S K.Determination of sex through handwriting characteristics[J].International Journal of Current Research and Review,2017,9(13):11-18.
[5] TOPALOGLU M,EKMEKCI S.Gender detection andidentif-ying one’s handwriting with handwriting analysis[J].Expert Systems with Applications,2017,79:236-243.
[6] HE K,ZHANG X,REN S,et al.Deep residual learning for image recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR).Las Vegas,NV,USA:IEEE,2016:770-778.
[7] BOUADJENEK N,NEMMOUR H,CHIBANI Y.Robust soft-biometrics prediction from off-line handwriting analysis[J].Applied Soft Computing,2016,46:980-990.
[8] BOUADJENEK N,NEMMOUR H,CHIBANI Y.Local descriptors to improve off-line handwriting-based gender prediction[C]//2014 6th International Conference of Soft Computing and Pattern Recognition(SoCPaR).Tunis,Tunisia:IEEE,2014:43-47.
[9] BOUADJENEK N,NEMMOUR H,CHIBANI Y.Fuzzy inte-gral for combining SVM-based handwritten soft-biometrics prediction[C]//2016 12th IAPR Workshop on Document Analysis Systems(DAS).Santorini,Greece:IEEE,2016:311-316.
[10] BOUADJENEK N,NEMMOUR H,CHIBANI Y.Age,genderand handedness prediction from handwriting using gradient features[C]//2015 13th International Conference on Document Analysis and Recognition(ICDAR).Tunis,Tunisia:IEEE,2015:1116-1120.
[11] GATTAL A,DJEDDI C,SIDDIQI I,et al.Gender classification from offline multi-script handwriting images using oriented Basic Image Features(oBIFs)[J].Expert Systems with Applications,2018,99:155-167.
[12] AHMED M,RASOOL A G,AFZAL H,et al.Improving handwriting based gender classification using ensemble classifiers[J].Expert Systems with Applications,2017,85:158-168.
[13] MAKEN P,GUPTA A.A method for automatic classification of gender based on text- independent handwriting[J].Multimedia Tools and Applications,2021,80(16):24573-24602.
[14] MORERA Á,SÁNCHEZ Á,VÉLEZ J F,et al.Gender and handedness prediction from offline handwriting using convolutional neural networks[J].Complexity,2018,2018(1):Article No.3891624.
[15] RAHMANIAN M,SHAYEGAN M A.Handwriting-based gender and handedness classification using convolutional neural networks[J].Multimedia Tools and Applications,2021,80(28-29):35341-35364.
[16] XUE G,LIU S,GONG D,et al.ATP-DenseNet:a hybrid deep learning-based gender identification of handwriting[J].Neural Computing and Applications,2021,33(10):4611-4622.
[17] DOSOVITSKIY A,BEYER L,KOLESNIKOV A,et al.Animage is worth 16x16 words:Transformers for image recognition at scale[C]//9th International Conference on Learning Representations(ICLR).Virtual Event:OpenReview.net,2021.
[18] KHAN S,NASEER M,HAYAT M,et al.Transformers in vision:A survey[J].ACM Computing Surveys,2022,54(10s):1-41.
[19] LI Y,LUO C,JIN L,et al.HTR-VT:Handwritten text recognition with vision transformer[J].Pattern Recognition,2025,158:110967.
[20] CASCIANELLI S,PIPPI V,MAARAND M,et al.The LAM dataset:A novel benchmark for line-level handwritten text recognition[C]//2022 26th International Conference on Pattern Recognition(ICPR).IEEE,2022:1506-1513.
[21] LI M,LV T,CHEN J,et al.TrOCR:Transformer-based optical character recognition with pre-trained models[C]//Proceedings of the 37th AAAI Conference on Artificial Intelligence(AAAI).Washington,DC,USA:AAAI Press,2023:13094-13102.
[22] BHUNIA A K,KHAN S,CHOLAKKAL H,et al.Handwriting transformers[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision(ICCV).2021:1086-1094.
[23] PARRES D,PAREDES R.Fine-tuning vision encoder-decodertransformers for handwriting text recognition on historical documents[C]//Document Analysis and Recognition-ICDAR 2023.Springer,2023:253-268.
[24] LIU Y,ZHANG Y,WANG Y,et al.A survey of visual transformers[J].IEEE Transactions on Neural Networks and Learning Systems,2023,35(7):8726-8746.
[25] YANG Y,TAM F,GRAHAM S J,et al.Men and women differ in the neural basis of handwriting[J].Human Brain Mapping,2020,41(10):2642-2655.
[26] VAN DER WEEL F R,VAN DER MEER A L H.Handwriting but not typewriting leads to widespread brain connectivity:a high-density EEG study with implications for the classroom[J].Frontiers in Psychology,2024,14:1219945.
[27] TAN M,LE Q.EfficientNet:rethinking model scaling forconvo-lutional neural networks[C]//International Conference on Machine Learning.2019:6105-6114.
[28] SIMONYAN K,ZISSERMAN A.Very deep convolutional networks for large-scale image recognition[C]//3rd International Conference on Learning Representations(ICLR).San Diego,CA,USA:OpenReview.net,2015.
[29] CHOLLET F.Xception:deep learning with depthwise separable convolutions[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2017:1251-1258.
[30] SZEGEDY C,LIU W,JIA Y Q.Going deeper with convolutions[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2015:1-9.
[31] BALAT M,MOHAMED Y,HEAKL A,et al.Arabic handwritten text for person biometric identification:a deep learning approach[J].arXiv:2406.00409,2024.
[32] HUANG G,LIU Z,VAN DER MAATEN L,et al.Densely con-nected convolutional networks[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2017:4700-4708.
[33] RABAEV I,ALKORAN I,WATTAD O,et al.Automatic gender and age classification from offline handwriting with bilinear ResNet[J].Sensors,2022,22(24):Article No.9650.
[34] RABAEV I,KURAR BARAKAT B,CHURKIN A,et al.The HHD dataset[C]//2020 17th International Conference on Frontiers in Handwriting Recognition(ICFHR).Dortmund,Germany:IEEE,2020:228-233.
[35] RABAEV I,LITVAK M,ASULIN S,et al.Automatic gender classification from handwritten images:a case study[C]//Computer Analysis of Images and Patterns(CAIP 2021).Virtual Event:Springer,2021:329-343.
[1] PAN Yuquan, YUAN Deyu, WANG Anran, JIA Yuan. Enhanced GNNs Across Social Networks User Identity Linkage Algorithm Based on HiddenFeatures [J]. Computer Science, 2026, 53(8): 50-60.
[2] WU Shuiqing, QIU Jihao, LIU Xiang, DONG Yuxi, WEN Yimin. Proxy-based Source-free Domain Adaptation for EEG Emotion Recognition Method [J]. Computer Science, 2026, 53(8): 94-102.
[3] WANG Jingyang, XUE Weimin, HUANG Min, WU Shaoguang. Improved YOLOv11n Model for Small Target Detection in UAV Aerial Images [J]. Computer Science, 2026, 53(8): 201-208.
[4] REN Yanzhang, GAO Tai, LI Ying, WANG Bin. Gated Bidirectional Mamba Multimodal Feature Fusion Framework for Drug-Target InteractionPrediction [J]. Computer Science, 2026, 53(8): 326-335.
[5] LI Xiaochao, YUAN Zisu, LI Qianmu, LIU Fan, CHE Xun. Survey on Code Representation Learning for Vulnerability Detection [J]. Computer Science, 2026, 53(8): 388-402.
[6] JIANG Lingla, CHEN Wen, SUN Wei, ZHAO Kui. Research on Deep Learning-based Side-channel Analysis Method with Dynamically ComposableMulti-head Attention [J]. Computer Science, 2026, 53(8): 437-445.
[7] JIAO Hanbing, KANG Junhua, XIAO Teng, DENG Fei. Low-light Image Enhancement Network Based on Multi-level Illumination Excitation and JointLoss Constraint [J]. Computer Science, 2026, 53(7): 62-70.
[8] NING Shiqiang, ZHOU Lianzhen, ZHANG Lifeng. Identification of Authentic and Forged Paper-based Fingerprints Based on LG-GFNet Feature Fusion Network [J]. Computer Science, 2026, 53(7): 91-100.
[9] XU Jian, CHEN Shijie, FENG Jiancong, YANG Geng. CBT-AD:CNN-BiLSTM-Transformer Hybrid Model for Time Series Anomaly Detection [J]. Computer Science, 2026, 53(7): 230-241.
[10] WU Kai, SUN Zhe, ZHANG Xu, CAO Yadong, SUN Zhixin. Research on Modeling and Scheduling Methods for Intra-city Delivery Based on Heterogeneous Graph Neural Networks [J]. Computer Science, 2026, 53(7): 242-250.
[11] XIAO Yanxue, DENG Li, REN Zhengwei, WU Mengxin. iDSRformer:Node Load Prediction Model for High-performance Computing Cluster [J]. Computer Science, 2026, 53(7): 251-261.
[12] JI Wendi, WANG Yongquan. Autoregressive Sequence Reconstruction for Unsupervised Anomaly Detection in Medical Insurance [J]. Computer Science, 2026, 53(7): 298-307.
[13] LI Siyu, QIAN Wenhua. HCKD:Lightweight Skin Lesion Classification Method Based on Dermoscopic Images [J]. Computer Science, 2026, 53(6A): 250600143-9.
[14] CHEN Nuo, ZHAO Peng, HUAN Haisheng. Review of Small Object Detection Based on Deep Learning [J]. Computer Science, 2026, 53(6A): 250700022-9.
[15] QU Jiewu, LU Xinxi, SUN Jian, LIU Yan, GAO Ling, XU Binbin. Object Detection Method Based on Phased Training Strategy and Multi-scale Feature Fusion [J]. Computer Science, 2026, 53(6A): 250700088-7.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!