Comparator Construction Experimental Design Lens
Philosophical Mode: Counterfactual
Primary Question: "Is the comparator fair and relevant?"
Focus: Baseline Choice, Control Realism, Version Matching, Effort Symmetry, Baseline Drift
When to Use
- Benchmark comparisons where baseline quality is questioned
- Ablation studies needing fair controls
- Claims of improvement over prior work
- User invokes
/exp-lens-comparator-construction or /make-experiment-diag comparator
Critical Constraints
NEVER:
- Modify any source code or experiment files
- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves
- Accept at face value that baselines received symmetric treatment
ALWAYS:
- Build a fairness matrix covering all treatment-vs-comparator pairs
- Check for confounding differences in implementation, tuning, data access, and compute
- Assess whether each comparator is the best available alternative at the time of the experiment
- Identify temporal drift in baseline relevance
- BEFORE creating any diagram, LOAD the
/mermaid skill using the Skill tool - this is MANDATORY
Analysis Workflow
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
Baseline/Control Definitions
- Find what the proposed method is compared against
- Look for: baseline, control, comparison, prior, state-of-the-art, vanilla, default, reference
Implementation Parity
- Find whether baselines get equal engineering effort
- Look for: reproduce, reimplement, original, paper, author, tuned, optimized, hyperparameter
Version & Environment Match
- Find whether baselines use the same software/hardware environment
- Look for: version, library, framework, gpu, hardware, environment, checkpoint
Tuning Protocol Symmetry
- Find whether hyperparameter tuning is symmetric
- Look for: tune, search, grid, optuna, sweep, budget, trials, epochs
Temporal Baseline Drift
- Find whether baselines have been updated or are stale
- Look for: date, published, year, updated, latest, deprecated, legacy
Step 2: Build the Comparator Inventory
For each comparator, assess:
- Is it the best available alternative?
- Is it given equal engineering effort?
- Is it run in the same environment?
- Is the tuning budget symmetric?
- Has it drifted since originally published?
Step 3: Construct the Fairness Matrix
CRITICAL — Analyze Counterfactual Quality:
For each treatment-vs-comparator pair:
- Does the comparison isolate the intended factor?
- Are there confounding differences in implementation, tuning, data access, or compute?
Build a fairness matrix with rows = comparators, columns = fairness dimensions.
Step 4: Create the Optional Comparison Diagram
If a diagram adds value, create a simplified flowchart. This is OPTIONAL for this hybrid lens — the tables are the primary output.
Direction: LR (treatment and comparator flow in parallel toward evaluation)
Subgraphs: "PROPOSED METHOD", "COMPARATOR(S)", "SHARED EVALUATION"
Node Styling:
cli class: proposed method nodes
phase class: comparator method nodes
handler class: shared evaluation pipeline nodes
output class: results nodes
gap class: asymmetries flagged
detector class: parity checks
Step 5: Write Output
Write the analysis to: temp/exp-lens-comparator-construction/exp_diag_comparator_construction_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Comparator Construction Analysis: {Experiment Name}
**Lens:** Comparator Construction (Counterfactual)
**Question:** Is the comparator fair and relevant?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Comparator Inventory
| Comparator | Source | Reimplemented? | Same Environment? | Same Tuning Budget? |
|------------|--------|---------------|-------------------|---------------------|
| {name} | {paper/repo} | Yes / No / Partial | Yes / No | Yes / No / Unknown |
## Fairness Matrix
| Comparator | Best Available? | Equal Effort? | Same Env? | Symmetric Tuning? | Temporally Current? |
|------------|----------------|--------------|-----------|-------------------|---------------------|
| {name} | Yes / No | Yes / No | Yes / No | Yes / No | Yes / No |
## Comparison Diagram (Optional)
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
flowchart LR
%% CLASS DEFINITIONS %%
classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
subgraph Proposed ["PROPOSED METHOD"]
METHOD["Proposed Method<br/>━━━━━━━━━━<br/>{method name}"]
end
subgraph Comparators ["COMPARATOR(S)"]
COMP1["Comparator 1<br/>━━━━━━━━━━<br/>{name}"]
COMP2["Comparator 2<br/>━━━━━━━━━━<br/>{name}"]
end
subgraph Evaluation ["SHARED EVALUATION"]
EVAL["Evaluation Pipeline<br/>━━━━━━━━━━<br/>{dataset/benchmark}"]
RESULTS["Results<br/>━━━━━━━━━━<br/>{metrics reported}"]
PARITY["Parity Check<br/>━━━━━━━━━━<br/>{asymmetry found}"]
ASYM["Asymmetry<br/>━━━━━━━━━━<br/>{description}"]
end
METHOD -->|"evaluated on"| EVAL
COMP1 -->|"evaluated on"| EVAL
COMP2 -->|"evaluated on"| EVAL
EVAL --> RESULTS
RESULTS --> PARITY
PARITY -.->|"flagged"| ASYM
class METHOD cli;
class COMP1,COMP2 phase;
class EVAL handler;
class RESULTS output;
class PARITY detector;
class ASYM gap;
Color Legend:
| Color |
Category |
Description |
| Dark Blue |
Proposed Method |
The method being evaluated |
| Purple |
Comparators |
Baselines and controls |
| Orange |
Evaluation |
Shared evaluation pipeline |
| Dark Teal |
Results |
Reported outcomes |
| Red |
Parity Checks |
Fairness verification points |
| Yellow |
Asymmetries |
Flagged unfair differences |
Asymmetry Register
| # |
Asymmetry |
Affects |
Impact Assessment |
Remediation |
| 1 |
{description} |
{comparator(s)} |
High / Medium / Low |
{how to fix} |
Recommendations
- {Most critical fairness fix — e.g., retune baseline with same budget}
- {Version alignment or environment standardization needed}
- {Additional comparator that should be included}
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/make-experiment-diag` - Parent skill for lens selection
- `/mermaid` - MUST BE LOADED before creating diagram
- `/exp-lens-estimand-clarity` - For clarifying what the comparison is measuring
- `/exp-lens-fair-comparison` - For deeper analysis of evaluation protocol fairness
1---2name: exp-lens-comparator-construction3description: Create Comparator Construction experimental design analysis assessing whether baselines and controls are fair and relevant. Counterfactual lens answering "Is the comparator fair and relevant?"4---56# Comparator Construction Experimental Design Lens78**Philosophical Mode:** Counterfactual9**Primary Question:** "Is the comparator fair and relevant?"10**Focus:** Baseline Choice, Control Realism, Version Matching, Effort Symmetry, Baseline Drift1112## When to Use1314- Benchmark comparisons where baseline quality is questioned15- Ablation studies needing fair controls16- Claims of improvement over prior work17- User invokes `/exp-lens-comparator-construction` or `/make-experiment-diag comparator`1819## Critical Constraints2021**NEVER:**22- Modify any source code or experiment files23- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves24- Accept at face value that baselines received symmetric treatment2526**ALWAYS:**27- Build a fairness matrix covering all treatment-vs-comparator pairs28- Check for confounding differences in implementation, tuning, data access, and compute29- Assess whether each comparator is the best available alternative at the time of the experiment30- Identify temporal drift in baseline relevance31- BEFORE creating any diagram, LOAD the `/mermaid` skill using the Skill tool - this is MANDATORY3233---3435## Analysis Workflow3637### Step 1: Launch Parallel Exploration Subagents3839Spawn Explore subagents to investigate:4041**Baseline/Control Definitions**42- Find what the proposed method is compared against43- Look for: baseline, control, comparison, prior, state-of-the-art, vanilla, default, reference4445**Implementation Parity**46- Find whether baselines get equal engineering effort47- Look for: reproduce, reimplement, original, paper, author, tuned, optimized, hyperparameter4849**Version & Environment Match**50- Find whether baselines use the same software/hardware environment51- Look for: version, library, framework, gpu, hardware, environment, checkpoint5253**Tuning Protocol Symmetry**54- Find whether hyperparameter tuning is symmetric55- Look for: tune, search, grid, optuna, sweep, budget, trials, epochs5657**Temporal Baseline Drift**58- Find whether baselines have been updated or are stale59- Look for: date, published, year, updated, latest, deprecated, legacy6061### Step 2: Build the Comparator Inventory6263For each comparator, assess:641. Is it the best available alternative?652. Is it given equal engineering effort?663. Is it run in the same environment?674. Is the tuning budget symmetric?685. Has it drifted since originally published?6970### Step 3: Construct the Fairness Matrix7172**CRITICAL — Analyze Counterfactual Quality:**73For each treatment-vs-comparator pair:74- Does the comparison isolate the intended factor?75- Are there confounding differences in implementation, tuning, data access, or compute?7677Build a fairness matrix with rows = comparators, columns = fairness dimensions.7879### Step 4: Create the Optional Comparison Diagram8081If a diagram adds value, create a simplified flowchart. This is OPTIONAL for this hybrid lens — the tables are the primary output.8283**Direction:** `LR` (treatment and comparator flow in parallel toward evaluation)8485**Subgraphs:** "PROPOSED METHOD", "COMPARATOR(S)", "SHARED EVALUATION"8687**Node Styling:**88- `cli` class: proposed method nodes89- `phase` class: comparator method nodes90- `handler` class: shared evaluation pipeline nodes91- `output` class: results nodes92- `gap` class: asymmetries flagged93- `detector` class: parity checks9495### Step 5: Write Output9697Write the analysis to: `temp/exp-lens-comparator-construction/exp_diag_comparator_construction_{YYYY-MM-DD_HHMMSS}.md`9899---100101## Output Template102103```markdown104# Comparator Construction Analysis: {Experiment Name}105106**Lens:** Comparator Construction (Counterfactual)107**Question:** Is the comparator fair and relevant?108**Date:** {YYYY-MM-DD}109**Scope:** {What was analyzed}110111## Comparator Inventory112113| Comparator | Source | Reimplemented? | Same Environment? | Same Tuning Budget? |114|------------|--------|---------------|-------------------|---------------------|115| {name} | {paper/repo} | Yes / No / Partial | Yes / No | Yes / No / Unknown |116117## Fairness Matrix118119| Comparator | Best Available? | Equal Effort? | Same Env? | Symmetric Tuning? | Temporally Current? |120|------------|----------------|--------------|-----------|-------------------|---------------------|121| {name} | Yes / No | Yes / No | Yes / No | Yes / No | Yes / No |122123## Comparison Diagram (Optional)124125```mermaid126%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%127flowchart LR128 %% CLASS DEFINITIONS %%129 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;130 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;131 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;132 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;133 classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;134 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;135 classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;136 classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;137 classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;138139 subgraph Proposed ["PROPOSED METHOD"]140 METHOD["Proposed Method<br/>━━━━━━━━━━<br/>{method name}"]141 end142143 subgraph Comparators ["COMPARATOR(S)"]144 COMP1["Comparator 1<br/>━━━━━━━━━━<br/>{name}"]145 COMP2["Comparator 2<br/>━━━━━━━━━━<br/>{name}"]146 end147148 subgraph Evaluation ["SHARED EVALUATION"]149 EVAL["Evaluation Pipeline<br/>━━━━━━━━━━<br/>{dataset/benchmark}"]150 RESULTS["Results<br/>━━━━━━━━━━<br/>{metrics reported}"]151 PARITY["Parity Check<br/>━━━━━━━━━━<br/>{asymmetry found}"]152 ASYM["Asymmetry<br/>━━━━━━━━━━<br/>{description}"]153 end154155 METHOD -->|"evaluated on"| EVAL156 COMP1 -->|"evaluated on"| EVAL157 COMP2 -->|"evaluated on"| EVAL158 EVAL --> RESULTS159 RESULTS --> PARITY160 PARITY -.->|"flagged"| ASYM161162 class METHOD cli;163 class COMP1,COMP2 phase;164 class EVAL handler;165 class RESULTS output;166 class PARITY detector;167 class ASYM gap;168```169170**Color Legend:**171| Color | Category | Description |172|-------|----------|-------------|173| Dark Blue | Proposed Method | The method being evaluated |174| Purple | Comparators | Baselines and controls |175| Orange | Evaluation | Shared evaluation pipeline |176| Dark Teal | Results | Reported outcomes |177| Red | Parity Checks | Fairness verification points |178| Yellow | Asymmetries | Flagged unfair differences |179180## Asymmetry Register181182| # | Asymmetry | Affects | Impact Assessment | Remediation |183|---|-----------|---------|-------------------|-------------|184| 1 | {description} | {comparator(s)} | High / Medium / Low | {how to fix} |185186## Recommendations1871881. {Most critical fairness fix — e.g., retune baseline with same budget}1892. {Version alignment or environment standardization needed}1903. {Additional comparator that should be included}191```192193---194195## Pre-Diagram Checklist196197Before creating the diagram, verify:198199- [ ] LOADED `/mermaid` skill using the Skill tool200- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)201- [ ] Diagram will include a color legend table202203---204205## Related Skills206207- `/make-experiment-diag` - Parent skill for lens selection208- `/mermaid` - MUST BE LOADED before creating diagram209- `/exp-lens-estimand-clarity` - For clarifying what the comparison is measuring210- `/exp-lens-fair-comparison` - For deeper analysis of evaluation protocol fairness