---
title: "Reducing experiment duration with predicted control variates"
description: "Etsy upgraded its experimentation platform's variance reduction from CUPED to CUPAC, which feeds pre-experiment features (over 100, up from 3) into LightGBM models whose predictions serve as the covariate in a linear CUPED-style adjustment."
url: "https://swe.quest/articles/reducing-experiment-duration-with-predicted-control-variates-cf5f4d721df76a4d"
canonical: "https://www.etsy.com/codeascraft/reducing-experiment-duration-with-predicted-control-variates"
source: "Etsy Code as Craft"
published: "2025-11-25"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["machine-learning","data-pipelines","ecommerce"]
---

# Reducing experiment duration with predicted control variates

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2025-11-25, 8 min read, Case study. Original: [https://www.etsy.com/codeascraft/reducing-experiment-duration-with-predicted-control-variates](https://www.etsy.com/codeascraft/reducing-experiment-duration-with-predicted-control-variates)

## Summary

Etsy upgraded its experimentation platform's variance reduction from CUPED to CUPAC, which feeds pre-experiment features (over 100, up from 3) into LightGBM models whose predictions serve as the covariate in a linear CUPED-style adjustment. Average variance reduction rose from 7% to 27%, with a range of 2% to 77% depending on metric stability. That cuts average experiment duration by almost 3 days. The pipeline runs as an Airflow DAG: BigQuery computes features, Dataflow runs batch predictions, Spark fits the regression, and t-tests follow. Because per-metric models are costly to train and maintain, Etsy still encourages CUPED for team-specific metrics and plans to automate CUPED's pre-experiment data collection.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- A/B testing and statistical power ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- linear regression
- gradient boosted trees

## Keywords

CUPED, CUPAC, LightGBM, XGBoost, Airflow, BigQuery, Dataflow, Vertex AI

## Related posts

- [Variance Reduction Below the Randomization Grain](https://swe.quest/articles/variance-reduction-below-the-randomization-grain-0cacd97bb1a5531d.md): Instacart Tech · 2026-07-01 · Hard · 7 min read · Machine learning, E-commerce
  Instacart improves CUPED variance reduction for region-day switchback experiments by training an order-level model (gradient boosted trees) on pre-treatment features and aggregating its predictions to the region-day grain as the CUPED covariate.
- [Scaling Model Evaluation at Pinterest with Ray (Part 4)](https://swe.quest/articles/scaling-model-evaluation-at-pinterest-with-ray-part-4-ba1e956bb72b960e.md): Pinterest Engineering · 2026-11-04 · Medium · 11 min read · ML platforms, Evaluation, Recommendations & ranking, Data pipelines, Python
  Pinterest fused model-evaluation metric computation into its Ray batch inference jobs, removing the separate Spark/Ray metrics job and the write-predictions-to-S3-then-reread handoff.
- [Building a dynamic inventory optimisation system: A deep dive](https://swe.quest/articles/building-a-dynamic-inventory-optimisation-system-a-deep-dive-21c9077c3e05644d.md): Zalando Engineering · 2025-06-29 · Medium · 9 min read · ML platforms, Machine learning, E-commerce, Data pipelines, Scaling
  Zalando's ZEOS builds replenishment recommendations by minimising a cost function that combines storage, lost sales, overstock, operations and inbound costs.
- [Measuring Commercial Impact at Scale at Canva](https://swe.quest/articles/measuring-commercial-impact-at-scale-at-canva-044aabee5607742a.md): Canva Engineering · 2025-06-20 · Medium · 15 min read · Analytics & OLAP, Python, Product engineering, Developer productivity
  Canva's IMPACT app is an internal Streamlit-in-Snowflake tool that standardizes how experiment uplifts translate into company-level MAU and ARR, using logic aligned with the central finance model.
- [Linear Regression Using ClickHouse Machine Learning Functions](https://swe.quest/articles/linear-regression-using-clickhouse-machine-learning-functions-74857eccf0056a32.md): ClickHouse · 2023-12-13 · Medium · 7 min read · Machine learning, Analytics & OLAP, SQL, Maps & geospatial
  Delivery times can be predicted with a linear regression trained entirely inside ClickHouse using stochasticLinearRegressionState and evalMLMethod, with no Python or Spark involved.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
