<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wen Yao on Medium]]></title>
        <description><![CDATA[Stories by Wen Yao on Medium]]></description>
        <link>https://medium.com/@yao.wen85?source=rss-8788e9c34173------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Dd-VMns0zVZ0DsOk.</url>
            <title>Stories by Wen Yao on Medium</title>
            <link>https://medium.com/@yao.wen85?source=rss-8788e9c34173------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:12:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yao.wen85/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Foundation models for bank transactions: from a single description to a full history]]></title>
            <link>https://engineering.plaid.com/foundation-models-for-bank-transactions-from-a-single-description-to-a-full-history-5d83dbeb117d?source=rss-8788e9c34173------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d83dbeb117d</guid>
            <category><![CDATA[transactions]]></category>
            <category><![CDATA[foundation-models]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[credit-risk]]></category>
            <dc:creator><![CDATA[Wen Yao]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 16:01:06 GMT</pubDate>
            <atom:updated>2026-11-20T16:01:06.121Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>CLERT learns what a single transaction means. MUSERT builds on it to read a full transaction history, and in offline tests it improved all three incumbent risk models we paired it with.</em></blockquote><p>By <a href="https://www.linkedin.com/in/wen-yao-a1497715/"><strong>Wen Yao</strong></a></p><p>The description on a bank statement is written for settlement systems, not for people. “TRADER JOE’S 0432 MANHATTAN NY” is easy to read. Others take work: “ACME DIR DEP PAYROLL” and “ACME * DJ3LD5A74” name the same company, but one is a paycheck coming in and the other is a card purchase going out. A language model reading only the string can’t tell you much about who Acme is, or whether that paycheck arrives every two weeks. That context isn’t in the string. It comes from outside knowledge and from the rest of the account’s history.</p><p>This matters for two kinds of work. The first is decoding a single transaction: its category, the merchant or employer it names, and how the money moved. The second is reading a transaction history to answer questions like whether a borrower will fall seriously behind, a payment will bounce, or a cash advance will be repaid. Today those history-based predictions are usually made by tree-based models over summary features such as counts, sums, and variance by category and time window. They are strong, auditable, and cheap to serve, but the summaries throw away the order of transactions, the time between them, and the text of the descriptions.</p><p>We presented two papers on this work at the <a href="https://thebal.ai/mfmb2026/accepted-papers.html#p1302">MFMB ’26 workshop</a> at ACM ICAIF. CLERT (Contrastive Learning-enhanced Encoder Representations of Transactions) is a text encoder for single transaction descriptions. MUSERT (Multitask User Sequence Encoder Representations for Transactions) is a sequence model over a transaction history that uses CLERT to read each description. They are the research versions of Plaid’s <a href="https://plaid.com/blog/building-transaction-foundation-model-intelligent-finance/">transaction foundation model</a>, and <a href="https://plaid.com/blog/sequential-foundation-model/">sequential foundation model</a>, which now powers our newest LendScore Arc, Signal and Cash Advance Index products. The results below come from offline experiments in the papers, not from those products.</p><p><strong>CLERT: grounding a transaction in plain English</strong></p><p>The common approach treats transactions as a language of their own and trains on raw transaction streams. That teaches a model patterns across transactions, but much of what a transaction means isn’t in the data. We went the other way and trained an encoder to match each transaction with a plain-English explanation of it. The pipeline has three parts, shown below: an LLM-driven interpreter that writes an explanation for each transaction, a contrastive stage that trains the encoder to match transactions to their explanations, and fine tuning for downstream tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*rm-o6NsGSjECoJ4mBCxptA.png" /><figcaption>Overview of the CLERT training pipeline</figcaption></figure><p>We built a three-stage “transaction interpreter”:</p><ul><li><strong>Entity extraction</strong>. An LLM parses entities out of each description. Knowing what a transaction is takes both who it names and how the money moved, so the scheme tags payment-type markers like DIR DEP, ACH, and POS alongside organization names. That is what separates the two Acme transactions above.</li><li><strong>Web context</strong>. For obscure entities, we run targeted web searches. A search for “ACME” might return that Acme Corp is a regional manufacturer.</li><li><strong>Interpretation</strong>. A second LLM reads the description, the amount, the direction of the money, and the gathered context, then writes two short interpretations giving a category, the entities and their roles, and the payment method. For “ACME DIR DEP PAYROLL,” one might read: “Payroll direct deposit from employer Acme Corp, a manufacturer, paying wages via ACH.” It also writes one plausible but wrong interpretation, a hard negative, such as: “Refund from Acme Corp for returned merchandise, credited via ACH.”</li></ul><p><strong>Training the encoder</strong></p><p>We started from Multilingual-E5-Large, an open-source 560M-parameter text encoder, and trained it with a SimCSE-style contrastive objective. Each description is pulled toward its own interpretations and pushed away from two kinds of negatives: its hard negative, and the interpretations of every other transaction in the batch.</p><p><strong>Transaction categorization</strong></p><p>Hand-labeling doesn’t scale to the volume a transformer needs, so we had an LLM label the data. We refined its prompt against roughly two thousand human-labeled transactions until its labels matched the human ones at 0.92 macro-F1, which averages F1 across all categories. We then used it to label several hundred thousand more transactions into ~130 fine-grained categories.</p><p>To compare, we attached a single linear layer to each one and fine-tuned end to end with the same recipe. The comparison that matters most is CLERT against the model it started from. The two share an architecture and a fine-tuning recipe, so the contrastive training is the only difference between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uw8jv4MNgQ8aD0WFc0GrqQ.png" /><figcaption><em>Transaction categorization performance after fine tuning (T</em>he paper compares 11 public encoders)</figcaption></figure><p>CLERT gained 3.1 macro-F1 points over its starting model at 500 steps and held a 2.0-point lead at convergence (0.689 to 0.709). It was also the best model at convergence, 1.3 points ahead of NeoBERT. Scale alone doesn’t decide this task: NeoBERT beats every larger baseline at 245M parameters, while Qwen3-Embedding-0.6B leads early but finishes below the starting model.</p><p><strong>Parsing merchants and other entities</strong></p><p>We also fine-tuned CLERT for named-entity recognition (NER). In “TRADER JOE’S 0432 MANHATTAN NY,” that means tagging the merchant, the city, and the state. In “ACME DIR DEP PAYROLL,” it means tagging ACME as the source of income and DIR DEP as the payment type.</p><p>It scored 0.84 micro-F1, which pools every labeled span into one score, and 0.77 macro-F1, which averages across the 11 entity types. The biggest gain over a hybrid baseline of hand-written rules plus a BERT-based model was in merchant names, where exact match rose from 0.44 to 0.79.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03AYdxk92_4MoEx0YWxp1w.png" /><figcaption>CLERT fine tuning results on NER tasks</figcaption></figure><p><strong>MUSERT: reading a transaction history</strong></p><p>Many of the questions that matter, like whether a loan will default or a payment will bounce, depend on the whole history: what came before, in what order, and how far apart. The question we cared about is whether a pretrained sequence model adds anything on top of the models already in use, and where. Those incumbents are tree-based models over feature sets refined across years of operations. Anything we add has to improve on what they already catch, and run fast enough for a live system.</p><p><strong>What we built</strong></p><p>MUSERT reads a transaction history as a time-ordered sequence of up to 4,096 transactions. Each transaction is embedded by three parallel streams:</p><ul><li><strong>Text</strong>. CLERT encodes the description. CLERT stays frozen while MUSERT trains, so its 1024-dimensional outputs are computed once, cached, and projected down to the sequence model’s width.</li><li><strong>Time</strong>. The gaps between transactions are irregular and predictive in themselves. We encode the log of the gap with Time2Vec, a learned periodic time embedding, alongside cyclical embeddings of hour of day, day of week, and month. Many bank records carry a date but no time, so an explicit mask zeroes the hour-of-day component rather than letting midnight act as a real observation.</li><li><strong>Categorical and amount fields</strong>. Account type, category, and similar fields get their own embeddings. Amount is encoded three ways: its sign, a normalized log magnitude, and a quantile bucket, which gives the model both a smooth and a discrete view of size.</li></ul><p>The streams feed a causal Transformer, so each transaction attends only to what came before it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TYba36G8cL3Ko_Hlh3TeKA.png" /><figcaption>MUSERT Architecture</figcaption></figure><p><strong>Three pretraining objectives</strong></p><p>We pretrained MUSERT on three self-supervised objectives together:</p><ul><li><strong>Replaced-token detection</strong>, originally used to train language models to spot words swapped into a sentence. We replaced a portion of the transactions in each history with similar-looking ones and trained the model to find them. This teaches it what fits in context.</li><li><strong>Contrastive predictive coding</strong>, which trains a model to pick the real future out of a set of fakes. MUSERT predicts the representation of transactions several steps ahead. This teaches it which kinds of transactions tend to follow which.</li><li><strong>Temporal contrastive learning</strong>, built on SimCLR. We split each account history into two non-overlapping segments and train the model to embed them close together and far from other people’s segments in the same batch. To do that, the model has to learn what stays consistent about an account over time.</li></ul><p><strong>Adapting MUSERT to each task in two stages</strong></p><p>We kept the existing risk models and gave them more to work with. Every task uses the same two stages.</p><ul><li><strong>Stage 1: task fine-tuning</strong>. We discard the pretraining heads, add a pooling layer and a small MLP classifier, and fine-tune the sequence model on the task’s historical outcomes, such as whether an ACH payment was returned or a loan went 90 days past due. CLERT stays frozen.</li><li><strong>Stage 2: late fusion</strong>. We export MUSERT’s pooled summary of each history as a block of dense features, add it next to the incumbent’s existing features, and retrain the incumbent tree-based model.</li></ul><p><strong>Late fusion improved all three incumbents</strong></p><p>We tested MUSERT on three questions, each against a model already in use. Will this loan default? Will this ACH payment be returned? Will this cash advance become delinquent? All three use out-of-time validation: the model is evaluated on a period after the one it was trained on. These are offline tests on historical data, not live decisions. The data and models are proprietary, so we report relative changes.</p><ul><li>For ACH returns, only a small fraction of transactions can be acted on, so the question is how many returned dollars that fraction catches. In our best configuration, late fusion improved AUPRC by 14.1% and caught 26.5% more returned dollars with 1% of transactions flagged. The gain was smaller at looser thresholds, so it’s largest where the flagging budget is tightest.</li><li>For credit, we sorted every loan in the test set from safest to riskiest. Among the safest 70%, defaults dropped 12.5% once MUSERT was added. Among the safest 20%, they dropped 31%.</li><li>On cash advance, MUSERT improved AUROC by 3.3% and KS by 11.5%. The gain also reaches the metric the product is managed on: across the safest-ranked 40 to 60% of advances, realized dollar loss fell 8 to 11%.</li></ul><p><strong>Cutting median latency from 136 ms to 38 ms</strong></p><p>A model in a live system has to be fast as well as accurate, and speed was the constraint that held MUSERT back. Profiling was clear: reading the descriptions with CLERT takes 80-90% of each forward pass.</p><p>We measured on one mid-range datacenter GPU at batch size 1, scoring a single 300-transaction history. It started at about 136 ms. Exporting to a static graph and serving through a compiled engine brought it to about 71 ms, a gain from operator fusion rather than reduced precision. Distilling CLERT into a smaller, pruned student roughly halved it again, to about 38 ms. We have not yet measured what the smaller encoder costs in accuracy. Lower precision didn’t help on our stack.</p><p><strong>Limitations</strong></p><p>There are a few areas we’re still working on. CLERT learns from explanations and labels written by an LLM. In MUSERT, the balance is off: the sequence model is small next to CLERT, which reads each description and dominates serving time. MUSERT stops improving well before it runs out of training data, which points to the pretraining objectives being too easy rather than the data being the limit.</p><p><strong>What’s next</strong></p><p>For CLERT, the focus is making it smaller without hurting downstream performance. It dominates both pretraining compute and serving latency, so a smaller encoder speeds up everything built on it.</p><p>For MUSERT, We’re testing which pretraining objectives carry the gain, exploring harder ones, and scaling the sequence model up. We’re also extending it to longer histories. Right now every input is a transaction, but other signals available at scoring time, such as balance changes or account connections, could go in as their own event types and give the model a fuller picture of each account.</p><p>If you’re interested in working on problems like this, we’re <a href="https://plaid.com/careers/openings/data/san-francisco-hq/staff-machine-learning-engineer-research-scientist-dfai/">hiring</a>!</p><h3>Acknowledgements</h3><p>Contributors to this work (first name in alphabetical order): Bill Klimczak, Han Yu, Kazi Islam, Kevin Supakkul, Mengjun Zhao, Ozgur Can Seckin, Raghu Chetlapalli, Sam Dutt, Samee Bhadouria, Yubo Fan, Zhenyi Lin</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d83dbeb117d" width="1" height="1" alt=""><hr><p><a href="https://engineering.plaid.com/foundation-models-for-bank-transactions-from-a-single-description-to-a-full-history-5d83dbeb117d">Foundation models for bank transactions: from a single description to a full history</a> was originally published in <a href="https://engineering.plaid.com/">Plaid Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Universal Transaction Categorization: How Plaid unified four ML systems into one]]></title>
            <link>https://engineering.plaid.com/universal-transaction-categorization-how-plaid-unified-four-ml-systems-into-one-f08bf1eade54?source=rss-8788e9c34173------2</link>
            <guid isPermaLink="false">https://medium.com/p/f08bf1eade54</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[foundation-models]]></category>
            <dc:creator><![CDATA[Wen Yao]]></dc:creator>
            <pubDate>Wed, 27 May 2026 15:19:21 GMT</pubDate>
            <atom:updated>2026-05-27T15:19:34.993Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By</strong> <a href="https://www.linkedin.com/in/wen-yao-a1497715/"><strong>Wen Yao</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/melody-zhao-2000/"><strong>Melody Zhao</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/kevinsupakkul/"><strong>Kevin Supakkul</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/christine-l-zhou/"><strong>Christine Zhou</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/han-yu-527840109/"><strong>Han Yu</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/nsundin/"><strong>Nick Sundin</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/ozgur-can-seckin/"><strong>Ozgur Seckin</strong></a><strong>, </strong><a href="https://www.linkedin.com/in/raghuchetlapalli/"><strong>Raghu Chetlapalli</strong></a></p><p>One model change. No product code touched. Accuracy up 13–23% across every downstream product simultaneously.</p><p>That’s the payoff of UXC (Universal Transaction Categorization), Plaid’s unified categorization system. Here’s how we built it, and why unification turned out to be as much an organizational win as a technical one.</p><h3><strong>The problem: Four systems doing the same job</strong></h3><p>Plaid processes data associated with hundreds of millions of financial transactions daily. A raw description like <em>ctlpquality inn debit hold</em> needs to become something meaningful (in this case, a vending machine purchase at Quality Inn) before it can power a consumer’s budgeting apps, credit decisions, or fraud detection.</p><p>To serve the distinct needs of different consumers and customers, Plaid developed four specialized categorization systems:</p><ul><li><strong>Personal Finance Categories (PFC): </strong>16 primary / 104 detailed categories, designed for budgeting and financial wellness apps.</li><li><strong>Credit Categories (CC): </strong>25 primary / 95 detailed categories, tailored for credit underwriting.</li><li><strong>Income categories: </strong>13 income-related categories supporting Credit’s Income Insights.</li><li><strong>V1 categories (legacy): </strong>600+ categories powering legacy products, never retrained</li></ul><p>Each maintained its own ML model, rule engine, labeling pipeline, and monitoring infrastructure. This made sense as each product evolved. But as Plaid’s transaction intelligence matured, we saw a bigger opportunity: improvements to the underlying categorization model that could benefit every product at once. That led us to UXC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jama4iUb4BhYEuV_FkvWFA.png" /></figure><h3>Designing the UXC taxonomy</h3><p>A unified system requires a unified label space, but it also has to work for product teams that already have their own taxonomic languages. Our solution was the <strong>shim layer</strong>: a deterministic, product-owned mapping from UXC labels to each downstream taxonomy. This meant product teams could keep speaking their own language while the underlying model was upgraded without their involvement.</p><p>With that architecture in place, we established four criteria for every UXC category:</p><ol><li><strong>Unambiguous definition. </strong>Each category must have a clear, singular meaning. For example, a Starbucks transaction is FOOD_AND_DRINK_COFFEE, not FOOD_AND_DRINK_FAST_FOOD or FOOD_AND_DRINK_RESTAURANT. The boundary is explicit, accompanied by a clear description and representative examples. This matters because ambiguous categories produce inconsistent labels, which corrupt training data.</li><li><strong>Maximum granularity. </strong>UXC operates at a finer level of detail than any downstream taxonomy, enabling lightweight many-to-one mappings. LOAN_DISBURSEMENTS preserves seven subcategories at the UXC level (LOAN_DISBURSEMENTS_AUTO, LOAN_DISBURSEMENTS_CASH_ADVANCES, LOAN_DISBURSEMENTS_EWA, LOAN_DISBURSEMENTS_MORTGAGE, LOAN_DISBURSEMENTS_PERSONAL, LOAN_DISBURSEMENTS_STUDENT, LOAN_DISBURSEMENTS_OTHER) and in the PFC taxonomy, these collapse into a single TRANSFER_IN_CASH_ADVANCES_AND_LOANS category.</li><li><strong>MECE (Mutually Exclusive, Collectively Exhaustive). </strong>Every transaction maps to exactly one detailed category. If no meaningful category applies, it falls into an explicit “Other” bucket.</li><li><strong>Backward compatible by design</strong>. Each downstream product implements a shim layer: a deterministic mapping from UXC labels to its own taxonomy. This is where product-specific logic lives.</li></ol><p>The resulting UXC taxonomy contains <strong>~130 detailed categories</strong>, sourced from the union of existing taxonomies where PFC and CC were already 80%+ overlapping.</p><h3>Bootstrapping labels: AI annotation at scale</h3><p>Building a new taxonomy creates an immediate cold-start problem: where do the training labels come from? With ~130 categories and transaction descriptions that are often cryptic (<em>AMZN MKTP US*AB123</em>, <em>DIR DEP ACME CORP PAYR</em>, <em>POS DEBIT CHKFILA 333222121 NY NY</em>), even expert human labelers struggle with edge cases.</p><p>We built an AI annotation pipeline to solve this. The system takes a transaction as input, including a normalized description, posted date, and amount, and assigns a UXC label through two stages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PdyPbFVEt1Zv2IkhY7QUg.png" /></figure><p>First, an LLM scans the transaction description and extracts key descriptors such as merchant name, income source, payment type, and general location. For unfamiliar entities, the system performs targeted web searches to gather context. A cryptic description like <em>VIDRINE AUTO PRT</em> gets resolved to an auto parts store through search results, which then informs the categorization.</p><p>Second, a label assignment LLM receives the transaction metadata and any enriched context, along with the full UXC taxonomy definitions, and assigns the most appropriate UXC label.</p><p>We validated quality through iterative evaluation rounds against a human-labeled holdout set: running annotation, identifying disagreements, analyzing error patterns, and refining prompts until AI and human labels agreed more than 90% of the time.</p><p>With that quality bar met, we generated ~1 million labeled transactions. To avoid over-representing common merchants, we used <strong>embedding-based stratified sampling</strong>: embed a large transaction sample, cluster by semantic similarity, sample proportionally from each cluster, and supplement with high-volume transactions. This balanced head-of-distribution coverage with long-tail diversity.</p><h3>Model architecture: From BERT to a domain-specific foundation model</h3><p>With the taxonomy and training data in place, we took a deliberate two-phase approach to the ML model: ship a reliable V1 quickly, then invest in a more powerful V2.</p><h4>UXC V1: A BERT-based classifier</h4><p>The first model fine-tuned a BERT encoder on our AI-annotated training data for multi-class classification, following the same approach described in our<a href="https://plaid.com/blog/how-plaid-parses-transaction-data/"> earlier posts on transaction categorization</a>. It takes transaction descriptions and metadata as input and outputs a probability distribution over UXC labels.</p><p>V1 validated the core thesis: the unified taxonomy worked, downstream shims mapped cleanly, and accuracy already improved over the fragmented systems it replaced. It shipped to production within weeks.</p><h4>UXC V2: Fine-tuning a transaction foundation model with CLERT</h4><p>With the taxonomy validated, we turned to improving the model’s representations. The V1 BERT base encoder had no prior understanding of the cryptic, domain-specific language of bank transactions. UXC V2 replaces that generic encoder with <strong>CLERT</strong> (Contrastive Learning-enhanced Encoder Representations of Transactions), a <a href="https://plaid.com/blog/building-transaction-foundation-model-intelligent-finance/">domain-specific foundation model</a> built by Plaid’s Data Foundations and AI team.</p><p><strong>How CLERT works</strong></p><p>A standard language model treats <em>DIR DEP ACME CORP PAYR</em> as a meaningless string of tokens, because it has never encountered truncated merchant names, abbreviations, and formatting conventions found in bank transaction descriptions. CLERT solves this by learning transaction-specific representations through contrastive learning before being fine-tuned on UXC labels:</p><ol><li><strong>Transaction interpretation. </strong>An agentic interpretation pipeline translates raw transactions into plain-English explanations. For each transaction, the system generates two correct “positive” interpretations and one plausible but incorrect “hard negative”:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fItDpqOE1NXDaNqxfoFF1w.png" /></figure><p><strong>2. Contrastive pretraining. </strong>Using a Multilingual-E5-Large encoder as its backbone (chosen for its strong performance on semantic similarity benchmarks and cross-task generalization), CLERT is trained on ~1M transaction-interpretation pairs. The result is a model that maps cryptic transaction strings and their plain-English meanings into a shared embedding space, so that semantically similar transactions end up close together, regardless of how they’re formatted or abbreviated. This helps CLERT learn the language of financial transactions, not just their surface tokens. The figure below illustrates this with “positive” examples as correct interpretations and “hard negatives” as plausible but incorrect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5nCnEWg3OGHiEjxXjjJfg.png" /><figcaption>Overview of the CL training objective</figcaption></figure><p>A qualitative view of the learned embedding space is shown in the figure below. Before contrastive learning, the E5 encoder keeps transaction descriptions (blue) and their interpretations (orange) in separate regions, with the orange points forming tight clusters far from the blue cloud. After contrastive learning, the tighter alignment confirms that the encoder has learned to recognize the semantic equivalence between a cryptic transaction string and its plain-English explanation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mFTBjsp-bFVbdX1GLAf6Aw.png" /></figure><p><strong>3. Fine-tuning for UXC. </strong>A single linear classification layer is attached to the pretrained CLERT encoder and fine-tuned on the labeled UXC transactions as mentioned in the previous section. The pretrained representations give the model a massive head start on understanding transaction semantics.</p><h4>Why a foundation model matters</h4><p>CLERT’s pretrained representations unlock three practical benefits:</p><ul><li><strong>Data-efficient fine-tuning.</strong> Because CLERT already understands the language of transactions, downstream tasks require a fraction of the labeled data that a generic encoder would need to reach the same performance.</li><li><strong>Fast adaptation to new domains.</strong> The same data efficiency makes expansion to new markets practical. Adapting to a different country’s transaction formats only requires a small set of local examples because the model already understands the structure of financial transactions; it just needs to learn local merchants and conventions.</li><li><strong>A foundation for multiple tasks.</strong> Categorization is just one application. The same pretrained CLERT encoder can be fine-tuned for entirely different tasks like merchant name extraction with minimal additional data. Invest once in pretraining, then adapt cheaply to many downstream problems.</li></ul><h3>Results</h3><p>UXC V2 delivers up to 13% higher accuracy on primary categories and 23% higher accuracy on detailed subcategories, with F1 gains of 10–30% on key categories like credit card payments, wages, and loan payments.</p><p>The V1-to-V2 upgrade required no changes to shim layers or downstream products. The model swap was fully contained within UXC: one fix, one deployment, universal impact.</p><p>Serving a 560M-parameter model at Plaid’s scale required care on the infrastructure side. FP16 quantization via ONNX Runtime produced no accuracy degradation versus FP32 and halved our GPU hosting footprint, keeping cost and latency within budget despite a ~5x parameter increase over v1.</p><h3>The real payoff: Shared vocabulary and faster iteration</h3><p>The most immediate benefit of unification is the ability to improve the underlying model without requiring changes from downstream product teams. We proved this with the V1 → V2 upgrade: CLERT replaced the generic BERT encoder, every downstream taxonomy saw accuracy improvements, and no product team changed a line of code. One model upgrade, one deployment, universal impact.</p><p>But the technical gains were only part of the story. Aligning taxonomies across PFC, Credit, and Income forced teams to debate definitions, reconcile edge cases, and agree on what transaction labels should actually mean. The result was more than a shared model architecture but also shared vocabulary.</p><h3>What’s next</h3><p><strong>Merchant name parsing and normalization.</strong> We’re applying the same pretrained CLERT encoder to merchant name normalization, parsing and normalize merchant names from raw transaction descriptions. CLERT’s understanding of transaction structure means this requires significantly less labeled data than a standalone Named Entity Recognition model would.</p><p><strong>Sequential foundation models. </strong>CLERT understands individual transactions. The next frontier is understanding sequences over time, like regular paychecks followed by rent payments, or rapid fund cycling that may indicate fraud. This behavioral understanding will power the next generation of Plaid’s risk and insights products.</p><h3>Conclusion</h3><p>UXC taught us that the hardest part of unifying systems isn’t the model — it’s getting teams to agree on what words mean. In the end, the organizational alignment turned out to be as durable as the technical architecture.</p><p>If you’re interested in working on problems like this, we’re <a href="https://plaid.com/careers/openings/data/san-francisco-hq/staff-machine-learning-engineer-research-scientist-dfai/">hiring</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f08bf1eade54" width="1" height="1" alt=""><hr><p><a href="https://engineering.plaid.com/universal-transaction-categorization-how-plaid-unified-four-ml-systems-into-one-f08bf1eade54">Universal Transaction Categorization: How Plaid unified four ML systems into one</a> was originally published in <a href="https://engineering.plaid.com/">Plaid Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>