Обзор архитектуры рекуррентного трансформера в контексте нейронных сетей с памятью

Автор: Булатов А.С., Куратов Ю.М., Бурцев М.С.

Журнал: Труды Московского физико-технического института @trudy-mipt

Рубрика: Информатика и управление

Статья в выпуске: 4 (64) т.16, 2024 года.

Бесплатный доступ

Проводится обзор нейросетевых архитектур с дополненной памятью (Memory-Augmented Neural Networks, MANN) с фокусом на модель рекуррентного трансформера с памятью (Recurrent Memory Transformer, RMT) для задач с длинным контекстом. Архитектура Трансформер показазывает высокую эффективность в обработке текстов, изображений и речи, однако их применение к длинным последовательностям ограничено квадратичной вычислительной сложностью механизма внимания и сложностью раздельного хранения локальной и глобальной информации. Рассматриваются ключевые модели с памятью с фокусом на обработку естественного языка. В этом контексте мы анализируем архитектуру RMT, которая преодолевает эти ограничения с помощью рекуррентного механизма памяти, добавляя специальные токены, позволяющие сохранять и передавать информацию между сегментами последовательности. Это решение дает возможность модели обрабатывать как локальные, так и глобальные зависимости, сохраняя вычислительную эффективность и масштабируемость. Экспериментальные данные показывают, что RMT превосходит аналоги, такие как Transformer-XL, в обработке длинных последовательностей, демонстрируя высокую эффективность даже при ограниченных ресурсах памяти. Данная архитектура представляет собой перспективное решение для широкого класса задач, требующих учёта длинного контекста, таких как алгоритмическое моделирование и рассуждения.

Еще

Глубокое обучение, рекуррентные нейронные сети, обработка естественного языка

Короткий адрес: https://sciup.org/142243844

IDR: 142243844

Список литературы Обзор архитектуры рекуррентного трансформера в контексте нейронных сетей с памятью

  • Bulatov A., Kuratov Y., Burtsev M. Recurrent Memory Transformer // Advances in Neural Information Processing Systems. 2022. V. 35. P. 11079–11091.
  • Hochreiter S., Schmidhuber J. Long Short-Term Memory // Neural Computation. 1997. V. 9, N 8. P. 1735–1780. DOI: 10.1162/neco.1997.9.8.1735. URL: https://doi.org/10.1162/neco.1997.9.8.1735.
  • Bahdanau D., Cho K.H., Bengio Y. Neural Machine Translation by Jointly Learning to Align and Translate // 3rd International Conference on Learning Representations, ICLR 2015. 2015.
  • Vaswani A. Attention Is All You Need // Advances in Neural Information Processing Systems. 2017. P. 5998–6008. URL: http://papers.nips.cc/paper/7181-attention-is-all-youneed.
  • Weston J., Chopra S., Bordes A. Memory Networks // 3rd International Conference on Learning Representations, ICLR 2015. 2015. URL: http://arxiv.org/abs/1410.3916.
  • Burtsev M.S., Kuratov Y., Peganov A., Sapunov G.V. Memory Transformer // arXiv preprint arXiv:2006.11527. 2020.
  • Dai Z., Yang Z., Yang Y., Carbonell J., Le Q.V., Salakhutdinov R. Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context // Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Florence, Italy: Association for Computational Linguistics, 2019. P. 2978–2988. DOI: 10.18653/v1/P19- 1285. URL: https://aclanthology.org/P19-1285.
  • Beltagy I., Peters M.E., Cohan A. Longformer: The Long-Document Transformer // arXiv preprint arXiv:2004.05150. 2020.
  • Bulatov A., Kuratov Y., Burtsev M.S. Scaling transformer to 1m tokens and beyond with RMT // arXiv preprint arXiv:2304.11062.
  • Bulatov A., Kuratov Y., Kapushev Y., Burtsev M. Beyond Attention: Breaking the Limits of Transformer Context Length with Recurrent Memory // Proceedings of the AAAI Conference on Artificial Intelligence. 2024. V. 38. P. 17700–17708.
  • Kuratov Y., Bulatov A., Anokhin P., Rodkin I., Sorokin D., Sorokin A., Burtsev M. BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack // arXiv preprint arXiv:2406.10149. 2024.
  • Willshaw D.J., Buneman O.P., Longuet-Higgins H.C. Non-Holographic Associative Memory // Nature. 1969. V. 222, N 5197. P. 960–962.
  • Hinton G.E., Anderson J.A. Parallel Models of Associative Memory. 1981.
  • Hopfield J.J. Neural Networks and Physical Systems with Emergent Collective Computational Abilities // Proceedings of the National Academy of Sciences. 1982. V. 79, N 8. P. 2554–2558.
  • Werbos P.J. Applications of Advances in Nonlinear Sensitivity Analysis // System Modeling and Optimization / ed. R.F. Drenick, F. Kozin. Berlin, Heidelberg: Springer Berlin Heidelberg, 1982. P. 762–770.
  • Rumelhart D.E., Hinton G.E., Williams R.J. Learning Internal Representations by Error Propagation // Biometrika. 1986. V. 71. P. 599–607.
  • Rumelhart D.E., Hinton G.E., Williams R.J. Learning Representations by Back- Propagating Errors // Nature. 1986. V. 323, N 6088. P. 533–536.
  • Hinton G.E., Plaut D.C. Using Fast Weights to Deblur Old Memories // Proceedings of the Ninth Annual Conference of the Cognitive Science Society. 1987. P. 177–186.
  • Von Der Malsburg C. The Correlation Theory of Brain Function // Models of Neural Networks: Temporal Aspects of Coding and Information Processing in Biological Systems. Springer, 1994. P. 95–119.
  • Feldman J.A., Ballard D.H. Connectionist Models and Their Properties // Cognitive Science. 1982. V. 6, N 3. P. 205–254.
  • Schmidhuber J. Learning to Control Fast-Weight Memories: An Alternative to Dynamic Recurrent Networks // Neural Computation. 1992. V. 4, N 1. P. 131–139.
  • Ba J.L., Hinton G.E., Mnih V. Using Fast Weights to Attend to the Recent Past // Advances in Neural Information Processing Systems. 2016. V. 29.
  • Schlag I., Irie K., Schmidhuber J. Linear Transformers Are Secretly Fast Weight Programmers // International Conference on Machine Learning. PMLR, 2021. P. 9355–9366.
  • Schmidhuber J. Annotated history of modern AI and deep learning // arXiv preprint arXiv:2212.11279. 2022.
  • Lenz W. Beitrag zum VerstГ¤ndnis der magnetischen Erscheinungen in festen Korpern // Z. Phys. 1920. V. 21. P. 613–615.
  • McCulloch W.S., Pitts W. A logical calculus of the ideas immanent in nervous activity // The Bulletin of Mathematical Biophysics. 1943. V. 5, N 4. P. 115–133.
  • Amari S.-I. Characteristics of random nets of analog neuron-like elements // IEEE Transactions on Systems, Man, and Cybernetics. 1972. N 5. P. 643–657.
  • Werbos P.J. Generalization of backpropagation with application to a recurrent gas market model // Neural Networks. 1988. V. 1, N 4. P. 339–356.
  • Williams R.J., Zipser D. Gradient-based learning algorithms for recurrent networks and their computational complexity // Backpropagation. Psychology Press, 1992. P. 433–486.
  • Bengio Y., Simard P., Frasconi P. Learning long-term dependencies with gradient descent is difficult // IEEE Transactions on Neural Networks. 1994. V. 5, N 2. P. 157–166.
  • Cho K. On the Properties of Neural Machine Translation: Encoder–Decoder Approaches // Proceedings of SSST-8, Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation. Doha, Qatar: Association for Computational Linguistics, 10.2014. P. 103–111. DOI: 10.3115/v1/W14-4012. URL: https://aclanthology.org/W14-4012.
  • Graves A., Wayne G., Danihelka I. Neural Turing Machines // arXiv preprint arXiv:1410.5401. 2014.
  • Graves A., Wayne G., Reynolds M., Harley T., Danihelka I., Grabska-Barwinska A.,... Hassabis D. Hybrid computing using a neural network with dynamic external memory // Nature. 2016. Oct. V. 538, N 7626. P. 471–476. ISSN 00280836. URL: http://dx.doi.org/10.1038/nature20101.
  • Rae J., Hunt J.J. Danihelka I., Harley T., Senior A.W., Wayne G.,... Lillicrap T. Scaling Memory-Augmented Neural Networks with Sparse Reads and Writes // arXiv preprint arXiv:1610.09027. 2016.
  • Joulin A., Mikolov T. Inferring Algorithmic Patterns with Stack-Augmented Recurrent Nets // arXiv preprint arXiv:1503.01007. 2015.
  • Grefenstette E., Hermann K.M., Suleyman M., Blunsom P. Learning to Transduce with Unbounded Memory // arXiv preprint arXiv:1506.02516. 2015.
  • Dehghani, M., Gouws, S., Vinyals O., Uszkoreit J., Kaiser L. Universal Transformers // International Conference on Learning Representations. 2019. URL: https://openreview.net/forum?id=HyzdRiR9Y7.
  • Graves A. Adaptive computation time for recurrent neural networks // arXiv preprint arXiv:1603.08983. 2016.
  • Zaheer M., Guruganesh G., Dubey K.A., Ainslie J., Alberti C., Ontanon S.,... Ahmed A. Big Bird: Transformers for Longer Sequences // Advances in Neural Information Processing Systems. V. 33 / ed. H. Larochelle. Curran Associates, Inc., 2020. P. 17283–17297. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/c8512d142a2d849725f31a9a7a361ab9-Paper.pdf.
  • Rae J.W. Compressive Transformers for Long-Range Sequence Modelling // International Conference on Learning Representations. 2020. URL: https://openreview.net/forum?id=SylKikSYDH.
  • Wu Q. Memformer: A Memory-Augmented Transformer for Sequence Modeling // Findings of the Association for Computational Linguistics: AACL-IJCNLP 2022. Online only: Association for Computational Linguistics, 11.2022. P. 308–318. URL: https://aclanthology.org/2022.findings-aacl.29.
  • Lei J. MART: Memory-Augmented Recurrent Transformer for Coherent Video Paragraph Captioning // arXiv preprint. 2020. arXiv:2005.05402 [cs.CL].
  • Martins P.H., Marinho Z., Martins A.F. ∞-former: Infinite Memory Transformer // arXiv preprint. 2021. arXiv:2109.00301.
  • Lample G. Large Memory Layers with Product Keys // arXiv preprint. 2019. arXiv:1907.05242 [cs.CL].
  • Gu A. HiPPO: Recurrent Memory with Optimal Polynomial Projections // Advances in Neural Information Processing Systems. 2020. V. 33. P. 1474–1487.
  • Gu A. Combining Recurrent, Convolutional, and Continuous-Time Models with Linear State Space Layers // Advances in Neural Information Processing Systems. 2021.
  • Gu A., Goel K., Re C. Efficiently Modeling Long Sequences with Structured State Spaces // International Conference on Learning Representations. 2021.
  • Peng B. RWKV: Reinventing RNNs for the Transformer Era // arXiv preprint. 2023. arXiv:2305.13048.
  • Gu A., Dao T. Mamba: Linear-Time Sequence Modeling with Selective State Spaces // arXiv preprint. 2023. arXiv:2312.00752.
  • Lieber O., Lenz B., Bata H., Cohen G., Osin J., Dalmedigos I.,... & Shoham Y. Jamba: A hybrid transformer-mamba language model // arXiv preprint. 2024. arXiv:2403.19887.
  • Rodkin I, Kuratov Y, Bulatov A, Burtsev M. Associative Recurrent Memory Transformer // arXiv preprint. 2024. arXiv:2407.04841.
  • Fishman V., Kuratov Y., Shmelev A., Petrov M., Penzar D., Shepelin D.,... Burtsev M. GENA-LM: A Family of Open-Source Foundational DNA Language Models for Long Sequences // bioRxiv. 2023. P. 2023–06.
  • Kuratov Y., Shmelev A., Fishman V., Kardymon O., Burtsev M. Recurrent Memory Augmentation of GENA-LM Improves Performance on Long DNA Sequence Tasks // ICLR 2024 Workshop on Machine Learning for Genomics Explorations.
  • Bessonov A., Staroverov A., Zhang H., Kovalev A.K., Yudin D., Panov A.I. Recurrent Memory Decision Transformer // arXiv preprint. 2023. arXiv:2306.09459.
  • Peng T. RMT-BVQA: Recurrent Memory Transformer-Based Blind Video Quality Assessment for Enhanced Video Content // arXiv preprint. 2024. arXiv:2405.08621.
  • Chevalier A., Wettig A., Ajith A., Chen D. Adapting Language Models to Compress Contexts // Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing / ed. by H. Bouamor, J. Pino, K. Bali Singapore: Association for Computational Linguistics, 12.2023. P. 3829–3846. DOI: 10.18653/v1/2023.emnlp-main.232. URL: https://aclanthology.org/2023.emnlp-main.232.
Еще
Статья научная