2025

Your Spending Needs Attention: Modeling Financial Habits With Transformers

Aman Gupta

citations

AI summary

This paper introduces nuFormer, a transformer-based representation learning model for financial transaction data, which leverages SSL with both textual and structured attributes, integrates user embeddings with tabular features, and achieves improvements on large-scale recommendation problems at Nubank.

Main Contributions

  • Propose a new method enabling the use of SSL with transaction data by adapting transformer-based models to handle both textual and structured attributes.
  • Introduce nuFormer, an end-to-end fine-tuning method that integrates user embeddings with existing tabular features.
  • Demonstrate improvements for large-scale recommendation problems at Nubank.
  • Achieve gains solely through enhanced representation learning rather than incorporating new data sources.
  • Achieve a 1.25% relative improvement in test set AUC.

Abstract

Predictive models play a crucial role in the financial industry, enabling risk prediction, fraud detection, and personalized recommendations, where slight changes in core model performance can result in billions of dollars in revenue or losses. While financial institutions have access to enormous amounts of user data (e.g., bank transactions, in-app events, and customer support logs), leveraging this data effectively remains challenging due to its complexity and scale. Thus, in many financial institutions, most production models follow traditional machine learning (ML) approaches by converting unstructured data into manually engineered tabular features. Conversely, other domains (e.g., natural language processing) have effectively utilized self-supervised learning (SSL) to learn rich representations from raw data, removing the need for manual feature extraction. In this paper, we investigate using transformer-based representation learning models for transaction data, hypothesizing that these models, trained on massive data, can provide a novel and powerful approach to understanding customer behavior. We propose a new method enabling the use of SSL with transaction data by adapting transformer-based models to handle both textual and structured attributes. Our approach, denoted nuFormer, includes an end-to-end fine-tuning method that integrates user embeddings with existing tabular features. Our experiments demonstrate improvements for large-scale recommendation problems at Nubank. Notably, these gains are achieved solely through enhanced representation learning rather than incorporating new data sources.

Citation Graph

Loading graph...

References [43]

Sort:
Filter:

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin - 2017

47 papers in library cite

K. Simonyan, Andrew Zisserman - 2014

20 papers in library cite

Jacob Devlin, M. W. Chang, K. Lee, Kristina Toutanova - 2018

39 papers in library cite

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton - 2012

71 papers in library cite

Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, Dario Amodei - 2020

21 papers in library cite

D. E. Rumelhart, Geoffrey E. Hinton, Ronald J. Williams - 1986

46 papers in library cite

R. Sennrich, B. Haddow, Alexandra Birch - 2016

22 papers in library cite

T. Chen, C. Guestrin - 2016

1 paper in library cites

Alec Radford, J. W. Kim, C. Hallacy, Aditya Ramesh, G. Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark - 2021

2 papers in library cite

Hugo Touvron, T. Lavril, G. Izacard, X. Martinet, M. Lachaux, T. Lacroix, B. Roziere, N. Goyal, Eric Hambro, F. Azhar - 2023

2 papers in library cite

G. Ke, Q. Meng, T. Finley, Tianle Wang, Weizhu Chen, W. Ma, Q. Ye, T. Liu - 2017

1 paper in library cites

E. J. Hu, Y. Shen, P. Wallis, Z. A. Zhu, Yiwei Li, Shijie Wang, Lisa Wang, Weizhu Chen - 2021

2 papers in library cite

Openai - 2023

6 papers in library cite

P. Covington, J. Adams, E. Sargin - 2016

2 papers in library cite

W. Kang, J. Mcauley - 2018

1 paper in library cites

Tri Dao, D. Fu, Stefano Ermon, A. Rudra, C. Re - 2022

1 paper in library cites

Tri Dao - 2023

1 paper in library cites

V. Borisov, T. Leemann, K. Sessler, J. Haug, M. Pawelczyk, G. Kasneci - 2022

1 paper in library cites

R. Wang, R. Shivanna, D. Cheng, Shantanu Jain, D. Lin, L. Hong, E. Chi - 2021

1 paper in library cites

Jeffrey Li, Mingliang Wang, Jeffrey Li, J. Fu, Xudong Shen, J. Shang, J. Mcauley - 2023

1 paper in library cites

Y. Gorishniy, I. Rubachev, A. Babenko - 2022

1 paper in library cites

A. Kazemnejad, I. Padhi, K. N. Ramamurthy, P. Das, Siva Reddy - 2023

1 paper in library cites

J. Shah, G. Bikshandi, Y. Z. Zhang, V. Thakkar, P. Ramani, Tri Dao - 2024

1 paper in library cites

J. Harte, W. Zorgdrager, P. Louridas, A. Katsifodimos, D. Jannach, M. Fragkoulis - 2023

1 paper in library cites

N. Pancha, A. Zhai, J. Leskovec, C. R. Rosenberg - 2022

1 paper in library cites

K. Rangadurai, Yibo Liu, S. Malreddy, Xiaodong Liu, P. Maheshwari, V. Sangale, F. Borisyuk - 2022

1 paper in library cites

G. Zabergja, A. Kadra, J. Grabocka - 2024

1 paper in library cites

P. Gage - 1994

3 papers in library cite

Michael I. Jordan - 1986

3 papers in library cite

F. Sun, Joseph Liu, Jeffrey Wu, C. Pei, Xiangning Lin, W. Ou, P. Jiang - 2019

1 paper in library cites

D. Babaev, N. Ovsov, I. Kireev, M. Ivanova, G. Gusev, I. Nazarov, A. Tuzhilin - 2022

1 paper in library cites

M. Awais, M. Naseer, S. Khan, R. M. Anwer, H. Cholakkal, Mubarak Shah, Michael Yang, F. S. Khan - 2023

1 paper in library cites

Chun-Liang Li, Ze Liu, M. Wu, Yiheng Xu, H. Zhao, P. Huang, G. Kang, Qinlang Chen, Wentao Li, D. L. Lee - 2019

1 paper in library cites

Q. Pi, W. Bian, G. Zhou, X. Zhu, K. Gai - 2019

1 paper in library cites

Alec Radford, J. W. Kim, T. Xu, Greg Brockman, C. Mcleavey, Ilya Sutskever - 2023

1 paper in library cites

Danyang Zhang, Shanda Li, X. Zhang, J. Zhan, Peng Wang, Y. Zhou, X. Qiu - 2023

1 paper in library cites

J. Ao, R. Wang, L. Zhou, Caitlin Wang, S. Ren, Yonghui Wu, Shuming Liu, T. Ko, Q. Li, Y. Z. Zhang - 2021

1 paper in library cites

N. Das, S. Dingliwal, S. Ronanki, R. Paturi, Zhongqiang Huang, P. Mathur, J. Yuan, D. Bekal, X. Niu, S. M. Jayanthi - 2024

1 paper in library cites

P. Skalski, D. Sutton, S. Burrell, I. Perez, J. Wong - 2023

1 paper in library cites

Yufang Hou, S. Mu, W. X. Zhao, Yiwei Li, B. Ding, J. Wen - 2022

1 paper in library cites

Diyi Yang, J. Tian, X. Tan, R. Huang, Shuming Liu, X. Chang, J. Shi, Siheng Zhao, J. Bian, Xiaobao Wu - 2023

1 paper in library cites

D. Mcelfresh, S. Khandagale, J. Valverde, V. C. Prasad, G. Ramakrishnan, M. Goldblum, C. White - 2023

1 paper in library cites

H. Ding, Yi Ma, A. Deoras, Yuzhi Wang, Haiming Wang - 2021

1 paper in library cites

Cited by

0

papers in your library

Cites

27

papers in your library

Read

on August 17, 2025

Your review

Tags

Paper Aliases

No aliases