Source-linked AI summary
Making Contextual Decisions with Low Technical Debt
Alekh Agarwal, Sarah Bird, Markus Cozowicz, Luong Hoang, John Langford, Stephen Lee, Jiaji Li, Dan Melamed, Gal Oshri, Oswaldo Ribas, Siddhartha Sen, Alex Slivkins
TL;DR
Contextual learning systems must make decisions with partial feedback and delayed rewards, while ensuring that collected data is correct. The Decision Service connects exploration, logging, learning, and deployment in one general-purpose system. Its production deployments report 14–25% lifts in target metrics, and its evaluation reports reduced technical debt.
Problem
Contextual decisions involve partial feedback and delayed rewards, while machine-learning theory assumes correct input data that is difficult to ensure in practice.
Source: §1 · p. 2Method
The Decision Service connects explore, log, learn, and deploy, recording decision events and later joining their rewards for learning.
Source: §1 · p. 2, §4.1 · p. 5, §4.2 · p. 5Results
14–25% lift in target metrics relative to strong baselines was achieved across the described deployments, and evaluation reports low-latency decisions, rapid data incorporation, scalability, and reduced technical debt.
Source: §1 · p. 2Takeaways & Limitations
The service has been used in content recommendation deployments and ongoing applications in tech support and cloud machine-failure handling.
Source: §1 · p. 2The methodology does not fully address nonstationary environments or data-collection issues caused by delayed rewards, and its theory assumes correct input data.
Source: §1 · p. 2
Abstract
from arXiv · showhide
Applications and systems are constantly faced with decisions that require picking from a set of actions based on contextual information. Reinforcement-based learning algorithms such as contextual bandits can be very effective in these settings, but applying them in practice is fraught with technical debt, and no general system exists that supports them completely. We address this and create the first general system for contextual learning, called the Decision Service. Existing systems often suffer from technical debt that arises from issues like incorrect data collection and weak debuggability, issues we systematically address through our ML methodology and system abstractions. The Decision Service enables all aspects of contextual bandit learning using four system abstractions which connect together in a loop: explore (the decision space), log, learn, and deploy. Notably, our new explore and log abstractions ensure the system produces correct, unbiased data, which our learner uses for online learning and to enable real-time safeguards, all in a fully reproducible manner. The Decision Service has a simple user interface and works with a variety of applications: we present two live production deployments for content recommendation that achieved click-through improvements of 25-30%, another with 18% revenue lift in the landing page, and ongoing applications in tech support and machine failure handling. The service makes real-time decisions and learns continuously and scalably, while significantly lowering technical debt.
1 Introduction
The introduction presents the Decision Service as a general system for contextual decision-making, where partial feedback and delayed rewards make reliable data collection difficult. It combines machine-learning methods with connected system abstractions and reports production lifts alongside evaluation evidence of reduced technical debt.
1 Introduction
- The paper targets technical debt from feedback loops and bias, distributed data collection, environmental change, and weak monitoring and debugging.It argues that existing systems neither solve this class of problems nor address these debts.Source: §1 · p. 1
- In contextual decisions, only the chosen action’s reward is observed, and rewards may arrive later through a separate data path.Because decisions shape collected training data and preferences can change, exploration is needed to acquire suitable data.Source: §1 · pp. 1–2
- Contextual bandits enable testing and optimizing exponentially more policies than A/B testing for the same amount of data, without knowing policies in advance.A/B testing requires data that scales linearly with the number of policies tested.Source: §1 · p. 2
- The machine-learning methodology addresses biased feedback and supports monitoring and debugging, but assumes correct input data and does not fully address nonstationarity or delayed-reward collection.The paper notes that ensuring correct data in practice is difficult.Source: §1 · p. 2
- The proposed loop connects explore, log, learn, and deploy; the logger records decisions and later joins their rewards.A uniform delay before releasing joined data is imposed to avoid delay bias, and models are trained and deployed online for dynamic environments.Source: §1 · p. 2
- 14–25% lift in target metrics relative to strong baselines was achieved across the described deployments.The evaluation also reports low-latency decisions, rapid incorporation of new data, scalability, and reduced technical debt.Source: §1 · p. 2
- The Decision Service is presented as the first general-purpose contextual reinforcement-learning service, with a simple API, deployment options, and production and ongoing applications.The described applications include content recommendation, tech support, and cloud machine-failure handling.Source: §1 · p. 2
2 Motivation
Contextual deployments face technical-debt risks from biased partial feedback, incorrect data collection, environmental change, and weak monitoring; existing systems leave important gaps in addressing them.
- Prior deployments required substantial code and infrastructure, and unaddressed failures can cause hard-to-debug degradation and technical debt.Source: §2 · p. 2
- Partial feedback and variable reward delays can bias learning toward selected actions or actions with faster positive feedback.Source: §2 · p. 3
- Distributed and delayed pipelines can make logged data inconsistent with the decision-time context or record downstream outcomes instead of the chosen action.Source: §2 · p. 3
- Changing input distributions and downstream processing make adaptation necessary to maintain performance.Source: §2 · p. 3
- Weak reproducibility and missing counterfactual queries make debugging and safeguards difficult, while accurate online-performance prediction is essential to learning.Source: §2 · p. 3
- Existing systems leave the targeted debts unaddressed, with available tools missing support for contextual learning, correct data collection, or offline evaluation and monitoring.Source: Table 1 · p. 3, §2 · p. 3
3 Machine learning methodology
The methodology combines contextual-bandit exploration with policy evaluation over logged interactions, supporting policy search, unbiased learning, and counterfactual safeguards.
- Multiworld testing evaluates and optimizes K policies using data and computation that scale as log K, without prior knowledge of the policies.Source: §3 · p. 3
- Exploration randomizes action choices, and logging each interaction's context, action, reward, and selection probability supports unbiased policy learning.Source: §3 · p. 4
- Inverse propensity scoring reuses matching-action interactions across policies, is statistically unbiased, and can be computed incrementally as data arrives.Source: §3 · p. 4
- Counterfactual estimates from a fixed exploration dataset allow real-time evaluation of arbitrary policies without running each live, supporting monitoring and safeguards.Source: §3 · p. 4
- Under stationary contexts and rewards in [0, 1], policy-evaluation error scales as O(log K), while A/B testing's error can be exponentially worse.Source: §3 · p. 4
- Policy training searches a class Π for its best policy, using a reduction to cost-sensitive classification rather than testing every policy.Source: §3 · p. 4
- To address non-stationarity, the system trains online and periodically resets or maintains a constant learning rate; it does not directly solve problem framing.Source: §3 · p. 4
- The system can autogenerate content-recommendation features and test alternative framings, including reward metrics, without collecting new data.Source: §3 · p. 4
4 System Design
The system design operationalizes contextual-learning methodology with modular abstractions and techniques for correct data collection, reproducibility, real-time monitoring, and performance. Its four-step loop connects Explore, Log, Learn, and Deploy.
4 System Design
- The design fills systems gaps in operationalizing the ML methodology, with goals of reducing technical debt while meeting performance demands.The methodology assumes correctly supplied data, which is difficult to ensure in practice.Source: §4 · pp. 4–5
4.1 Design goals
- Design goals include recording decisions accurately, controlling reward-joining delays, learning continuously, reproducing runs, and meeting low-latency decision and update needs.The stated targets include decisions in ∼10ms or less and policy updates every few minutes.Source: §4.1 · p. 5
4.2 Abstractions and architecture
- Explore emits keyed decisions and action probabilities; Log joins rewards after a configurable wait; Learn trains online; Deploy stores models for Explore to retrieve.Each abstraction is implemented by a scalable service.Source: §4.2 · pp. 5–6
4.3.1 Full reproducibility
- Randomization is seeded by interaction key and application ID, while policy IDs and processing order are recorded to support reproducible decisions and trained policies.Reproducibility when scaling the Online Learner has not yet been evaluated; the largest deployments had not required it.Source: §4.3.1 · p. 6
4.3.2 Real-time safeguards
- Incremental policy evaluation provides counterfactually unbiased real-time estimates for checking candidate policies against safe baselines before deployment.The estimates can support automated rollbacks or alerts when a policy deviates from a previous best policy or loses to a reasonable baseline.Source: §4.3.2 · p. 6
4.3.3 Auto-generated features
- The Feature Generator can pre-featurize public content and cache results for insertion by the Client Library, but relies on independent cloud services.It consolidates input-dependency technical debt in the Decision Service rather than directly eliminating it.Source: §4.3.3 · p. 7
4.3.4 Low-latency learning
- ∼7 sec is the end-to-end event-to-trained-policy latency without batching; the Client Library supports multithreaded predictions over a local model.The components support batching to improve throughput.Source: §4.3.4 · p. 7
5 Implementation and Deployment Options
The implementation runs on Azure but is designed to be cloud-agnostic, with API and deployment options for different application needs.
5 Implementation and Deployment Options
- The Decision Service is implemented on Azure, but its design is cloud-agnostic; the self-hosted service is open source.The self-hosted service is open source.Source: §5 · p. 7
- Applications can use a portable web API or a low-latency Client Library, which predicts locally using models trained by the Online Learner.The web API can embed context in a background HTTP call; the Client Library supports local predictions.Source: §5 · p. 7, Figure 3 · p. 8
- Deployment options include self-hosted, hosted, and local modes; local mode replaces the Join Service with an in-memory buffered join and uses local VW instances.Self-hosted deployments run in a customer's Azure account; hosted deployments share resources across tenants.Source: §5 · p. 8
6 Deployments
The Decision Service was deployed across content recommendation and other applications, with reported improvements over the stated baselines in several production deployments.
6 Deployments
- MSN’s Slate achieved >25% CTR improvement over editorial ordering; Complex gained >30% over editorial, and TrackRevenue reported an 18% lift over a context-free ϵ-greedy baseline.TrackRevenue’s 18% lift provides a measure of the value of context in that deployment.Source: §6 · pp. 8–9
- The MSN Panel showed a 5.3% improvement over editorial ordering while receiving 10x more traffic than the Slate, with long-term engagement metrics maintained or improved.The engagement metrics included sessions per unique user and average session length.Source: §6 · p. 8
- MSN made the service its production default for logged-in users; Toronto’s support application remained preliminary, while Azure Compute targeted virtual-machine migration decisions.MSN served tens of millions of users and thousands of requests per second.Source: §6 · pp. 8–9
- For Azure Compute, a dataset collected under a 10-minute-wait baseline indicated a 19% reduction in wasted time, supporting the decision to proceed to production.Once deployed, the system could no longer evaluate all possible options for free; MWT was critical for real-world performance estimates.Source: §6 · p. 9
7 Evaluation and Lessons
The evaluation uses live deployments and exploration data collected from them to assess systems performance and technical-debt reduction.
7 Evaluation and Lessons
- The evaluation uses live deployments and collected exploration data to assess systems goals and technical-debt minimization.The passage identifies the evaluation inputs and criteria but does not report findings.Source: §7 · p. 9
7.1 System evaluation
The evaluation measures decision and learning latency, throughput, offline experimentation, and technical-debt safeguards. The system handled high event rates, made low-latency decisions, and supported counterfactually accurate offline tuning.
7.1 System evaluation
- The evaluation covered decision and learning latency, high event rates, and support for offline experimentation, using production data and a self-hosted service loop.The setup used several large A4 instances and a D5 instance for the Online Learner; some experiments used MSN and Complex exploration data.Source: §7.1 · p. 9
7.1.1 Latency of decisions and learning
- 0.2 ms average decision latency increased MSN front-end CPU per request by 4.9%, a level deemed acceptable.Latency was measured by repeatedly calling ChooseAction with a policy trained on one hour of MSN data.Source: §7.1.1 · p. 9
- Except for 5.9% of Complex requests, decisions finished before page load; fewer than 1% took over four additional seconds.The measurements used page-load data across 20 days; the maximum additional delay was 8.7 seconds.Source: §7.1.1 · pp. 9–10, Figure 5 · p. 10
- 7.3 seconds was the average learning latency after configurable sources of delay were removed.The experiment polled for models every 100 ms, used a one-second experimental unit, and published an updated policy after each event.Source: §7.1.1 · p. 10
7.1.2 High event rates
- 2,000 events/sec was stable on one learner core, implying viability for applications processing 100 million events/day.With encoded contexts, policy training was the bottleneck; without them, deserialization was. VW parallel learning was not incorporated, so model performance under parallel learning remains unevaluated.Source: §7.1.2 · p. 10
7.1.3 Offline experimentation
- Offline experiments on Complex exploration data found higher CTR with Bag, a different learning rate, and selected feature changes, without another live experiment.The ML methodology made these results counterfactually accurate.Source: §7.1.3 · p. 10
7.2 Technical debt evaluation
The technical-debt evaluation compares learning-time estimates with test-time performance under simulated failures and production scenarios. The results show discrepancies from faulty logging, stale policies under changing conditions, and debugging benefits from reproducibility.
7.2 Technical debt evaluation
- The evaluation simulated failures in one day of exploration data, preserving time order in an 80% training and 20% testing split; correct-data estimates stayed within 5%.It compared performance estimates from training with policy evaluations on test data.Source: §7.2 · p. 10
7.2.1 (F1) Partial feedback and bias
- 18%–55% daily improvement for MSN and 7%–112% for Complex were reported against editorial ranking; delayed top-article clicks made training estimates 1.3x higher than test, or 1.7x with constant learning rate.The system sustained improvements through continuous learning and periodic learning-rate adjustment; observed non-stationarity was likely related to new content and changing user interests.Source: Table 3 · p. 11, §7.2.1 · p. 11, §7.2.3 · p. 11
7.2.2 (F2) Incorrect data collection
- 1.2x to 8.7x discrepancies between training and testing estimates occurred across four data-collection errors; decision-point logging avoids these failures.The simulated failures included incorrect action probabilities, decision-derived features, modified features, and deleted features.Source: §7.2.2 · p. 11
7.2.3 (F3) Changes in the environment
- A day-one policy achieved 73% of day two’s CTR and 46% of day three’s, while the trained policy eventually improved 42% over editorial by day’s end.With periodic learning-rate resets, the trained policy began outperforming editorial after 65K interactions—about one minute at 1,000 requests per second.Source: §7.2.3 · p. 11
7.2.4 (F4) Weak monitoring and debugging
- Real-time policy comparisons were captured within an average of 10 seconds after interactions, and offline reproducibility helped diagnose dropped data and an ML-software bug.The bug involved a model initialized with insufficient data range and an incompatible reset of the min/max prediction range for rewards of {−1, 0}.Source: §7.2.4 · pp. 11–12
8 Related work
Related work spans exploration methods, experimentation platforms, and machine-learning systems. The paper positions the Decision Service as a contextual-bandit system that closes the loop from exploration and data collection through deployment.
8.1 Machine learning with exploration
- The service builds on contextual bandits with policy sets and offline policy evaluation; unlike Thompson Sampling alternatives, this approach supports MWT.The related-work discussion distinguishes contextual bandits from active learning, reinforcement learning, and context-free multi-armed bandits.Source: §8.1 · p. 12
8.2 Systems for ML and experimentation
- A/B testing partitions subjects among treatments, while the paper characterizes MWT as exponentially more data-efficient.The comparison distinguishes experimentation platforms from systems focused on model development and deployment.Source: §8.2 · p. 12
- Existing bandit platforms generally lack contextual bandit learning or automatic deployment, while prior contextual-bandit deployments were one-offs rather than general-purpose systems.LUIS and NEXT support active learning but not customer-facing exploration decisions or MWT; supervised-learning platforms generally do not support data gathering or exploration.Source: §8.2 · p. 12
9 Conclusion
The conclusion presents the Decision Service as a general-purpose contextual-learning system and identifies parameter-free operation and stronger production safeguards as future goals.
9 Conclusion
- The Decision Service is presented as the first general-purpose service for contextual learning, combining an ML methodology with system design across the data lifecycle.The conclusion says this design addresses many common failure modes.Source: §9 · p. 12
- Future work aims to make the service parameter-free and use MWT for more sophisticated safeguards in production.Source: §9 · p. 12