<?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">ntv</journal-id><journal-title-group><journal-title xml:lang="ru">Научно-технический вестник информационных технологий, механики и оптики</journal-title><trans-title-group xml:lang="en"><trans-title>Scientific and Technical Journal of Information Technologies, Mechanics and Optics</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2226-1494</issn><issn pub-type="epub">2500-0373</issn><publisher><publisher-name>Университет ИТМО</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.17586/2226-1494-2024-24-1-112-117</article-id><article-id custom-type="elpub" pub-id-type="custom">ntv-105</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>КОМПЬЮТЕРНЫЕ СИСТЕМЫ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>COMPUTER SCIENCE</subject></subj-group></article-categories><title-group><article-title>Метод хранения векторных представлений в сжатом виде  с применением кластеризации</article-title><trans-title-group xml:lang="en"><trans-title>A method of storing vector data in compressed form 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-0001-9325-0356</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>Tomilov</surname><given-names>N. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Томилов Никита Андреевич — аспирант</p><p>Санкт-Петербург, 197101</p><p>sc 57225127284</p></bio><bio xml:lang="en"><p>Nikita A. Tomilov — PhD Student</p><p>Saint Petersburg, 197101</p><p>sc 57225127284</p></bio><email xlink:type="simple">programmer174@icloud.com</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0009-1470-7633</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>Turov</surname><given-names>V. P.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Туров Владимир Павлович — аспирант</p><p>Санкт-Петербург, 197101</p></bio><bio xml:lang="en"><p>Vladimir P. Turov — PhD Student</p><p>Saint Petersburg, 197101</p></bio><email xlink:type="simple">firemoon@icloud.com</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0004-6367-6398</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>Babayants</surname><given-names>A. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Бабаянц Александр Амаякович — аспирант</p><p>Санкт-Петербург, 197101</p></bio><bio xml:lang="en"><p>Alexander A. Babayants — PhD Student</p><p>Saint Petersburg, 197101</p></bio><email xlink:type="simple">babayants.alexander@gmail.com</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-8485-1296</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>Platonov</surname><given-names>A. V.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Платонов Алексей Владимирович — кандидат технических наук, доцент</p><p>Санкт-Петербург, 197101 </p></bio><bio xml:lang="en"><p>Alexey V. Platonov — PhD, Associate Professor</p><p> Saint Petersburg, 197101</p></bio><email xlink:type="simple">avplatonov@itmo.ru</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Университет ИТМО</institution><country>Россия</country></aff><aff xml:lang="en"><institution>ITMO University</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2024</year></pub-date><pub-date pub-type="epub"><day>12</day><month>12</month><year>2024</year></pub-date><volume>24</volume><issue>1</issue><fpage>112</fpage><lpage>117</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Томилов Н.А., Туров В.П., Бабаянц А.А., Платонов А.В., 2024</copyright-statement><copyright-year>2024</copyright-year><copyright-holder xml:lang="ru">Томилов Н.А., Туров В.П., Бабаянц А.А., Платонов А.В.</copyright-holder><copyright-holder xml:lang="en">Tomilov N.A., Turov V.P., Babayants A.A., Platonov A.V.</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://ntv.elpub.ru/jour/article/view/105">https://ntv.elpub.ru/jour/article/view/105</self-uri><abstract><p>Введение. Алгоритмы машинного обучения для информационного поиска позволяют представить текстовые и мультимодальные документы в виде векторов. Такие векторные представления (embeddings) сохраняют семантическое содержание документов и сводят задачу поиска к задаче определения расстояния между векторами. Сжатие векторных представлений позволяет уменьшить объем памяти, занимаемый ими, и повысить эффективность вычислений. В работе рассмотрены существующие способы сжатия векторных представлений без потери и с потерей точности. Предложен метод уменьшения ошибки путем кластеризации векторных представлений при использовании сжатия с потерей точности. Метод. Сущность метода состоит в предварительной кластеризации векторных представлений, сохранении центров каждого кластера и значений координат каждого векторного представления относительно центра его кластера. Центры каждого кластера сжимаются без потери точности, а получившиеся смещенные векторные представления с потерей точности. Основные результаты. Предложенный метод протестирован на наборах данных fashion-mnist-784-euclidean и NYT-256-angular. Проведено сравнение векторных представлений, сжатых с потерей точности при помощи уменьшения разрядности, с векторными представлениями, сжатыми по предложенному методу. При незначительном, около 10 %, увеличении размера сжатых данных средняя абсолютная величина ошибки от потери точности для наборов fashion-mnist-784-euclidean и NYT-256-angular снизилась в четыре и примерно в два раза соответственно. Обсуждение. Разработанный метод может быть применен для решения задач хранения и обработки векторных представлений мультимодальных документов, например, при разработке поисковых систем.</p></abstract><trans-abstract xml:lang="en"><p>The development of the machine learning algorithms for information search in recent years made it possible to represent text and multimodal documents in the form of vectors. These vector representations (embeddings) preserve the semantic content of documents and allow the search to be performed as the calculation of distance between vectors. Compressing embeddings can reduce the amount of memory they occupy and improve computational efficiency. The article discusses existing methods for compressing vector representations without loss of accuracy and with loss of accuracy. A method is proposed to reduce error by clustering vector representations using lossy compression. The essence of the method is in performing the preliminary clustering of vector representations, saving the centers of each cluster, and saving the coordinate value of each vector representation relative to the center of its cluster. Then, the centers of each cluster are compressed without loss of accuracy, and the resulting shifted vector representations are compressed with loss of accuracy. To restore the original vector representations, the coordinates of the center of the corresponding cluster are added to the coordinates of the displaced representation. The proposed method was tested on the fashion-mnist-784-euclidean and NYT-256-angular datasets. A comparison has been made of compressed vector representations with loss of accuracy by reducing the bit depth with vector representations compressed using the proposed method. With a slight (around 10 %) increase in the size of the compressed data, the absolute value of the error from loss of accuracy decreased by four and two times, respectively, for the tested sets. The developed method can be applied in tasks where it is necessary to store and process vector representations of multimodal documents, for example, in the development of search engines.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>векторные представления</kwd><kwd>эмбеддинг</kwd><kwd>кластеризация</kwd><kwd>k-means</kwd><kwd>сжатие векторных представлений</kwd></kwd-group><kwd-group xml:lang="en"><kwd>vector representations</kwd><kwd>embeddings</kwd><kwd>clustering</kwd><kwd>k-means</kwd><kwd>compression of vector representations</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">Grbovic M., Cheng H. Real-time personalization using embeddings for search ranking at airbnb // Proc. of the 24th ACM SIGKDD International Conference on Knowledge Discovery &amp; Data Mining. 2018. P. 311–320. https://doi.org/10.1145/3219819.3219885</mixed-citation><mixed-citation xml:lang="en">Grbovic M., Cheng H. Real-time personalization using embeddings for search ranking at airbnb // Proc. of the 24th ACM SIGKDD International Conference on Knowledge Discovery &amp; Data Mining. 2018. P. 311–320. https://doi.org/10.1145/3219819.3219885</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Berry M.W., Drmac Z., Jessup E.R. Matrices, vector spaces, and information retrieval // SIAM Review. 1999. V. 41. N 2. P. 335–362. https://doi.org/10.1137/S0036144598347035</mixed-citation><mixed-citation xml:lang="en">Berry M.W., Drmac Z., Jessup E.R. Matrices, vector spaces, and information retrieval // SIAM Review. 1999. V. 41. N 2. P. 335–362. https://doi.org/10.1137/S0036144598347035</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Micikevicius P., Narang S., Alben J., Diamos G., Elsen E., Garcia D., Ginsburg B., Houston M., Kuchaiev O., Venkatesh G., Wu H. Mixed precision training // arXiv. 2017. arXiv:1710.03740. https://doi.org/10.48550/arXiv.1710.03740</mixed-citation><mixed-citation xml:lang="en">Micikevicius P., Narang S., Alben J., Diamos G., Elsen E., Garcia D., Ginsburg B., Houston M., Kuchaiev O., Venkatesh G., Wu H. Mixed precision training // arXiv. 2017. arXiv:1710.03740. https://doi.org/10.48550/arXiv.1710.03740</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Zhang J., Yang J., Yuen H. Training with low-precision embedding tables // Systems for Machine Learning Workshop at NeurIPS. 2018. V. 2018.</mixed-citation><mixed-citation xml:lang="en">Zhang J., Yang J., Yuen H. Training with low-precision embedding tables // Systems for Machine Learning Workshop at NeurIPS. 2018. V. 2018.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Moghadasi M.N., Zhuang Y. Sent2Vec: A new sentence embedding representation with sentimental semantic // Proc. of the 2020 IEEE International Conference on Big Data (Big Data). 2020. P. 4672– 4680. https://doi.org/10.1109/BigData50022.2020.9378337</mixed-citation><mixed-citation xml:lang="en">Moghadasi M.N., Zhuang Y. Sent2Vec: A new sentence embedding representation with sentimental semantic // Proc. of the 2020 IEEE International Conference on Big Data (Big Data). 2020. P. 4672– 4680. https://doi.org/10.1109/BigData50022.2020.9378337</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Parekar P.M., Thakare S.S. Lossless data compression algorithm–a review // International Journal of Computer Science &amp; Information Technologies. 2014. V. 5. N 1. P. 276–278.</mixed-citation><mixed-citation xml:lang="en">Parekar P.M., Thakare S.S. Lossless data compression algorithm–a review // International Journal of Computer Science &amp; Information Technologies. 2014. V. 5. N 1. P. 276–278.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Manro A., Sinha S., Chaturvedi B., Mohan J. Index seek versus table scan performance and implementation of RDBMS // Lecture Notes in Electrical Engineering. 2019. V. 526. P. 411–420. https://doi.org/10.1007/978-981-13-2553-3_40</mixed-citation><mixed-citation xml:lang="en">Manro A., Sinha S., Chaturvedi B., Mohan J. Index seek versus table scan performance and implementation of RDBMS // Lecture Notes in Electrical Engineering. 2019. V. 526. P. 411–420. https://doi.org/10.1007/978-981-13-2553-3_40</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Kanungo T., Mount D., Netanyahu N., Piatko Ch., Silverman R., Wu A. The analysis of a simple k-means clustering algorithm // Proc. of the sixteenth annual symposium on Computational geometry. 2000. P. 100–109. https://doi.org/10.1145/336154.336189</mixed-citation><mixed-citation xml:lang="en">Kanungo T., Mount D., Netanyahu N., Piatko Ch., Silverman R., Wu A. The analysis of a simple k-means clustering algorithm // Proc. of the sixteenth annual symposium on Computational geometry. 2000. P. 100–109. https://doi.org/10.1145/336154.336189</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Xiao H., Rasul K., Vollgraf R. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms // arXiv. 2017. arXiv:1708.07747. https://doi.org/10.48550/arXiv.1708.07747</mixed-citation><mixed-citation xml:lang="en">Xiao H., Rasul K., Vollgraf R. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms // arXiv. 2017. arXiv:1708.07747. https://doi.org/10.48550/arXiv.1708.07747</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Bi C., China P.R. Research and application of SQLite embedded database technology // WSEAS Transactions on Computers. 2009. V. 8. N 1. P. 83–92.</mixed-citation><mixed-citation xml:lang="en">Bi C., China P.R. Research and application of SQLite embedded database technology // WSEAS Transactions on Computers. 2009. V. 8. N 1. P. 83–92.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Туров В.П., Томилов Н.А., Бабаянц А.А. Разработка инструмента сравнения алгоритмов векторного поиска // XI Конгресс молодых учёных: сборник научных трудов. Т. 1. 2022. С. 446–450.</mixed-citation><mixed-citation xml:lang="en">Turov V.P., Tomilov N.A., Babaiantc A.A. Development of a tool for comparing vector search algorithms. Proc. of the XI Congress of Young Scientists. V. 1. 2022, pp. 446–450. (in Russian)</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Aumüller M., Bernhardsson E., Faithfull A. ANN-benchmarks: A benchmarking tool for approximate nearest neighbor algorithms // Lecture Notes in Computer Science. 2017. V. 10609. P. 34–49. https://doi.org/10.1007/978-3-319-68474-1_3</mixed-citation><mixed-citation xml:lang="en">Aumüller M., Bernhardsson E., Faithfull A. ANN-benchmarks: A benchmarking tool for approximate nearest neighbor algorithms // Lecture Notes in Computer Science. 2017. V. 10609. P. 34–49. https://doi.org/10.1007/978-3-319-68474-1_3</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Golomb S. Run-length encodings (Corresp.) // IEEE Transactions on Information Theory. 1966. V. 12. N 3. P. 399–401. https://doi.org/10.1109/TIT.1966.1053907</mixed-citation><mixed-citation xml:lang="en">Golomb S. Run-length encodings (Corresp.) // IEEE Transactions on Information Theory. 1966. V. 12. N 3. P. 399–401. https://doi.org/10.1109/TIT.1966.1053907</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>
