Subscribe to get high-signal insights on how modern fintech is built.

anatomy

Stripe's ML Infrastructure — Beyond Fraud

Radar catches fraud, but the other ten ML systems handle authorization, monitoring, underwriting, and the foundation model underneath all of it.

By Alex Kugell ·

You know about Radar. Stripe's fraud detection system scores hundreds of millions of predictions, trained on hundreds of billions of data points from the payment network. When people talk about Stripe and machine learning, Radar is usually the entire conversation.

It shouldn't be. Fraud detection covers maybe a fifth of Stripe's ML surface area.

Stripe runs at least ten distinct ML systems spanning training infrastructure, feature engineering, authorization optimization, anomaly detection, credit underwriting, and internal AI tooling. The engineering organization behind them posts jobs listing PyTorch, RAG pipelines, LLM fine-tuning, and deep neural networks.

The rest of the machine is bigger than most fintech companies' entire ML operation.

Stripe ML Surface Area
Infrastructure
Railyard
Model training
Kubernetes, framework-agnostic
Shepherd
Feature engineering
Built on Chronon
Customer-Facing ML
Radar
Fraud detection
The one everyone knows
Foundation Model
Transaction embeddings
Self-supervised, announced 2025
Adaptive Acceptance
Authorization formatting
Per-issuer optimization
Smart Retries
Subscription recovery
Optimal retry timing
Optimized Checkout
Payment method ranking
Dynamic ordering
Anomaly Detection
Network monitoring
Slice-based time series
Capital Underwriting
Merchant lending
Real-time payment signals
Financial Connections
Bank data enrichment
Transaction categorization
Internal Tools
Kai
Knowledge assistant
RAG on internal data
Harbor
AI prototyping
Natural language to UI

The training layer

Before you can score a payment, you need to train the model that scores it. Fraud models go stale fast. A pattern that catches card-testing in March gets bypassed by April. Stripe needed to retrain hundreds of models daily without each ML team managing its own compute.

Railyard is their answer. It's a Kubernetes-based training platform that gives every ML team at Stripe a generic API for model training. An engineer defines a training job. Railyard handles scheduling, resource allocation, and execution across a multi-instance-type cluster.

Before Railyard, Stripe engineers manually launched Python training scripts on shared EC2 instances. The setup was fragile and couldn't scale.

After eighteen months in production, Railyard was training hundreds of new models each day. By 2019, Kelley Rivoire presented at Strata Data Conference and described thousands of models retrained per week, most of them fraud models that degrade if they sit still.

The design lesson the team emphasized was a generic API that isn't tied to one ML framework. Teams use PyTorch, XGBoost, TensorFlow, random forests. Railyard manages compute, not model architecture.

The feature layer

Training models is one problem, but feeding them consistent features is a different one entirely.

In a restaurant kitchen, every chef measures "a pinch of salt" differently. The recipes work in each chef's hands, but the dishes taste different every time.

The ML equivalent: a feature computed one way during training and a slightly different way during inference. If "average transaction amount over 30 days" gets a different window boundary in production than it had in training, the model degrades silently. Nobody notices until fraud losses spike.

Stripe built Shepherd to solve this. It's a feature engineering platform based on Airbnb's Chronon, an open-source feature platform that Stripe helped develop starting in 2022. The core guarantee is that a feature defined once gets computed identically for training and for real-time serving.

Chronon builds data pipelines that produce both offline feature tables for model training and online feature endpoints for low-latency inference. The temporal consistency means training data matches what the model actually sees in production. Stripe and Airbnb both run Chronon in production, and a 2026 Confluent conference listing also names Netflix and OpenAI as adopters. Stripe's adaptation, Shepherd, adds whatever internal integrations their stack requires, though the details aren't public.

Authorization optimization

While fraud detection prevents losses, authorization optimization is where ML generates revenue for merchants. Stripe has built ML into three layers of the authorization path.

A $47 charge can succeed or fail depending on how the payment request is formatted, because every card issuer has different preferences. Adaptive Acceptance learns those preferences from network-wide data and adjusts the request before sending, or retries with a modified format after a decline. Stripe claims this recovers about 20% of false declines on average.

When a recurring payment bounces, timing the retry matters more than retrying at all. Smart Retries picks the optimal moment based on hundreds of signals about the cardholder and the issuer. Stripe says this reduces subscription declines by up to 30%.

Optimized Checkout uses ML to decide which payment methods to surface for each buyer. Stripe reports an 11.9% average revenue increase from dynamically ordering payment options.

These are company-reported numbers from Stripe's marketing pages, not peer-reviewed research. But even discounting for sales language, the systems run ML at scale. Stripe's authorization product page attributes as much as $27 billion per year in incremental revenue to its optimization suite, aggregated across all merchants on the network.

The foundation model

Fraud labels are expensive. A human reviewer confirms a charge was fraudulent only after the fact, sometimes weeks later. Training a new model for every downstream task means collecting labeled data for every task.

Stripe's alternative, announced at Sessions in May 2025: a self-supervised foundation model for payments that learns patterns from raw transaction data without any human labels at all. Gautam Kedia, a Stripe engineer, described the architecture: the model treats each charge as a token and sequences of charges as context windows, producing a dense embedding, a single vector, for every transaction.

Foundation Model Data Flow
Raw TransactionsTens of billionsof chargesFoundationModelSelf-supervisedDense EmbeddingOne vector per chargeCard-Testing DetectionAuthorization OptimizationMerchant Risk ScoringUnderwriting

Those embeddings feed downstream models. The first public application was card-testing detection, where organized attackers run thousands of small charges to validate stolen card numbers. Stripe reported that the foundation model raised detection from 59% to 97% on large merchants. Secondary reporting of an a16z interview claims ElevenLabs blocks roughly 2,000 free-trial abusers per day using Stripe's signals.

Stripe can pre-train once on the full network's data, then fine-tune cheaply for specific tasks. Card testing was first. Authorization optimization, merchant risk scoring, and underwriting are natural next surfaces.

Monitoring the network

Global payment metrics can hide local failures. If a UK card issuer starts declining prepaid recurring charges at twice the normal rate, that spike barely moves Stripe's aggregate success numbers. But merchants with heavy prepaid-card volume feel it immediately.

Stripe built an ML-powered monitoring system that cuts the network into "slices," segments defined by issuer, card type, transaction type, geography, and merchant category. Each slice gets its own time-series baseline. When a metric deviates, whether success rate, authentication rate, cost, or fraud rate, the system flags it and routes an alert to the right team.

A patent filing from February 2023 by Lakshmi Narayan, who also authored the engineering blog post on this system, describes the slice generation and anomaly detection architecture in detail. This is ML applied to the health of the payment network itself, not to individual transactions.

Capital and Financial Connections

Stripe Capital offers merchant financing, and the underwriting is automated. The models draw on something most lenders don't have: real-time payment processing data.

When a merchant runs on Stripe, the platform sees daily revenue, average transaction size, seasonal patterns, refund rates, and chargeback frequency. That data feeds ML models for credit decisioning. Job postings describe the stack as regression, random forests, and deep neural networks, with explainability and anomaly detection as core requirements.

Financial Connections is Stripe's open banking product, giving merchants access to customer bank data with the customer's permission. The ML layer handles transaction categorization, risk scoring, and data enrichment. A posting for a staff ML engineer on this team lists PyTorch, TensorFlow, XGBoost, and Spark, and says LLM experience is preferred.

Internal AI tools

Stripe also builds ML for its own employees, not just for merchants.

A company with thousands of employees and years of internal documentation generates more institutional knowledge than any single person can search. Kai (Knowledge AI Platform) is Stripe's answer: a RAG-based assistant that connects to the data warehouse, Slack, and Google Suite. Reports describe tens of thousands of daily sessions across the company, and a LangChain case study describes the system's architecture as built on deep agents.

Harbor lets any employee describe an interface in plain language and get back a functional prototype built with Stripe's design components and mock data. It started as a product team tool but spread to finance, risk, and sales. Because Harbor exposes its actions as tool calls, a coding agent can take a Harbor prototype and rebuild it as production code.

What the hiring signal tells you

Stripe's current ML job postings show where investment is going. As of late 2026, an ML Engineer Manager for the AI Conversation Platform is building RAG-based systems on LLMs and fine-tuning proprietary models, which suggests a customer-facing AI assistant for merchants beyond what Kai does internally.

A Staff ML Engineer for Financial Connections requires ten years of production ML experience. A Growth Platform engineer lists building and evaluating LLM applications alongside reusable ML capabilities like training automation and model monitoring.

A Staff Software Engineer on ML Platform lists familiarity with SageMaker, Bedrock, and Databricks.

Stripe is layering LLMs and foundation models on top of an already-mature classical ML infrastructure. The team that built Railyard and Shepherd is now building the serving and orchestration layer for a different generation of models.

The full surface

Count the ML systems: Railyard for training, Shepherd for features, Radar for fraud, the foundation model for embeddings, Adaptive Acceptance for authorization, Smart Retries for subscriptions, Optimized Checkout for conversion, anomaly detection for network monitoring, Capital underwriting for lending, Financial Connections for bank data enrichment, Kai for internal intelligence, and Harbor for prototyping.

Twelve systems, and that's only what's visible from engineering blogs, job postings, product pages, and patent filings. The internal ML surface is almost certainly larger.

Stripe processed nearly $2 trillion in payment volume in 2025. At that scale, a 1% improvement in authorization rates translates to billions in merchant revenue. The ML infrastructure runs deep enough that removing it would break authorization, monitoring, lending, and internal operations, not just fraud detection.

Sources

Frequently Asked Questions

What ML systems does Stripe run besides Radar fraud detection?
Stripe operates at least ten distinct ML systems. Railyard handles model training on Kubernetes, retraining thousands of models weekly. Shepherd manages feature engineering built on Airbnb's Chronon. Adaptive Acceptance and Smart Retries optimize payment authorization. A self-supervised foundation model produces transaction embeddings. Anomaly detection monitors payment network health in real time. Capital uses ML for automated underwriting, and Financial Connections enriches open banking data with ML classification.
How does Stripe's payments foundation model work?
Announced at Sessions in May 2025, the model is self-supervised and trained on tens of billions of transactions. It treats each charge as a token and sequences of charges as context windows, producing a single dense embedding per transaction. Those embeddings feed downstream models for fraud detection, authorization optimization, and merchant risk scoring. Stripe reported that it raised card-testing detection from 59% to 97% on large merchants.
How does Stripe train hundreds of ML models per day?
Stripe built Railyard, a Kubernetes-based training platform with a generic API that accepts any ML framework. Engineers define a training job and Railyard handles scheduling and resource allocation across a multi-instance-type cluster. Before Railyard, teams manually launched Python training scripts on shared EC2 instances. After eighteen months in production, the platform was training hundreds of new models each day.
What is Stripe's Adaptive Acceptance and how does it increase payment authorization rates?
Adaptive Acceptance uses ML to reformat payment requests based on each card issuer's preferences. The same charge might need different message structures for different issuers. The system adjusts requests before sending or retries with modified formatting after a decline. Stripe claims it recovers about 20% of false declines on average and contributes to an average 3.8% authorization rate lift across its network.
Does Stripe use LLMs and RAG systems internally?
Yes. Stripe's Knowledge AI Platform, called Kai, is a RAG-based assistant available to all employees. It connects to the internal data warehouse, Slack, and Google Suite. Stripe also built Harbor, an AI prototyping tool that generates functional interfaces from natural language descriptions using Stripe's design components. Current job postings for an AI Conversation Platform team describe RAG systems, LLM fine-tuning, and agent-based architectures.

Built by Trio, a fintech-native engineering partner helping teams build the next generation of financial technology and infrastructure.

Subscribe to Ledger Drift for high-signal insights into how modern fintech is built, from systems to code to teams.

Keep reading

anatomyRamp Is Building the CFO Control PlaneThree moves in five weeks turned an expense card company into the layer that sits above every bank a business uses.
fintechWhat a Federal Stablecoin Issuer Actually Has to RunThe OCC's final GENIUS Act rule turns '1:1 backed stablecoin' into an operating spec with a liquidation trigger.
fintechCards Without Card ProgramsMesh provisions a Visa credential the user never sees, converts crypto at purchase, and settles to the merchant as a standard card payment.
View more ›