Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Denoising Models Develop Human-Like Perceptual Illusion Representations Across Architectures

Project website →

Contents

Directory Description
data/ Full effect-size tables, per-channel rankings, ablation results, psychophysics, permutation p-values, shift fractions
code/ Probing pipeline, ablation, injection, psychophysics, statistics utilities
docs/ Source for the project website (README)

data/

effect_sizes/

Full layer × timestep tables with Cohen's d, Hedge's g, and Glass's Δ for every model. All metrics are signed; use abs() for ranking. t-test p-values are included for completeness only — effect size is the primary result criterion throughout the paper.

File Model Layers Timesteps
church_ddpm_full.csv google/ddpm-ema-church-256 41 6
bedroom_ddpm_full.csv google/ddpm-ema-bedroom-256 41 6
celebahq_ddpm_full.csv google/ddpm-ema-celebahq-256 41 6
ldm_celebahq_full.csv LDM (CelebA-HQ) 41 6
sd15_full.csv runwayml/stable-diffusion-v1-5 (trained + 3 random seeds) 32 5
dit_xl2_full.csv DiT-XL/2 28 6
resnet50_full.csv ResNet-50 (ImageNet) 17
vgg19_full.csv VGG-19 (ImageNet) 19
vit_b16_full.csv ViT-B/16 (ImageNet) 12
vit_l16_full.csv ViT-L/16 (ImageNet) 24

Columns (DDPM models): layer, timestep, category, n_images, cohens_d, hedges_g, glass_delta, p_value, p_fdr, significant

Columns (CNNs/ViTs): image, layer, timestep, mean_ill, mean_ctrl, delta, model

per_channel/

Per-channel effect sizes at t=50 for the three key layers (N=72 color images).

Columns: layer, channel, cohens_d, hedges_g, glass_delta, p_value, n_images, p_fdr, significant

File Layer Channels
mid_attn_0_per_channel.csv mid_attn_0 512
mid_resnet_0_per_channel.csv mid_resnet_0 512
down_5_resnet_1_per_channel.csv down_5_resnet_1 512

Channel 311 is the top channel by |d| across all three layers (see paper Section 3.4).

ablation/

File Description Paper reference
threshold_sweep.csv % Δ reduction vs d-threshold (0.2–0.8) for pos_d / neg_d groups Appendix W
cv_results.csv 5-fold + LOO cross-validation of channel selection stability Appendix AH
random_null_500.csv 500 random-channel ablation samples (null distribution) Appendix
mse_phantom_test.csv MSE/MAE phantom test — ablated vs random channels on generated images Appendix AP

psychophysics/

File Description
flodog_per_layer_rho.csv Spearman ρ between FLODOG brightness predictions and per-layer activations (color illusions)
dose_response.csv Mean activation delta vs illusion amplitude for Ebbinghaus + Ponzo at 7 strength levels

permutation/

File Description
permutation_pvalues_246.csv FDR-corrected permutation p-values for all 246 (layer × timestep) combinations

shift_fractions/

File Description
all_models_shift_frac.csv Phantom injection shift fractions for church-DDPM, DiT-XL/2, and LDM-CelebA-HQ

code/

See code/README.md for full reproduction instructions.

probing/
  hooks.py            activation capture via forward hooks
  effect_sizes.py     Cohen's d, Hedge's g, Glass's Δ
  stimuli.py          GVIL + programmatic illusion loaders
  run_probe.py        main probing entry point

ablation/
  channel_ablation.py
  cross_validation.py
  random_null.py

injection/
  ddim_injection.py
  single_step_injection.py
  within_manifold.py

psychophysics/
  flodog.py
  dose_response.py

stats/
  bootstrap.py
  permutation.py

Data schemas

Effect size columns

  • cohens_d — paired Cohen's d = mean(Δ) / std(Δ)
  • hedges_g — bias-corrected; preferred for N < 50 (g ≈ 0.978 × d at N=35)
  • glass_delta — normalized by control-region std; independent of illusion-region variance

Region definitions

  • illusion_a / bbox_match — humanlike illusion region (appears perceptually different)
  • illusion_b / bbox_mismatch — control region (matched location, no illusory context)
  • Δ = mean activation in illusion_a − mean activation in illusion_b, per image, then paired

Models not included

Model weights are not shipped. All models load automatically from HuggingFace:

  • google/ddpm-ema-church-256, google/ddpm-ema-bedroom-256, google/ddpm-ema-celebahq-256
  • runwayml/stable-diffusion-v1-5
  • DiT-XL/2: facebook/DiT-XL-2-256

About

This is the supporting code and data for the Paper "Denoising Models Develop Human-Like Perceptual Illusion Representations Across Architectures"

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages