#!/bin/bash # ============================================================================= # gradient_ascent_reverse.sh — toilet→bathroom causal influence map via probe gradient. # # REVERSED direction: steer = toilet probe, readout = bathroom probe. # Images: toilet-only (toilet=1, bathroom=0). # # For each TOILET-ONLY image: nudge the residual stream at layer l along # ĝ = ∂ score_toilet_l/∂ h_l (unit gradient ascent in the toilet direction), # propagate, and measure Δ bathroom score at every layer l' >= l. # Averaged → heatmap (intervention layer l × readout l'). # # Tunables (override inline, e.g. DEVICE_ID=1 bash