International Journal of Technology and Emerging Research

DOI: 10.64823/ijter.2505001

⚠️ This HTML version is automatically generated from the manuscript file and may contain formatting or data discrepancies compared to the original paper. Please refer to the PDF version for the authoritative, publisher-formatted record.

HANDWRITING – BASED BEHAVIOUR PATTERN DETECTION USING CONVOLUTIONAL NEURAL NETWORKS

1Dwarapu Daliya, 2Dr. Priyanka K Bhansali

1Student, 2Assistant Professor

1Department of Computer science and Systems Engineering, 2 Department of Information Technology and Computer Applications,

Andhra University College of Engineering, Visakhapatnam, Andhra Pradesh, India.

1dwarapudaliya597@gmail.com, 2dr.priyankabhansali@andhrauniversity.edu.in

______________________________________________________________________________________

Abstract: Handwriting is not just a way of writing; it reflects how a person thinks, feels, and behaves. It acts as a brain imprint that shows each person’s unique personality. This research uses Convolutional Neural Networks (CNNs), a type of deep learning, to detect behaviour patterns automatically from handwriting images. This research focuses on analyzing handwriting characteristics to scientifically infer personality traits from writing patterns and structures. The handwriting images were processed through grayscale conversion, noise removal, thresholding, and normalization. For model development, we divided the data into training, validation, and testing sets and used them to train the CNN model. Along with overall classification, selected handwriting samples were studied to analyze behaviour related features such as slant, margin, line spacing, word spacing, size consistency, baseline consistency and pressure. These features help understand personality traits like emotional stability, clarity of thought, confidence, and how a person interacts with others. This work can find practical use in fields such as recruitment, teaching, forensic examinations, counseling, and mental health services, where having a clear understanding of a person’s character and behaviour is highly valuable.

Keywords: Graphology, CNN, Personality traits, Deep Learning, Behaviour Prediction.

______________________________________________________________________________________

1. INTRODUCTION

Handwriting is one of the ways people express themselves, and it often shows personality, emotions, and thinking style. Features like slant, word spacing, size of letters, writing pressure, and baseline can give some idea about behaviour. When these features are checked by hand, the results are not always the same and may change from person to person. Using computer methods makes the process more consistent and faster.

In this work, handwriting images were studied with Convolutional Neural Networks (CNN). A total of 6,415 grayscale samples were collected and processed. The images were cleaned by removing noise, applying thresholding, and normalization. After that, the data was divided into three parts: training, validation, and testing.

To make the model handle natural handwriting changes, augmentation methods like rotation, shifting, zoom, and brightness changes were applied. The CNN was designed with layers that help in learning both simple and detailed features of handwriting. Along with this, 40 handwriting samples were also checked carefully to study traits like slant, spacing, pressure, and baseline.

This study shows that handwriting can be linked with behaviour and that CNNs can be used to study it in a structured way. The method can be useful in areas such as education, psychology, human resource management, and forensic work.

2. LITERATURE REVIEW

Handwriting has long been studied as a mirror of human behavior and personality traits. Traditional graphology relied on manual analysis of slant, margins, pressure, and spacing, but such methods were subjective and not scalable. Recent advancements in artificial intelligence have enabled automated systems for handwriting analysis with improved consistency and reliability.

Deep learning techniques such as Convolutional Neural Networks (CNNs) have shown strong potential in identifying personality features directly from handwriting samples [1]. Surveys on computerized graphology highlight the importance of preprocessing, feature extraction, and hybrid models that combine structural and symbolic handwriting characteristics [2]. Reviews on digital graphology further emphasize the role of machine learning models like Support Vector Machines and Neural Networks, while also discussing challenges in dataset availability and variations in handwriting styles [3].

Other approaches focus on neural network–based personality identification, where structural features such as zones, slant, and spacing are used as inputs to Artificial Neural Networks for classification [4]. Rule-based and hybrid models have also been developed, where handwriting parameters like baseline, pen pressure, and letter loops are mapped to behavioral traits, providing automated personality prediction [7].

Overall, these studies demonstrate a clear shift from manual graphology to AI-driven handwriting analysis, with CNNs and hybrid frameworks offering higher accuracy, scalability, and practical applications in psychology, career counseling, and forensic sciences.

3. PROBLEM STATEMENT

Understanding human behaviour and personality through handwriting is a challenging task that involves analyzing subtle visual features. Manual evaluation lacks scalability and objectivity. With advancements in deep learning. Particularly CNNs, there is potential to automate the detection of psychological, neurological, and emotional indicators from handwriting images. However, most existing models focus on character recognition or limited features, failing to capture full behavioural context.

This study addresses the gap by developing a CNN-based system that analyzes complete handwriting samples to extract and interpret traits such as slant, size, pressure, spacing, margins, and baseline consistency. These features are mapped to personality attributes, emotional states, and cognitive tendencies with high accuracy and confidence. The goal is to create a reliable, scalable model capable of identifying behavioural and psychological patterns from handwriting in real-world conditions.

4. PROPOSED METHOD

The proposed system adopts a hybrid model that integrates rule-based feature extraction with a deep CNN classifier to identify behavioural traits from full-page handwriting images. Unlike earlier methods focused on isolated characters, this approach analyzes complete handwriting samples to extract seven key behavioural features and generate structured interpretations. This end-to-end framework improves prediction accuracy, enhances reliability, and remains robust across varied handwriting styles. The model captures both local and global handwriting patterns, allowing for deeper psychological insight. It is designed to function efficiently across real-word applications such as education, recruitment, psychological screening.

To strengthen prediction, the system leverages both spatial and contextual handwriting features. Each extracted parameter is linked to behavioural dimensions such as emotional control, personality traits, cognitive tendencies. A separate decision layer refines final predictions to avoid misclassification. The CNN backbone is optimized using regularization and dropout to prevent overfitting and improve generalization. This hybrid methodology provides interpretable outputs that can aid psychologists and educators in making informed assessments.

Additionally, the model is scalable to large datasets and adaptable to new handwriting styles, it ensures consistency in feature extraction despite ink quality, paper texture, or scanner

resolution. They interpretability of outputs makes it user-friendly for non-technical professionals in behavioural research.

No

Description

Example

1

Slant: Indicates emotional response and social attitude.

2

Margin: Reflects attitude toward past, future, and planning.

3

Word Spacing: Reflects social distance and interaction style.

4

Line Spacing: Reflects clarity and organization.

5

Size Consistency: Shows focus and mental stability

6

Baseline Consistency:

Writing line shows emotional state

7

Pressure: Writing force shows energy and emotional intensity.

TABLE 1: Seven Features of Handwriting.

4.1 Data Acquisition

This study used a custom dataset of 6,415 high-resolution handwriting images, each showing a full A4 page written naturally in English. The samples were collected from various individuals to reflect diverse handwriting styles, including differences in slant, spacing, pressure.

Images were scanned, and low-quality or incomplete ones were removed. Each accepted image was resized and aligned while preserving the original handwriting. Class labels were evenly distributed across seven behaviour categories. All data collection followed ethical practices, forming a solid foundation for CNN-based behavioural analysis.

Fig. 1. Proposed system for handwriting-based personality and behaviour analysis.

4.2 Preprocessing

To ensure high-quality input for behavioural analysis and CNN training, a comprehensive data preprocessing pipeline was implemented. All handwriting images were first converted to grayscale to reduced computational load while preserving key stroke and pressure features. Images were resized to 128×128 for consistency. Noise was reduced using Gaussian blur and median filtering to smooth strokes while maintaining edge clarity. Contrast was enhanced using histogram equalization, and adaptive Gaussian thresholding converted the images to binary, making features like slant, margins, and spacing easier to identify. Pixel values were normalized to the [0,1] range to aid in model convergence.

Preprocessed images were saved and organized with labels based on filename annotations, allowing accurate personality mapping. Dataset split: 70% training, 15% validation, 15% testing using stratified sampling for balanced classes. Data augmentation techniques such as random rotations, shifts, zooms, brightness changes, shearing, and horizontal flips were applied during training to enhance diversity and prevent overfitting.

Alongside CNN-compatible data, a rule-based feature extraction module was developed to compute behavioural traits like word spacing, line spacing, slant, size consistency, pressure, baseline consistency, and margin. These manually derived features added clarity and helped validate the CNN’s prediction results. The final processed dataset served as a strong foundation for training the deep learning model and ensured accurate behavioural analysis from handwriting samples.

4.3 Parameters

The handwriting samples underwent detailed feature analysis to extract personality related traits using custom image processing techniques:

1. Slant:

Using Hough line transformation on canny edge-detected images, the average writing slant was computed. A right slant reflected optimism and sociability, a left slant indicated introspection and caution, while vertical strokes denoted emotional stability.

2. Margins:

Margins indicate the writer’s planning ability and emotional expression. They also reflect decision-making patterns based on spatial organization.

3. Word Spacing:

It helps estimate social tendencies. Close spacing implies sociability, while wider gaps suggest independence.

4. Line Spacing:

Vertical space between text lines was calculated. Dense spacing suggested cognitive overload or stress, wide spacing indicate clarity of thought, and consistent spacing represented organized thinking.

5. Size Consistency:

The average height of handwriting was measured relative to image size. Small writing suggested attention to detail and introversion, medium size reflected a balanced mindset, and large size indicate confidence and extroversion.

6. Baseline consistency:

Consistency in line alignment was examined to interpret emotional stability. A straight and stable baseline indicated emotional control, whereas an uneven or wavy baseline hinted at fluctuation or restlessness.

7. Pressure Estimation:

Pen pressure was assessed by analyzing the average brightness level in the grayscale handwriting image. High pressure indicated strong emotions and determination, medium pressure reflected emotional stability, and low pressure suggested adaptability and sensitivity.

4.4 Convolutional Neural Networks

To effectively classify handwriting samples based on personality related features, we developed a custom Convolutional Neural Networks architecture optimized for grayscale handwriting images of size 128×128 pixels.

Fig. 2. Convolutional Neural Networks Architecture.

1. Initial Processing Layers:

The architecture begins with an input layer, followed by Gaussian noise injection and batch normalization to enhance robustness and accelerate convergence.

The batch normalization operation is defined as:

x̂=x-μσ2+ϵ,y=γx̂+β

2. Convolutional Blocks:

The CNN is designed with three convolutional blocks consisting of 64 to 256 filters, each using 3×3 kernels initialized with the initialization. To prevent overfitting, L2 regularization is applied to each convolutional layer.

The convolution operation is mathematically represented as:

Y(i,j)=m=0M-1n=0N-1K(m,n)I(i+m,j+n)

Y(i,j) denotes the output at position (i,j), where I is the input feature map, K is the convolution kernel, and m, n are indices over the kernel’s dimensions, computing a weighted sum over the time local input region.

3. Leaky ReLU Activation Function

The Leaky ReLU activation function is defined as:


f(x)={x,&ifx>0αx,&ifx<0

Dropout regularization is applied with increasing dropout rates 0.3, 0.4 and 0.5 after each convolutional block.

The dropout mechanism is defined as:

x̃=xr,r~Bernoulli(1-p)

4. Pooling

After each convolutional block, max pooling is used to reduce spatial dimensions and retain prominent features.

5. Fully Connected Layers

The output feature maps are flattened and forwarded through two dense layers containing 512 and 256 neurons, respectively. Batch normalization, Leaky ReLU activation, and 0.5 dropout rate are applied after each dense layer to enhance regularization.

A softmax layer with 7 units outputs class probabilities. It is defined as:

ŷi=zj=17zj

6. Loss Function

The network is trained using the categorical cross-entropy loss function, which is defined as:

L=-log(ŷC)

7. Optimization

The model was trained using the Adam optimizer, known for its adaptive learning rate and fast convergence. To improve generalization, an exponential decay strategy was used to adjust the learning rate over time, defined at step t as:

αt=α0.γts

5. RESULT AND DISCUSSION

The proposed CNN model was evaluated using full-page A4 handwriting samples. The model effectively extracted handwriting features such as size, slant, margin, word spacing, line spacing, baseline consistency, pressure. These features were then used to predict behvioural traits, including emotional state, cognitive behviour, psychological conditions, and personality characteristics. The results remained consistent across various handwriting styles and ink types, proving the model’s robustness and real-world applicability.

5.1 Result of Parameters

Parameters

Recognize (%)

Slant

90.93

Margins

95.71

Word Spacing

90.93

Line Spacing

94.65

Size Consistency

90.93

Baseline Consistency

90.93

Pressure

90.93

TABLE 2: Performance of CNN model on handwriting parameters.

5.2 Results of CNN Accuracy metrics

The model’s generalization performance is summarized through its consistency high accuracy across all data splits: training, validation, and testing. This indicates is strong capability to learn meaningful and representative features without exhibiting overfitting. Moreover, the minimal performance gap between training and validation outcomes demonstrates not only its stability but also its robustness under varied writing conditions, sample variations, and environmental noise. This consistency confirms that the model I well- tuned and capable of handling unseen handwriting patterns with precision. Such generalization is crucial for real-world applications, where the diversity of handwriting styles, tools, paper types can introduce significant variability in data

Metric

Training Data

Validation Data

Testing Data

Split Ratio (%)

70

15

15

Accuracy (%)

96.83

96.90

96.80

TABLE 3: CNN Accuracy Metrics across Data Splits.

The mean loss across training and validation phases highlights the model’s learning trajectory and generalization strength. A consistent decline in loss value points to successful optimization during training.

Loss Type

Average Type

Training Loss

0.5952

Validation Loss

0.6790

TABLE 4: Comparison of Average Training and Validation Loss.

Fig. 3. Average Training and Validation Loss

The accuracy curves for both training and validation show early convergency and consistently high performance, surpassing 96% over 130 epochs. The loss curves reflect efficient learning with limited signs of overfitting, supporting the model’s strength and ability to generalize well.

Fig. 4. Model Accuracy and Model Loss.

5.3 Confusion Matrix

The confusion matrix compares actual and predicted labels, with correct predictions on the diagonal and errors off-diagonal. It provides a detailed breakdown of classification performance across all categories. High values along the diagonal indicate strong model accuracy, while off-diagonal values reveal, misclassifications between similar classes.

Fig. 5. Confusion Matrix showing lack of class-wise prediction diversity.

5.4 Classification Report

The model showed strong overall accuracy on the test data. However, performance across all classes was imbalanced, with weaker results on less represented classes. The weighted metrics remained high, reflecting the influence of a dominant class in the dataset.

Fig. 6. Classification Report of the CNN Model.

5.5 Features Analysis

The study focuses on analyzing handwriting through a combination of image processing techniques and Convolutional Neural Networks to evaluate correlations with personality traits. The system generates percentage-based consistency scores, offering a structured interpretation of behavioural tendencies.

In additional, the model identifies deviations from typical handwriting patterns, which may suggest emotional imbalance or cognitive stress. This feature level insight supports practical applications in areas such as recruitment, psychological evaluation, educational guidance, forensic profiling.

EXAMPLE:

Personality interpretation

The handwriting reveals a personality marked by strong focus and attention to detail. The vertical slant indicates emotional balance and self-control, while light pressure reflects sensitivity and adaptability. The margins suggest an organized mindset and a cautions approach to unfamiliar situations. A steady baseline shows emotional stability and reliability. Narrow word spacing suggests a preference for closeness, and tight line spacing may reflect mental clutter or a busy thought process.

Psychologically, the writer appears progressive, ambitious, and open to change. They may be energetic and future-oriented, with occasional signs of anxiety or impulsiveness. Neurologically, the writing reflects quick decision-making and strong mental engagement. The system assigned a high confidence level to this interpretation reliable behavioural insight.

6. CONCLUSION

This research successfully demonstrated that handwriting serves as a reliable medium to detect individual behavioural and personality traits using deep learning techniques. By leveraging a custom-designed Convolutional Neural Network, trained on a well preprocessed and diverse dataset of 6,415 full-page handwriting images, the system achieved impressive classification accuracy exceeding 96% across training, validation, testing phases.

Beyond overall performance, the system excelled in identifying fine-grained behavioural features – including slant, margins, word spacing, line spacing, size consistency, pressure, baseline consistency with high precision. These features were interpreted to reflect cognitive and emotional traits such as confidence, organization, sensitivity, emotional control, and interpersonal tendencies.

The integration of CNN with graphological feature extraction not only improved prediction accuracy but also offered interpretable insights, making the system practical for applications in forensics, recruitment, education, counseling, and personality assessment.

This work bridges the gap between handwriting analysis and modern AI by presenting a robust, scalable, and explainable system for personality prediction. It opens new avenues for feature exploration such as real-time handwriting analysis, multi-language adaption, and integration with psychological profiling tools.

7. REFERENCES:

  1. Sri Hastuti Fatimah, Esmeralda C. Djamal, Ridwan Ilyas, Faiza Renaldi – “Personality Features Identification from Handwriting using Convolutional Neural Networks”, 2019 (IEEE Access).
  2. Afnan H. Garoot, Maedeh safar, ching Y. suen - “A Comprehensive survey on Handwriting and computerized Graphology”, 2017 (IEEE Access).
  3. Ranjitha P, Akshatha Prabhu – “A Review on Challenges and Applications of Digital Graphology”, 2020 (IEEE Access).
  4. Shalini puri, Anupam Varshney – “A survey on Human Personality Identification on the Basis of Handwriting using ANN” 2017 (IEEE Access).
  5. Krinal Joshi, Paresh Chauhan – “A Survey on Personality Trait Recognition from Handwiting: Approach and Applications”, 2020 (IEEE Access).
  6. Anamika Sen, Harsha Shah – “Automated Handwriting Analysis System Using Principles of Graphology” 2017 (IEEE Access).
  7. Champa H. N, K. R. Ananda Kumar – “Automated Human Behavior Prediction Through Handwriting Analysis”, 2010 (IEEE Access).
  8. Derry Alamsyah, Samsuryadi, Wijang Widhiarso, Shafaatunnur Hasan – “Handwriting Analysis for Personality Trait Features Identification Using CNN”, 2022 (IEEE Access).
  9. Aisha Hakami, Sara Alminhail, Amani Jamal – “Personality Identification Based on Handwritten Signature”, 2013 (IEEE Access).
  10. Zainab Khan, Sarita Ambadekar – “A Machine learning Approach for Predicting Personality Traits”, 2023 (IEEE Acess).
  11. Noor Fazilla Abd Yusof, Nur Zareen Zulkarnain, Sharifah Sakinah Syed Ahmad, Zuraini Othman, Azura Hanim Hashim – “Extracting Graphological Features for Identifying Personality Traits using Agglomerative Hierarchical Clustering Algorithm”, 2022 (IEEE Access).
  12. R. P. Archana, S. M. Anzar, N. P. Subheesh – “Design and Development of the Graphology-based Carrer Analysis and Prediction System (G-CAPS) for Engineering Students”, 2023 (IEEE Access).
  13. Anshika Jadon, Harsh Gupta, Er. Hatesh Shyam, Aayush Tyagi, Tejaswi Raj – “Personality Analysis using Graphology and Image Processing Techniques”, 2024 (IEEE Access).
  14. Arnav Bhardwaj, Shilpi Sharma – “Analysing the Psychological Condition of Pilots Through Computer Aided Graphology”, 2021 (IEEE Access).
  15. Mahendra Kumar Gourisaria, M. Sridevi, Anurag Singh, Rohitash Chandra – “Emotional State and Personality Trait Detection using Deep Learning and Handwriting Analysis”, 2025 (SN Computer Science, Springer).
  16. R. Kumar, A, Kumar, P. Ahmed – “Ensemble Learning Model for Personality Prediction based on Handwritten Text”, 2023 (Multimedia Tools and Applications, Springer).
  17. Devika R. Bagmar, Megha V. Patel – “Offline Handwriting Analysis for Predicting Personality Traits Using Machine Learning Algorithms”, 2022 (Journal of The Institution of Engineers (India): Series B, Springer).
  18. Madesh Safar, Ching Y. Suen – “Revealing personality trough Handwriting: A Fusion of Graphology and Machine Learning Algorithms Techniques”, 2024 (Pattern Recognition and Image Analysis, Pleiades Publishing, Springer).
  19. Madesh Safar, Ching Y. Suen – “Revealing personality trough Handwriting: A Fusion of Graphology and Machine Learning Algorithms Techniques”, 2024 (Pattern Recognition and Image Analysis, Pleiades Publishing, Springer).
  20. Shreya Ghosh Partha Pratim Roy, Monisha Sharma – “Graphology-based Handwritten Character Analysis for Human Behaviour Prediction Using Machine Learning Techniques”, 2020 (CAAI Transactions on Intelligencer Technology, Elsevier).