What Meta Robyn is, and what it is not
Meta Robyn is the open-source marketing mix modeling (MMM) package from Meta Marketing Science. Its own repository describes it as "an experimental, semi-automated and open-sourced Marketing Mix Modeling (MMM) package," built for "granular datasets with many independent variables and therefore especially suitable for digital and direct response advertisers with rich data sources."
Read that description twice. Two words in it matter. Experimental, and semi-automated. Robyn automates the tedious part, searching thousands of model variants so a human is not hand-tuning decay rates all week. It does not automate the judgement. You still choose the final model. Anyone selling Robyn as a push-button oracle has not run it.
The distinction from the rest of the field is statistical. Robyn is frequentist. It fits models with ridge regression and searches hyperparameters with an evolutionary optimiser. Google Meridian, the other serious open-source option, is Bayesian. That single fork drives almost every practical difference between the two, and we cover the choice in detail at the end of this guide and in the Google Meridian implementation guide.
For why marketing mix modeling came back into fashion at all, the short version is privacy: third-party cookies and device identifiers decayed, click-based attribution stopped telling the whole story, and modelled measurement filled the gap. We wrote that story separately in MMM is back: what Google Meridian changes. This guide assumes you already buy the why and want the how.
One clarification that saves confusion later. The Python version, robynpy, was announced on 19 December 2024 and, in Meta's own words, was produced "leveraging the latest Large Language Models (like Llama) and open source AI frameworks." Meta labels it Beta and warns it may contain bugs. So when we say "the R path is production-grade," that is not R snobbery. It is that the Python port is a machine-translated Beta and the R package is the one Meta has shipped and patched for years.
How Robyn works in plain English
Here is the whole idea in one sentence. Robyn takes your weekly outcome (sales, sign-ups, applications, installs) and every driver behind it, then works out mathematically how much each marketing channel actually contributed, correcting for the fact that advertising lingers and that spending twice as much rarely buys twice the result.
The engine runs six stages. Each one has a job.
Adstock, the memory of advertising. Robyn offers two families. Geometric adstock uses "the one-parametric exponential decay function" with a single decay parameter, theta: effect peaks the week the ad runs, then fades at a fixed rate. Weibull adstock uses two parameters (shape and scale) for a flexible decay curve, and the Weibull PDF variant "offers lagged effect," meaning the peak can arrive weeks after the spend. That lagged option is why brand and television channels often use Weibull PDF while a search campaign is fine with geometric.
Saturation, the shape of diminishing returns. After adstock, each channel passes through the Hill function. The verbatim form from Meta's documentation is media_saturated = 1 / (1 + (gamma / media_adstocked) ^ alpha), where alpha sets the curve shape and gamma sets the inflection point. This is the maths behind "the first dollar in a channel works harder than the hundred-thousandth."
The fit and the search. "Robyn uses the L2-form of the regularisation, also known as Ridge regression," which shrinks coefficients to handle channels that move together (search and social often rise in the same weeks). The hyperparameters (the adstock and saturation settings per channel, plus the ridge penalty) are too many to grid-search, so Robyn hands the job to Nevergrad: "Meta's gradient-free optimization platform" driven "with its so-called ask and tell interface." It proposes settings, scores them, learns, and proposes better ones.
Nevergrad does not chase one number. It minimises three objectives at once, which is what makes the output a shortlist rather than a single answer.
NRMSE
Robyn's "prediction error." Does the model track history? Catches a poor fit.
DECOMP.RSSD
Robyn's "business error," the gap between a channel's spend share and its effect share. Catches implausible attribution.
MAPE.LIFT
Robyn's "calibration error," active only when you supply experiment results. Catches a model that contradicts a real test.
The result is a Pareto front: a set of models where no single model wins on all three objectives simultaneously. Improving fit might worsen plausibility, and vice versa. Robyn hands you that trade-off set and steps back. The analyst chooses. That human step is deliberate, and it is also where most of the real skill lives.
Return on investment (ROI) and return on ad spend (ROAS) come out of this last step per channel, which is the number the finance side actually cares about. The glossary below fixes the vocabulary before the workflow section, because these terms recur throughout.
- Weibull adstock
- A two-parameter (shape, scale) carryover curve. The PDF variant lets a channel's peak effect arrive weeks after the spend, unlike geometric adstock's fixed fast decay.
- Hill saturation
- The diminishing-returns transform applied after adstock. Alpha controls the curve shape, gamma the inflection point where extra spend starts buying much less.
- Ridge regression
- L2-regularised linear regression. It shrinks coefficients to handle correlated channels and reduce overfitting. This is Robyn's core estimator.
- Pareto front
- The set of candidate models where none is strictly better than another across all objectives. Robyn's shortlist, from which the analyst selects the final model.
- DECOMP.RSSD
- Decomposition Root Sum of Squared Distance. Robyn's "business error": the distance between a channel's share of spend and its share of modelled effect.
- NRMSE
- Normalised Root Mean Square Error. Robyn's "prediction error," measuring how closely the model tracks historical outcomes.
- Nevergrad
- Meta's gradient-free optimisation library. It runs Robyn's evolutionary hyperparameter search through an ask-and-tell interface.
- Prophet decomposition
- Trend, seasonality, and holiday extraction that feeds baseline regressors, isolating media effects from calendar effects.
The data Robyn actually needs
Most failed MMM projects fail here, before a line of R runs. The model is only as good as the panel you feed it, and Robyn is specific about what it wants. The requirements below are Meta's own, taken verbatim from its analyst guidance.
| Requirement | What Meta specifies | What it means for you |
|---|---|---|
| Minimum history | "A minimum of two years of historical weekly data." Monthly-only data should span "more than two years (e.g. 4-5 years)." | Two years of weekly rows is the floor. Less than that and the model cannot separate seasonality from media. |
| Granularity | Weekly "as best practice." Daily "can also be acceptable, however this would require extra data validations." | Default to weekly. Reach for daily only if you have the analyst time to validate it. |
| Observation ratio | "The recommended ratio of data points is 1 independent variable : 10 observations." | Ten drivers wants roughly one hundred rows. Two years weekly gives you one hundred and four. Add channels, add history. |
| Dependent variable | Commonly sales, but "different data can be used depending on the vertical (e.g. account sign-ups for a telco business, home loan applications for a bank)." | A Singapore or Australian bank models loan applications; a Malaysian telco models activations. Pick the outcome the business is actually paid on. |
| Media inputs | Inputs "ideally should reflect how many 'eyeballs' have seen or been exposed to the media (e.g. impressions, GRPs). Spends should also be collected in order to calculate Return On Investment." | Feed exposure (impressions, gross rating points) as the model input. Keep spend alongside for the ROI maths, not as the primary signal. |
| Variable types | Paid media (spend-backed), organic (marketing without clear spend), and context (non-media: pricing, competitor activity, macro factors). | Do not omit context. A pricing change or a competitor's launch, left out, gets misattributed to whichever channel happened to move that week. |
The observation ratio is the one people argue with and lose. It is not arbitrary. Every hyperparameter you let Robyn search costs degrees of freedom, and a model with more parameters than the data can support will "fit" noise beautifully and predict the future badly. If you have eight channels plus trend, seasonality, price, and two competitor flags, that is a dozen-plus variables asking for well over a hundred clean weekly rows. Short history is the single most common reason a build should be delayed rather than run.
The implementation workflow, step by step
This is the centre of the guide. A data team should be able to scope a Robyn build from the steps below. Meta ships a canonical demo.R script that walks the entire flow, and starting from it beats writing from scratch. The sequence is the same whether your outcome is retail sales in the US or home-loan applications for a Singapore bank.
- Install (R path). Install the
Robynpackage from CRAN, or the development build from GitHub. Robyn drives its hyperparameter search through Python's Nevergrad, so you also install Python and Nevergrad and wire them to R through thereticulatebridge. The repository is explicit: "Robyn requires the Python library Nevergrad." The Python-only alternative ispip install robynpy, but that is the Beta, LLM-translated port, so treat it as early-adopter. - Open
demo.R. Meta's demo script runs the full pipeline end to end on a sample dataset. Run it once as-is before touching your own data. It is the fastest way to see the shape of every object Robyn returns. - Define inputs (
robyn_inputs()). Map each column to its role: dependent variable, paid media spend, media exposure, organic, and context. Set the date range, choose an adstock family per channel (geometric, Weibull CDF, or Weibull PDF), and set the hyperparameter search bounds. Wider adstock bounds for brand and television, tighter for search. - Set hyperparameters. For every media channel you give Robyn ranges to search: adstock (theta, or shape and scale) and saturation (alpha, gamma), plus the ridge penalty (lambda). These bounds are where your domain knowledge enters the model. Bad bounds produce a technically clean, commercially absurd result.
- Run the search (
robyn_run()). This launches the Nevergrad evolutionary search across trials and iterations. A common documented default is roughly five trials of about two thousand iterations each (treat that as a starting point, not a rule). More iterations search more thoroughly but cost compute and raise the risk of the model hunting historical noise. - Select from the Pareto front. Robyn returns one or more Pareto fronts of candidate models. You pick the final model using business judgement, the marginal ROAS curves, and, if you calibrated, the experiment fit. Robyn narrows the field. It does not make the call for you.
- Generate outputs (
robyn_outputs()). This produces the per-model one-pager: decomposition waterfall, actual-versus-predicted fit, adstock decay curves, saturation curves, and response and ROI by channel. This is the artefact your analytics lead reviews and the CFO eventually sees a version of. - Allocate budget (
robyn_allocator()). Optimise future spend with gradient-based optimisation, in one of two modes: maximise response for a fixed budget, or hit a target efficiency for the minimum budget, subject to per-channel constraints you set. - Refresh over time (
robyn_refresh()). Rather than rebuild every quarter, refresh rolls the window forward and re-fits from the selected model's hyperparameters, keeping the story continuous across cycles.
Reading the outputs: Pareto selection and the one-pager
Robyn's output is not a single verdict, it is a shortlist plus a stack of diagnostic sheets. The skill is knowing which chart on the one-pager to trust and in what order. Read it top to bottom the way below, and reject the model at the first serious red flag rather than the last.
- Fit chartActual versus predicted outcome over time. First gate: if the model does not track history, nothing downstream matters. A suspiciously perfect fit is its own warning, it usually means overfitting.
- DecompositionThe waterfall showing how much of the outcome each driver explains. Second gate: does the credit split pass a straight-face test? If a minor channel gets outsized credit, reject the model regardless of the fit line.
- Adstock curvesCarryover decay per channel. Sanity-check the shape: does the implied memory match how the channel really behaves? A twelve-week tail on a performance-search channel is a signal something is wrong.
- Saturation curvesDiminishing-returns shape per channel. This tells you where a channel stops paying back, which is the input the budget allocator uses.
- Response and ROIResponse and return by channel. This is the finance conversation. It is also the number most likely to be over-read, so pair it with the decomposition and the calibration fit before anyone acts on it.
The multi-objective scoring gives you a fast triage rule for which failure a diagnostic is catching. It maps cleanly onto the three objectives from the methodology section.
| Symptom | Objective that flags it | What to do |
|---|---|---|
| Model does not track history | NRMSE (prediction error) | Revisit the panel and the baseline decomposition before touching media terms. |
| Attribution is implausible for the spend | DECOMP.RSSD (business error) | Inspect the decomposition; a channel's effect share is far from its spend share. |
| Model contradicts a real experiment | MAPE.LIFT (calibration error) | Only active when calibrated. Trust the experiment over the regression and re-select. |
The honest catch: a Pareto front can hand you several "optimal" models that tell different budget stories. That is not a bug, it is the trade-off surface made visible. But it does push the final decision back onto a human, which is a point the criticism section returns to.
Calibrating Robyn with experiments
An uncalibrated MMM is a decomposition of correlation. A calibrated one starts to earn the word causal. This is the single most valuable step most teams skip, and it is the thing that separates a model you present with confidence from a model you present with caveats.
Robyn is built to fuse observational modelling with experimental ground truth. You pass a calibration input carrying results from geo-experiments, conversion-lift studies, or randomised tests: the dates, the channel or channels tested, and an absolute lift estimate. When that input is present, Robyn activates its third objective, MAPE.LIFT, "the Mean Absolute Percentage Error for experiments," and the search then favours hyperparameter combinations whose implied media effect matches your experiment. You are anchoring the regression to a result you actually measured.
This matters because observational regression cannot resolve endogeneity on its own. If search spend rises every time organic demand rises, a naive model credits search for sales that demand would have delivered anyway. An experiment breaks that confound. For the mechanics of running the experiments themselves, geo-tests and lift studies and how to size them, see the incrementality testing guide.
Version 3.12.0 also added robyn_calibrate, a curve-calibration tool for reach and frequency datasets, which extends calibration beyond simple lift inputs. For cross-border teams stitching modelled and experimental measurement across markets, the pattern we use is covered in cookieless MMM: Bayesian incrementality for cross-border APAC.
Honest limits and the criticisms, stated fairly
A guide that only lists a tool's strengths is marketing, not analysis. Robyn is a good tool with real limitations, and the sharpest critiques come partly from Meta itself. Here they are, stated straight.
DECOMP.RSSD is contested, by Meta's own admission. Robyn's documentation says plainly that the business-error metric is controversial (Meta's own spelling in the docs is "controvertial") because it tends to converge media returns. The pointed external critique, from independent MMM practitioners, is that by rewarding models whose effect share tracks spend share, DECOMP.RSSD can throw away the models that would have told you a channel was wasting money. That is the exact finding you often ran the MMM to detect. Use the objective as one signal, never as ground truth.
Without calibration, it is correlation. Covered above, but it belongs on the limits list too. An uncalibrated Robyn model cannot resolve endogeneity. Treat it as a decomposition and label it as such to stakeholders.
Search can overfit. Thousands of iterations can hunt historical noise. Ridge regularisation and out-of-sample checks reduce this, they do not remove it. More iterations is not automatically better.
Pareto choice overload. The front can return many "optimal" models with divergent ROI stories. That pushes the final decision back onto human judgement, which partly re-introduces the subjectivity the automation was meant to remove.
No native uncertainty intervals. Being frequentist, Robyn produces point estimates. Bootstrapping adds a sense of variance, but it does not give you the principled posterior credible intervals a Bayesian model like Google Meridian produces by construction. If your stakeholders demand ranges rather than points, this is a real gap.
Python maturity gap. The Python port remains an LLM-translated Beta in 2026. R is the trustworthy path. Do not put a live budget decision on robynpy yet.
There is also a governance point worth stating neutrally: a platform that builds the tool measuring its own channels has an obvious interest in how those channels are measured. This is a reason to calibrate with independent experiments and to sanity-check the decomposition, not evidence of a specific bias. It is a consideration, not an accusation.
Robyn or Meridian? The chooser
Both Meta Robyn and Google Meridian are credible, open-source, and free. Neither is "correct." They suit different teams, and the honest truth is that for a large band of cases either one will get you to a defensible answer. The differences that matter are statistical paradigm, language, and what the output looks like.
| Dimension | Meta Robyn | Google Meridian |
|---|---|---|
| Statistical paradigm | Frequentist: ridge regression plus evolutionary hyperparameter search | Bayesian causal inference, Markov Chain Monte Carlo via the No-U-Turn Sampler |
| Language | R (production); Python robynpy is a Beta, LLM-translated | Python |
| License | MIT | Apache-2.0 |
| Owner | Meta Marketing Science | |
| Uncertainty output | Point estimates; variance via bootstrapping | Native posterior credible intervals |
| Business knowledge enters via | DECOMP.RSSD plausibility objective plus experiment calibration | Priors set directly on parameters |
| Current status (2026) | CRAN 3.12.1 (July 2025), actively maintained | Actively developed |
The core divide: Robyn minimises cost functions and encodes plausibility through DECOMP.RSSD; Meridian lets you write your business knowledge as priors and gives you uncertainty for free. Answer the eight questions below and the tool weighs your answers. It is a heuristic starting point, not a verdict, and it will tell you honestly when the call is close enough that either tool works.
Robyn or Meridian? Eight-question heuristic
Pick the option closest to your situation for each. This is a weighted rule of thumb to start a conversation, not a recommendation to act on blind.
Want the expert version of this call, run against your actual data? Talk to us about a tool-fit review.
Wherever the chooser lands, the build discipline is the same: get the data right first, calibrate with an experiment, and treat the model as a decision aid rather than a decree. For the equivalent hands-on walkthrough of the Bayesian option, including its data-feasibility maths and diagnostics, read the Google Meridian implementation guide. If you would rather someone scoped the whole build for your markets across Singapore, Malaysia, Australia, the US, and Canada, that is what our analytics and insights work does.
