Proceedings

HT-Transformer: Event Sequences Classification by Accumulating Prefix Information with History Tokens

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. AI4Tech: AI Enabling Technologies. Pages 6462-6470.

https://doi.org/10.24963/ijcai.2026/719

© 2026 International Joint Conferences on Artificial Intelligence

Abstract

Deep learning has achieved strong results in modeling sequential data, including event sequences, temporal point processes, and irregular time series. Recently, transformers have largely replaced recurrent networks in these tasks. However, transformers often underperform recurrent networks in classification tasks that aim to predict future targets, such as churn, user reactions, or treatment response. The reason behind this performance gap remains largely underexplored. In this paper, we identify a key limitation of transformers: the lack of a single vector representation that compactly summarizes the evolving state of a sequence. We further show that commonly used contrastive embeddings are poorly suited to capturing the local context needed for accurate forward-looking prediction. To address these challenges, we introduce history tokens, a novel concept that enables the accumulation of historical information during next-token prediction pretraining. Our approach significantly improves transformer-based models, achieving impressive results in finance, e-commerce, and healthcare tasks. The code is publicly available: https://github.com/ivan-chai/pretpp.

  1. [Babaev et al., 2022] Dmitrii Babaev, Nikita Ovsov, Ivan Kireev, Maria Ivanova, Gleb Gusev, Ivan Nazarov, and Alexander Tuzhilin. ColLES: Contrastive learning for event sequences with self-supervision. In Proceedings of the 2022 International Conference on Management of Data, pages 1190-1199, 2022.
  2. [BehnamGhader et al., 2024] Parishad BehnamGhader, Vaibhav Adlakha, Marius Mosbach, Dzmitry Bahdanau, Nicolas Chapados, and Siva Reddy. LLM2Vec: Large language models are secretly powerful text encoders. In First Conference on Language Modeling, 2024.
  3. [Beltagy et al., 2020] Iz Beltagy, Matthew E Peters, and Ar- man Cohan. Longformer: The long-document trans- former. arXiv preprint arXiv:2004.05150, 2020.
  4. [Bulatov et al., 2022] Aydar Bulatov, Yury Kuratov, and Mikhail Burtsev. Recurrent memory transformer. Advances in Neural Information Processing Systems, 35:11079-11091, 2022.
  5. [Cho et al., 2014] Kyunghyun Cho, Bart van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the proper- ties of neural machine translation: Encoder-decoder ap- proaches. In Proceedings of SSST-8, Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation, pages 103-111, 2014.
  6. [Chopra et al., 2005] Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In 2005 IEEE computer society conference on computer vision and pattern recog- nition (CVPR'05), volume 1, pages 539-546. IEEE, 2005.
  7. [Devlin et al., 2019] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understand- ing. In Proceedings of the 2019 conference of the North American chapter of the association for computational lin- guistics: human language technologies, volume 1 (long and short papers), pages 4171-4186, 2019.
  8. [Gorishniy et al., 2021] Yury Gorishniy, Ivan Rubachev, Valentin Khrulkov, and Artem Babenko. Revisiting deep learning models for tabular data. Advances in neural in- formation processing systems, 34:18932-18943, 2021.
  9. [Johnson et al., 2016] Alistair EW Johnson, Tom J Pollard, Lu Shen, Li-wei H Lehman, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo An- thony Celi, and Roger G Mark. Mimic-iii, a freely ac- cessible critical care database. Scientific data, 3(1):1-9, 2016.
  10. [Karpukhin and Savchenko, 2026] Ivan Karpukhin and An- drey Savchenko. Detecting the future: All-at-once event sequence forecasting with horizon matching. In Proceed- ings of the AAAI Conference on Artificial Intelligence, vol- ume 40, pages 22536-22544, 2026.
  11. [Ke et al., 2017] Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu. Lightgbm: A highly efficient gradient boost- ing decision tree. Advances in neural information process- ing systems, 30, 2017.
  12. [Kingma and Ba, 2015] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In The Twelfth International Conference on Learning Represen- tations, 2015.
  13. [Lan et al., 2020] Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Sori- cut. Albert: A lite bert for self-supervised learning of language representations. In International Conference on Learning Representations, 2020.
  14. [Liu et al., 2019] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
  15. [McDermott et al., 2023] Matthew McDermott, Bret Nestor, Peniel Argaw, and Isaac S Kohane. Event stream gpt: a data pre-processing and modeling library for generative, pre-trained transformers over continuous-time sequences of complex events. Advances in Neural Information Pro- cessing Systems, 36:24322-24334, 2023.
  16. [Muennighoff et al., 2023] Niklas Muennighoff, Nouamane Tazi, Loic Magne, and Nils Reimers. Mteb: Massive text embedding benchmark. In Proceedings of the 17th Confer- ence of the European Chapter of the Association for Com- putational Linguistics, pages 2014-2037, 2023.
  17. [Osin et al., 2025] Dmitry Osin, Igor Udovichenko, Egor Shvetsov, Viktor Moskvoretskii, and Evgeny Burnaev. Ebes: Easy benchmarking for event sequences. In Pro- ceedings of the 31st ACM SIGKDD Conference on Knowl- edge Discovery and Data Mining V. 2, pages 5730-5741, 2025.
  18. [Padhi et al., 2021] Inkit Padhi, Yair Schiff, Igor Melnyk, Mattia Rigotti, Youssef Mroueh, Pierre Dognin, Jerret Ross, Ravi Nair, and Erik Altman. Tabular transformers for modeling multivariate time series. In ICASSP 2021- 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 3565-3569. IEEE, 2021.
  19. [Radford et al., 2018] Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever, et al. Improving language understanding by generative pre-training. 2018.
  20. [Rizoiu et al., 2017] Marian-Andrei Rizoiu, Young Lee, Swapnil Mishra, and Lexing Xie. Hawkes processes for events in social media. In Frontiers of multimedia re- search, pages 191-218. 2017.
  21. [Robinson et al., 2021] Joshua Robinson, Li Sun, Ke Yu, Kayhan Batmanghelich, Stefanie Jegelka, and Suvrit Sra. Can contrastive learning avoid shortcut solu- tions? Advances in neural information processing systems, 34:4974-4986, 2021.
  22. [Sakhno et al., 2025] Artem Sakhno, Ivan Kireev, Dmitrii Babaev, Maxim Savchenko, Gleb Gusev, and Andrey Savchenko. PyTorch-Lifestream: Learning embeddings on discrete event sequences. In James Kwok, editor, Pro- ceedings of the Thirty-Fourth International Joint Confer- ence on Artificial Intelligence, IJCAI-25, pages 11104- 11108. International Joint Conferences on Artificial Intel- ligence Organization, 8 2025. Demo Track. IJCAI
  23. [Shchur et al., 2020] Oleksandr Shchur, Marin Biloš, and Stephan Günnemann. Intensity-free learning of tempo- ral point processes. International Conference on Learning Representations (ICLR), 2020.
  24. [Snoek et al., 2012] Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of ma- chine learning algorithms. Advances in neural information processing systems, 25, 2012.
  25. [Stankevičius and Lukoševičius, 2024] Lukas Stankevičius and Mantas Lukoševičius. Extracting sentence embed- dings from pretrained transformer models. Applied Sci- ences, 14(19):8887, 2024.
  26. [Synerise, 2025] Synerise. Recsys challenge 2025. https: //recsys.synerise.com/, 2025. Accessed: 2025-07-25. Link
  27. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
  28. [Wang et al., 2019] Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In International Confer- ence on Learning Representations, 2019.
  29. [Xue et al., 2024] Siqiao Xue, Xiaoming Shi, Zhixuan Chu, Yan Wang, Hongyan Hao, Fan Zhou, Caigao JIANG, Chen Pan, James Y Zhang, Qingsong Wen, et al. Easytpp: To- wards open benchmarking temporal point processes. In The Twelfth International Conference on Learning Repre- sentations, 2024.
  30. [Yang et al., 2022] Chenghao Yang, Hongyuan Mei, and Ja- son Eisner. Transformer embeddings of irregularly spaced events and their participants. In Proceedings of the Tenth International Conference on Learning Representa- tions (ICLR), 2022.
  31. [Yenduri et al., 2024] Gokul Yenduri, Muthukumaran Ra- malingam, G Chemmalar Selvi, Y Supriya, Gautam Sri- vastava, Praveen Kumar Reddy Maddikunta, G Deepti Raj, Rutvij H Jhaveri, B Prabadevi, Weizheng Wang, et al. Gpt (generative pre-trained transformer)-a comprehen- sive review on enabling technologies, potential applica- tions, emerging challenges, and future directions. IEEE access, 12:54608-54649, 2024.
  32. [Zhang et al., 2025] Caojin Zhang, Qiang Zhang, Ke Li, Sai Vidyaranya Nuthalapati, Benyu Zhang, Jason Liu, Ser- ena Li, Lizhu Zhang, and Xiangjun Fan. Gem: Empower- ing llm for both embedding generation and language un- derstanding. arXiv preprint arXiv:2506.04344, 2025.
  33. [Zuo et al., 2020] Simiao Zuo, Haoming Jiang, Zichong Li, Tuo Zhao, and Hongyuan Zha. Transformer hawkes pro- cess. In International conference on machine learning, pages 11692-11702. PMLR, 2020.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards