Creating and Studying Graphological Agent using Artificial Intelligence

Download Full-Text PDF Cite this Publication

Text Only Version

Creating and Studying Graphological Agent using Artificial Intelligence

Nitin Pramod Ranjan

18BCE0272, SCOPE

Vellore Institute of Technology, Vellore, India

Saurabh Kumar Jha

18BCE0197, SCOPE

Vellore Institute of Technology, Vellore, India

Atharva Mahendra Hundare

18BCE0246, SCOPE

Vellore Institute of Technology, Vellore, India

Abstract McNeal in his introductory paper on scientific and business use of graphology presented many useful purposes for the same. Research suggests that under controlled situations, handwriting can yield insight into the mind of the writer. Using CNN, OCR and some standard graphology techniques, the authors have tried to build an intelligent graphology agent in order to assess both machine accuracy to the method and the accuracy of the method itself. The agent demonstrated about 89 percent accuracy in the limited experiment it was subjected to.

Keywords Graphology, personality, trait, feature-extraction, machine learning, Convolutional Neural Network, neural networks.

  1. INTRODUCTION

    Graphology is the study of human personality or traits through handwriting. It is often referred to as a projective personality test. Personality itself is built atop experiences of a person and hence personality studies might have a wide range of applications in psychoanalysis. Graphology relies on handwriting features like page margin, slants of the words, baseline etc. However, the scientific evidence behind the validity of graphology as a standard tool is limited. In order to further assess the method, machine based graphology can be introduced and despite not backed by science, has been a subject to research. We have tried to create an automated graphological agent that requires the user to upload a photo- graph of the written text. The project has several challenges including the application of graphological rules into a machine learning algorithm.

    figure: Graphology results example

  2. RELATED WORK

    In [1] The authors define graphology and further argues the business needs and impacts of graphology, the previous attempts made at automating the same using various segre- gation techniques and a brief comparison between the same. In [2] The authors present a brief about graphology and use a

    sentiment-polarity based model. The authors present their framework where they create a four-phase model with four engines that carry out lexical analysis on words and then give sentiment scores on a normalised polarity scale (i.e. between

    -1 and 1) and store it in a student specific memory location.In

    [3] This research article was mostly used for understanding graphology itself. The author tries to explain why it is important to understand graphology, the class features of handwriting analysis, the features that should be looked for and the unique features that professionals try to look for. The author further explains how samples ought to be collected, why handwriting analysis is not treated to be a science and why forgery is always a possibility. In [4] The authors argue that graphology might serve as an excellent mean of introspection and self-growth. They collect 25 random samples and use standard graphological functions to segregate the data and then analyse them. They do mention that it is possible using fuzzy logic functions, however they use image processing. Finally, they compare the data with the one provided by a professional and find a high degree of similarity, thus establishing that it is possible to analyse handwriting and personalities digitally. In [5] one of the founding papers for modern study in graphology, James McNeal provides the idea of how handwriting might serve as a tool to evaluate a persons personality, mood and aid marketeers in establishing better inter-personal relationships. It does not provide any mathematical or experimental basis for it, however it does provide a theoretical basis by arguing that graphologists and psychiatrists stand in agreement with a correlation coefficient of 0.6 to 0.7. However, he does argue that it is too early to use graphology as a tool in the market and it might take a few years before its usability or short- comings are established. In [6] Using seven professional graphologists and seven test subjects, each subject was asked to select 20 traits about himself/herself and the graphologists were asked to determine the traits of the control-subjects using a page of text each subject had written. These datasets were compared. Further, all subjects were subjected to a standard personality test. And this data was then compared to the previous data. This was used to evaluate a coefficient of correlation between the graphologists study and the actual personality of the control-subjects. The results were not very promising. However, this was one of the earliest experiments in graphology and so the author does not conclusively present any statement for or against it. In [7] this research paper has outlined a behavioral system or a tool to achieve high analysis rate on the nature of the person with the help of

    artificial neural networks and character recognition and detection systems. The proposed system will automatically detect the traits of the person by letter slants. In [8] this paper is to specify the handwritten data of 114 students categorised under three classes, the action, person and event. The authors have tried to perform the analysis on the imagination of the people as the subjects have to write the imagination content video displayed to them and highlight the coloured text of the handwritten data.

  3. DATASET

    One of the most difficult steps involved in the project was to classify the letters manually then create a model to recognize them. Secondly, there is no classified data set for graphology that is maintained by some institution. So, for this project, the authors have used the following datasets:

    1. MNIST

      Devanagari database, Mathematics database and English Characters Database

    2. IAM

      1539 characters This is because:

      1. The MNIST database is already classified into 26 balanced classes.

      2. The IAM database is easy to use for handwriting recognition projects.

    A script was then used to convert the encoded data in the databases to a PNG file. This facilitates the reclassification for symbols.

  4. PROPOSED WORK

    figure: Software Architecture Proposed

    1. Multi-class classification

      In order to classify the data, the authors rejected linear classification owing to the multi-feature nature of the data itself. Regression methodologies like One-vs-All logistic regression yields high accuracy, however, takes a lot of time especially with the data set as large and varied as handwriting. It involves binary logistic regression to every feature and return the highest value as prediction. This is similar to the concept of a confidence variable for each feature and the variable with highest value is returned. So, the authors decided to rely on neural networks in this project as it would be computationally cheaper, easier to construct and modify and compatible with various open-source libraries.

    2. Neural Network

      An artificial neuron is a device with several inputs and one output and has two modes of operation training and using modes. So, a program was developed to understand the working of the libraries involved. This is a single layered neural network with the hidden layer having several units. This step recreates the datasets available as coordinates of the alphabet curve into image of PNG format. GNU Octave

      5.2.0 is used to feed forward the neural network and return the cost while the theta values are then determined using back propagation. An accuracy of 92% was achieved in the neural network. The neural network was trained in a Windows 10 environment with a 10th Gen Intel i5 processor and 8GB RAM.

    3. Image OCR

      We have used TesseractJS for this purpose as it supports over 60 languages, boxing of symbols and supports confidence variables for each symbol. The TesseractJS engine extracts text from the image uploaded. The confidence variable with the highest confidence is sent to CNN layer for recognition. However, TesseractJS has only about 71 percent accuracy as per its official documentation. A better alternative could be Google OCR with 95percent accuracy; however, it does not support the confidence variable option.

    4. CNN for Symbol Recognition

      After the symbols have been extracted, they are sent to a Keras-built LeNet-5 architecture. We have undertaken 50 epochs for the CNN training and realised that the data does not converge. The reason for this being the lack of data. Psy- chology, being a fluid subject and lack of data for handwriting recognition as well, the CNN fails to achieve a very high level of accuracy, especially under accelerated training conditions. Data augmentation might help to generate additional datasets from the current set itself, however, due to forensic limitations that might arise because of it, the authors suggest against it. Other than this, the authors would also like to note that CRNN is a way better methodology for this purpose since CNN, despite its high accuracy has a very poor recall rate.

      figure: Epoch vs Accuracy for CNN model employed

    5. A simpler neural network

      To solve the problem of lack of data, a simpler neural network might be used. This is based on the hypothesis that simple neural networks yield better performance than CNNs when the dataset is limited. The neural network built has a simple back-propagation algorithm with N sets in the hidden layer of the network.

      figure: The neural network employed in the model

    6. Software integration

      To a user, the project is a simple web page where the user can upload images. It has a minimalist UI and obeys all 4 golden rules of UI design. The graphological analysis is presented in a dialog box dedicated to this purpose.

  5. EXPERIMENT

    The authors contacted 50 participants and asked them to submit four pieces of writing each. An alphabet, a word, a paragraph and a letter. This was followed by them to write down a small SWOT analysis and a small questionnaire on their behaviour, traits and personalities as they knew them- selves to be. The images of their write-ups were fed to the software, results were generated, compiled, verified against the data the behavioural data collected from them, and re- verified with the participants themselves.

  6. RESULTS

    77percent of the results that the software produced matched completely with the data collected from the participants, 9 percent matched partially while 3 percent participants admitted in the re-verification that the results were true.

    However, the authors believe that psychology is a very fluid subject and hence, the results might have inherent shortcomings. However, for this report, we conclude that 89 percent of result generated by the software was wholly or partially true with at least 77 percent completely true.

  7. CHALLENGES

      1. The primary challenge was to compile the data both for training and for the results. Psychoanalysis through graphology is a difficult and often inaccurate tool. The authors rely on the fact that through all the research literature mentioned in the paper, an average coefficient of correlation between graphological analysis and standard psychological analysis of about 0.68 has been observed. This is strong number considering the fact that only dedicated researchers collect, sample and analyse data in this field owing to it being categorised as a pseudo-science.

        figure: Example of Graphological results

      2. Another challenge was to integrate TensorflowJS (in the web UI engine) with Keras. The Keras program returns a p file, which needs an additional convertor to be made compatible with TensorFlow.

      3. Since we used a simple neural network instead of a CNN module in order to reduce training loss, we had to manually add filters that are inbuilt in CNN. Most of the image processing was done using the standard Canvas API module that was manually added to the software.

      4. The experiments were conducted on a limited group. The results hence, might not be universal in its current iteration. After the pandemic gets over, the authors plan to conduct a larger experiment on a more varied group of participants.

  8. OBSERVATION

    The following results can be arrived upon based on the experimental observations recorded with both the data-sets:

    1. As already demonstrated in Experimental Observations, the accuracy and loss in both Transfer Learning based model was 77percent accuracy compared to 58 percent loss.

    2. The transfer learning based model that uses two epochs has a loss of 63 percent as compared to the 58 percent loss in the same model but with a single epoch of training. This might be because Deep Learning models approach a saturation when the same model undergoes various levels of training. This was one of the reasons why I opted for RESNET-50 over RESNET-150 or higher. The Transfer Learning paradigm only increases the effective number of layers in the Deep Learning Model and is slower because a more comprehensive memory of the layers has to be maintained by the algorithm.

    3. Without Transfer Learning, the accuracy was around 74 percent for RESNET 50 model with ALASKA2 dataset and around 75 percent for Na¨ve Dataset.

    4. In the Naive dataset that I used once the model was successfully trained with ALASKA2 dataset, the accu- racy achieved was about 78 percent compared to a loss statistics of around 58 percent during model training. This is when the number of epochs is 1.

    5. The Naive Dataset training was faster and slightly better results were obtained as compared to ALASKA2 dataset, probably because the Naive Dataset is DCT encoded and LSB is a simple and yet effective way to decode the same.

    6. The conclusions are based on the two datasets that I used to train and test the model. This might however be specific to the datasets I picked up because the accuracy largely depends upon the number of steganography algorithms used in the data studied under the model as well. This is because the Transfer learning model will remember basic algorithms when trained while the non-transfer learning model will learn some specific families of algorithms better.

  9. CONCLUSIONS

    The authors are glad to have worked on this project and although the current project is limited in available data for training and in the participants available for experiment, the module works nicely in its current iteration. We shall try to expand both training dataset and experimental results in the next iteration of the project. If CRNN be used instead of CNN, a better image processing might take place and the project come very close to professional graphological analysis. In its current form, the project still provides a minimalist tool for intra and interpersonal analysis.

  10. SUGGESTIONS AND FURTHER IMPROVEMENTS

Using the Xception paradigm(Extreme Inception) model that was introduced yet again for the ImageNet 2015 dataset might help to further improve the RESNET+LSB model accu-racy. The Xception model outperformed the then best model (before the ImageNet 2015 competition where Microsoft pro-posed the RESNET model) by eliminating the need to learn 3D mapping and replacing it with learning a 2D+1D map. The mode might also be improved further with accuracy of about 85 percent achieved if the CNN model being used in the RESNET-50 is replaced with a DenseNet Model. Densenet is a Recurrent CNN model with added memory. However, I did not suggest it for two reasons it will make the model very complicated.

    1. The Densenet model itself behaves as a small deep learning paradigm. In this case, several Densenets might have the same effect on the model as increasing the number of deep learning layers or transfer learning layer has increased saturation in training and increase loss.

    2. Additionally, the RESNET model is experimentally known to be the strongest Stegnalysis mode. However, the researcher is open to the idea of combining these two models for the sake of experimental verification of point (2).

ACKNOWLEDGMENT

The authors express their gratidtude to their teacher and subject incharge for Artificial Intelligence course, Dr Harshita Patel, School of Information Technology and Engineering for her guidance and support in this endevour.

REFERENCES

  1. Lakshmi Durga , and Deepu R, Handwriting Analysis through Graphol- ogy , IEEE,2018

  2. Chhanda Roy , and others, Emotion Predictor Using Social Media Text and Graphology ,IEEE

  3. Dial, and Jackie,Forensic Handwriting Analysis Salem Encyclopaedia of Science, 2020

  4. Kukuh Adi Prasetyo , and others, Mobile Application for Identifying Personality of Person Using Graphology, IES-KCIC, 2017, IEEE

  5. James U.McNeal , Graphology: A New Marketing Research Technique , Journal of Market Research, 1967

  6. Paul E. Green Vthala R. Rao, and Diana E. Armani , Graphology and Marketing Research: A Pilot Experiment in Validity and Inter-judge Reliability , Journal of Marketing, 1971

  7. Akshita Chanchlani, Pratima Kharade, Rutuja Kapase, Sonal Janvalka,and Aakanksha Jaitly, Predicting Human Behavior through Handwriting, International Journal for Research in Applied Science & Engineering Technology (IJRASET) ISSN: 2321-9653; IC Value: 45.98;

    SJ Impact Factor:6.887, Volume 5 Issue X, October 2017

  8. Bayu Yudha Pratama, and Riyanarto Sarno,Personality classification based on Twitter text using Naive Bayes, KNN and SVM IEEE, 2015

Leave a Reply

Your email address will not be published. Required fields are marked *