Skip to main content

Ensemble Learning Based Quantum Text Classifiers

  • Conference paper
  • First Online:
New Trends in Database and Information Systems (ADBIS 2023)

Abstract

Quantum Natural Language Processing (QNLP) is a very young area of research, aimed at the design and implementation of NLP models that exploit certain quantum phenomena such as superposition, entanglement, and interference to perform language-related tasks on quantum hardware. To explore the structural relationships between quantum theory and natural languages Lambeq toolkit was created. This first high-level open-source Python toolkit for quantum natural language processing offers a fully automated quantum machine learning pipeline. Lambeq currently includes five compositional models that use varying degrees of syntactic information. While the previous studies focus on Discocat model, the aim of this study is to conducte an extensive evaluation of various classifiers based on different compositional models for text classification applications, focusing on the potential advantages of ensemble learning. The classifiers, including Spider, Cups, Stairs, Tree, and DisCoCat, were examined on two datasets: MC and RP. Performance evaluation was carried out using accuracy, precision, recall, and F1-score as the metrics. The results revealed notable variations in the performance of the classifiers across the datasets. Spider emerged as the top-performing classifier on the MC dataset, achieving remarkable scores of 100% in accuracy, precision, recall, and F1-score. However, on the RP dataset, Stairs outperformed the other classifiers with an accuracy of 68%, precision of 71%, recall of 68%, and F1-score of 69%. Furthermore, ensemble models using hard voting and soft voting techniques were constructed and evaluated. The ensemble models showcased improved performance compared to individual classifiers, with the soft voting ensemble achieving a score of 97% for all metrics on the MC dataset, and a precision of 72% and F1-score of 68% on the RP dataset. These findings highlight the potential benefits of ensemble learning in enhancing the overall performance of text classification tasks on both the MC and RP datasets using soft voting method, allowing for more accurate and reliable predictions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Bouakba, Y., Belhadef, H.: Quantum natural language processing: a new and promising way to solve NLP problems. In: Salem, M., Merelo, J.J., Siarry, P., Bachir Bouiadjra, R., Debakla, M., Debbat, F. (eds.) ICAITA 2022. CCIS, vol. 1769, pp. 215–227. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-28540-0_17

    Chapter  Google Scholar 

  2. Coecke, B., de Felice, G., Meichanetzidis, K., Toumi, A.: Foundations for near-term quantum natural language processing. arXiv preprint arXiv:2012.03755 (2020)

  3. Coecke, B., Sadrzadeh, M., Clark, S.: Mathematical foundations for a compositional distributional model of meaning. arXiv preprint arXiv:1003.4394 (2010)

  4. Kartsaklis, D., et al.: lambeq: an efficient high-level python library for quantum NLP. arXiv preprint arXiv:2110.04236 (2021)

  5. Lorenz, R., Pearson, A., Meichanetzidis, K., Kartsaklis, D., Coecke, B.: QNLP in practice: running compositional models of meaning on a quantum computer. J. Artif. Intell. Res. 76, 1305–1342 (2023)

    Article  MathSciNet  MATH  Google Scholar 

  6. Meichanetzidis, K., Gogioso, S., De Felice, G., Chiappori, N., Toumi, A., Coecke, B.: Quantum natural language processing on near-term quantum computers. arXiv preprint arXiv:2005.04147 (2020)

  7. Meichanetzidis, K., Toumi, A., de Felice, G., Coecke, B.: Grammar-aware question-answering on quantum computers. arXiv preprint arXiv:2012.03756 (2020)

  8. Nieto, V.: I. Towards machine translation with quantum computers. Ph.D. thesis, Master’s Thesis, University of Stockholm, Stockholm, Sweden (2021)

    Google Scholar 

  9. Rimell, L., Maillard, J., Polajnar, T., Clark, S.: RELPRON: a relative clause evaluation data set for compositional distributional semantics. Comput. Linguist. 42(4), 661–701 (2016)

    Article  MathSciNet  Google Scholar 

  10. Sodré, A., Magalhães, D., Floriano, L., Pozo, A., Hara, C., Machado, S.: COVID-19 portal: machine learning techniques applied to the analysis of judicial processes related to the pandemic. In: Bellatreche, L., et al. (eds.) ADBIS 2021. CCIS, vol. 1450, pp. 109–120. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-85082-1_10

    Chapter  Google Scholar 

  11. Zeng, W., Coecke, B.: Quantum algorithms for compositional natural language processing. arXiv preprint arXiv:1608.01406 (2016)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yousra Bouakba .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bouakba, Y., Belhadef, H. (2023). Ensemble Learning Based Quantum Text Classifiers. In: Abelló, A., et al. New Trends in Database and Information Systems. ADBIS 2023. Communications in Computer and Information Science, vol 1850. Springer, Cham. https://doi.org/10.1007/978-3-031-42941-5_35

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-42941-5_35

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-42940-8

  • Online ISBN: 978-3-031-42941-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics