<?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 Vishal Gupta on Medium]]></title>
        <description><![CDATA[Stories by Vishal Gupta on Medium]]></description>
        <link>https://medium.com/@vishalgupta1602?source=rss-59867bf032e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Exis0uey0bjLbU3U</url>
            <title>Stories by Vishal Gupta on Medium</title>
            <link>https://medium.com/@vishalgupta1602?source=rss-59867bf032e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:07:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishalgupta1602/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[Multi-Armed Bandits for Collections: Learning the Best Outreach Strategy Online]]></title>
            <link>https://medium.com/aplazo-tech-blog/multi-armed-bandits-for-collections-learning-the-best-outreach-strategy-online-89759c5b92e5?source=rss-59867bf032e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/89759c5b92e5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[credit-risk]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[multi-arm-bandit]]></category>
            <dc:creator><![CDATA[Vishal Gupta]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 10:42:34 GMT</pubDate>
            <atom:updated>2026-08-21T10:42:34.912Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6siCx_0w30H_ntcTKsERjw.gif" /></figure><blockquote>This is the story of how the Data Science team at Aplazo used multi-armed bandits to turn collections outreach from a set of static rules into an adaptive system that continuously learns which strategy works best for each type of customer.</blockquote><p>In lending, issuing credit is only one side of the equation, ensuring that repayments happen on time is equally important. When a customer misses a scheduled payment, collections helps bring the account back on track through timely interventions, while balancing recovery with a good customer experience.</p><p>Deciding the right intervention is not straightforward: should the customer receive a WhatsApp message, an email, an automated call, or a call from an agent? How frequently should they be contacted? Should the communication be gentle or urgent? And should the same approach be used for every customer?</p><p>These decisions are often implemented as fixed rules. For example, every customer at one day past due may receive the same sequence of communications, while a more aggressive strategy begins after several days of non-payment.</p><p>The problem is that customers are not equally likely to repay. Some customers need only a reminder. Others require earlier and more persistent intervention. Applying the same strategy to everyone can result in unnecessary communication for customers who would have paid anyway, while failing to intervene strongly enough for customers at genuine risk of rolling into deeper delinquency.</p><p>We wanted to move from a static, one-size-fits-all collections policy to a system that could continuously learn which outreach strategy worked best for different types of customers.</p><p>That eventually led us to combine two components: a <strong>cure-prediction model</strong> to understand customer risk and a <strong>multi-armed bandit</strong> to learn which collections strategy works best within that context.</p><h3>In this story</h3><ol><li><a href="#352b">The problem: Moving beyond static collections strategies</a></li><li><a href="#86c0">Step 1: ML Model to predict the likelihood of cure</a></li><li><a href="#b955">Step 2: Learning which strategy works best</a></li><li><a href="#07cf">Turning the idea into a collections policy</a></li><li><a href="#e2ee">Putting the system into production</a></li><li><a href="#1142">What we learned</a></li></ol><h3>The problem: moving beyond static collections strategies</h3><p>The first question we needed to answer was where in the delinquency lifecycle better decision-making could have the greatest impact.</p><p>Collections is highly time-sensitive. When we looked at the recovery curve, most of the movement happened early. Cumulative recovery increases sharply during the initial few days after the due date. Recovery continues to improve moderately for some more days post which it flattens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDAdPrUbAWOn6OpCMbj1Pg.png" /></figure><p>This meant that the most important opportunity was not necessarily recovering customers who were already deeply delinquent. It was preventing customers in early delinquency from rolling forward into higher delinquency buckets.</p><p>In other words, <strong>the earlier we could make a better decision, the greater the opportunity to influence the final outcome</strong>.</p><p>But timing was only half of the problem.</p><p>Our existing collections process primarily used broad <strong>DPD, or days-past-due, based rules</strong>. Under this approach, the strategy changed according to how many days had passed since a missed payment. A customer at DPD 1 might receive a light reminder, while a customer at a later DPD stage could receive more frequent or more intensive communication.</p><p>DPD is useful because it tells us <strong>where a customer is in the delinquency lifecycle</strong>. What it does not tell us is <strong>how likely that particular customer is to repay</strong>.</p><p>This created two forms of inefficiency:</p><ol><li>Customers who were highly likely to repay without intensive intervention could receive more communication than necessary. This increased communication costs and risked creating a poor customer experience</li><li>Customers with a low probability of curing could receive insufficient intervention during the short period when collections actions were most likely to influence the outcome</li></ol><p>A more effective system needed to answer two separate questions</p><ol><li>How likely is this customer to repay within the next few days?</li><li>Given that level of risk, which collections strategy should we use?</li></ol><p>Machine learning could help answer the first question, while adaptive experimentation could help answer the second.</p><p>But the first question had to come first: before deciding what treatment to use, we needed a better way to understand each customer’s likelihood of curing.</p><h3>Step 1: Predicting the likelihood of cure</h3><p>Before optimising the collections strategy, we needed to understand the customer’s probability of repayment.</p><p>We developed a <strong>cure-prediction model</strong> that estimates the probability that an account will cure within a defined window. The model uses information available during early delinquency and produces a score that rank-orders customers from most likely to least likely to repay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5boB7KACH8W71GOXtFJntw.png" /></figure><p>Rather than using the score directly to prescribe a treatment, we grouped customers into broad risk tiers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bBbLHn1F_uGelHFg1Duw2w.png" /></figure><p>These tiers created a much more useful view of the collections population.</p><p>Instead of thinking only in terms of “<em>this customer is at DPD 1</em>,” we could now say “<em>this customer is at DPD 1 and has a relatively high or low probability of curing</em>.”</p><p>The cure model solved only one part of the problem.</p><p>It could tell us <strong>who was more or less likely to repay</strong>, but it could not tell us <strong>which communication strategy would actually work best for that customer</strong>.</p><p>A prediction model estimates risk. It does not estimate the causal effect of sending an email instead of WhatsApp, calling earlier instead of later, or using a relaxed strategy instead of an aggressive one.</p><p>That brought us to the second question.</p><h3>Step 2: Learning which strategy works best</h3><p>Within each risk group, we had several possible outreach strategies.</p><p>The challenge was that we only observe the outcome of the strategy we actually use. If a customer receives WhatsApp plus an automated call and later pays, we observe that outcome but we never observe what would have happened if that same customer had received only an email.</p><p>This is fundamentally an experimentation problem. Our first option was a traditional A/B test.</p><p>A conventional experiment could allocate customers evenly between several strategies and wait until enough observations accumulated to identify a statistically significant winner.</p><p>But in collections, this approach had two important limitations.</p><h4>Exploration is expensive</h4><p>During an A/B test, a large percentage of customers may continue to receive an inferior strategy until the experiment concludes.</p><p>In a low-cost digital experiment, this may be acceptable. In collections, the cost is more direct.</p><p>A weaker treatment may lead to lower recovery, higher roll-forward rates, unnecessary customer contact or greater operational expense.</p><p>If evidence starts accumulating that one strategy is clearly underperforming, we would prefer to reduce its traffic rather than continue sending customers to it purely to maintain an even experiment split.</p><h4>The best strategy may not remain the best</h4><p>Customer behaviour, channel effectiveness, and portfolio mix drifts.</p><p>A strategy that wins an experiment today may not remain the best strategy several months later.</p><p>What we wanted was therefore slightly different from a traditional experiment.</p><p>We wanted a system that could <strong>learn while making decisions</strong>, exploring enough to discover better options while gradually sending more customers toward strategies that were already performing well.</p><p>This is exactly the type of problem a <strong>multi-armed bandit</strong> is designed to solve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2DvEag8XXstd9tDBurQdEg.png" /></figure><h4>What is a multi-armed bandit?</h4><p>A multi-armed bandit (MAB), is a decision-making framework used to choose among several competing actions while continuously learning which one performs best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUlju8CYMe9IzaK2Zq1xLg.png" /></figure><p>The name comes from a row of slot machines, sometimes called one-armed bandits. Each machine has an unknown payout, and the player must decide whether to keep using the machine that has performed well so far or try another machine that may be even better.</p><p>This creates the central trade-off in a bandit problem:</p><ul><li><strong>Exploitation:</strong> selecting the option that currently appears to perform best</li><li><strong>Exploration:</strong> continuing to test other options so that potentially better alternatives are not overlooked</li></ul><p>Unlike a traditional A/B test, which usually distributes traffic evenly across variants for a fixed period, a bandit gradually sends more traffic toward better-performing options while still allocating some traffic to alternatives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Svk-1S34_kBNKUZajB1hHg.png" /></figure><p>Collections has exactly these characteristics that make this useful.</p><p>Every customer assigned to a weaker strategy represents a potential recovery opportunity lost. At the same time, permanently choosing one strategy based on a historical experiment is risky because portfolio composition, customer behaviour, communication channels, and operational conditions can change.</p><p>The bandit gave us a way to continuously balance those two concerns.</p><h3>Turning the idea into a collections policy</h3><p>Realising that a bandit could help was only the beginning. The harder questions were:</p><ul><li><strong>What exactly should the bandit choose?</strong></li><li><strong>What should the bandit consider a good outcome?</strong></li></ul><p>Those two decisions designing the arms and designing the reward ultimately mattered as much as the algorithm itself.</p><h4>Designing the bandit arms</h4><p>Each bandit arm represented a complete communication strategy.</p><p>A strategy could vary across several dimensions, including:</p><ul><li>Communication channels, such as email, WhatsApp, push notification, automated calling, or agent calling</li><li>Number of contacts per day</li><li>Timing of the communication</li><li>Number of messages within the recovery window</li><li>Tone and urgency</li><li>Escalation from digital to calling channels</li></ul><p>For example, a relaxed strategy could rely primarily on digital reminders with limited frequency.</p><p>A baseline strategy could use a moderate combination of digital channels and automated calls.</p><p>An aggressive strategy could introduce earlier calling and a higher frequency of communication.</p><p>The important point was that the arms represented <strong>real operational choices</strong>, not tiny variations that would be difficult to distinguish.</p><h4>A hybrid experimentation framework</h4><p>We did not implement one bandit across the entire collections population. Instead, we created a layered framework.</p><p>The cure-prediction model first assigned each eligible account to a risk tier. Within each risk tier, the customer entered a separate decision context with its own eligible communication strategies.</p><p>The risk tier therefore acted as the <strong>context</strong>, while the competing collections strategies were the <strong>bandit arms</strong>.</p><p>We chose this tier-based design because it offered a practical balance between personalisation, interpretability, and operational control. A fully contextual bandit could use individual customer features directly in the allocation decision, but it would also introduce additional complexity in implementation, monitoring, and interpretation.</p><p>Alongside these adaptive arms, we retained fixed comparison groups:</p><ul><li>A business-as-usual (BAU) control representing the existing DPD-based strategy</li><li>A no-communication holdout used to estimate the incremental impact of collections outreach</li></ul><p>This created a hybrid experimentation framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zwbR0WizILEuwiMPS4vUg.png" /></figure><blockquote>The fixed control groups allowed us to measure absolute lift and answer causal questions such as whether communication itself improved recovery.</blockquote><blockquote>The bandit arms answered a different question: among the strategies we were willing to deploy, which one should receive the most traffic?</blockquote><p>Keeping these two layers separate was important. A bandit is effective at optimising allocation, but without a stable control group it can become difficult to determine whether the optimised treatment is genuinely better than the original process.</p><h4>Choosing an allocation algorithm</h4><p>Several algorithms can manage the exploration-exploitation trade-off.</p><p>An <strong>epsilon-greedy</strong> policy selects the current best-performing strategy most of the time and chooses a random alternative with a fixed probability. It is easy to understand, but a constant exploration rate means that the system continues sending the same share of traffic to weaker arms even after substantial evidence has accumulated.</p><p><strong>Upper Confidence Bound, or UCB</strong>, assigns each arm an optimism bonus based on uncertainty. Less-tested arms receive a larger bonus, encouraging the system to explore them until their performance becomes clearer.</p><p>Our production framework used <strong>Thompson sampling</strong>.</p><p>Thompson sampling maintains a probability distribution representing the uncertainty around each arm’s performance. During each allocation cycle, it draws a possible value from each arm’s distribution and selects the arm with the highest sampled value.</p><p>A well-performing arm is therefore selected more frequently. However, an arm with less data or greater uncertainty still has a chance to be explored.</p><p>This produces a natural balance between exploration and exploitation without requiring a fixed exploration percentage.</p><p>If you want to read more about the different algorithms, I would suggest <a href="https://lilianweng.github.io/posts/2018-01-23-multi-armed-bandit/">this blog post</a> by Lilian Weng.</p><h4>Reward design: optimising more than recovery</h4><p>Once we had defined what the bandit could choose, another question became even more important:</p><p><strong>What exactly should it optimise?</strong></p><p>Our first instinct was the obvious one: <strong>Reward = recovery rate</strong></p><p>However, optimising only for short-term recovery can create undesirable behaviour.</p><p>A highly aggressive strategy may recover slightly more money in the short term, but it may also produce excessive customer contact, higher calling costs, greater message fatigue, and a worse long-term customer relationship.</p><p>We therefore needed the reward to reflect the broader business objective. To compare the intensity of different strategies, we created a <strong>strictness index</strong> based on factors such as the number of communication channels, average communications per day, average messages per day, and the use of more expensive or intensive channels such as agent calling.</p><p>The purpose of this index was not to claim that customer experience could be represented perfectly by one formula. It provided a consistent way to distinguish between strategies with similar recovery but very different communication intensity.</p><p>The bandit reward then combined three components:</p><ul><li>α × recovery rate</li><li>β × strictness index</li><li>γ × portfolio recovery rate</li></ul><p>The first component rewards successful repayment.</p><p>The second penalises unnecessary communication, allowing a gentler and lower-cost strategy to outperform an aggressive strategy when their recovery rates are similar.</p><p>The third protects against excessive local optimisation by incorporating broader portfolio performance.</p><p>The weights α, β and γ encode the business trade-off between recovery, cost, and customer experience.</p><h3>Putting the system into production</h3><p>We implemented the system as a multi-layer decision pipeline that connected offline scoring, real-time decisioning, and execution across communication channels.</p><p>The production flow worked as follows:</p><ol><li>A scheduled batch scoring system evaluated all accounts at DPD 1 and assigned each customer to a risk tier using the cure-prediction model.</li><li>A real-time decisioning service consumed these risk-tiered scores and determined the appropriate experimental path for each account, selecting between business-as-usual treatment, no-communication holdout, or bandit-driven allocation.</li><li>For accounts routed into the adaptive experimentation path, a bandit optimisation service assigned one of the eligible communication strategies using a multi-armed bandit policy.</li><li>The selected strategy was then passed to a downstream engagement orchestration layer, which triggered the corresponding customer journey across communication channels such as WhatsApp, email, automated calling, or agent calling.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNiabJAbkxE2rV6Lr2o1GQ.png" /></figure><p>This separation of responsibilities allowed each component to focus on a distinct part of the decision loop: scoring, allocation, optimisation, and execution.</p><p>In practice, this meant that risk estimation, experimentation logic, and customer communication were fully decoupled but tightly integrated through well-defined interfaces.</p><p>The assignment unit was the account or instalment rather than an individual communication event. This ensured that the customer received a coherent strategy during the outcome window instead of switching between variants midway through the treatment.</p><p>As outcomes accumulated, stronger strategies received more traffic. Underperforming strategies gradually lost traffic, while all eligible arms retained some probability of exploration.</p><h3>What we observed</h3><p>One of the most important findings was that there was no universally optimal collections strategy. Different risk groups responded differently.</p><p>A relatively relaxed strategy could be sufficient for customers with a high probability of self-curing. Adding more channels or increasing contact frequency for these customers produced limited incremental recovery while increasing communication cost.</p><p>Higher-risk groups benefited more from earlier escalation and stronger intervention. However, even within these segments, the most aggressive strategy was not automatically the best once communication intensity and portfolio impact were included in the reward.</p><p>The system was able to identify differentiated winning strategies across risk tiers and gradually redirect traffic toward them.</p><p>This was more valuable than discovering one global winner. The practical benefit came from matching the strategy to the customer context.</p><p>The bandit also changed how we thought about experimentation. Instead of treating experimentation as a temporary phase before production, <strong>learning became a permanent component of production decisioning</strong>.</p><h3>What we learned</h3><h4>Segmentation and optimisation solve different problems</h4><p>The cure model estimates the customer’s probability of repayment. It does not tell us which communication treatment will cause the customer to repay.</p><p>The bandit learns treatment performance, but it depends on useful contexts and well-designed arms. Neither component is sufficient on its own.</p><h4>Reward design matters more than algorithm sophistication</h4><p>It is easy to spend time comparing Thompson sampling, UCB, epsilon-greedy policies, and other algorithms.</p><p>However, the business outcome is often more sensitive to the reward definition. A sophisticated algorithm optimising the wrong reward will converge efficiently toward the wrong policy.</p><h4>Arms must represent real choices</h4><p>Bandits work best when the alternatives are operationally distinct and each arm reflects a meaningful business hypothesis.</p><p>Testing several nearly identical communication plans creates complexity without producing actionable learning.</p><h4>Delayed feedback slows learning</h4><p>Collections outcomes are not necessarily immediate.</p><p>The reward can only be calculated once the cure window has resolved, meaning the bandit is always learning from decisions made some time earlier.</p><p>Changes in strategy design, eligibility, or portfolio conditions therefore have to account for this delayed feedback.</p><h4>Controls should remain stable</h4><p>Adaptive allocation should not replace every part of the experimental design.</p><p>Keeping stable control groups was essential for measuring incremental impact and understanding whether the bandit-optimised strategies improved outcomes compared with the previous process.</p><h4>Bandits are not always the right tool</h4><p>A multi-armed bandit is most useful when decisions are repeated frequently, there is enough volume to learn from, experimentation has a meaningful cost, and the environment can change over time.</p><p>A traditional A/B test may still be preferable when the primary objective is to estimate the causal effect of a clearly defined change, traffic is limited, rewards take a very long time to resolve, or operational constraints leave little room for adaptive allocation.</p><p>Our tier-based approach also treats customers within a risk group as broadly similar. A future contextual-bandit system could incorporate individual customer attributes directly into the allocation decision.</p><p>For us, however, the tier-based design provided a useful balance between personalisation, interpretability, operational control, and implementation complexity.</p><h3>From experimentation to continuous learning</h3><p>We started with a simple collections question:</p><p><strong>When a customer misses a payment, what is the right intervention to make?</strong></p><p>What we learned is that there is no single answer.</p><p>The right strategy depends on the customer, their likelihood of curing, the interventions available to us, and what we continue to learn from every decision we make.</p><p>By combining cure prediction with multi-armed bandits, we moved from relying primarily on static DPD-based rules toward a collections system that can learn and adapt over time.</p><p>For us, the biggest shift was changing experimentation from something we run periodically into something that can continuously inform how collections decisions are made.</p><blockquote>The goal is no longer to find one winning collections strategy, but to build a system that keeps learning which strategy works best, for whom, and when.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89759c5b92e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aplazo-tech-blog/multi-armed-bandits-for-collections-learning-the-best-outreach-strategy-online-89759c5b92e5">Multi-Armed Bandits for Collections: Learning the Best Outreach Strategy Online</a> was originally published in <a href="https://medium.com/aplazo-tech-blog">Aplazo Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>