<?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-2025-25-4-710-717</article-id><article-id custom-type="elpub" pub-id-type="custom">ntv-496</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>K-sparse энкодер для эффективного информационного поиска</article-title><trans-title-group xml:lang="en"><trans-title>K-sparse encoder for efficient information retrieval</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0009-0004-3056-8403</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>Dobrynin</surname><given-names>V. Yu.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Вячеслав Юрьевич Добрынин, аспирант</p><p>197101; Санкт-Петербург</p><p>sc 57223099701</p></bio><bio xml:lang="en"><p>Viacheslav Yu. Dobrynin, PhD Student</p><p>197101; Saint Petersburg</p><p>sc 57223099701</p></bio><email xlink:type="simple">vidobrynin@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>2025</year></pub-date><pub-date pub-type="epub"><day>29</day><month>08</month><year>2025</year></pub-date><volume>25</volume><issue>4</issue><fpage>710</fpage><lpage>717</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Добрынин В.Ю., 2025</copyright-statement><copyright-year>2025</copyright-year><copyright-holder xml:lang="ru">Добрынин В.Ю.</copyright-holder><copyright-holder xml:lang="en">Dobrynin V.Y.</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/496">https://ntv.elpub.ru/jour/article/view/496</self-uri><abstract><sec><title>   Введение</title><p>   Введение. Современные промышленные поисковые системы, как правило, используют двухстадийный конвейер — быстрый отбор кандидатов и последующее ранжирование, что неизбежно ведет к потере части релевантных документов из-за простых алгоритмов на первой стадии. В работе предлагается одностадийный подход, сочетающий преимущества плотных моделей семантического поиска и эффективности инвертированных индексов. Ключевым компонентом решения является K-sparse энкодер, применяемый для преобразования плотных векторов в разреженные, совместимые с инвертированными индексами библиотеки Lucene.</p></sec><sec><title>   Метод</title><p>   Метод. В отличие от ранее исследованного идентифицируемого вариационного автоэнкодера, предлагаемая модель основана на автоэнкодере с функцией активации TopK, которая явно фиксирует число ненулевых координат на этапе обучения. Такая функция активации делает процесс получения разреженного вектора дифференцируемым, устраняет необходимость постобработки и упрощает функцию потерь до суммы ошибки восстановления и компоненты, сохраняющей относительные расстояния между плотными и разреженными представлениями. Обучение выполнялось на подмножестве из 300 тыс. документов набора данных MS MARCO с использованием PyTorch и GPU NVIDIA L4.</p></sec><sec><title>   Основные результаты</title><p>   Основные результаты. Предложенная модель достигает 96,6 % качества исходной плотной модели по метрике NDCG@10 (0,57 против 0,59) на наборе данных SciFact при 80 % разреженности векторов. Дополнительно показано, что дальнейшее увеличение разреженности снижает объем индекса и ускоряет время поиска, сохраняя приемлемое качество поиска. По используемой памяти решение превосходит графовый алгоритм Hierarchical Navigable Small World, а по скорости приближается к нему при высоких уровнях разреженности. Обсуждение. Работа подтверждает применимость предложенного подхода для поиска неструктурированных данных. Прямое управление степенью разреженности дает возможность балансировать между качеством, задержкой поиска и требованиями к памяти. Благодаря использованию инвертированного индекса на базе библиотеки Lucene, предлагаемое решение может быть эффективно применено в промышленных поисковых системах. В качестве направлений дальнейших исследований рассматриваются интерпретируемость извлекаемых признаков и повышение качества поиска при значительной разреженности представлений.</p></sec></abstract><trans-abstract xml:lang="en"><p>   Modern industrial search engines typically employ a two-stage pipeline: fast candidate retrieval followed by reranking. This approach inevitably leads to the loss of some relevant documents due to the simplicity of algorithms used in the first stage. This work proposes a single-stage approach that combines the advantages of dense semantic search models with the efficiency of inverted indices. The key component of the solution is a K-sparse encoder used to convert densevectors into sparse ones compatible with inverted indices of the Lucene library. In contrast to the previously studied identifiable variational autoencoder, the proposed model is based on an autoencoder with a TopK activation function which explicitly enforces a fixed number of non-zero coordinates during training. This activation function makes the sparse vector generation process differentiable, eliminates the need for post-processing, and simplifies the loss function to a sum of reconstruction error and a component preserving relative distances between dense and sparse representations. The model was trained on a 300,000-document subset of the MS MARCO dataset using PyTorch and an NVIDIA L4 GPU. The proposed model achieves 96.6 % of the quality of the original dense model in terms of the NDCG@10 metric (0.57 vs. 0.59) on the SciFact dataset with 80 % sparsity. It is also shown that further increasing sparsity reduces index size and improves retrieval speed while maintaining acceptable search quality. In terms of memory usage, the approach outperforms the Hierarchical Navigable Small World (HNSW) graph-based algorithm, and at high sparsity levels, its speed approaches that of HNSW. The results confirm the applicability of the proposed approach to unstructured data retrieval. Direct control over sparsity enables balancing between search quality, latency, and memory requirements. Thanks to the use of an inverted index based on the Lucene library, the proposed solution is well suited for industrial-scale search systems. Future research directions include interpretability of the extracted features and improving retrieval quality under high sparsity conditions.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>информационный поиск</kwd><kwd>разреженные векторные представления</kwd><kwd>K-sparse автоэнкодер</kwd><kwd>функция активации TopK</kwd><kwd>инвертированный индекс</kwd><kwd>одностадийная архитектура</kwd></kwd-group><kwd-group xml:lang="en"><kwd>information retrieval</kwd><kwd>sparse vector representations</kwd><kwd>autoencoder</kwd><kwd>TopK activation function</kwd><kwd>inverted index</kwd><kwd>single-stage architecture</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">Chen R., Gallagher L., Blanco R., Culpepper J.S. Efficient cost-aware cascade ranking in multi-stage retrieval // Proc. of the 40&lt;sup&gt;th&lt;/sup&gt; International ACM SIGIR Conference on Research and Development in Information Retrieval. 2017. P. 445–454. doi: 10.1145/3077136.3080819</mixed-citation><mixed-citation xml:lang="en">Chen R., Gallagher L., Blanco R., Culpepper J.S. Efficient cost-aware cascade ranking in multi-stage retrieval. Proc. of the 40&lt;sup&gt;th&lt;/sup&gt; International ACM SIGIR Conference on Research and Development in Information Retrieval, 2017, pp. 445–454. doi: 10.1145/3077136.3080819</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Liu S., Xiao F., Ou W., Si L. Cascade ranking for operational E-commerce search // Proc. of the 23&lt;sup&gt;rd&lt;/sup&gt; ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2017. P. 1557–1565. doi: 10.1145/3097983.3098011</mixed-citation><mixed-citation xml:lang="en">Liu S., Xiao F., Ou W., Si L. Cascade ranking for operational E-commerce search. Proc. of the 23&lt;sup&gt;rd&lt;/sup&gt; ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2017, pp. 1557–1565. doi: 10.1145/3097983.3098011</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Furnas G.W., Landauer T.K., Gomez L.M., Dumais S.T. The vocabulary problem in human-system communication // Communications of the ACM. 1987. V. 30. N 11. P. 964–971. doi: 10.1145/32206.32212</mixed-citation><mixed-citation xml:lang="en">Furnas G.W., Landauer T.K., Gomez L.M., Dumais S.T. The vocabulary problem in human-system communication. Communications of the ACM, 1987, vol. 30, no. 11, pp. 964–971. doi: 10.1145/32206.32212</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Zhao L., Callan J. Term necessity prediction // Proc. of the 19&lt;sup&gt;th&lt;/sup&gt; ACM International Conference on Information and Knowledge Management. 2010. P. 259–268. doi: 10.1145/1871437.1871474</mixed-citation><mixed-citation xml:lang="en">Zhao L., Callan J. Term necessity prediction. Proc. of the 19&lt;sup&gt;th&lt;/sup&gt; ACM International Conference on Information and Knowledge Management, 2010, pp. 259–268. doi: 10.1145/1871437.1871474</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Zamani H., Dehghani M., Croft W.B., Learned-Miller E., Kamps J. From neural re-ranking to neural ranking: Learning a sparse representation for inverted indexing // Proc. of the 27&lt;sup&gt;th&lt;/sup&gt; ACM International Conference on Information and Knowledge Management. 2018. P. 497–506. doi: 10.1145/3269206.3271800</mixed-citation><mixed-citation xml:lang="en">Zamani H., Dehghani M., Croft W.B., Learned-Miller E., Kamps J. From neural re-ranking to neural ranking: Learning a sparse representation for inverted indexing. Proc. of the 27&lt;sup&gt;th&lt;/sup&gt; ACM International Conference on Information and Knowledge Management, 2018, pp. 497–506. doi: 10.1145/3269206.3271800</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Formal T., Piwowarski B., Clinchant S. SPLADE: Sparse lexical and expansion model for first stage ranking // Proc. of the 44&lt;sup&gt;th&lt;/sup&gt; International ACM SIGIR Conference on Research and Development in Information Retrieval. 2021. P. 2288–2292. doi: 10.1145/3404835.3463098</mixed-citation><mixed-citation xml:lang="en">Formal T., Piwowarski B., Clinchant S. SPLADE: Sparse lexical and expansion model for first stage ranking. Proc. of the 44&lt;sup&gt;th&lt;/sup&gt; International ACM SIGIR Conference on Research and Development in Information Retrieval, 2021, pp. 2288–2292. doi: 10.1145/3404835.3463098</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Dobrynin V., Sherman M., Abramovich R., Platonov A. A sparsifier model for efficient information retrieval // IEEE 18&lt;sup&gt;th&lt;/sup&gt; International Conference on Application of Information and Communication Technologies (AICT). 2024. P. 1–4. doi: 10.1109/aict61888.2024.10740301</mixed-citation><mixed-citation xml:lang="en">Dobrynin V., Sherman M., Abramovich R., Platonov A. A sparsifier model for efficient information retrieval. IEEE 18&lt;sup&gt;th&lt;/sup&gt; International Conference on Application of Information and Communication Technologies (AICT), 2024, pp. 1–4. doi: 10.1109/aict61888.2024.10740301</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Dobrynin V.Yu., Abramovich R.K., Platonov A.V. Efficient sparse retrieval through embedding-based inverted index construction // Scientific and Technical Journal of Information Technologies, Mechanics and Optics. 2025. V. 25. N 1. P. 61–67. doi: 10.17586/2226-1494-2025-25-1-61-67</mixed-citation><mixed-citation xml:lang="en">Dobrynin V.Yu., Abramovich R.K., Platonov A.V. Efficient sparse retrieval through embedding-based inverted index construction. Scientific and Technical Journal of Information Technologies, Mechanics and Optics, 2025, vol. 25, no. 1, pp. 61–67. doi: 10.17586/2226-1494-2025-25-1-61-67</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Khemakhem I., Kingma D.P., Monti R.P., Hyvarinen A. Variational autoencoders and nonlinear ICA: A unifying framework // Proc. of the 23&lt;sup&gt;rd&lt;/sup&gt; International Conference on Artificial Intelligence and Statistics (AISTATS). 2020. V. 108. P. 2207–2216.</mixed-citation><mixed-citation xml:lang="en">Khemakhem I., Kingma D.P., Monti R.P., Hyvarinen A. Variational autoencoders and nonlinear ICA: A unifying framework. Proc. of the 23&lt;sup&gt;rd&lt;/sup&gt; International Conference on Artificial Intelligence and Statistics (AISTATS), 2020, vol. 108, pp. 2207–2216.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Louizos C., Welling M., Kingma D.P. Learning sparse neural networks through L0 regularization // arXiv. 2017. arXiv:1712.01312. doi: 10.48550/arXiv.1712.01312</mixed-citation><mixed-citation xml:lang="en">Louizos C., Welling M., Kingma D.P. Learning sparse neural networks through L0 regularization. arXiv, 2017, arXiv:1712.01312. doi: 10.48550/arXiv.1712.01312</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Makhzani A., Frey B. k-Sparse autoencoders // arXiv. 2013. arXiv:1312.5663. doi: 10.48550/arXiv.1312.5663</mixed-citation><mixed-citation xml:lang="en">Makhzani A., Frey B. k-Sparse autoencoders. arXiv, 2013, arXiv:1312.5663. doi: 10.48550/arXiv.1312.5663</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Gao L., Tour T.D., Tillman H., Goh G., Troll R., Radford A., Sutskever I., Leike J., Wu J. Scaling and evaluating sparse autoencoders // arXiv. 2024. arXiv:2406.04093. doi: 10.48550/arXiv.2406.04093</mixed-citation><mixed-citation xml:lang="en">Gao L., Tour T.D., Tillman H., Goh G., Troll R., Radford A., Sutskever I., Leike J., Wu J. Scaling and evaluating sparse autoencoders. arXiv, 2024, arXiv:2406.04093. doi: 10.48550/arXiv.2406.04093</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Bricken T., Templeton A., Batson J., Chen B., Jermyn A., Conerly T., et al. Towards monosemanticity: decomposing language models with dictionary learning // Transformer Circuits Thread. 2023.</mixed-citation><mixed-citation xml:lang="en">Bricken T., Templeton A., Batson J., Chen B., Jermyn A., Conerly T., et al. Towards monosemanticity: decomposing language models with dictionary learning. Transformer Circuits Thread, 2023.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Paszke A., Gross S., Massa F., Lerer A., Bradbury J., Chanan G., et al. PyTorch: An imperative style, high-performance deep learning library // arXiv. 2019. arXiv:1912.01703. doi: 10.48550/arXiv.1912.01703</mixed-citation><mixed-citation xml:lang="en">Paszke A., Gross S., Massa F., Lerer A., Bradbury J., Chanan G., et al. PyTorch: An imperative style, high-performance deep learning library. arXiv, 2019, arXiv:1912.01703. doi: 10.48550/arXiv.1912.01703</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Bajaj P., Campos D., Craswell N., Deng L., Gao J., Liu X., et al. MS MARCO: A human generated MAchine Reading COmprehension dataset // arXiv. 2016. arXiv:1611.09268. doi: 10.48550/arXiv.1611.09268</mixed-citation><mixed-citation xml:lang="en">Bajaj P., Campos D., Craswell N., Deng L., Gao J., Liu X., et al. MS MARCO: A human generated MAchine Reading COmprehension dataset. arXiv, 2016, arXiv:1611.09268. doi: 10.48550/arXiv.1611.09268</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Wadden D., Lin S., Lo K., Wang L.L., van Zuylen M., Cohan A., Hajishirzi H. Fact or fiction: verifying scientific claims // Proc. of the Conference on Empirical Methods in Natural Language Processing (EMNLP). 2020. P. 7534–7550. doi: 10.18653/v1/2020.emnlp-main.609</mixed-citation><mixed-citation xml:lang="en">Wadden D., Lin S., Lo K., Wang L.L., van Zuylen M., Cohan A., Hajishirzi H. Fact or fiction: verifying scientific claims. Proc. of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020, pp. 7534–7550. doi: 10.18653/v1/2020.emnlp-main.609</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Malkov Y., Yashunin D.A. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs // IEEE Transactions on Pattern Analysis and Machine Intelligence. 2020. V. 42. N 4. P. 824–836. doi: 10.1109/TPAMI.2018.2889473</mixed-citation><mixed-citation xml:lang="en">Malkov Y., Yashunin D.A. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, vol. 42, no. 4, pp. 824–836. doi: 10.1109/TPAMI.2018.2889473</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>
