Offline Signature Verification Using Deep Learning and Genetic Algorithm
Offline Signature Verification Using Deep Learning and Genetic Algorithm
)
DOI: 10.4197/Comp.13-1.5
Abstract. the process of verifying signatures has wide-ranging applications in computer systems, including
financial opera- tions, electronic document signing, and user identity verification. This approach has the
advantage of community acceptance and presents a less intrusive alternative than other biological
authentication methods. Deep learning (DL) and Convolutional Neural Networks (CNNs) have emerged as
prominent tools in the field of signature verification, significantly enhancing the accuracy and effectiveness
of these systems by effectively extracting discriminative features from signature images. However,
optimizing the hyperparameters in CNN models remains a challenging task, as it directly affects the
efficiency and accuracy of the models. Currently, the design of CNN architectures relies heavily on manual
adjustments, which can be time consuming and may not yield optimal results. To address this issue, the
proposed method focuses on employing a genetic algorithm to evolve a population of CNN models, thereby
enabling the automatic discovery of the most suitable architecture for offline signature verification. By
leveraging the optimization capabilities of the genetic algorithm, the proposed approach aims to improve
the overall performance and effectiveness of the signature verification model. The effectiveness of the
proposed method was evaluated using multiple datasets, including BHSig260-Bengali, BHSig260-Hindiin,
GPDS, and CEDAR. Through rigorous testing, the approach achieved remarkable discrimination rates with
a False Rejection Rate (FRR) of 2.5%-, False Acceptance Rate (FAR) of 3.2%-, Equal Error Rate (EER) of
2.35%-, and accuracy rate of 97.73%-.
Keywords—Offline Signature Verification, Convolutional Neural Network, Deep Learning, and Genetic
Algorithm.
69
70 Abdoulwase M. Obaid Al-Azzani, and Abdulbaset M. Qaid Musleh
forged signatures produced by fraudulent simplifies the addition of new individuals to the
individuals [6]. Forgery in the signature system, as the classification is based on a
verification field can be categorized into three single category for all per-sons [11, 12]. In
types [7]. Unskilled forgery occurs when a recent years, numerous automated systems
person forges another indi- vidual’s signature have been developed to verify the authenticity
without possessing knowledge of that person. of handwritten signatures us- ing various
Random forgery involves a person who knows algorithms and methods. Deep learning,
only the signer’s name without having specifically Convolutional Neural Net-works
previously seen its genuine signature. On the (CNNs), has emerged as a dom- inant approach
other hand, skilled forgery is performed by an owing to its effectiveness in image
individual who possesses knowledge of both classification and processing [13, 14]. CNNs,
the signer’s name and the shape of their such as VGGNet, GoogleNet [15], ResNet
genuine signature. These distinctions highlight [16], CapsNet [17], and DenseNet [18] have
the complex- ity and importance of offline demon- strated significant improvements in
signature verification as they play a critical efficiency and performance in real-world
role in safeguarding against fraudulent applications [19, 20]. The performance of
activities. Further CNNs re- lies heavily on their architecture [21,
advancements in this field have the potential to 22]. Experts in this field have designed
enhance security measures and improve the different structures and versions to address
accuracy of signature-verification systems [8]. specific classification problems. However, it is
Handwritten Signature Verification systems challenging to find a CNN model that can
employ two classifications of learning: writer- effectively solve all classification problems.
independent (WI) and writer- dependent (WD) The manual design of CNN architectures
[9, 10]. In the Writer-Independent state, involves iterative attempts to find suitable
learning is performed by all signatures in the parameters that yield the best results, which
database collectively, whereas in the Writer- often requires a substantial amount of time
Dependent state, learning is conducted [23]. Figures (1,2, and 3) show some samples
independently for individual signatures. The from the dataset used.
WI method has gained popularity because it
To address this challenge, this study proposes architecture helped reduce the required
a method that utilizes a genetic algorithm to training data volume and resulted in a 13 %-
optimize the hyperparameters of the CNN increase in system efficiency. Genetic
architecture for offline signature verification. algorithms have also been applied to optimize
The genetic algorithm assists in determining CNN architectures. For example, in a study by
the optimal combination of hy- perparameters, [27], two models for predicting the strength of
significantly reducing the time required for adhesively bonded joints were de- signed using
manual design. By leveraging the genetic a CNN. The architecture of one model was
algorithm, the proposed method aims to manually developed, whereas the architecture
enhance the performance and efficiency of the of the other model was opti- mized using a
CNN model for offline signature verification, genetic algorithm. The improved model with
providing more accurate and re- liable results. genetic algorithm optimization demonstrated
better results. In image clas- sification tasks,
II. LITERATURE R EVIEW genetic algorithms have been employed to
In the field of artificial intelligence, particularly optimize CNN architectures using datasets
deep learning, Convolutional Neural Networks such as CIFAR10, MNIST, and Cal-tech256
(CNNs) have been widely used in various [23]. By automatically adjusting the model’s
applications, including computer vision, param- eters, the genetic algorithm improved
pattern recog- nition, and natural language the accuracy compared to the other tested
processing [24]. CNNs consist of several key models. In [28], the authors presented a hybrid
components, including a Convolutional Layer, ap- proach for extracting features from signature
Acti- vating function, pool-ing layer, and fully images. We utilized a Convolutional Neural
connected layer. The Convolutional Layer Network (CNN) and Histogram of Oriented
applies filters (kernels) to extract features or Gradients (HOG) techniques, followed by a
patterns from the input image matrix, and feature-selection algo- rithm (Decision Trees)
multiple filters can be used to capture the to identify important features. The CNN and
different features. The Pooling Layer reduces HOG methods were combined. We evaluated
the size of the matrices by applying functions, the effective- ness of our hybrid approach using
such as Max or Average pooling. The Fully three classifiers: long short-term memory,
connected layer is a multilayer percep- tron, support vector machine, and K-nearest
where neurons are connected to all the nodes of Neighbor. The experimental results
the previous layer and are responsible for the demonstrated that the proposed model per-
final classification. Different ap- proaches formed satisfactorily in terms of efficiency and
have been proposed for offline signature predictive ability. It achieved accuracy rates of
verification. A method known as the Siamese 95.4 %-, 95.2 %-, and 92.7 %- with the UTSig
network was introduced in [25]. It utilizes dataset and 93.7 %-, 94.1 %-, and 91.3 %- with
writer-independent (WI) feature learning and the CEDAR dataset. Another study [29]
measures the similarity or dissimilarity applied a genetic algorithm to select
between Siamese network outputs using the parameters such as the number of filters, filter
Euclidean distance. Another study [26] size, and number of layers added to the
employed a Siamese Neural Network for trainable layers of a CNN transfer model. The
signature verification, training, and evalua- proposed method achieved an accuracy of 97
tion of two similar neural networks on the %- in classify- ing cat and dog datasets over 15
same data. The use of the Siamese network generations. In the domain of finger-vein
72 Abdoulwase M. Obaid Al-Azzani, and Abdulbaset M. Qaid Musleh
ing, and testing. These steps work in associated steps within each stage of the
conjunction to create an effective and robust proposed model, providing a clear overview of
offline signature verification system. Figure 4 the workflow involved in the offline signature
visually represents the main stages and verification.
CNNs consist of interconnected layers of the loss did not improve after two epochs.
artificial neurons that learn to recognize 2) A 2D convolutional layer is added to the
patterns and spatial hierarchies in the data. The model with a spec- ified number of filters,
key components of a CNN are convolutional, kernel size, and activation function. The input
pooling, and fully connected layers. Here’s shape was set to the provided input shape.
how they work: Convolutional Layers: These 3) Another 2D convolutional layer is added to
layers per- form convolution operations on the model with a specified number of filters,
input data. A convolution involves sliding a kernel size, padding, and activa- tion function.
small window, called a filter or kernel, over the 4) A max pooling layer is added to the model
input and computing dot products between the with a specified pool size.
filter and the local patches of the input. This 5) Steps 2 and 3 are repeated for two more
process captures the local patterns and convolutional layers.
features. Convolutional layers can have 6) Add a dropout layer with a specified
multiple filters to learn different fea- tures dropout rate.
simultaneously. Pooling Layers: Pooling 7) The output is flattened from the previous
layers reduce the spatial dimensions of the data, layers.
helping to make the learned features more 8) Add a dense (fully connected) layer to the
robust and invariant to small translations and model with a spec- ified number of units and
distortions. The most common pooling activation function ‘ReLU’ [38].
operation is max-pooling, which selects the 9) Add another dropout layer with a specified
maximum value within each local region of the drop-out rate.
input. Fully Con- nected Layers: After several 10) A dense output is added to the layer with the
convolutional and pooling layers, the output is activation func- tion ‘Softmax’ [39] and the
flattened and connected to the fully connected specified number of classes and activation
layers. These layers resemble traditional neural function.
networks, in which each neuron is connected 11) Return the trained model using the training
to every neuron in the previous layer. Fully dataset.
connected layers learn global patterns and C The Genetic Algorithm
make predictions based on the extracted AG is used to determine the best combination of
features. During the training process, CNNs hyperparame- ters for the convolutional neural
learn to optimize their internal parameters network model, which can achieve high
(weights and biases) by min- imizing a chosen accuracy in classifying signatures. It begins by
loss function. This is usually performed using randomly ini- tializing a population of network
gradient-based optimization algorithms, such configurations, where each con- figuration
as stochastic gradi- ent descent (SGD) or its representation of genes is a set of
variants. The backpropagation algorithm hyperparameters for the convolutional neural
computes the weight loss gradients, allowing network. The fitness of each network was
for efficient parame- ter updates. The proposed evaluated by training and testing the
model function creates a convolutional neural corresponding convolutional neural network
network (CNN) model based on the parameters model on the signature data. The genetic algo-
provided by the genetic algorithm and trains it rithm then applies selection, crossover, and
using the given training data. Here, is a mutation operations to the population.
breakdown of the steps performed by function: Selection favors networks with higher fitness,
1) We defined an early stopping callback to allowing them to pass their genetic material
monitor the valida- tion loss and stop training if (hyperparameters) to the next generation.
Offline Signature Verification Using Deep learning and Genetic Algorithm 75
Crossover combines the genetic material of process of evaluating the fitness, selecting the
two-parent networks to create new child best networks, generating new networks
networks, potentially inheriting beneficial through crossover, and introducing mutations is
hyperparameter combinations. Mutation in- repeated for multiple generations. The
troduces random changes to the algorithm aims to iteratively improve
hyperparameters of the networks, promoting the population by evolving networks with
the exploration of the search space. This improved performance.
Table I. Random Generated Initial Population.
Hyperparame teR
r ange
Epoch Random (2, 25)
Filter Size Choice (16, 32, 64, 96)
Kernel Size Choice [(3x3), (5x5)]
Unit Choice (128, 256, 512)
Dropout Choice (0, 0.25, 0.50)
a) Initialization The constructor initializes equation represents the fitness of each network
the hyperparame- ters randomly, including the in the population. It trains and tests the
number of epochs, filter size, kernel size, Convolutional Neural Network model with the
dropout rate, activation function, loss given hyperparameters, and calculates its
function, optimizer, and accuracy. This step accuracy. The accuracy was then stored. In
returns a dictionary that contains the current addition, the function prints the accu- racy and
values of the hyperparameters. A CNN model classification reports for each network. The
was built based on the given hyperparameters. fitness function evaluates the fitness of each
It uses a combination of convolutional, network in the network list by training and
pooling, dropout, and dense layers to construct evaluating a convolutional neural network
the model. The model was compiled us- ing a model for each network parameter
specified optimizer, loss function, and metrics. configuration. This is an explanation of the
This method initializes the attributes of an steps performed by the function.
instance with random or predefined values, as 1) Selecting for each one the population
listed in Table I. The attributes used included dictionary from the list.
the following: 2) For convenience, we take the parameter
1) epoch: An integer attribute is randomly values from the population dictionary and
initialized be- tween 1 and 25. assign them to the corre- sponding variables.
2) filter1 and filter2: Integer attributes were 3) We attempted to create and train a CNN
randomly cho- sen from the values 64, 32, and model using the CNN model function with the
16. extracted parameter values and input data.
3) units1: An integer attribute is randomly 4) The performance of the trained model is
chosen from values 128, 256, and 512. evaluated using the evaluation method on the
4) kernel1 and kernel2: Tuple attributes test data, and the accuracy score is stored in the
randomly chosen from the values (3, 3) and (5, accuracy attribute of the network.
5). 5) The accuracy of the model was obtained as a
5) dropout1 and dropout2: Float attributes percentage.
randomly cho- sen from the values 0.25 and 6) Generate predictions using the trained
0.5. model and obtain classification reports
b) Fitness Function The fitness function comparing predicted labels with true labels.
76 Abdoulwase M. Obaid Al-Azzani, and Abdulbaset M. Qaid Musleh
7) The updated list of networks is returned, to the hyperparameters of the networks within
including the accuracy values for each the population. The mutation process follows
network. these steps for each newly generated child
c) Selection The selection function performs from the previous pro- cess.
selection by sort- ing the population based on 1) A random uniform function is used to
the accuracy of each network and retaining the generate a random number between 0 and 1.
top individuals. The number of individuals 2) The random “ function” was used to
selected was equal to the population size. generate a random integer within the specified
1) The population list is sorted in descending range.
order based on the individual accuracy 3) A random module was imported at the
attributes. beginning of the code to access these
2) The top individuals are selected from the functions.
sorted popu- lation based on a specified 4) The mutation process remains the same,
percentage or number. where the “epoch” and “units” attributes of
3) The selected population is then returned. each individual are modified if the generated
d) Crossover The crossover function is random number is less than or equal to 0.1.
responsible for perform- ing a crossover by 5) Finally, the modified population was
randomly selecting two parent networks from returned.
the population and creating two child D Training and Testing Stage
networks. The cross-over process follows In the training and testing stages of the
these steps for each of the two parents from the signature verification process, our objective
population, using a selection process: was to develop an efficient model for of- fline
1) The total number of attributes signature verification using a genetic
(hyperparameters) in the parents was divided algorithm and evaluate its performance on
into half. multiple datasets. Table II shows lists of the
2) Take the first half of the attributes from the datasets used in the proposed model. Our
first parent and assign them to the study employed Con-
corresponding attributes of the second child.
3) Take the first half of the attributes from the
second parent and assign them to the
corresponding attributes of the first child.
4) Combine the offspring list, which includes
two newly created child networks, with the
current population, forming a new population.
5) Return to the new population.
This process enables the exchange of genetic
information be- tween parent networks,
allowing the child networks to inherit certain
hyperparameters from their parents. By
combining attributes from different parents,
crossover promotes the ex- ploration and
exploitation of potential solutions within a pop-
ulation.
e) Mutation The mutation function is
responsible for introduc- ing random mutations
Offline Signature Verification Using Deep learning and Genetic Algorithm 77
classified. An equal Error Rate (EER) is The ”Surround- edness Features” meth-od
applied to evaluate the equilibrium point where [11] achieves a False Acceptance Rate (FAR)
the FRR equals the FAR. A lower EER indicates of 8.33%-, False Rejection Rate (FRR) of
a better per- formance for the model. The 8.33%-, Equal Error Rate (EER) of 8.33%-,
results obtained from the proposed method of and accuracy of 91.67%-. On the other hand,
constructing the CNN model using the genetic the ”Multi-Path Siamese (MA-SCN)” method
algorithm were compared with those of other [41] yields an FRR of 18.35%-, FAR of
methods using hand-built CNN models. The 19.21%-, EER of 18.92%-, and accuracy of
results were compared with those of other 80.75%-. Additionally, the ”Siamese CNN”
studies. Table IV. presents a comparison of method
the performance of different methods with our [42] achieves a FAR of 6.78%-, FRR of
method on the CEDAR dataset in terms of 4.20%-, and accuracy of 95.66%-. In
FAR, FRR, EER, and accuracy. ”Our method” comparison, our proposed method
outperforms the other methods in terms of outperformed these approaches with a FAR of
FAR, FRR, EER, and accuracy, indicating its 2.5%-, FRR of 2.2%-, EER of 2.35%-, and
superior performance on the CEDAR dataset. accuracy of 97.73%-.
Table III. The Parameter Setting of The
Proposed System.
Dataset Name
Parameter
GPDS-300 CEDAR BHSig260-B BHSig260-H
Max Epochs 20 21 12 14
Parameters 2,402,731 2,545,911 2,426,120 1,241,250
Layer 1 Conv2D (32, 3x3) (32, 3x3) (64, 3x3) (32, 3x3)
Layer 2 & MaxPool(2, 2) Conv2D (32, 3x3) Conv2D (64, 3x3) Conv2D (32, 3x3) Conv2D (32, 3x3)
Layer 3 & MaxPool(2, 2) Conv2D (32, 3x3) Conv2D (32, 3x3) Conv2D (64, 3x3) Conv2D (32, 3x3)
Layer 4 & MaxPool(2, 2) Conv2D (32, 3x3) Conv2D (64, 3x3) Conv2D (32, 3x3) Conv2D (32, 3x3)
Dropout 0.50 0.25 0.25 0.50
Flatten 512 264 512 256
Accuracy 0.93 0.977 0.958 0.922
Table IV. Comparison Results for CEDAR Dataset.
CEDAR
Method
FAR FRR EER
Surroundedness Features [11] 8.33 8.33 8.33
Multi-Path (MA-SCN) [41] 19.21 18.35 18.92
Siamese CNN [42] 6.78 4.20 –
Our method 2.5 2.2 2.35
GPDS-300
Method
FAR FRR EER
CNN-GP [43] 9.08 20.60 12.83
GoogLeNet V1 and V3 [44] – – 26
Our method 9.1 20 11
Tables VI and VII compares the results of this 6.65%-. In contrast, our method achieved FRR
study with the performance of our method on values of 2.1%- and 4.7%- for BHSig260-B
the BHSig260-B and BHSig260- H datasets. and BHSig260-H, respectively. For the EER
The ”Multi-Path Siamese (MA-SCN)” [41] met- ric, the ”Multi-Path Siamese (MA-SCN)”
method method achieved rates of 8.18%- and 5.32%-
for BHSig260-B and BHSig260-H, respec-
achieves FAR values of 5.73%- and 9.96%- for
tively. The ”Sia-mese CNN” method does not
BHSig260-B and BHSig260-H, respectively.
provide a spe- cific EER value, and the ”Multi-
The ”Siamese CNN” [?] method has FAR
scripted with CNN” method lacks this
values of 14.25%- and 12.29%- for the
information. In comparison, the proposed
respective datasets. For the ”Multi-scripted
method achieved EER values of 1.7%- and
with CNN” [10] method, the FAR val- ues
5.2%- for the respective datasets. In terms of
were 1.50%- and 2.31%- for BHSig260-B and
accuracy, the ”Multi-Path Siamese (MA-
BHSig260- H, respectively. In contrast, our
SCN)” method achieved accuracy rates of
method achieved FAR values of 1.3%- and
94.99%- for BHSig260-B and 92%- for
6.8%- for the same dataset. Regarding the
BHSig260-H. The ”Siamese CNN” method
FRR, the ”Multi-Path Siamese (MA-SCN)”
achieves accuracy rates of 90.64%- and
method achieved rates of 4.86%- and 5.85%-
88.98%- for the respective datasets. The
for BHSig260-B and BHSig260-H, respec-
”Multi-scripted with CNN” method achieves
tively. The ”Sia-mese CNN” method has FRR
accuracy rates of 95%- and 90%-. Our method
values of 6.41%- and 9.6%- for the respective
outperformed the other methods, achieving the
datasets. The ”Multi-scripted with CNN”
highest accuracy rates of 95.82%- for
method achieves FRR values of 3.14%- and
BHSig260-B and 92.26%- for BHSig260-H.
80 Abdoulwase M. Obaid Al-Azzani, and Abdulbaset M. Qaid Musleh
BHSig260-B
Method
FAR FRR EER
Multi-Path Siamese (MA-SCN) [41] 5.73 4.86 8.18
Siamese CNN [42] 14.25 6.41 –
Multi-scripted with CNN [10] 1.50 3.14 –
Our method 1.3 2.1 1.7
Table VII. Comparison Results for BHSig260-H
BHSig260-H
Method
FAR FRR EER
Multi-Path Siamese (MA-SCN) [41] 9.96 5.85 5.32
Siamese CNN [42] 12.29 9.6 –
Multi-scripted with CNN [10] 2.31 6.65 –
Our method 6.8 4.7 5.2
2
عبدالواسع محمد عبيد العزاني ،1عبدالباسط محمد قايد مصلح
مستخلص .إن عملية التحقق من التوقيعات لها تطبيقات واسعة النطاق في أنظمة الكمبيوتر ،بما في ذلك العمليات
المالية ،التوقيع اإللكتروني للمستندات والتحقق من هوية المستخدم .يتمتع هذا النهج بميزة قبول المجتمع ويقدم بديالً
أقل تدخالً من طرق المصادقة البيولوجية األخرى .التعلم العميق والعصبية التالفيفية برزت الشبكات كأدوات بارزة
في مجال لتحقق من التوقيع مما أدى إلى تعزيز دقة وفعالية هذه األنظمة بشكل كبير من خالل استخالص الميزات
التمييزية بشكل فعال من صور التوقيع .ومع ذلك ،يظل تحسين المعلمات الفائقة في نماذج ث مهمة صعبة ،ألنه يؤثر
بشكل مباشر على كفاءة النماذج ودقتها .وحالياً ،يعتمد تصميم بنيات بشكل كبير على التعديالت اليدوية ،والتي يمكن
أن تستغرق وقتا ً طويالً ربما أيضا ً ال تسفر عن النتائج المثلى .ولمعالجة هذه المشكلة ،تركز الطريقة المقترحة على
استخدام خوارزمية جينية للتطور مجموعة من نماذج ،مما يتيح االكتشاف التلقائي للبنية األكثر مالءمة للتوقيع دون
اتصال باألنترنت تحقق .من خالل االستفادة من قدرات التحسين للخوارزمية الجينية ،يهدف النهج المقترح إلى تحسين
األداء العام وفعالية نموذج التحقق من التوقيع .تم تقييم فعالية الطريقة المقترحة باستخدام مجموعة بيانات متعددة ،من
خالل اختبارات صارمة ،حقق النهج معدالت تمييز ملحوظة مع معدل رفض كاذب بنسبة ٥٠٢ومعدل قبول كاذب
بنسبة ،٢٠٣ومعدل خطأ مسا ٍو بنسبة ، ٣٥٠٢ومعدل ودقة قدرة ٠٠٧٣٠٩٧
الكلمات المفتاحيةـ ـ التحقق من التوقيع دون االتصال ،التعلم العميق ،والخوارزمية الجينية.