0% found this document useful (0 votes)
20 views14 pages

Quantum_Machine_Learning_Classifier_and_Neural_Net

IntechOpen is a leading publisher of Open Access books, featuring 7,000 titles and contributions from 186,000 international authors. The chapter on Quantum Machine Learning discusses the integration of quantum algorithms with neural network transfer learning, showcasing advancements in COVID-19 screening accuracy through hybrid models. It emphasizes the potential of combining quantum computing with machine learning to enhance data processing across various fields.

Uploaded by

Fran J Gal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views14 pages

Quantum_Machine_Learning_Classifier_and_Neural_Net

IntechOpen is a leading publisher of Open Access books, featuring 7,000 titles and contributions from 186,000 international authors. The chapter on Quantum Machine Learning discusses the integration of quantum algorithms with neural network transfer learning, showcasing advancements in COVID-19 screening accuracy through hybrid models. It emphasizes the potential of combining quantum computing with machine learning to enhance data processing across various fields.

Uploaded by

Fran J Gal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

We are IntechOpen,

the world’s leading publisher of


Open Access books
Built by scientists, for scientists

7,000
Open access books available
186,000
International authors and editors
200M Downloads

Our authors are among the

154
Countries delivered to
TOP 1%
most cited scientists
12.2%
Contributors from top 500 universities

Selection of our books indexed in the Book Citation Index


in Web of Science™ Core Collection (BKCI)

Interested in publishing with us?


Contact book.department@intechopen.com
Numbers displayed above are based on latest data collected.
For more information visit www.intechopen.com
Chapter

Quantum Machine Learning


Classifier and Neural Network
Transfer Learning
Pauline Mosley and Avery Leider

Abstract

This chapter explores quantum machine learning (QML) and neural network
transfer learning. It begins by describing the potential of QML. The discussion
then shifts to transfer learning, leveraging pre-trained neural models across diverse
domains. A demonstration of advancements in both fields forms the core of the chap-
ter, showcasing how QML classifiers can be used with classical neural networks for
enhanced performance. To improve the accuracy of COVID-19 screening, ensemble
method and sliding window mechanism measurements have been employed using
computer vision on frequency domain spectrograms of audio files. Parallel with this,
the accuracy of these measurements could be improved by quantum machine transfer
learning. The chapter describes a case study where a hybrid approach demonstrated
significant improvements in data processing accuracy, offering an understanding of
practical applications. In conclusion, the authors present ideas on how the combina-
tion of QML and transfer learning could unfold new horizons in various fields with
complex, large-scale datasets. The chapter concludes with predictions about the
trajectory of these technologies, emphasizing their role in shaping the future of trans-
fer learning. This combination of current research and visionary thinking inspires
further exploration at the intersection of quantum computing machine learning and
neural network transfer learning.

Keywords: quantum machine learning, QML, transfer learning, hybrid neural


networks, neural networks

1. Introduction

1.1 Transfer learning in the context of quantum machine learning

Quantum machine learning transfer learning, or transfer learning in the context of


quantum machine learning, is a concept that blends the principles of transfer learning
with the unique capabilities of quantum computing. To define it, let us first break
down its two main components:

1
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

1.1.1 Transfer learning in classical machine learning

Transfer learning is a technique where a data model developed for one task is
reused as the starting point for a model on a second task. It is particularly useful in
scenarios where the second task has limited data available for training. In essence,
transfer learning allows for the leveraging of pre-trained models to achieve quicker
and more efficient learning in a new, but related, problem. Transfer learning is an idea
that is taken from how the human mind works. In the human mind, previous experi-
ence is used to handle training on a new task that must be learned to assist it into
learning the new task more quickly. An example is learning a new foreign language.
If one language has already been learned, then the new language training is guided by
that previous experience, to speed up the process, as described in “A computer science
perspective on models of the mind” by Brooks et al. [1].

1.1.2 Quantum machine learning

This involves using quantum algorithms to either improve classical machine


learning methods or develop new machine learning models that operate on
quantum data as described in “Quantum deep learning neural networks”, by
Kamruzzaman et al. [2] and “Quantum machine learning: A review and case stud-
ies” by Zeguendry et al. [3].

1.2 Combining these concepts

Quantum machine learning transfer learning can be understood as follows:

1.2.1 Leveraging pre-trained quantum models

It involves reusing a model, which has been trained on a quantum computer for
one task, for a different but related task. This is particularly beneficial given the
computational expense of training models on quantum computers.

1.2.2 Hybrid approach

It might also involve using quantum algorithms to enhance classical machine


learning models that have been pre-trained on classical data. This could mean,
for instance, fine-tuning a classical neural network using a quantum-enhanced
optimization algorithm. Hybrid approaches are currently the most popular form
of quantum machine transfer learning. This approach is used for the illustration in
this chapter.

1.2.3 Cross-domain applications

Transfer learning in the quantum domain can be especially powerful for tasks
where classical data needs to be augmented with quantum data or vice versa. For
example, a quantum machine learning model initially trained on quantum simulation
data might be adapted for a more specialized task in quantum chemistry with mini-
mal retraining.

2
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

1.2.4 Efficiency and scalability

Quantum transfer learning aims to reduce the computational resources needed


to train quantum models from scratch, which is especially crucial given the current
limitations of quantum hardware.

1.3 The rest of this chapter is about

The rest of this chapter illustrates the terms described above in the Introduction
with a survey of the research that serves as an example of each of the concepts, a
practical example of using quantum machine learning transfer learning in a hybrid
with classical neural networks, and a conclusion.

2. Illustrations and examples

2.1 Example of transfer learning in classical machine learning

An example of transfer learning in classical machine learning is given in “Using a


Novel Transfer Learning Method for Designing Thin Film Solar Cells with Enhanced
Quantum Efficiencies” [4] which observes that machine learning can learn from
the human brain, which applies transfer learning to take what it learns from previ-
ous experience and applying it to a new task to reduce training time. An example
of this is a human computer programmer learning a new programming language,
where they do not start from the beginning, but rather by using the programming
language(s) that are already known, and applying that knowledge to the new lan-
guage, reducing learning time. The transfer learning in this case is applied to finding
a more optimized design to “thin film multilayer solar cells” by using a surrogate
model. A surrogate model (also called metamodel) is an approximation to a black
box model that searches for optimal points. When design specifications change, the
surrogate model must also change. However, using transfer learning, the new sur-
rogate model can be refitted more efficiently, resulting in a model that learned and
optimized the new function with 2–3 times the accuracy and using only half as many
training data points as the original. Transfer learning is best when it uses the model
developed on one data set on another similar data set as in this research paper. In this
case, the model developed was from another similar set of materials as in the thin
film multilayer structure.

2.2 Examples of quantum machine learning

Several examples of quantum machine learning (QML) are given in “Quantum


Machine Learning: A Review and Case Studies” by Amine et al. [3] providing a
comprehensive overview of the intersection of quantum computing and machine
learning, particularly focusing on quantum machine learning (QML). It explores fun-
damental quantum theory, quantum algorithms, and their applications in machine
learning, aiming to make this complex field understandable to computer scientists
who have no physics background. The need for understanding quantum physics in
order to understand quantum computing is a significant conceptual challenge for

3
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

computer scientists who mistakenly believe that it is required. However, it is not


necessary to study quantum physics in order to understand quantum computing. An
understanding of the basics of linear algebra is all that is necessary.
The article begins with an introduction to machine learning and its reliance on
linear algebra for processing data as matrices. It highlights the potential of quantum
computing to improve machine learning by handling large matrices more efficiently
using quantum bits (qubits). It reviews key quantum computing concepts such as
quantum bits, superposition, entanglement, quantum measurement, and the struc-
ture of quantum circuits.
The authors discuss various quantum algorithms, including Grover’s and Shor’s
algorithms, and their implications for machine learning. Grover’s algorithm promises
quadratic speedup of computations. Shor’s algorithm promises to break the RSA
encryption algorithm and therefore unleash plaintext in worldwide systems that
rely on RSA encryption to secure their key information, especially the world’s finan-
cial systems and military systems. They also explore quantum variants of popular
machine learning algorithms like quantum neural networks (QNN), quantum sup-
port vector machines (QSVM), and quantum principal component analysis (QPCA).
The article presents case studies comparing the performance of QML algorithms
with their classical counterparts. These include implementing quanvolutional neural
networks (QNNs) to recognize handwritten digits and comparing them with classi-
cal convolutional neural networks (CNNs), implementing quantum support vector
machines (QSVM) on a breast cancer dataset and comparing it to classical support
vector machine (SVM), and implementing the variational quantum classifier (VQC)
on the Iris dataset to compare accuracies with classical classifiers.
In conclusion, the paper discusses challenges in quantum computing, such as the
need for quantum random access memory (QRAM) for efficiently handling classical
data, and suggests future research directions in QML.
Overall, this paper provides a detailed insight into how quantum computing can
revolutionize machine learning by enabling faster processing and handling of com-
plex data.

2.3 Example of leveraging pre-trained quantum models

An example of leveraging pre-trained quantum models with transfer learning is


given in “Hybrid Model of Quantum Transfer Learning to Classify Face Images with
a COVID-19 Mask” by Soto-Paredes and Sulla-Torres [5], which presented a study on
classifying face images of individuals wearing COVID-19 masks. The authors aimed
to categorize images into three classes: (1) correctly worn mask, (2) incorrectly worn
mask, and (3) no mask. They utilized a hybrid model combining Quantum Transfer
Learning with the classical ResNet-18 model.
Key points from the article include:
Context and motivation: given the widespread impact of COVID-19 and the
essential role of masks in controlling its spread, the study focuses on using technology
to monitor mask usage effectively.
Data set: the study gathered 660 images of people across genders and ages 18–86.
These images were then categorized into the three classes for mask usage.
Methodology: the classical transfer learning model used was ResNet-18,
augmented with a quantum approach using the Pennylane quantum simulator.
Various layers and templates were employed in the quantum model, including Basic
Entangling Layers and Strongly Entangling Layers.
4
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

Results: the model achieved a high accuracy of 99.05% in classifying correctly


worn masks. Different variations of the model were compared, demonstrating that
Stochastic Gradient Descent with Nesterov Momentum was the most effective optimi-
zation method.
Comparison with other studies: the study compared its approach and results with
other related works in the field, highlighting the novelty and effectiveness of their
hybrid model.
Conclusions and future work: the article concluded that the hybrid model is a
promising tool for detecting correct mask usage. It also suggests exploring other
quantum templates and improving hyper-parameters in future research.
This research is significant in the context of public health and safety during the
COVID-19 pandemic, offering a technological solution to monitor and encourage
proper mask usage. The use of a hybrid classical-quantum approach also demon-
strates the potential of quantum computing in enhancing traditional machine learn-
ing methods.

2.4 An additional example of leveraging pre-trained quantum models

The paper “Transfer learning in hybrid classical-quantum neural networks”


by ***Mari et al. [6] explores the application of transfer learning in the context
of hybrid neural networks that incorporate both classical and quantum elements.
The paper is particularly relevant in the current era of intermediate-scale quantum
technology and focuses on how a pre-trained classical network can be augmented
with a final variational quantum circuit. This hybrid approach allows for efficient
processing of high-dimensional data, such as images, using state-of-the-art classical
networks, followed by embedding a select set of features into a quantum processor
for further processing. This paper is so important that it is posted on Pennylane, the
artificial intelligence machine learning simulator website, as a tutorial in quantum
transfer learning.
Key points of the paper include:
Introduction to transfer learning: the concept of transfer learning, common in
artificial intelligence, is introduced. This concept involves transferring knowledge
acquired in one context to a different area. The paper aims to investigate the potential
of transfer learning in quantum machine learning, focusing on hybrid models where
quantum variational circuits and classical neural networks are jointly trained.
Hybrid classical-quantum networks: the study reviews basic concepts of hybrid
networks and introduces dressed quantum circuits. These circuits consist of a varia-
tional quantum circuit augmented with classical layers for pre-processing and post-
processing input and output data, respectively. The addition of the classical layers is
known as “dressing”.
Transfer learning variants: the study identifies four variants of transfer learning in
hybrid systems: classical-to-classical (CC), classical-to-quantum (CQ ), quantum-to-
classical (QC), and quantum-to-quantum (QQ ). Each variant offers unique opportu-
nities for leveraging the strengths of both classical and quantum computing.
Implementation and examples: the study presents several proof-of-concept
examples demonstrating practical implementations of quantum transfer learning for
tasks like image recognition and quantum state classification. These examples use the
PennyLane software library for simulations and test a high-resolution image classifier
on real quantum computers provided by IBM and Rigetti. To gain access to the IBM
real quantum computers, one needs only to go to the IBM website and log-in for free
5
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

academic access to the older machines. To gain access to the Rigetti real quantum
computers, one can use Amazon Web Services (AWS) and pay for each “shot”.
Results and analysis: the study reports the successful application of transfer
learning in hybrid systems, with specific emphasis on the classical-to-quantum (CQ )
approach due to its relevance to current quantum technology. The CQ approach is
used to classify high-resolution images using real quantum processors.
Conclusion: the authors conclude that transfer learning is a promising approach
in the context of near-term quantum devices. They note the potential benefits of
combining the power of quantum computers with the well-established methods of
classical machine learning, especially for tasks like image processing.
This research is significant as it explores the intersection of quantum comput-
ing and machine learning, demonstrating the feasibility and potential advantages
of applying transfer learning techniques in hybrid classical-quantum settings.
The results indicate that such hybrid approaches could be valuable in efficiently
processing complex data using the combined strengths of classical and quantum
computation.

2.5 Hybrid approach illustration

The article “Screening for COVID-19 via Acoustics using Artificial Intelligence” by
Bakhitov et al. [5] presented a novel approach for COVID-19 screening by analyzing
audio files using deep learning techniques. This research did not include quantum
computing or transfer learning, however, in subsequent research done for this chap-
ter, the authors have extended the work to include both.
The original hybrid approach started with crowdsourced audio files of indi-
viduals exhibiting COVID-19 symptoms and compared them to those of healthy
subjects. The methodology involved processing these audio samples into log-power
spectrograms (image format) using the librosa Python library, which were then
analyzed by Convolutional Neural Networks (CNNs) to identify patterns indicative
of the virus.
The study utilized a dataset from the Coswara project found at Ref. [6], which
contained audio samples from 1433 healthy individuals and 681 positive COVID-19
cases. Each dataset entity contained nine files recorded by one individual such as
breathing heavy, counting fast, vowel sounds, etc. The researchers trained their
model on 70% of this data, validated it on 20%, and tested it on the remaining 10%,
achieving promising initial results with an 85% Area Under the (Receiver Operating
Characteristics (ROC)) Curve (AUC).
This original research emphasized the importance of a hybrid approach that
combined audio preprocessing, image transformation, and advanced deep learn-
ing (specifically CNNs) to address the challenge of rapid and accessible COVID-19
screening. The significant aspect of this approach was its potential to reduce the
costs and logistical challenges associated with traditional testing methods while also
minimizing the risk of false negatives. The article also highlighted the high incidence
of false negatives in current COVID-19 tests and suggested that this AI-driven method
could offer a more reliable alternative for preliminary screening.
Future directions at that time for this work included improving the model through
more advanced techniques such as exploring the use of quantum computing and
transfer learning. The team aimed to process the entire Coswara dataset with the
improved model and test their approach on additional COVID-19 audio datasets as
they became available. They did not become available.
6
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

The way that this research was improved and extended for this chapter was to
add quantum transfer learning. An illustration of the addition of quantum comput-
ing to the neural network to create a hybrid network is to take the classical neural
network done for the original research such as that seen in Figure 1, and replace it
with a hybrid classical-quantum neural network, such as that seen in Figure 2. The
difference between the two figures is that the final fully connected (fc) layer of the
neural network in Figure 2 has been cut out and replaced by a quantum circuit layer,
simulated in this instance by the use of the Pennylane quantum computing simula-
tion software platform found at Ref. [7] in Python. The effect of this was that the
first neural network from Figure 1 became a feature extractor for the second, hybrid
neural network from Figure 2. The way this is done is to freeze the pre-trained layers
from the first neural network that is used for the transfer learning, before adding the
quantum circuit layers for the hybrid. The authors placed the data model in the data
scientist sharing platform Hugging Face at Ref. [8] and the code on GitHub at Ref. [9].
Similar to the approach in Ref. [4] with the transfer learning done with the materials
of solar cells, the authors picked a similar dataset to use for the transfer learning of
the model, picking a different subset of the Coswara data, that had not been used for
training the original model. Transfer learning from the original counting audio files
data subset to train the model for the deep breathing subset.
The original research resulted in data model summary measurements as seen in
Ref. [5]. This data model was simplified for the purposes of illustrating classical and
quantum transfer learning for this chapter. The classical transfer learning resulted in
the data model summary measurements as seen in Table 1.
The classical model, originally adept at processing and classifying audio files for
medical screening, provided a solid foundation due to its effective pattern recognition
in audio data. By incorporating a quantum circuit to process the extracted features,
the goal was to leverage quantum computing’s potential to handle high-dimensional
data and execute computations beyond the reach of classical systems alone.
This hybrid approach was not only a test of quantum transfer learning’s feasibility
but also an investigation into its potential to enrich classical machine learning models
with quantum efficiency. The process involved addressing the distinctive challenges

Figure 1.
Classic neural network processing images down to 50 nodes then 2 nodes for decision of COVID-19 positive or
negative in original research from Bakhitov et al. [5].

7
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

Figure 2.
Addition of quantum layer for hybrid for the research done for this chapter.

Measurements from original model

Layer(type) Output shape Param #


Conv2d-1 [−1, 16, 256, 256] 160

ReLU-2 [−1, 16, 256, 256] 0

MaxPool2d-3 [−1, 16, 128, 128] 4640

Conv2d-7 [−1, 64, 64, 64] 18,496

ReLU-8 [−1, 64, 64, 64] 0

MaxPool2d-9 [−1, 64, 32, 32] 0

Conv2d-10 [−1, 128, 32, 32] 73,856

ReLU-11 [−1, 128, 32, 32] 0

MaxPool2d-12 [−1, 128, 16, 16] 0

Linear-13 [−1, 512] 16,777,728

ReLU-14 [−1, 512] 0

Linear-15 [−1, 2] 1026


Total Params: 16,875,906.
Trainable Params: 16,875,906.
Non-trainable Params: 0.
Input size (MB): 0.25.
Forward/backward pass size (MB): 33.76.
Params size (MB): 64.38.
Estimated total size (MB): 98.38.

Table 1.
Original classical neural network without the quantum transfer learning.

of quantum computing, such as error rates and qubit coherence, with the Pennylane
simulator, while also scrutinizing the model’s scalability and performance against
purely classical or quantum solutions.
The outcome of this case study illustrated the practical application of quantum-
enhanced machine learning models, shedding light on both the obstacles and advan-
tages of integrating quantum circuits into classical neural networks. By successfully
implementing this hybrid model, the team contributed to the quantum machine
learning field, showcasing an effective strategy for employing quantum computing to
augment classical machine learning tasks. This case study not only demonstrated the
model’s high accuracy in the specific context of medical screening but also under-
scored the broader potential of quantum computing to revolutionize various sectors,
8
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

marking a significant step forward in the fusion of quantum and classical computing
technologies.
The addition of the quantum layer resulted in the data model summary measure-
ments as seen in Table 2.

2.6 Cross-domain applications

Although in our example we did not cross domains outside of the Coswara data-
set to apply our trained model to a new domain of data, there are examples of this
done in “Hybrid model of quantum transfer learning to classify face images with a
COVID-19 mask,” Soto-Paredes and Sulla-Torres [10], in which the classic transfer
learning model chosen was ResNet-18 and the quantum layers of the target model
was used with a basic entangler layers template for four qubits using the Pennylane
quantum simulator. Their main finding was 99.05% accuracy in classifying the

Measurements from quantum hybrid model

Layer (type) Output shape Param #


Conv2d-1 [−1, 16, 256, 256] 160

ReLU-2 [−1, 16, 256, 256] 0

MaxPool2d-3 [−1, 16, 128, 128] 0

Conv2d-4 [−1, 32, 128, 128] 4640

ReLU-5 [−1, 32, 128, 128] 0

MaxPool2d-6 [−1, 32, 64, 64] 0

Conv2d-7 [−1, 64, 64, 64] 18,496

ReLU-8 [−1, 64, 64, 64] 0


MaxPool2d-9 [−1, 64, 32, 32] 0

Conv2d-10 [−1, 128, 32, 32] 73,856

ReLU-11 [−1, 128, 32, 32] 0

MaxPool2d-12 [−1, 128, 16, 16] 0

Linear-13 [−1, 512] 16,777,728

ReLU-14 [−1, 512] 0

SpectrogramCNN-15 [−1, 512] 0

Linear-16 [−1, 4] 2052

Linear-17 [−1, 2] 10

DressedQuantumNet-18 [−1, 2] 0
Total Params: 16,876,942.
Trainable Params: 2062.
Non-trainable Params: 16,874,880.
Input size (mB): 0.25.
Forward/backward pass size (MB): 33.76.
Params size (MB): 64.38.
Estimated total size (MB): 98.39.

Table 2.
Measurements of quantum transfer learning: Note the great reduction in the trainable parameters with the pre-
trained model.

9
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

correct protective mask images (no mask, incorrectly worn mask, correctly worn
mask). Mari et al. “Transfer learning in hybrid classical-quantum neural networks,”
which is a foundational paper that is posted on the Pennylane site and describes the
theory of transfer learning in hybrid classical-quantum and quantum-quantum
neural networks [11]. In “Quantum deep transfer learning,” by Wang et al. [12] which
describes the theory of transfere learning in four steps of transfer learning across
domains as “(1) For a given task with the dataset, find a source domain dataset for
knowledge transfer. (2) Train a model on source domain dataset. (3) Build a criteria
for the transfer process…depending on the specific task… (4) Train the target task
model on the target domain dataset using the learning information obtained by (3).”
In “COVID-19 detection on IBM quantum computer with classical-quantum transfer
learning,” by Acar and Yilmaz [13], describes using transfer learning on MRI images
of lungs of people positive for COVID-19 as compared to healthy individuals. Leider
et al. “Quantum machine learning classifier,” uses the Iris dataset and the Pennylane
simulator [14] and Leider et al. “Hybrid Quantum Machine Learning Classifier with
Classical Neural Network Transfer Learning.” that uses the wine dataset and the
Pennylane simulator [15].

2.7 Current quantum computers limitations on efficiency and scalability

The reason for using the quantum simulator of Pennylane is to overcome the
current constraints to the capabilities of quantum computing, which is known as the
Noisy Intermediate-Scale Quantum (NISQ ) era. This is because today’s quantum
computers are still quite primitive, error prone and therefore most research work
done on them is academic at this time, because of said noise creating inconsistent
results. Quantum computers are considered probabilistic, meaning that quantum
programs have to be run repeatedly in “shots” of 1000 times or more in order to get
the most probable result.

3. Conclusions

Figure 3 shows that when using quantum machine transfer learning, in the earlier
epochs the learning rate is much faster and more accurate. This is the major reason
that transfer learning is attractive; it saves computing time. Figure 4 shows that
the loss rate is also reduced in the earlier epochs using transfer learning. Quantum
machine transfer learning currently uses “dressed” quantum circuits that have clas-
sical layers of the hybrid neural network before and after the quantum circuit layer,
and there is significant slowdown in translating the information from classical to

Figure 3.
Accuracy of the fully connected ( fc) layer to the quantum layer is better in the earlier epochs in the pre-trained
model.

10
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

Figure 4.
Loss of the fully connected layer to the quantum layer is better in the earlier epochs in the transfer learning
example.

quantum and back to classical information. Because of this slowdown, it is possible


that a hybrid quantum transfer learning network will produce less satisfying results
than a purely classical network, however, quantum computing is advancing rapidly
and these challenges may soon be solved.

Acknowledgements

The authors would like to acknowledge Dmitrii Bakhitov, Adjunct Professor of


Data Science at Pace University who contributed the hybrid approach illustrative data
model using Pennylane. This was an extension of his data model used for Ref. [5] and
includes the hugging face data models in Ref. [8, 9] and code in GitHub at Ref. [16].
The authors would also like to acknowledge Pace University Seidenberg School of
Computer Science and Information Systems for the funding to conduct and publish
this research.

Conflict of interest

The authors declare no conflict of interest.

11
Transfer Learning – Leveraging the Capability of Pre-trained Models Across Different Domains

Author details

Pauline Mosley*† and Avery Leider†


Pace University, Pleasantville, New York, USA

*Address all correspondence to: al43110n@pace.edu

†These authors contributed equally.

© 2024 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of
the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0),
which permits unrestricted use, distribution, and reproduction in any medium, provided
the original work is properly cited.
12
Quantum Machine Learning Classifier and Neural Network Transfer Learning
DOI: http://dx.doi.org/10.5772/intechopen.115051

References

[1] Brooks TN, Kamruzzaman A, [9] Bakhitov D. HuggingFace Dataset


Leider A, Tappert CC. A computer science for Breathing Deep Normal Used for
perspective on models of the mind. In: the Transfer Learning Model. Available
Intelligent Systems and Applications: from: https://huggingface.co/datasets/
Proceedings of the 2018 Intelligent bakhitovd/covid_breathing_deep
Systems Conference (IntelSys), London,
UK. Vol. 2. Springer International [10] Soto-Paredes C, Sulla-Torres J.
Publishing; 2019. pp. 759-772 Hybrid model of quantum transfer
learning to classify face images with a
[2] Kamruzzaman A, Alhwaiti Y, Leider A, COVID-19 mask. International Journal
Tappert CC. Quantum deep learning neural of Advanced Computer Science and
networks. In: Advances in Information and Applications. 2021;12(10):826-836
Communication: Proceedings of the 2019
Future of Information and Communication [11] Mari A, Bromley TR, Izaac J,
Conference (FICC), San Francisco, CA. Schuld M, Killoran N. Transfer learning
Vol. 2. Springer International Publishing; in hybrid classical-quantum neural
2020. pp. 299-311 networks. Quantum. 2020;9(4):340
[3] Zeguendry A, Jarir Z, Quafafou M.
[12] Wang L, Sun Y, Zhang X. Quantum
Quantum machine learning: A review
deep transfer learning. New Journal of
and case studies. Entropy. 2023;25(2):287
Physics. 2021;23(10):103010
[4] Kaya M, Hajimirza S. Using a novel
transfer learning method for designing [13] Acar E, Yilmaz I. COVID-19 detection
thin film solar cells with enhanced on IBM quantum computer with classical-
quantum efficiencies. Scientific Reports. quantum transfer learning. Turkish
2019;9(1):5034 Journal of Electrical Engineering and
Computer Sciences. 2021;29(1):46-61
[5] Bakhitov D, Khemraj R, Skorko J,
Leider A, Mosley P. Screening for [14] Leider A, Jaoude GA, Strobel AE,
COVID-19 via acoustics using artificial Mosley P. Quantum machine learning
intelligence. In: Future of Information classifier. In: Future of Information and
and Communication Conference. Cham, Communication Conference. Cham:
Switzerland: Springer Nature; 2023. Springer International Publishing; 2022.
pp. 630-645 pp. 459-476

[6] GitHub Dataset Repository and [15] Leider A, Jaoude GG, Mosley P.
Description of the Coswara Project. Hybrid quantum machine learning
Available from: https://github.com/ classifier with classical neural
iiscleap/Coswara-Data network transfer learning. In: Future
[7] Pennylane. Available from: https://
of Information and Communication
pennylane.ai/ Conference. Cham, Switzerland:
Springer Nature; 2023. pp. 102-116
[8] Bakhitov D. Hugging Face Repository
for the Counting Normal Dataset Used [16] Bakhitov D, GitHub Code
for the Original Model. Available from: Repository for the Data Model Used
https://huggingface.co/bakhitovd/ for this Chapter. Available from: https://
covid_conv_10 github.com/Bakhitovd/covid_screening
13

You might also like