# TRACE Paper — Data and Code

**Paper:** "When Models Examine Themselves: Vocabulary-Activation Correspondence in Self-Referential Processing"

**Author:** Zachary Pedram Dadfar

## Data Files

All data in `data/` directory:

| File | Description | N | Section |
|------|-------------|---|---------|
| `llama_baseline_n50.json` | Llama 70B baseline correspondence runs | 50 | 4.4 |
| `llama_descriptive_control.json` | Llama descriptive control (loop + surge contexts) | 50 | 4.4 |
| `llama_paired_n70.json` | Paired baseline/steered runs for within-subject analysis | 70 | 4.5 |
| `llama_overnight_battery.json` | Refusal orthogonality and safety tests | — | 4.3 |
| `llama_layer_sweep_70b.json` | Layer sweep identifying introspection hotspot | — | 4.3 |
| `qwen_baseline_n50.json` | Qwen 2.5-32B baseline correspondence runs | 50 | 4.6 |
| `qwen_descriptive_control.json` | Qwen descriptive control V2 | 50 | 4.6 |

## Scripts

All scripts in `scripts/` directory:

**Figure generation:**
- `generate_fig2_steering.py` — Steering effect bar chart
- `generate_fig5_loop_autocorr.py` — Loop ↔ autocorrelation scatter
- `generate_fig6_descriptive_control.py` — Introspective vs descriptive comparison
- `generate_fig7_shimmer_paired.py` — Shimmer paired delta scatter
- `generate_fig9_qwen_control.py` — Qwen descriptive control bar chart

**Analysis:**
- `analyze_qwen_n50_all.py` — Qwen correspondence analysis
- `analyze_paired_n50.py` — Paired within-subject analysis
- `analyze_llama_desc_control.py` — Llama descriptive control analysis
- `compute_fdr.py` — Benjamini-Hochberg FDR correction
- `verify_tables.py` — Table 1 number verification
- `verify_qwen.py` — Table 2 number verification

## Requirements

```
numpy
scipy
matplotlib
```

## License

CC-BY 4.0

## Contact

zack.dadfar@automatica.sbs
