IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i24p3990-d1547080.html
   My bibliography  Save this article

Sentence Embedding Generation Framework Based on Kullback–Leibler Divergence Optimization and RoBERTa Knowledge Distillation

Author

Listed:
  • Jin Han

    (School of Computer and Software, Nanjing University of Information Science & Technology, Nanjing 210044, China)

  • Liang Yang

    (School of Computer Science, Nanjing University of Information Science & Technology, Nanjing 210044, China)

Abstract

In natural language processing (NLP) tasks, computing semantic textual similarity (STS) is crucial for capturing nuanced semantic differences in text. Traditional word vector methods, such as Word2Vec and GloVe, as well as deep learning models like BERT, face limitations in handling context dependency and polysemy and present challenges in computational resources and real-time processing. To address these issues, this paper introduces two novel methods. First, a sentence embedding generation method based on Kullback–Leibler Divergence (KLD) optimization is proposed, which enhances semantic differentiation between sentence vectors, thereby improving the accuracy of textual similarity computation. Second, this study proposes a framework incorporating RoBERTa knowledge distillation, which integrates the deep semantic insights of the RoBERTa model with prior methodologies to enhance sentence embeddings while preserving computational efficiency. Additionally, the study extends its contributions to sentiment analysis tasks by leveraging the enhanced embeddings for classification. The sentiment analysis experiments, conducted using a Stochastic Gradient Descent (SGD) classifier on the ACL IMDB dataset, demonstrate the effectiveness of the proposed methods, achieving high precision, recall, and F1 score metrics. To further augment model accuracy and efficacy, a feature selection approach is introduced, specifically through the Dynamic Principal Component Selection (DPCS) algorithm. The DPCS method autonomously identifies and prioritizes critical features, thus enriching the expressive capacity of sentence vectors and significantly advancing the accuracy of similarity computations. Experimental results demonstrate that our method outperforms existing methods in semantic similarity computation on the SemEval-2016 dataset. When evaluated using cosine similarity of average vectors, our model achieved a Pearson correlation coefficient (τ) of 0.470, a Spearman correlation coefficient (ρ) of 0.481, and a mean absolute error (MAE) of 2.100. Compared to traditional methods such as Word2Vec, GloVe, and FastText, our method significantly enhances similarity computation accuracy. Using TF-IDF-weighted cosine similarity evaluation, our model achieved a τ of 0.528, ρ of 0.518, and an MAE of 1.343. Additionally, in the cosine similarity assessment leveraging the Dynamic Principal Component Smoothing (DPCS) algorithm, our model achieved a τ of 0.530, ρ of 0.518, and an MAE of 1.320, further demonstrating the method’s effectiveness and precision in handling semantic similarity. These results indicate that our proposed method has high relevance and low error in semantic textual similarity tasks, thereby better capturing subtle semantic differences between texts.

Suggested Citation

  • Jin Han & Liang Yang, 2024. "Sentence Embedding Generation Framework Based on Kullback–Leibler Divergence Optimization and RoBERTa Knowledge Distillation," Mathematics, MDPI, vol. 12(24), pages 1-21, December.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:24:p:3990-:d:1547080
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/24/3990/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/24/3990/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Sourav Chatterjee, 2021. "A New Coefficient of Correlation," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 116(536), pages 2009-2022, October.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Borgonovo, Emanuele & Plischke, Elmar & Rabitti, Giovanni, 2024. "The many Shapley values for explainable artificial intelligence: A sensitivity analysis perspective," European Journal of Operational Research, Elsevier, vol. 318(3), pages 911-926.
    2. Yihui He & Fang Han, 2023. "On propensity score matching with a diverging number of matches," Papers 2310.14142, arXiv.org, revised Nov 2023.
    3. Fang Han, 2024. "An Introduction to Permutation Processes (version 0.5)," Papers 2407.09664, arXiv.org.
    4. Tan Shaojie & Arshad Abd Samad & Lilliati Ismail, 2024. "The Influence of Meta-Cognitive Listening Strategies on Listening Performance in the MALL: The Mediation Effect of Learning Style and Self-Efficacy," SAGE Open, , vol. 14(2), pages 21582440241, May.
    5. Almanza Junco, Carlos Alberto & Parra Acosta, Yenny Katherine & Sabogal Salamanca, Mauricio, 2024. "Model of innovation in agriculture 4.0 processes in the department of Cundinamarca, Colombia," Revista Tendencias, Universidad de Narino, vol. 25(2), pages 86-112, July.
    6. Zhexiao Lin & Fang Han, 2023. "On the failure of the bootstrap for Chatterjee's rank correlation," Papers 2303.14088, arXiv.org, revised Apr 2023.
    7. Abdol Rassoul Zarei & Marzieh Mokarram & Mohammad Reza Mahmoudi, 2023. "Comparison of the capability of the Meteorological and Remote Sensing Drought Indices," Water Resources Management: An International Journal, Published for the European Water Resources Association (EWRA), Springer;European Water Resources Association (EWRA), vol. 37(2), pages 769-796, January.
    8. Ziming Lin & Fang Han, 2024. "On the consistency of bootstrap for matching estimators," Papers 2410.23525, arXiv.org, revised Nov 2024.
    9. Borgonovo, Emanuele & Clemente, Gian Paolo & Rabitti, Giovanni, 2024. "Why insurance regulators need to require sensitivity settings of internal models for their approval," Finance Research Letters, Elsevier, vol. 60(C).
    10. Borgonovo, Emanuele & Ghidini, Valentina & Hahn, Roman & Plischke, Elmar, 2023. "Explaining classifiers with measures of statistical association," Computational Statistics & Data Analysis, Elsevier, vol. 182(C).
    11. Liqi Xia & Ruiyuan Cao & Jiang Du & Jun Dai, 2025. "Consistent complete independence test in high dimensions based on Chatterjee correlation coefficient," Statistical Papers, Springer, vol. 66(1), pages 1-32, February.
    12. Zhang, Qingyang, 2023. "On the asymptotic null distribution of the symmetrized Chatterjee’s correlation coefficient," Statistics & Probability Letters, Elsevier, vol. 194(C).
    13. Tobias Fissler & Marc-Oliver Pohle, 2023. "Generalised Covariances and Correlations," Papers 2307.03594, arXiv.org, revised Sep 2023.
    14. Juan C. King & Roberto Dale & Jos'e M. Amig'o, 2024. "Blockchain Metrics and Indicators in Cryptocurrency Trading," Papers 2403.00770, arXiv.org.
    15. Karch, Julian D. & Perez-Alonso, Andres F. & Bergsma, Wicher P., 2024. "Beyond Pearson’s correlation: modern nonparametric independence tests for psychological research," LSE Research Online Documents on Economics 124587, London School of Economics and Political Science, LSE Library.
    16. King, Juan C. & Dale, Roberto & Amigó, José M., 2024. "Blockchain metrics and indicators in cryptocurrency trading," Chaos, Solitons & Fractals, Elsevier, vol. 178(C).
    17. Zhaoyang Li & Yuehan Yang, 2024. "A semi-orthogonal nonnegative matrix tri-factorization algorithm for overlapping community detection," Statistical Papers, Springer, vol. 65(6), pages 3601-3619, August.
    18. H Shi & M Drton & F Han, 2022. "On the power of Chatterjee’s rank correlation [Adaptive test of independence based on HSIC measures]," Biometrika, Biometrika Trust, vol. 109(2), pages 317-333.
    19. Junlong Feng & Sokbae Lee, 2023. "Individual Welfare Analysis: Random Quasilinear Utility, Independence, and Confidence Bounds," Papers 2304.01921, arXiv.org, revised Nov 2024.
    20. Qingyang Zhang, 2024. "Asymptotic expected sensitivity function and its applications to measures of monotone association," Annals of the Institute of Statistical Mathematics, Springer;The Institute of Statistical Mathematics, vol. 76(5), pages 877-896, October.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:24:p:3990-:d:1547080. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.