Eliminating Variables: Ensuring Complete Reproducibility
Back to Academy
14Methodology·Advanced

Eliminating Variables: Ensuring Complete Reproducibility

Pin every variable — seeds, versions, images, configs — so an artifact evaluator reproduces your numbers on the first try.

7 min read Methodology June 9, 2026

Full Guide

Executive Summary

Reproducibility is now a gatekeeper, not a virtue. USENIX Security, IEEE S&P, ACM CCS, and NDSS all run Artifact Evaluation committees that try to re-run your code and reproduce your numbers, awarding Available / Functional / Reproduced badges that increasingly shape acceptance and citation. A brilliant result that an evaluator cannot reproduce on the first try is, to the committee, indistinguishable from a result that does not exist.

This module is about eliminating uncontrolled variance: pinning every version, seed, image, and config so that "run it again" — on your machine next year or on a stranger's machine today — yields the same answer. The discipline is unglamorous and decisive.

The one-line mental model: A result that only reproduces on your laptop, this week, is a coincidence. Pin every variable until the result is a property of the method, not the machine.

Learning Outcomes

By the end of this module you will be able to:

  • Pin software, OS, model versions, and random seeds.
  • Containerize and snapshot the full environment.
  • Separate fixed factors from deliberately controlled variables.
  • Prepare an artifact for ACM/USENIX evaluation.

1. The Sources of Irreproducibility

Before you can pin variables, you must know which ones bite. They cluster into four families, and a single un-pinned one can flip your results.

diagram — rendering…
flowchart TD
    R["Irreproducible result"] --> E["Environment<br/>OS build, lib versions,<br/>EDR signature date"]
    R --> S["Stochasticity<br/>RNG seeds, thread order,<br/>network jitter"]
    R --> D["Data<br/>unversioned dataset,<br/>shuffled splits"]
    R --> C["Config<br/>undocumented flags,<br/>'works on my machine'"]

    style E fill:#1a230c,stroke:#fca311,color:#fef3c7
    style S fill:#2a0c14,stroke:#ef233c,color:#fee2e2
    style D fill:#0c1f2a,stroke:#08d9d6,color:#cffafe
    style C fill:#0c2a22,stroke:#10e793,color:#d1fae5

For offensive-security work, the sneakiest source is environment drift over time: an EDR's cloud reputation feed updates daily, so "78% evasion" measured in March may be "40%" in June with the exact same binary. Pinning here means recording the precise EDR agent version and signature/cloud-feed date, and ideally running an offline arm where that feed is frozen.


2. Pinning: From Loose to Locked

Every dependency exists on a spectrum from "latest" (irreproducible) to "cryptographically pinned" (reproducible). Move every variable as far right as feasible.

Variable✗ Loose~ Better✓ Locked
OS"Windows 11""Win11 22H2"Specific build + golden image hash
Libraryrequestsrequests>=2.0requests==2.31.0 + lockfile hash
Containerpython:latestpython:3.11python@sha256:... digest
RNGunsetseed=42seed + framework determinism flags
EDR"CrowdStrike"agent versionversion + sensor + cloud-feed date
Dataset"our data"versioned tarballDVC/Git-LFS hash + datasheet

The rule: never reference `latest` anywhere. latest is a different artifact every day. Pin to a digest or a hash. A reviewer who sees python:latest in your Dockerfile already doubts your numbers.


3. Fixed Factors vs. Controlled Variables

Reproducibility does not mean freezing everything — it means freezing everything except the variable you are deliberately studying. Confusing the two is a design error.

text
EXPERIMENT: does syscall-layer evasion beat userland on EDR detection?    FIXED FACTORS (pin these — they are noise)     OS build, EDR version+date, hardware, payload, network,     trial count, RNG seed for ordering    CONTROLLED VARIABLE (vary this — it is the experiment)     evasion technique ∈ {userland, syscall, ablation}    MEASURED OUTCOME (observe this)     evasion rate per EDR

Write this three-way split explicitly in your methodology. It tells the reviewer you understand causality: any difference in the outcome can only come from the one thing you varied, because everything else is pinned. This is the experimental-design backbone of internal validity (Module 09).


4. Containerization and Snapshots

The practical vehicle for pinning is an immutable image: a container or VM snapshot that bundles the entire environment so it boots identically anywhere.

diagram — rendering…
flowchart LR
    SRC["Source + lockfiles<br/>(git, pinned)"] --> BUILD["Build<br/>(Dockerfile / Packer)"]
    BUILD --> IMG["Image @ digest"]
    IMG --> RUN1["Run here, today"]
    IMG --> RUN2["Run on evaluator's box"]
    IMG --> RUN3["Run in 2 years"]
    RUN1 & RUN2 & RUN3 --> SAME["Identical result"]

    style IMG fill:#0c2a22,stroke:#10e793,color:#d1fae5
    style SAME fill:#1a230c,stroke:#fca311,color:#fef3c7

For pure-software artifacts, a Dockerfile pinned to digests plus a lockfile is the standard. For lab-based offensive work, the analog is the IaC + golden snapshot from Module 11: terraform apply rebuilds the topology, the snapshot restores the exact victim state, and a seed file fixes any randomized ordering. The litmus test: can a stranger get from `git clone` to your headline number with one documented command?


5. Preparing for Artifact Evaluation

Artifact Evaluation committees follow a checklist; meeting it is mostly mechanical, and the badges are worth real acceptance/citation weight.

text
ARTIFACT EVALUATION READINESS  [ ] README: claims → which script reproduces each  [ ] One-command bootstrap (Docker/Vagrant) — no manual setup  [ ] INSTALL with exact versions; all deps pinned (no 'latest')  [ ] Small + full run paths (evaluators are time-boxed)  [ ] Expected outputs committed (so deviations are visible)  [ ] Seeds fixed; sources of remaining nondeterminism documented  [ ] License + ethics/data-use statement  [ ] Archived with a DOI (Zenodo) — for the "Available" badge

The badge ladder mirrors increasing trust: Available (it's archived and accessible), Functional (it runs and does what's claimed), Reproduced (an independent party regenerated your key results). Design your repository from day one around the top rung — "README maps each claim to the script that reproduces it" is the single highest-leverage sentence you can offer an evaluator.


Step-by-Step Practical Exercise

Goal: Take one experiment from "works on my machine" to a pinned, one-command-reproducible artifact with a claim-to-script map.

Time: ~85 minutes. You need: one small experiment (script + a number it produces) and Docker or Vagrant.

Step 1 — Inventory your variables (15 min). List every dependency: OS, libraries, data, seeds, external services (EDR/cloud). Mark each as loose/better/locked using §2.

Step 2 — Split fixed vs. controlled (10 min). Write the three-way split from §3 for your experiment. Confirm exactly one thing varies.

Step 3 — Pin everything loose (20 min). Convert loose deps to locked: exact versions, digest-pinned base image, committed lockfile, fixed seed. Replace every latest.

Step 4 — Containerize (20 min). Write a Dockerfile (or Vagrantfile/IaC) that builds the pinned environment and runs your experiment with one command. Commit expected output.

Step 5 — Self-evaluate (20 min). Run the §5 readiness checklist against your repo. Then do the real test: on a clean machine (or fresh container, no caches), run your one command and confirm it reproduces the number. Document any remaining nondeterminism.

Deliverable: a pinned, containerized experiment, a README mapping each claim to its script, and a successful clean-machine reproduction. This artifact is what you'll submit for evaluation (Module 29).


Where to go next

Related reading on the blog: "Why My 78% Evasion Became 40% Three Months Later" and "From git clone to Headline Number in One Command".