There’s a perennial buzz about AI seeping into almost every part of a company’s operations. However, some of the most valuable and tangible results can be achieved if AI can help prevent scenarios that hit people where it hurts the most: losing money.
Stripe’s use of AI to boost fraud detection and increase security measures is a crucial case study on how AI can be used in payment processing, especially given the scale at which the company operates, with customers like OpenAI, Amazon, Google, Apple, and many more.
At the Stripe Sessions product keynote held last month, the company announced the Payments Foundation Model as part of its efforts to boost fraud detection and enhance security. Stripe also touted it as the “world’s first foundational model built for payments”.
This foundation model highlighted the company’s success in identifying card testing, wherein bad actors try to determine whether stolen card information is valid so that they can use it to make purchases.
Stripe Built a Transformer-Based ‘Payments Foundation Model’
Gautam Kedia, who leads applied machine learning at Stripe, elaborated on the company’s methodology in a LinkedIn post.
Kedia revealed that while standard machine learning models have helped Stripe reduce fraud, each requires task-specific training for activities like authorisation, fraud detection, dispute resolution, and more.
“Given the learning power of generalised transformer architectures, we wondered whether an LLM-style approach could work here. It wasn’t obvious that it would—payments are like language in some ways,” Kedia explained.
Hence, the company decided to build a foundational payments model—a self-supervised model that learns “dense, general-purpose vectors for every transaction, much like a language model that embeds words”. The model is said to be trained on tens of billions of transactions and distils each charge’s key signals into a single embedding.
“You can think of the result as a vast distribution of payments in a high-dimensional vector space. The location of each embedding captures rich data, including how different elements relate to each other.”
Kedia further explained that payments with shared characteristics naturally group together. For example, transactions from the same card issuer are clustered, those from the same bank are even closer, and payments using the same email address appear almost indistinguishable.
He further indicated that these ‘rich embeddings’ make it easier to spot nuanced, adversarial transaction patterns and build more accurate classifiers based on both the features of an individual payment and its relationship to other payments in the sequence.
In the last two years, the company has reduced card testing for users on Stripe by 80%. However, more sophisticated attacks, where the card testers hide novel attack patterns in the volumes of the largest companies, make it hard to spot them with traditional methods, Kedia suggested.
“We built a classifier that ingests sequences of embeddings from the foundation model and predicts if the traffic slice is under an attack,” he said. Kedia added that this works in real time so that Stripe can block attacks before they hit businesses.
“This approach improved our detection rate for card-testing attacks on large users from 59% to 97% overnight.”
He also said that Stripe’s success may suggest that payment activities contain semantic meaning. “Just like words in a sentence, transactions possess complex sequential dependencies and latent feature interactions that simply can’t be captured by manual feature engineering,” he said.
Kedia also shared a table comparing the performance of Stripe’s own foundational model and ‘incumbent’ machine learning models.
Stripe Also Recovered $6 Bn in Legitimate Transactions That Were Declined
Notably, the company also reported using AI to prevent redundant transactions and to identify which transactions must actually be retried.
“This resulted in more than $6 billion in legitimate declined transactions recovered for our users in 2024—a record amount,” John Affaki, payments business lead at Stripe, wrote in a blog post.
The company stated that it resolved the issue through its product, Adaptive Acceptance, which uses AI to automatically identify falsely declined transactions.
Stripe said it can recognise various patterns in transaction data, which indicate that a legitimate payment was mistakenly rejected by issuers as suspected fraud.
Previously, Stripe used a gradient-boosted tree model, XGBoost, but then transitioned to a TabTransformer-based deep neural network, which the company calls TabTransformer+. “This system excels at modelling complex interactions among hundreds of factors that influence transaction success,” the company stated.
It further stated that the new architecture also features high-dimensional embeddings, which map payment patterns and enable the model to capture and analyse signals that affect payment outcomes. This allows the model to make “more nuanced decisions” about which declined transactions to retry and how to adjust them for a higher approval chance.
“Based on these improvements, Adaptive Acceptance’s new AI model achieves 70% greater precision in identifying legitimate transactions that have been falsely declined. This increased precision allowed us to recover more revenue than ever last year while reducing retry attempts by 35%,” the company said.
Besides, Stripe’s fraud prevention tool Radar was updated with automated authentication capabilities. It can now trigger 3DS, Stripe’s additional layer of security, to enable a two-factor authentication flow. Stripe also said it is backed by a new multihead model and a decision-making layer, and early users have seen a 30% reduction in fraud on eligible transitions.
All things considered, AI is extensively used in the payments processing industry. Several leading global giants, including Razorpay, a competitor of Stripe, are using AI to tackle delayed customer payments, simplify setting up payment gateways, and reduce the return-to-origin problem.
The post How Stripe Used AI to Boost Fraud Detection from ‘59-97% Overnight’ appeared first on Analytics India Magazine.