Datasets:
Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: research-use-sdxl-openrail-derived
|
| 4 |
+
license_link: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md
|
| 5 |
+
pretty_name: Improving CA-LoRA — CA measurements and generated images
|
| 6 |
+
tags:
|
| 7 |
+
- lora
|
| 8 |
+
- sdxl
|
| 9 |
+
- cityscapes
|
| 10 |
+
- concept-aware-lora
|
| 11 |
+
- synthetic-images
|
| 12 |
+
- reproducibility
|
| 13 |
+
- research
|
| 14 |
+
task_categories:
|
| 15 |
+
- text-to-image
|
| 16 |
+
size_categories:
|
| 17 |
+
- 1K<n<10K
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Improving CA-LoRA — CA measurements and generated images
|
| 21 |
+
|
| 22 |
+
The two large evidence sets behind the reproduction-and-extension study of **CA-LoRA
|
| 23 |
+
(Concept-Aware LoRA)** on SDXL / Cityscapes:
|
| 24 |
+
|
| 25 |
+
1. **`measurements/`** — the raw head-granularity concept-attribution tensors for a 13-timestep
|
| 26 |
+
sweep (backs **Table 2** and **Figure 1** of the report).
|
| 27 |
+
2. **`generated/`** — every image that was scored for the main results (backs **Table 3** and its
|
| 28 |
+
bootstrap confidence intervals).
|
| 29 |
+
|
| 30 |
+
The adapters that produced the images live in
|
| 31 |
+
[`chs35/improving-ca-lora-checkpoints`](https://huggingface.co/chs35/improving-ca-lora-checkpoints).
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## `measurements/tsweep_sdxl_head/` — 39 files, 191 MB
|
| 36 |
+
|
| 37 |
+
Head-granularity CA measurements over the timestep grid
|
| 38 |
+
`[1, 41, 81, 121, 201, 301, 401, 481, 601, 701, 801, 901, 981]` — 13 timesteps × 3 files:
|
| 39 |
+
|
| 40 |
+
| file | what it is |
|
| 41 |
+
| --- | --- |
|
| 42 |
+
| `t<NNNN>.safetensors` | the full measurement at that timestep (256 samples) |
|
| 43 |
+
| `t<NNNN>_half0.safetensors` | first split half |
|
| 44 |
+
| `t<NNNN>_half1.safetensors` | second split half |
|
| 45 |
+
|
| 46 |
+
The `half0` / `half1` pair is what the **split-half agreement** column of Table 2 is computed from
|
| 47 |
+
(Spearman 0.956 for the primary ews metric); the full files carry the CA magnitudes and direction
|
| 48 |
+
statistics that rank the timesteps and drive Figure 1's per-head heatmaps.
|
| 49 |
+
|
| 50 |
+
Each file carries a `unit_granularity` metadata field (`head`), which the loading code verifies —
|
| 51 |
+
head- and module-granularity measurement products cannot be mixed. Measurements were taken at
|
| 52 |
+
`batch_size = 1` with `crop="center"`, and seeds are derived so that pairing holds across concept
|
| 53 |
+
axes and across timesteps.
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## `generated/` — 11 runs × 900 PNG + manifest, ~12 GB
|
| 58 |
+
|
| 59 |
+
The exact 1024×1024 images scored for **CMMD** and **CLIP-Score** in Table 3. One directory per
|
| 60 |
+
evaluated arm:
|
| 61 |
+
|
| 62 |
+
```
|
| 63 |
+
generated/<RUN>/
|
| 64 |
+
in_domain/ 00000.png … 00499.png (500 images)
|
| 65 |
+
foggy/ 00500.png … 00599.png (100)
|
| 66 |
+
night-time/ 00600.png … 00699.png (100)
|
| 67 |
+
rainy/ 00700.png … 00799.png (100)
|
| 68 |
+
snowy/ 00800.png … 00899.png (100)
|
| 69 |
+
manifest.json
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Filenames are a **global index 00000–00899 across the whole run**, not per-condition counters — the
|
| 73 |
+
condition directory a file sits in is implied by its index range, as laid out above. 900 images per
|
| 74 |
+
run, 9,900 in total.
|
| 75 |
+
|
| 76 |
+
`manifest.json` records, for every single image: its `index`, the full `prompt` actually used, the
|
| 77 |
+
sampled `class_names`, the `condition`, the `seed` and `batch_seed_index`, and the relative `path`.
|
| 78 |
+
It also records the generation protocol (guidance scale 5.0, 25 steps, `EulerDiscreteScheduler`,
|
| 79 |
+
1024², fp32, seed 0) and which adapter checkpoint was loaded. Per-image scores and bootstrap CIs
|
| 80 |
+
can therefore be recomputed exactly from these files.
|
| 81 |
+
|
| 82 |
+
### Runs, and the report rows they back
|
| 83 |
+
|
| 84 |
+
| directory | selection criterion | axis | Table 3 row |
|
| 85 |
+
| --- | --- | --- | --- |
|
| 86 |
+
| `A_t81_style` | t = 81 (the original paper's timestep) | style | "t = 81 (paper) / style" |
|
| 87 |
+
| `A_t81_viewpoint` | t = 81 (the original paper's timestep) | viewpoint | "t = 81 (paper) / viewpoint" |
|
| 88 |
+
| `B_top3_style` | multi-t, top-3 timesteps [41, 1, 81] | style | "multi-t [41, 1, 81] / style" |
|
| 89 |
+
| `B_top3_viewpoint` | multi-t, top-3 timesteps [41, 1, 81] | viewpoint | "multi-t [41, 1, 81] / viewpoint" |
|
| 90 |
+
| `C_t41_style` | t = 41 (this study's top-ranked timestep) | style | "t = 41 / style" |
|
| 91 |
+
| `C_t41_viewpoint` | t = 41 (this study's top-ranked timestep) | viewpoint | "t = 41 / viewpoint" |
|
| 92 |
+
| `D_t1_style` | t = 1 | style | "t = 1 / style" |
|
| 93 |
+
| `D_t1_viewpoint` | t = 1 | viewpoint | "t = 1 / viewpoint" |
|
| 94 |
+
| `E_random` | **control**: random 2% of heads, no CA | — | "random 2% (no CA)" |
|
| 95 |
+
| `E_all` | **control**: all attention projections, no CA selection | — | "full attention (no CA)" |
|
| 96 |
+
| `control_base` | **control**: base SDXL, no adapter at all | — | "0% control (base SDXL)" |
|
| 97 |
+
|
| 98 |
+
The four weather conditions are what the per-condition CLIP-Score columns and the weather-mean
|
| 99 |
+
column of Table 3 (and the gap analysis of Table 4) are computed over; `in_domain` is the CMMD set.
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
## ⚠️ Not included: the Cityscapes CMMD reference set
|
| 104 |
+
|
| 105 |
+
CMMD in Table 3 is measured against **500 centre crops of the Cityscapes `val` split**. Those
|
| 106 |
+
reference images are **not distributed here, or anywhere** — the Cityscapes license forbids
|
| 107 |
+
redistribution of the imagery. No real Cityscapes image appears in this repository.
|
| 108 |
+
|
| 109 |
+
The reference set is rebuildable from your own Cityscapes download: take the **first 500 images of
|
| 110 |
+
the `val` split in index order**, at **1024×1024**, **centre-cropped** and un-mirrored — the same
|
| 111 |
+
framing the training data was read with, so that CMMD measures a gap in content rather than a
|
| 112 |
+
difference in cropping. The exporter is `scripts/evaluate.py` (`export_reference`) in the code
|
| 113 |
+
repository, and the relevant config knobs (`eval.reference_split`, `eval.reference_num_images`,
|
| 114 |
+
`eval.seed`) are in the released `config.yaml`. Obtain Cityscapes from
|
| 115 |
+
<https://www.cityscapes-dataset.com/>. Every other number in the report is reproducible from the
|
| 116 |
+
artifacts here without it.
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
## License and intended use
|
| 121 |
+
|
| 122 |
+
**Research use.** The PNGs are **synthetic images generated by SDXL-derived adapters fine-tuned on
|
| 123 |
+
Cityscapes** — they are model output, not photographs, and they inherit the
|
| 124 |
+
[OpenRAIL++ use restrictions](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md)
|
| 125 |
+
of the SDXL base model, which apply to this data as they do to the model that produced it. Because
|
| 126 |
+
the adapters were fine-tuned on Cityscapes, users should also respect the
|
| 127 |
+
[Cityscapes terms](https://www.cityscapes-dataset.com/license/). Again: **no real Cityscapes images
|
| 128 |
+
are included** in this repository.
|
| 129 |
+
|
| 130 |
+
These images exist to make the report's metrics auditable and re-scorable. They are not a
|
| 131 |
+
general-purpose street-scene dataset, and they carry the domain and quality limitations discussed in
|
| 132 |
+
the report's Limitations section.
|
| 133 |
+
|
| 134 |
+
## Verifying integrity
|
| 135 |
+
|
| 136 |
+
The code repository ships `results/sha256_measurements.txt` and `results/sha256_generated_images.csv`
|
| 137 |
+
(`path,bytes,sha256`), keyed by the same repo-relative paths used here.
|