---
title: "Variance Reduction Below the Randomization Grain"
description: "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."
url: "https://swe.quest/articles/variance-reduction-below-the-randomization-grain-0cacd97bb1a5531d"
canonical: "https://tech.instacart.com/variance-reduction-below-the-randomization-grain-31719f87a7d2"
source: "Instacart Tech"
published: "2026-07-01"
difficulty: "hard"
kind: "Research"
reading_minutes: 7
tags: ["machine-learning","ecommerce"]
---

# Variance Reduction Below the Randomization Grain

A post on [Instacart Tech](https://swe.quest/sources/instacart.md), published 2026-07-01, 7 min read, Research. Original: [https://tech.instacart.com/variance-reduction-below-the-randomization-grain-31719f87a7d2](https://tech.instacart.com/variance-reduction-below-the-randomization-grain-31719f87a7d2)

## Summary

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. Across 10 lateness experiments, order-level CUPED cut variance by 18-40% versus 5-10% for region-day CUPED, shortening experiment runtimes by about a third on average. Features must be unaffected by treatment, and a placebo mean-difference test on the aggregated prediction catches contamination, as with ETA model experiments that shift which orders get placed. The approach applies wherever interference forces coarse cluster randomization but outcomes are observed at a finer unit.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

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

## Prerequisites

- A/B testing statistics ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- CUPED variance reduction
- switchback experiments
- regression basics

## Keywords

CUPED, switchback experiments, Gradient Boosted Trees, Instacart

## Related posts

- [Reducing experiment duration with predicted control variates](https://swe.quest/articles/reducing-experiment-duration-with-predicted-control-variates-cf5f4d721df76a4d.md): Etsy Code as Craft · 2025-11-25 · Medium · 8 min read · Machine learning, Data pipelines, E-commerce
  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.
- [Roonomics: How Economics Helped Us to Build a Churn Prediction Model](https://swe.quest/articles/roonomics-how-economics-helped-us-to-build-a-churn-prediction-model-fa0a6f4e34dc5a67.md): Deliveroo Engineering · 2026-09-22 · Medium · 6 min read · Machine learning, Evaluation
  Deliveroo replaced a high-recall, rule-based restaurant churn flagging system with a ranked probability model tuned for precision, because retention teams have limited capacity and false positives carry a real opportunity cost.
- [Leveraging PyFixest for High-Cardinality Marketplace Modeling at Instacart](https://swe.quest/articles/leveraging-pyfixest-for-high-cardinality-marketplace-modeling-at-instacart-51b7ebdb06241104.md): Instacart Tech · 2026-06-29 · Hard · 13 min read · Python, Algorithms, Performance engineering, Scientific computing
  Controlling for high-cardinality fixed effects (e.g. thousands of regions, shoppers or customers) makes standard OLS intractable, because each dummy variable expands the Gram matrix and matrix inversion scales as O(k³).
- [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.
- [Scaling Subscriptions at The New York Times with Real-Time Causal Machine Learning](https://swe.quest/articles/scaling-subscriptions-at-the-new-york-times-with-real-time-causal-machine-700983f92e260375.md): NYT Open · 2025-10-03 · Hard · 9 min read · Machine learning, ML platforms, Product engineering
  The New York Times replaced its monthly batch Dynamic Meter model with real-time algorithms that decide within milliseconds whether to show a registration wall, a paywall, or allow access.

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)
