Synthetic DiD time weights: defaults versus tighter optimization

Fixed tuning parameters and samples · exploratory methodological check

Published

October 19, 2026

What is being compared

This exercise holds the outcome matrices, donor pools, cohort windows, intercept and default time-weight penalty fixed. “Optimized” means numerical optimization of that same objective, not cross-validation of a new penalty. It concerns time weights only: unit weights, ATTs and inference are not refit or promoted to the main collection. In the default no-covariate model the two weight problems are separate, so improving unit-weight convergence is not necessary to study the time-weight solution.

Four algorithm settings are compared for every available block:

  1. Author default: reproduce the authors’ time-weight solver, including its 100-iteration preliminary stage, sparsification, 10,000-iteration final cap and min.decrease = 1e-5 * noise.level.
  2. Author tighter, sparsification: same algorithm, but a 100,000 final cap and min.decrease = 1e-8 * noise.level. The preliminary cap remains 100.
  3. Author tighter, no sparsification: a single uniform-start author-solver run with that tighter stopping rule and 100,000 cap.
  4. QP optimized: an independent full-simplex quadratic program for the identical objective, solved with OSQP. Uniform and default-weight initializers are both retained to expose numerical sensitivity in nearly flat problems.

The pinned author package is synth-inference/synthdid 0.0.9, commit 70c1ce3eac58e28c30b67435ca377bb48baa9b8a. The default penalty coefficient is zeta.lambda = 1e-6 * noise.level. After dividing the objective by the positive noise variance, the ridge coefficient is therefore 1e-12. Very similar objective values need not imply similar weights at such weak regularization.

Objective and acceptance checks

Let A contain the controls’ pre-period outcomes, with each column centered across controls, and b their centered mean post-period outcome. The program minimizes mean((A %*% lambda - b)^2) + zeta.lambda^2 * sum(lambda^2) subject to nonnegative weights summing to one. Centering profiles out the authors’ free intercept.

For comparability across outcomes the objective and gradient are divided by noise.level^2. A simplex Frank–Wolfe gap, lambda' gradient - min(gradient), is an upper bound on objective suboptimality in exact arithmetic. The numerical acceptance target is gap ≤ 1e-8, with simplex feasibility and no material negative weights. Solver status alone is not the acceptance criterion.

OSQP uses absolute and relative tolerances 1e-11, a 1,000,000 iteration limit, polishing, and a 30-second limit per solve. Its raw weights and feasibility violations are preserved. For feasible weight comparisons only, negative roundoff is clipped to zero and the vector is normalized; the repair magnitude and the post-repair gap are checked. Tiny positive QP numbers are not claimed to be mathematically nonzero. The main support comparison uses weight > 1e-6, with three other cutoffs provided.

Numerical results

method n accepted iteration_caps median_gap max_gap median_l1_change max_l1_change
default 394 134 16 1.335e-05 0.00067889 0.00000000 0.000000
author_tight_sparse 394 152 33 2.000e-08 0.00007585 0.00021682 1.703704
author_tight_no_sparse 394 114 239 3.920e-06 0.00006752 0.00031265 1.703704
qp_uniform 394 394 2 0.000e+00 0.00000000 0.00022319 1.898025
qp_default_start 394 394 0 0.000e+00 0.00000000 0.00022319 1.898025

The acceptance count measures a numerical objective-gap criterion, not statistical validity or identification of the weights. With the default tiny ridge, substantial weight changes can occur along nearly flat directions. Initializer comparisons and changes in donor predictions are therefore reported alongside objective gains.

Representative comparisons

The representative cohort/outcome for each paper is the same one selected before the earlier default run; no example is chosen for having a large difference.

paper_default T0_default gap_default gap_qp accepted_qp support_1e6_default support_1e6_qp l1_from_default_qp recent_mass_change objective_reduction
1 Religion and conflict 2 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
2 Collectivization 3 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
3 Rebel on the Canal 176 5e-05 0 TRUE 154 152 0.32522 0.01854 2e-05
4 ARRA and voting 3 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
5 Cap-and-trade 4 0e+00 0 TRUE 3 3 0.00000 0.00000 0e+00
6 Medical implants 5 1e-05 0 TRUE 3 3 0.00006 0.00001 0e+00
7 School construction 2 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
9 Curriculum and Ideology 2 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
148 Government audits (randomized) 8 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
176 Italian opera 56 0e+00 0 TRUE 2 2 0.00000 0.00000 0e+00
206 Birth of a Nation 45 2e-05 0 TRUE 15 15 0.00056 0.00004 0e+00
325 Hospitals / Gift of a Lifetime 10 1e-05 0 TRUE 5 5 0.00006 0.00000 0e+00
387 Credit Markets 20 2e-05 0 TRUE 4 4 0.00001 0.00000 0e+00

Full vectors and reproducibility

The original default results and the main collection remain unchanged. All comparisons are exploratory. The two zero-noise cases are logged without substitute weights. Each cohort/outcome is a separate problem; the many fits within papers are not independent studies.

Run this document with the prepared matrices from the frozen default analysis and the pinned author package. Every numerical solver, diagnostic and plot appears inline. No fitted vectors are imported as the basis of the new analysis; the previous defaults are read only for an independent equality check.