<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">mais</journal-id><journal-title-group><journal-title xml:lang="ru">Моделирование и анализ информационных систем</journal-title><trans-title-group xml:lang="en"><trans-title>Modeling and Analysis of Information Systems</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">1818-1015</issn><issn pub-type="epub">2313-5417</issn><publisher><publisher-name>Yaroslavl State University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.18255/1818-1015-2021-3-292-311</article-id><article-id custom-type="elpub" pub-id-type="custom">mais-1529</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Theory of Data</subject></subj-group></article-categories><title-group><article-title>Векторизация текстов на основе word-embedding моделей с использованием кластеризации</article-title><trans-title-group xml:lang="en"><trans-title>Word-embedding Based Text Vectorization Using Clustering</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0003-3245-6240</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Юферев</surname><given-names>Виталий Иванович</given-names></name><name name-style="western" xml:lang="en"><surname>Yuferev</surname><given-names>Vitaly I.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Главный эксперт, магистр техники и технологий.</p><p>Ул. Неглинная, д. 12, Москва, 107016</p></bio><bio xml:lang="en"><p>Chief expert, Master of science.</p><p>12 Neglinnaya str., Moscow 107016</p></bio><email xlink:type="simple">YuferevVI@mail.cbr.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-7669-776X</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Разин</surname><given-names>Николай Алексеевич</given-names></name><name name-style="western" xml:lang="en"><surname>Razin</surname><given-names>Nikolai A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Начальник отдела, кандидат физико-математических наук.</p><p>Ул. Неглинная, д. 12, Москва, 107016</p></bio><bio xml:lang="en"><p>Head of division, PhD.</p><p>12 Neglinnaya str., Moscow 107016</p></bio><email xlink:type="simple">razinna@cbr.ru</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Департамент информационных технологий Центрального банка Российской Федерации, Инновационная лаборатория Новосибирск</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Department of Information Technologies of the Central Bank of the Russian Federation, Laboratory of innovations Novosibirsk</institution><country>Russian Federation</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Департамент противодействия недобросовестным практикам, Центральный банк Российской Федерации</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Department of Counteraction to Unfair Practices, the Central Bank of the Russian Federation</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2021</year></pub-date><pub-date pub-type="epub"><day>12</day><month>10</month><year>2021</year></pub-date><volume>28</volume><issue>3</issue><fpage>292</fpage><lpage>311</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Юферев В.И., Разин Н.А., 2021</copyright-statement><copyright-year>2021</copyright-year><copyright-holder xml:lang="ru">Юферев В.И., Разин Н.А.</copyright-holder><copyright-holder xml:lang="en">Yuferev V.I., Razin N.A.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://www.mais-journal.ru/jour/article/view/1529">https://www.mais-journal.ru/jour/article/view/1529</self-uri><abstract><p>Известно, что в задачах обработки естественного языка представление текстов векторами фиксированной длины с использованием word-embedding моделей оправдано в тех случаях, когда векторизуемые тексты являются короткими. Чем сравниваемые тексты длиннее, тем подход работает хуже. Такая ситуация обусловлена тем, что при использовании word-embedding моделей происходит потеря информации при преобразовании векторных представлений слов, составляющих текст, в векторное представление всего текста, имеющее обычно ту же размерность, что и вектор отдельного слова.</p><p>В настоящей работе предлагается альтернативный способ использования предобученных word-embedding моделей для векторизации текстов. Суть предлагаемого способа заключается в объединении семантически близких элементов словаря имеющегося корпуса текстов путем кластеризации их (элементов словаря) эмбеддингов, в результате чего формируется новый словарь размером меньше исходного, каждый элемент которого соответствует одному кластеру. Исходный корпус текстов переформулируется в терминах этого нового словаря, после чего на переформулированных текстах выполняется векторизация одним из словарных подходов (в работе применялся TF-IDF). Полученное векторное представление текста дополнительно может обогащаться с использованием векторов слов исходного словаря, полученных путем уменьшения размерности их эмбеддингов по каждому кластеру.</p><p>В работе описана серия экспериментов по определению оптимальных параметров предлагаемого подхода; для задачи ранжирования текстов приведено сравнение подхода с другими способами векторизации – усреднением эмбеддингов слов со взвешиванием по TF-IDF и без взвешивания, а также с векторизацией на основе TF-IDF коэффициентов.</p></abstract><trans-abstract xml:lang="en"><p>It is known that in the tasks of natural language processing, the representation of texts by vectors of fixed length using word-embedding models makes sense in cases where the vectorized texts are short.</p><p>The longer the texts being compared, the worse the approach works. This situation is due to the fact that when using word-embedding models, information is lost when converting the vector representations of the words that make up the text into a vector representation of the entire text, which usually has the same dimension as the vector of a single word.</p><p>This paper proposes an alternative way for using pre-trained word-embedding models for text vectorization. The essence of the proposed method consists in combining semantically similar elements of the dictionary of the existing text corpus by clustering their (dictionary elements) embeddings, as a result of which a new dictionary is formed with a size smaller than the original one, each element of which corresponds to one cluster. The original corpus of texts is reformulated in terms of this new dictionary, after which vectorization is performed on the reformulated texts using one of the dictionary approaches (TF-IDF was used in the work). The resulting vector representation of the text can be additionally enriched using the vectors of words of the original dictionary obtained by decreasing the dimension of their embeddings for each cluster.</p><p>A series of experiments to determine the optimal parameters of the method is described in the paper, the proposed approach is compared with other methods of text vectorization for the text ranking problem – averaging word embeddings with TF-IDF weighting and without weighting, as well as vectorization based on TF-IDF coefficients.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>эмбеддинговые модели</kwd><kwd>Fasttext</kwd><kwd>TF-IDF</kwd><kwd>усреднение</kwd><kwd>кластеризация</kwd><kwd>семантическое сходство текстов</kwd><kwd>определение расстояний</kwd><kwd>ранжирование текстов</kwd></kwd-group><kwd-group xml:lang="en"><kwd>word embedding</kwd><kwd>Fasttext</kwd><kwd>TF-IDF</kwd><kwd>averaging</kwd><kwd>clustering</kwd><kwd>text similarity</kwd><kwd>distance</kwd><kwd>text ranking</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">P. Sitikhu, K. Pahi, P. Thapa, and S. Shakya, “A Comparison of Semantic Similarity Methods for Maximum Human Interpretability”, vol. 1, 2019, pp. 1–4. doi: 10.1109/AITB48515.2019.8947433.</mixed-citation><mixed-citation xml:lang="en">P. Sitikhu, K. Pahi, P. Thapa, and S. Shakya, “A Comparison of Semantic Similarity Methods for Maximum Human Interpretability”, vol. 1, 2019, pp. 1–4. doi: 10.1109/AITB48515.2019.8947433.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">C. D. Manning, P. Raghavan, and H. Schu¨tze, Introduction to Information Retrieval. USA: Cambridge University Press, 2008, isbn: 0521865719.</mixed-citation><mixed-citation xml:lang="en">C. D. Manning, P. Raghavan, and H. Schu¨tze, Introduction to Information Retrieval. USA: Cambridge University Press, 2008, isbn: 0521865719.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">C. De Boom, S. Van Canneyt, T. Demeester, and B. Dhoedt, “Representation Learning for Very Short Texts Using Weighted Word Embedding Aggregation”, Pattern Recogn. Lett., vol. 80, no. C, pp. 150–156, Sep. 2016, issn: 0167-8655. doi: 10.1016/j.patrec.2016.06.012.</mixed-citation><mixed-citation xml:lang="en">C. De Boom, S. Van Canneyt, T. Demeester, and B. Dhoedt, “Representation Learning for Very Short Texts Using Weighted Word Embedding Aggregation”, Pattern Recogn. Lett., vol. 80, no. C, pp. 150–156, Sep. 2016, issn: 0167-8655. doi: 10.1016/j.patrec.2016.06.012.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">G. Kim and K. Cho, “Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with Search”, ArXiv, vol. abs/2010.07003, 2020.</mixed-citation><mixed-citation xml:lang="en">G. Kim and K. Cho, “Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with Search”, ArXiv, vol. abs/2010.07003, 2020.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">O. Zafrir, G. Boudoukh, P. Izsak, and M. Wasserblat, “Q8BERT: Quantized 8Bit BERT”, ArXiv, vol. abs/1910.06188, 2019.</mixed-citation><mixed-citation xml:lang="en">O. Zafrir, G. Boudoukh, P. Izsak, and M. Wasserblat, “Q8BERT: Quantized 8Bit BERT”, ArXiv, vol. abs/1910.06188, 2019.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">H. Gong, Y. Shen, D. Yu, J. Chen, and D. Yu, “Recurrent Chunking Mechanisms for Long-Text Machine Reading Comprehension”, in Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, Jul. 2020, pp. 6751–6761. doi: 10.18653/v1/2020.acl-main.603. [Online]. Available: https://www.aclweb.org/anthology/2020.acl-main.603.</mixed-citation><mixed-citation xml:lang="en">H. Gong, Y. Shen, D. Yu, J. Chen, and D. Yu, “Recurrent Chunking Mechanisms for Long-Text Machine Reading Comprehension”, in Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, Jul. 2020, pp. 6751–6761. doi: 10.18653/v1/2020.acl-main.603. [Online]. Available: https://www.aclweb.org/anthology/2020.acl-main.603.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Y. Qi, D. Sachan, M. Felix, S. Padmanabhan, and G. Neubig, “When and Why Are Pre-Trained Word Embeddings Useful for Neural Machine Translation?”, in Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), New Orleans, Louisiana: Association for Computational Linguistics, Jun. 2018, pp. 529–535. doi: 10.18653/v1/N18-2084. [Online]. Available: https://www.aclweb.org/anthology/N18-2084.</mixed-citation><mixed-citation xml:lang="en">Y. Qi, D. Sachan, M. Felix, S. Padmanabhan, and G. Neubig, “When and Why Are Pre-Trained Word Embeddings Useful for Neural Machine Translation?”, in Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), New Orleans, Louisiana: Association for Computational Linguistics, Jun. 2018, pp. 529–535. doi: 10.18653/v1/N18-2084. [Online]. Available: https://www.aclweb.org/anthology/N18-2084.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">D. Shen, G. Wang, W. Wang, M. R. Min, Q. Su, Y. Zhang, C. Li, R. Henao, and L. Carin, “Baseline Needs More Love: On Simple Word-Embedding-Based Models and Associated Pooling Mechanisms”, in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia: Association for Computational Linguistics, Jul. 2018, pp. 440–450. doi: 10.18653/v1/P18-1041. [Online]. Available: https://www.aclweb.org/anthology/P18-1041.</mixed-citation><mixed-citation xml:lang="en">D. Shen, G. Wang, W. Wang, M. R. Min, Q. Su, Y. Zhang, C. Li, R. Henao, and L. Carin, “Baseline Needs More Love: On Simple Word-Embedding-Based Models and Associated Pooling Mechanisms”, in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia: Association for Computational Linguistics, Jul. 2018, pp. 440–450. doi: 10.18653/v1/P18-1041. [Online]. Available: https://www.aclweb.org/anthology/P18-1041.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">A. Ru¨ckle´, S. Eger, M. Peyrard, and I. Gurevych, “Concatenated p-mean Word Embeddings as Universal Cross-Lingual Sentence Representations”, ArXiv, vol. abs/1803.01400, 2018.</mixed-citation><mixed-citation xml:lang="en">A. Ru¨ckle´, S. Eger, M. Peyrard, and I. Gurevych, “Concatenated p-mean Word Embeddings as Universal Cross-Lingual Sentence Representations”, ArXiv, vol. abs/1803.01400, 2018.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">P. Turney and P. Pantel, “From Frequency to Meaning: Vector Space Models of Semantics”, Journal of Artificial Intelligence Research, vol. 37, pp. 141–188, Mar. 2010. doi: 10.1613/jair.2934.</mixed-citation><mixed-citation xml:lang="en">P. Turney and P. Pantel, “From Frequency to Meaning: Vector Space Models of Semantics”, Journal of Artificial Intelligence Research, vol. 37, pp. 141–188, Mar. 2010. doi: 10.1613/jair.2934.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">A. L. O. Shahmirzadi and K. Younge, “Text Similarity in Vector Space Models: A Comparative Study”, in 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), 2019, pp. 659–666. doi: 10.1109/ICMLA.2019.00120.</mixed-citation><mixed-citation xml:lang="en">A. L. O. Shahmirzadi and K. Younge, “Text Similarity in Vector Space Models: A Comparative Study”, in 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), 2019, pp. 659–666. doi: 10.1109/ICMLA.2019.00120.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">V. Gupta, A. Kumar, P. Nokhiz, H. Gupta, and P. Talukdar, “Improving Document Classification with Multi-Sense Embeddings”, in 24th European Conference on Artificial Intelligence - ECAI 2020, Nov. 2020, pp. 2030–2037. doi: 10.3233/FAIA200324.</mixed-citation><mixed-citation xml:lang="en">V. Gupta, A. Kumar, P. Nokhiz, H. Gupta, and P. Talukdar, “Improving Document Classification with Multi-Sense Embeddings”, in 24th European Conference on Artificial Intelligence - ECAI 2020, Nov. 2020, pp. 2030–2037. doi: 10.3233/FAIA200324.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">V. Mekala Dheeraj and Gupta, B. Paranjape, and H. Karnick, “SCDV : Sparse Composite Document Vectors using soft clustering over distributional representations”, in Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark: Association for Computational Linguistics, Sep. 2017, pp. 659–669. doi: 10.18653/v1/D17-1069. [Online]. Available: https://www.aclweb.org/anthology/D17-1069.</mixed-citation><mixed-citation xml:lang="en">V. Mekala Dheeraj and Gupta, B. Paranjape, and H. Karnick, “SCDV : Sparse Composite Document Vectors using soft clustering over distributional representations”, in Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark: Association for Computational Linguistics, Sep. 2017, pp. 659–669. doi: 10.18653/v1/D17-1069. [Online]. Available: https://www.aclweb.org/anthology/D17-1069.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">V. Gupta, H. Karnick, A. Bansal, and P. Jhala, “Product Classification in E-Commerce using Distributional Semantics”, in Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan: The COLING 2016 Organizing Committee, Dec. 2016, pp. 536–546. [Online]. Available: https://www.aclweb.org/anthology/C16-1052.</mixed-citation><mixed-citation xml:lang="en">V. Gupta, H. Karnick, A. Bansal, and P. Jhala, “Product Classification in E-Commerce using Distributional Semantics”, in Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan: The COLING 2016 Organizing Committee, Dec. 2016, pp. 536–546. [Online]. Available: https://www.aclweb.org/anthology/C16-1052.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
