Yuan Liu (@RealYuanLiu) profile picture

Part-time Hacker. Software Engineer @Stripe.

Seattle
Joined May 2011
Photo by Yuan Liu (@RealYuanLiu)Photo by Yuan Liu (@RealYuanLiu)
The decision to work for a startup can be stressful. Everyone wants to get rich, but it is impossible to accurately predict the trajectory of any given company. One important lesson I learned: examine its capital efficiency when deciding to join a startup. lyncredible.com/2022/07/17/c…
Always fascinated with traffic light countdown in Amap in China. Turns out it is implemented by crowdsourcing motion data. Had thought they had integration with city govs (which they do but with just a small number of cities). What is Google doing with maps all these years?
202
TL;DR: We built a transformer-based payments foundation model. It works. For years, Stripe has been using machine learning models trained on discrete features (BIN, zip, payment method, etc.) to improve our products for users. And these feature-by-feature efforts have worked well: +15% conversion, -30% fraud. But these models have limitations. We have to select (and therefore constrain) the features considered by the model. And each model requires task-specific training: for authorization, for fraud, for disputes, and so on. Given the learning power of generalized transformer architectures, we wondered whether an LLM-style approach could work here. It wasn’t obvious that it would—payments is like language in some ways (structural patterns similar to syntax and semantics, temporally sequential) and extremely unlike language in others (fewer distinct ‘tokens’, contextual sparsity, fewer organizing principles akin to grammatical rules). So we built a payments foundation model—a self-supervised network that learns dense, general-purpose vectors for every transaction, much like a language model embeds words. Trained on tens of billions of transactions, it distills each charge’s key signals into a single, versatile 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. Payments that share similarities naturally cluster together: transactions from the same card issuer are positioned closer together, those from the same bank even closer, and those sharing the same email address are nearly identical. These rich embeddings make it significantly easier to spot nuanced, adversarial patterns of transactions; and to build more accurate classifiers based on both the features of an individual payment and its relationship to other payments in the sequence. Take card-testing. Over the past couple of years traditional ML approaches (engineering new features, labeling emerging attack patterns, rapidly retraining our models) have reduced card testing for users on Stripe by 80%. But the most sophisticated card testers hide novel attack patterns in the volumes of the largest companies, so they’re hard to spot with these methods. We built a classifier that ingests sequences of embeddings from the foundation model, and predicts if the traffic slice is under an attack. It leverages transformer architecture to detect subtle patterns across transaction sequences. And it does this all in real time so we 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. This has an instant impact for our large users. But the real power of the foundation model is that these same embeddings can be applied across other tasks, like disputes or authorizations. Perhaps even more fundamentally, it suggests that payments have 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. Turns out attention was all payments needed!
175
543
236
5,188
1,304,248
The @stripe product keynote just finished! We announced a lot of new stuff. (We actually couldn't fit everything into the keynote.) Some highlights: • We've built and deployed the first general-purpose Payments Foundation Model. Trained on tens of billions of transactions and already leading to very large fraud reductions. • We announced Stablecoin Financial Accounts. Businesses in 101(!) more countries can now store stablecoin balances in Stripe and use our regular fiat money movement rails around the world. The magic of stablecoins comes when they're integrated with the rest of the financial ecosystem. I think it's the biggest international launch we'll ever do -- businesses from 151 countries can now use Stripe. • Stripe Profiles: your public identity on the Stripe network. Stripe Profiles will let you streamline invoicing and payments with other businesses on Stripe. (We’ll soon launch reservations for Stripe Profiles.) • Stripe Verified, a new service that will help you navigate global requirements for payment processing with personalized monitoring, enhanced protections, and expert assistance. • We're adding multicurrency support to Stripe accounts: instead of converting all balances to a single currency, we're going to make it easy to store, convert, and operate across different currencies. We want to make it possible to use Stripe as your financial home. • Stripe Orchestration: manage multiple payment processors directly within Stripe. • Support for many new payment methods. You can now access more than 125 global payment methods on Stripe, including stablecoins and real-time payment schemes like Pix and UPI. • We’ve upgraded the AI models built into Optimized Checkout Suite and now use more than 100 signals to personalize the checkout in real time. A/B tests indicate that Optimized Checkout Suite increases revenue by 11.9% on average. • Managed Payments: merchant of record is coming to Stripe! Enter new markets while we take care of global taxes, fraud prevention, dispute management, fulfillment, and more. • A new Connect dashboard, with vastly improved visibility into what's happening across your platform. • Radar for Connect: it’s now way easier to detect and manage fraud and compliance issues with subaccounts. • Networked onboarding for platforms: users no longer need to re-enter their details if they’ve onboarded before. • Smart Disputes: AI automatically responds to disputes for you. Early results show that companies win 13% more chargebacks. We also put skin in the game: we cover the fee if you lose. • Radar now supports ACH and SEPA. This reduces fraud rates by 20% and 42% respectively. • A bunch of usage-based billing improvements. It can now ingest up to 100,000 events every second. • Stripe Terminal can now be used with third-party hardware, starting with Verifone. • Klarna is coming to Link. • Authorization Boost. AI automatically updates cards and tokens, determines optimal transaction routing across networks, and determines if and how to retry failed payments (if we’re confident that the failure was ephemeral). • Radar risk scores are now available via the API. (I.e. they can become a feature for in-house fraud systems.) • Stripe Tax is now available in 102 countries (up from 57 last year), and we also now automate the entire tax lifecycle (monitoring, registration, collection, filing). • New FX Quotes API. • Payment method sharing: if you have multiple Stripe accounts, you can now share payment details across them, saving the need to have customers re-enter their details. • Stripe Issuing now supports consumer card programs. (Long-requested!) • Global Payouts: pay customers, contractors, and other third parties with just an email address. • Stripe Workflows: build, test, and execute multistep flows that orchestrate behavior across Stripe multiple products—using your data, Stripe APIs, and conditional logic. • Stripe Scripts: a new way to extend and customize the logic in Stripe Billing. This will soon expand to cover many parts of the Stripe platform. • Benchmarking: compare your performance to similar businesses on Stripe. • You can now import third-party data into Stripe Capital, which enables expanded eligibility for your customers. • A new Issuing rules engine: granular configurability over authorization decisions. • Global Issuing via stablecoins: a simple and cohesive way to administer global card programs. Ramp is using this to massively accelerate their global expansion. • Data in Sigma is now far faster (6 hour latency, down from 24 hours). That'll continue to get faster in the coming months. Similar data freshness improvements across other products. • You can now use Instant Payouts to withdraw funds from Stripe to debit cards in 32 countries. • The Dashboard AI agent: create products, process refunds, and generate payment links by just telling our little critter what to do. Whew! I’m not sure I even covered everything. A few of the above are years in the works and could have received launch events by themselves. I’m very proud of the team. So what are the common themes? • We’re rethinking and upgrading pretty much every part of the stack with AI. (Embedding/foundation models, agents, etc.) • Stablecoins are enabling unprecedented global access and expansion. • We’re making a lot of things deeply configurable that weren’t previously. (Scripts, Workflows, and more.) Ties to our goal of building truly programmable, global financial services.
96
139
77
1,687
282,464
We’ve been using AI to help businesses on Stripe grow for more than 10 years. Here’s the latest.
17
14
4
73
16,334
Excited to share my chat with @saranormous & @eladgil We talked about how Stripe is applying AI across our products, our journey from traditional ML to LLMs, what we are seeing across the AI ecosystem, and how AI can be applied to grow the economy: podcasts.apple.com/us/podcas…
1
5
4
39
32,895
Our internal LLM tool, built last March, allows Stripes to safely experiment with LLMs. With 3K Stripes using the tool weekly and over 700 shared prompts, the tool is reshaping how we work and build for our users. We shared more with @bentossell
How do you get your team to use AI? I gathered insights from Stripe, Google, Intercom, Zapier, Adobe and others and came up with 9 ways they help encourage employee adoption. - AI champions - Demos & workshops - Small experiments, cross-functional teams - Hackathons - Internal tools - Regular discussions - Access to tools - Education
3
8
35
9,903
Summer time means I am going to help quite a few new grads to ramp up. Over the last few years I learned a few hacks to make the process more effective. In this post I describe the spin-up buddy setup, and some admin task tricks like the Slack user group. lyncredible.com/2022/07/25/n…
Inspired by Will, I wrote up my learnings of accounting to read earnings reports. It is a great tool to help me understand my employers and make career decisions, despite being at a position far from the executives. lyncredible.com/2022/07/10/l…
Wrote up some notes on reading profit & loss statements, which are a surprisingly useful (often ignored!) tool for engineers and eng leadership to better understand the companies they work at, and also how engineering contributes revenue and expenses lethain.com/profit-and-loss-…
3
I wrote a post to argue that leadership is not a title, but a skill. I referred to Tom Brady as an example of true leadership. It is too bad that Brady, as @patrickc would say, is not going to make a few more slam dunks in Super Bowl LVI later today. lyncredible.com/2022/02/13/l…
1
Touchdowns: 5. Slam dunks: 0. I made the prediction! 😝
BTW, we are hiring if you would like to work with Joe and me to accelerate ML at Stripe and increase the GDP of the Internet. stripe.com/jobs/search?q=mac…
1
I’m very excited to share that the Responsible Machine Learning team at Stripe is hiring. Join me and help equalize access to the internet economy! There are not many places where ML fairness, accountability, and transparency work can have more impact. stripe.com/jobs/listing/mach…
2
15
2
74
After dipping my toe into Ethereum mining over the holiday break, I was amazed at how much centralization there is despite the best intentions that were put into designing a decentralized system. I walk through the journey and my thoughts in this post: lyncredible.com/2022/01/14/c…
1
@moxie's impressions on Web3 post is clearly an inspiration. Read his post instead if you only have time for one: moxie.org/2022/01/07/web3-fi…
Weekend fun project: set up alerting from home security system to (via email) @cloudmailin to private endpoint hosted on @render to family @SlackHQ. All free!
2
1
7
Thanks @umachingunde for the amazing product!
1
5