#!/bin/bash # ============================================================================= # integrated_gradient_reverse.sh — toilet→bathroom causal influence map via # INTEGRATED GRADIENT of the toilet probe (REVERSED direction). # # Steer = toilet probe, readout = bathroom probe. Images: toilet-only (toilet=1, # bathroom=0). Steered direction at layer l = integrated gradient of score_toilet_l # along base→image, base = mean caption-token residual of NEGATIVE-label validation # images. Step = ALPHA*‖h_l‖*ĝ plus a 'full' panel h'=h+(x−b). Δ bathroom score read # at every layer l'>=l. Averaged → heatmap. # # Tunables (override inline, e.g. DEVICE_ID=2 IG_STEPS=64 bash