---
doc_id: HIST-PROJECT
title: Project progress and next-gate ledger
status: maintained
---

# Project progress ledger — DIRE

> **Policy:** append a new dated entry after every significant code, protocol, data, or run change. Do not overwrite prior entries. Every entry must locate the work in [`../project-roadmap.md`](../project-roadmap.md), state evidence level, list checks/artifacts, blockers, and the exact condition for the next step. Routine typo-only edits may be omitted; changes that alter executable behavior, experiment scope, data selection, metrics, checkpointing or claims are significant.

## Current position

**Roadmap location:** T0/M0.1–M0.2 established in this branch; next active gate is T1/M4 (Kaggle LSUN Table 5 pilot path prepared, real execution unverified). T1/R1–R2 remain P0 partial/D0 blocked; T2/X1 has user-provided reports, not independently verified.

**State source:** roadmap work is on active branch `arena/92242cb0-dire-modal`, based on `e7625f70afe3c2e089848458a2f6e1aae637e534`. The roadmap/docs edits are being validated in this branch; they do not record a new Kaggle run.

**Current presentation boundary:** theory and DIRE method; provenance-aware comparison of paper-reported values with group-measured values; and only experiments/improvements genuinely proposed and run by the group. No Manim/video objective. AEROBLADE is external prior work/reference only and lives under `docs/refs/`.

### Completed / checked in repository

- Integrated Kaggle LSUN-Bedroom Table 5 notebook exists: `platforms/kaggle/lsun-table5-full-pipeline.ipynb`.
- Manifest reuse and selected-ID reuse were implemented; source path override `MANIFEST_SOURCE_PATH` permits a pilot to load a prior manifest while using a separate output `RUN_ID`.
- ResNet checkpoint loading was corrected to load the pretrained backbone, omit the ImageNet 1000-class head, and initialize a fresh 1-logit head; RGB_DIRE has explicit 6-channel conv1 initialization.
- Notebook JSON and code-cell AST validation passed in the previous work. Synthetic manifest/selection cache loaders passed in a local smoke test. No PyTorch package was available in the local environment for a real model instantiation test.
- Docs cleanup merged in PR #140 (`e7625f70`): current Kaggle path is indexed; Modal legacy docs live under `docs/modal/`; stale platform evaluations and superseded demo plans live under `docs/archive/`.

### Runtime state — user-reported, not independently inspected

- User pasted a Kaggle log showing REC training at epoch 8/400 after about two hours. Reported val AP increased to 0.72158; accuracy remained near 0.5. We do not have the Kaggle working directory or checkpoint files in this repository.
- This does not prove test evaluation, completion of REC, completion of the other representations, persistence after session end, or GPU utilization.
- With user-reported speed around 8 epochs/2 hours, full-data 400-epoch training across four representations cannot be presumed to fit a 24-hour deadline. See `docs/kaggle-lsun-table5-24h.md` for preserve-first/pilot advice.

### Scientific status and hard limits

- Paper-reproduction P0 is partial; D0 is blocked in `docs/research/plans/paper-reproduction-p0-d0-audit.md`. No exact-reproduction claim is authorized by a plan alone.
- Configured LSUN test generator list includes `adm`, `ddpm`, `iddpm`, `pndm`, `sdv2`, subject to availability. SDv2 is a variant, not SDv1.
- `recons/test/ADM` was confirmed absent by user; REC × test ADM remains unavailable. No substitute reconstruction data.
- Current fast index uses `images` as master and counterpart path probes for DIRE/recons, so orphan-only records in those branches are not enumerated.
- ImageNet/DIRE encoding assumptions and exact author RGB_DIRE conv1 adaptation remain unverified.
- CelebA-HQ reports are user-provided and must stay in the extension track; do not merge them into paper-reproduction evidence.

## Next gate — T1/M4 pilot, after persistence check

**Before closing current Kaggle runtime:** export/persist `triplet_manifest.json`, `selected_ids.json`, current run protocol, `REC/best_model.pt`, `REC/last_resume.pt` and `REC/history.json` if those files exist. Confirm the saved copies are accessible from the next session. If feasible, letting the current REC run reach an epoch divisible by 5 updates its resume checkpoint; do not risk losing the existing best checkpoint or use the volatile working directory as the only copy.

**Then:** create a new pilot `RUN_ID`, set `RUN_MODE="pilot"`, a 200-per-cell cap and 3–5 epochs, point `MANIFEST_SOURCE_PATH` to the preserved full manifest, and leave the original full-run outputs untouched. Check manifest compatibility, counts, missing modalities, GPU, elapsed time and persistence before launching training. Mark every pilot output as pilot/compute-limited.

**Gate passes when:** a pilot run or a clearly diagnosed failure is saved with protocol, manifest/selection provenance, checkpoints/history, available test scores, counts and runtime metadata. It does not pass the paper-reproduction gate.

## Append-only change log

### 2026-10-14 — Prior merged code/docs milestone recorded (PR #140)

- **Roadmap location:** T3/M3.1–M3.2 and T0/M0.1.
- **Change:** integrated Kaggle notebook gained `MANIFEST_SOURCE_PATH` to load a compatible prior full manifest into a new run ID; ResNet checkpoint loading now excludes the ImageNet 1000-class head, creates a fresh binary head, and explicitly initializes RGB_DIRE's 6-channel conv1.
- **Repository reference:** PR #140, merge commit `e7625f70afe3c2e089848458a2f6e1aae637e534`.
- **Evidence:** local synthetic cache loader tests and notebook JSON/code AST checks passed before merge. Real Kaggle cache, torch model instantiation, GPU training and test evaluation were not independently run.
- **Next condition:** current Kaggle operator preserves the manifest/checkpoints, then validates the new manifest-backed pilot in the target runtime; do not treat source-level correctness as runtime verification.

### 2026-10-14 — Roadmap and progress tracking established

- **Roadmap location:** T0/M0.1 and M0.2.
- **Change:** defined tracks/milestones; added the rule that significant code/protocol/run changes append a ledger entry; made `plan.md` point to the project roadmap and preserved its prior visualization task as an optional plan.
- **Evidence:** manually invoked all docs-index test assertions successfully; repository-wide local Markdown link scan returned zero broken links; notebook JSON/code-cell AST validation passed; `git diff --check` passed.
- **Limitations:** pytest is not installed; no Kaggle/GPU run or current user checkpoint was inspected. Existing direct agent-doc assertions show plan tracking drift for three future tests (`test_dire_equivalence`, `test_aero_sign`, `test_fusion_no_leak`), outside this roadmap change.
- **Current state:** no runtime state changed; roadmap/history/docs updates are on `arena/92242cb0-dire-modal` and are not yet committed.
- **Next condition:** preserve the user's Kaggle artifacts before stopping the active kernel; then run a new manifest-backed pilot under a distinct `RUN_ID`. Record actual output/elapsed time before choosing a larger compute scope.

### 2026-10-14 — Consolidated contributor docs and centralized research corpus

- **Roadmap location:** T0/M0.1–M0.2.
- **Change:** removed the redundant `AGENT.md` and obsolete root `handoff.md`; consolidated repo-wide agent rules into `AGENTS.md`; reduced `CLAUDE.md` to a pointer; rewrote the human README; moved the old changelog and agent-doc survey to `docs/archive/`; moved scientific plans, books, references, CelebA-HQ extension reports and slide assets under `docs/research/`.
- **Code/doc references:** updated Markdown, scripts/tools, tests, slide assets and notebook path strings to the new canonical locations. No experiment logic or runtime behavior was intentionally changed.
- **Evidence:** focused documentation assertions invoked directly passed; repository-wide local Markdown link scan found zero broken links; Kaggle and environment notebooks passed JSON/Python AST checks; `git diff --check` passed.
- **Limitations:** pytest is not installed in this environment; no Kaggle/GPU execution or artifact inspection occurred.
- **Current state:** branch `arena/92242cb0-dire-modal`; this cleanup remains uncommitted.
- **Next condition:** maintain `AGENTS.md` as the only root agent guide and append future significant implementation/run changes here; resume at the manifest-backed Kaggle pilot gate only after current outputs are persisted.

### 2026-10-14 — Retired Manim objective and reset presentation scope

- **Roadmap location:** T0/M0.1 and T4/D1–D4.
- **Change:** replaced active Manim/video and visualization goals with theory-and-evidence presentation scope: explain DIRE, compare paper-reported and group-measured results with provenance/caveats, and report only group experiments genuinely run. AEROBLADE is explicitly external prior work, not a group improvement. Its comparison notes and former SPEC-001 are routed to `docs/refs/`.
- **Archive/routing:** moved the former Manim plan, prototype plan, tools/tests, and `02_improve.sh` to `docs/archive/`; removed the retired workflow from active `scripts/`; updated current spec, roadmap, project plan, slide brief, delivery workflow, site status, and canonical guides. Legacy ADR/runbook material is labeled historical rather than treated as current instruction.
- **Evidence:** focused pytest rerun passed: 72 tests across docs index, agent docs, scripts layout, historical/current scope separation, native-path checks and scratch workflow guards (`PYTHONPATH=src`). Four site tests (JSON, palette, status/scope, slide order) passed. Python compile checks, `bash -n`, `git diff --check`, and repository-wide Markdown link scan passed (0 broken links).
- **Limitations:** full pytest suite was not run. Rebuilding the generated site data through `platforms/site/build.py` could not import `dire_modal` because `modal` is not installed; the checked-in JSON status section was regenerated from the builder's declared status list and its focused tests passed. No new GPU experiment or scientific improvement is claimed.
- **Current state:** changes remain uncommitted on `arena/92242cb0-dire-modal`; no experiment/runtime state changed.
- **Next condition:** use the theory/evidence brief for presentation work; include only group measurements backed by artifacts and clearly distinguish them from paper values and unverified reports. Continue the separate Kaggle pilot gate only after preserving the user's current artifacts.

### 2026-10-14 — Added static progress dashboard

- **Roadmap location:** T0/M0.1 and T4/D2.
- **Change:** added `artifacts/progress-dashboard.html`, a self-contained, responsive visual snapshot of the five tracks, current P0/D0 gates, the M4 preserve-first sequence, evidence labels, user-reported Kaggle snapshot, missing-data guardrails, and the clarified presentation scope. Added the dashboard route to `docs/README.md`.
- **Evidence:** dashboard content is derived from this ledger and the roadmap; it deliberately shows no aggregate completion percentage and labels the Kaggle metrics as user-reported/unverified. No new experiment or runtime evidence was added.
- **Limitations:** HTML is a static snapshot and may become stale; the progress ledger remains authoritative. Validate local links and standalone HTML before handoff.
- **Current state:** uncommitted on `arena/92242cb0-dire-modal`.
- **Next condition:** refresh the dashboard only from an updated ledger/roadmap, preserving provenance labels; do not infer a new runtime status from the dashboard itself.

### 2026-10-14 — DIRE theory synthesis and Kaggle experiment readiness

- **Roadmap location:** T0/M1.1, T1/M4–M5, T3/M3.2, T4/D1.
- **Change:** added `docs/research/reports/dire-theory-and-kaggle-experiment-brief.md` to connect DDIM inversion, DIRE residuals, classifier roles, paper-reported results and current Kaggle experiments. It explicitly separates the ImageNet ResNet-50 initialization checkpoint, ADM diffusion checkpoint, and author-trained DIRE detector checkpoint; it also records current data/checkpoint requirements and P0/D0 blockers. Added image-level bootstrap confidence bands and exploratory permutation comparisons with Holm correction to the Kaggle Figure 5 notebook, keeping outputs labeled exploratory and storing a one-file ZIP bundle.
- **Evidence / checks:** all code cells in the Figure 5 notebook compile; notebook parses as valid JSON; `git diff --check` passes. These are static checks only.
- **Limitations:** raw DiffusionForensics inputs/checkpoint bytes are not in this checkout, and this workspace has no Kaggle runtime/account connection. No dataset was uploaded, no checkpoint was deployed, and no Kaggle/GPU or empirical FFT analysis was executed. Local paper/supplement version and P0/D0 inventory remain unresolved as stated by the existing audit.
- **Current scope:** the runnable near-term path is E0 (CPU analysis of already-mounted DIRE maps); E1 Table 5 requires mounted image/map/reconstruction inputs plus a SHA-identified ImageNet ResNet-50 checkpoint; clean-room map generation additionally requires compatible ADM diffusion weights and substantial compute.
- **Next gate:** user/operator identifies the target Kaggle asset version and checkpoint class/path for E1 or R1. For now, run E0 from the existing DIRE input, save its manifest/protocol/ZIP, and do not treat exploratory Figure 5 statistics as full-paper reproduction.

### 2026-10-14 — Research direction clarified: DiT reconstructor, ResNet detector fixed

- **Roadmap location:** T2/X2 (new research extension); T3/M3.2; T4/D1.
- **User decision:** core intervention is replacing the U-Net diffusion reconstructor with a DiT-based reconstructor and then measuring its residual maps; keep the downstream ResNet-50 detector recipe fixed for the first comparison. ViT detector is a separate later axis. The previously prepared Figure 5/FFT E0 is auxiliary, not the primary research target.
- **Research added:** `docs/research/reports/dit-reconstructor-research-design.md` records source inspection of official `facebookresearch/DiT` commit `ed81ce2229091fd4ecc9a223645f95cf379d582b`: latent-space VAE pipeline, 4→8-channel learned-variance output, ImageNet class conditioning/null label, deterministic DDIM primitives, license note and non-drop-in distinction from ADM pixel-space U-Net. It defines a VAE-only control and a staged, matched-ID experiment.
- **Evidence/checks:** official GitHub source was cloned read-only under `/tmp` for inspection; no third-party code/weights were added to Git. Documentation links, notebook JSON/code syntax, and `git diff --check` were checked locally.
- **Limitations:** no Kaggle access, dataset/checkpoint bytes, VAE revision/hash or DiT deployment artifact is available in this checkout. No model was loaded, no GPU job launched, and no empirical result exists. Official DiT weights are ImageNet class-conditional and cannot be treated as an LSUN ADM substitute.
- **Next gate:** user must choose ImageNet (official DiT checkpoint/domain match, still a latent-vs-pixel variant) or LSUN-Bedroom (requires an LSUN-trained/fine-tuned DiT checkpoint and substantially more compute) before implementing a runnable Kaggle DiT prototype. Resolve VAE/checkpoint revisions, license and Kaggle GPU/disk budget before smoke inference.

### 2026-10-14 — Figure 5 group discovery scoped to LSUN-Bedroom subtree

- **Roadmap location:** T3/M3.1; supporting E0 Figure 5 path only (not the primary DiT research target).
- **User report:** `resolve_group_dirs` found two `real` candidates under `dire/test/lsun_bedroom/imagenet/...` and `dire/test/lsun_bedroom/lsun_bedroom/...`.
- **Change:** `find_group_candidates` now prefers the repeated-domain subtree `test/lsun_bedroom/lsun_bedroom/` when present, and does not merge the sibling `/imagenet/` branch. Added regression tests for repeated-domain preference and direct-domain fallback.
- **Evidence:** both synthetic discovery tests passed by direct invocation; notebook JSON/code cells compile; report links and `git diff --check` pass.
- **Limitations:** this validates path selection on synthetic structure only; no Kaggle directory was read. Existing local audit records the two DIRE real branches as byte-identical, so they must not be counted as separate real groups.

### 2026-10-14 — Deep research artifact: DiT backbone for DIRE-like maps and Kaggle pilot

- **Roadmap location:** T2/X2 (research extension), T3/M3.2, T4/D1; no Kaggle execution.
- **Artifact:** `docs/research/reports/dit-for-dire-kaggle-deep-research.html` is a standalone static HTML research note with source links, DiT architecture audit, pixel-space residual contract, domain/checkpoint caveat, staged Kaggle gates, resource/license checklist and no-go criteria. Indexed in `docs/research/README.md`.
- **Primary source audit:** official DiT snapshot `ed81ce2229091fd4ecc9a223645f95cf379d582b`; official DIRE snapshot `1f89fff15f0e478307cdea9abdfe06a52fe7838a`; OpenAI guided-diffusion snapshot `22e0df8183507e13a7813f8d38d51b072ca1e67c`; DIRE paper arXiv:2303.09295 HTML/PDF and DiT paper arXiv:2212.09748.
- **Important correction:** DIRE paper Appendix A specifies domain-matched ADM reconstructor (ADM-LSUN for LSUN-Bedroom, unconditional ADM-ImageNet for ImageNet); released `compute_dire.sh` defaults to `256x256_diffusion_uncond.pt`, so shell default is not provenance for every map. Corrected the DiT design report, DIRE walkthrough/reference and book claim to distinguish paper appendix from release-script default.
- **Findings:** official DiT-XL/2 is a 675M-parameter, ImageNet class-conditional latent model using a 4-channel VAE latent, patch tokens, adaLN-Zero, and learned-sigma output. No official LSUN DiT checkpoint is listed in the audited repo. Pixel-space `|x - decode(z_hat)|` preserves the DIRE-like residual representation but adds VAE reconstruction effects; VAE-only is required as a control. ImageNet DiT on LSUN is only an out-of-domain engineering smoke, not an architecture comparison.
- **Evidence/checks:** local read-only clones used for source inspection only; no weights downloaded/loaded, no external code vendored. Static HTML internal anchors, source URLs, Markdown links, notebook unaffected; run `git diff --check`. No GPU/Kaggle run or experimental result.
- **Next gate:** user/operator chooses target domain; for an interpretable LSUN pilot, supply a provenance-verified LSUN-trained DiT checkpoint and VAE/license; otherwise restrict official ImageNet DiT to a clearly labeled engineering smoke or switch the scientific pilot to ImageNet with matched inputs/checkpoint.

### 2026-10-14 — User-provided Kaggle DIRE tree mapped to cross-domain / mix checkmap

- **Roadmap location:** T1/M2 (cross-dataset planned), with a separate research extension for proportion mixtures; no experiment run.
- **Input:** user pasted a tree of `dire/test`, `dire/train`, and `dire/val` groups under the current Kaggle DIRE map root. The inventory is user-provided and was not inspected by this agent on Kaggle.
- **Artifact:** `docs/research/plans/cross-dataset-mix-checkmap.md`, indexed in `docs/research/README.md`. It maps domain × split × generator, identifies nested test branches / duplicate-real cautions, lists content/ID/hash audit gates, proposes six single-source directed transfer tests, and specifies leave-one-domain-out mixtures with fixed total N/class.
- **Feasibility from listing:** LSUN↔ImageNet are the most controlled first pair because both have train/val real+ADM; CelebA-HQ has train real+SDv2 and test holdouts but no val, so a content-disjoint validation subset would need to be created from train. Mixing LSUN+ImageNet then testing CelebA-HQ is a candidate held-out-domain proportion study; generator/domain confounds for mixes containing CelebA are documented.
- **Limitations:** directory names alone do not verify tar members, counts, ID/hash overlap, map encoding, or RGB/image-root availability. Current `dire/` inventory can support downstream detector studies on provided maps, not DiT reconstructor generation; DiT requires original RGB inputs plus VAE/DiT assets. No archive was read, no Kaggle/GPU run, no training or cross-dataset score exists.
- **Next gate:** user reviews/marks the checkmap and confirms dataset version, target scenarios, mix proportions, total per-class sample budget and compute budget; then run read-only archive/ID audit before code/compute.

### 2026-10-14 — Kaggle notebook created for DIRE Table 3 cross-dataset classifier reproduction

- **Roadmap location:** T1/M2. This is a detector reproduction on released DIRE maps, separate from the DiT reconstructor extension.
- **Notebook:** `platforms/kaggle/dire-table3-cross-dataset-reproduction.ipynb`; indexed in root `README.md` and `docs/README.md`.
- **Protocol:** trains three separate LSUN-Bedroom real-vs-fake ResNet-50 detectors (`ADM`, `iDDPM`, `StyleGAN`) using train/val maps, then evaluates each on `ADM(ImageNet)`, `SD-v1(ImageNet)` and `StyleGAN(LSUN)` for the 3×3 Table 3 matrix. Uses explicit archive paths from user's directory listing, released maps, paper-style transforms/Adam/BCE/validation stopping and fixed `score > 0.5` ACC plus AP/AUROC.
- **User constraint:** intentionally no archive SHA-256 or expected-member-count integrity gate. The notebook still indexes image members to construct a streaming Dataset and reports actual selected sample counts; it does not assert canonical counts or hash data.
- **Safety:** defaults to `MODE='smoke'`, `CONFIRM_TRAINING=False`; no GPU work starts until the user supplies the mounted ImageNet ResNet-50 checkpoint path and explicitly enables training. Full mode is possible but not run here.
- **Validation:** notebook JSON parsed and all Python code cells passed `ast.parse`; `git diff --check` run. No Kaggle mount was accessed, no archives opened, no checkpoint loaded, and no training/evaluation results exist.
- **Limitations:** this reproduces detector training/evaluation on published DIRE maps; it does not regenerate residual maps or prove the original archive provenance. Kaggle path, checkpoint, resource budget, archive contents and actual Table 3 scores remain to be verified by the user-run notebook.

### 2026-10-14 — Kaggle Table 3 notebook updated for moved mounts and duplicated directory leaves

- **Symptom:** the Kaggle upload is exposed with a different mount/root and some extracted map directories contain a repeated terminal generator folder (examples provided: `test/lsun_bedroom/lsun_bedroom/adm/adm`, `train/imagenet/adm/adm`), while Stage 1 previously required fixed `.tar.gz` paths only.
- **Change:** Stage 0 now detects likely DIRE roots under the Kaggle dataset mount and offers `DIRE_ROOT_OVERRIDE`; Stage 1 accepts the released archive path or an extracted source folder, preferring a repeated leaf (`<generator>/<generator>`) when present. Stage 2 reads images directly from either tar or directories without extracting or modifying the mounted data.
- **Scientific guard:** the Table 3 train rows still require LSUN-Bedroom. A `train/imagenet/...` tree is not silently substituted for LSUN; the path report is fail-closed. The existing no-expected-member-count/no-hash constraint is unchanged.
- **Checks:** notebook JSON and every code cell parse; synthetic tests passed for duplicated-leaf folder resolution, image indexing/labels, and tar fallback; `git diff --check` passed. Repository pytest could not run because `pytest` is not installed in this environment. Kaggle mount and actual data were not accessed, so root/layout remains unverified on Kaggle.

### 2026-11-30 — Table 3 Kaggle notebook switched to directory-only input

- **Symptom:** Kaggle execution reached `tarfile.open()` on `.../train/lsun_bedroom/real/real`, which is an extracted image directory and raised `IsADirectoryError`.
- **Change:** Table 3 notebook now maps required sources directly to Kaggle image directories (including repeated terminal leaves), recursively indexes image files, and opens those paths directly. Removed tarfile/BytesIO imports, tar readers, archive path specs and tar-backed dataset handles. No archive input or extraction is used.
- **Scope:** table train/val paths remain LSUN-Bedroom; test columns remain ADM/ImageNet, SD-v1/ImageNet and StyleGAN/LSUN. Input mount stays read-only. No expected image/member count or hash audit was added.
- **Checks:** notebook JSON and all code cells parse; synthetic folder-only tests passed for repeated-leaf train/val/test directories and record labels; `git diff --check` passed. Kaggle itself was not run here, so physical directory layout must still pass Stage 1 on Kaggle.

### 2026-11-30 — Replace one-epoch smoke mode with a bounded pilot subset

- **Change:** notebook defaults to `MODE="pilot"` instead of smoke. Pilot samples up to 512 images per class/source, runs up to 20 epochs per detector with validation-driven LR reduction/stopping (patience 3); full mode remains separately capped at 400 epochs (patience 5).
- **Safety:** `CONFIRM_TRAINING=False` remains the default; no training/evaluation starts unless explicitly enabled. Pilot/full both require a mounted ImageNet ResNet-50 checkpoint and GPU. Pilot outputs are marked as a subset engineering result, not Table 3 paper results.
- **Validation:** notebook JSON/code-cell parse and stale-smoke search; no Kaggle run, checkpoint loading, or training performed in this environment.

### 2026-11-30 — Set Kaggle ResNet-50 checkpoint path and trusted-load mode

- **Change requested before merge:** set `IMAGENET_RESNET50_CHECKPOINT` to `/kaggle/input/datasets/j4cknguyn/dire-modal/weights/resnet50-19c8e357.pth`; load this operator-specified mounted checkpoint with `torch.load(..., weights_only=False)` (compatibility fallback for older PyTorch). The notebook-generated best-model checkpoint still uses `weights_only=True`.
- **Safety note:** `weights_only=False` can unpickle Python objects; use only with this trusted, user-specified Kaggle checkpoint.
- **Validation:** notebook JSON/code-cell syntax and `git diff --check`; checkpoint file itself is not mounted in this local environment and was not loaded.
