Weight-space programming and mechanistic interpretability for model editing in particle physicsWeight-space programming and mechanistic interpretability for model editing in particle physics
Researchers demonstrate on a particle physics foundation model that weight-space programming and sparse autoencoder (SAE)-guided editing can directly modify model weights to eliminate unwanted model behavior. In a foundation model trained on jets data, adding a single soft neutral particle causes large changes in jet classification, violating infrared safety; the authors use mechanistic analysis to locate the relevant attention heads and trace the root of the flaw to the pretraining data using a different reconstruction threshold. The paper proposes two repair methods: removing three latent directions identified by the SAE, and having a language model agent directly edit the weights, requiring no gradients and only 50 model queries. Each of the two edits almost completely eliminates the flaw, leaves the model's other responses almost unchanged, and modifies far fewer parameters than fine-tuning. Although the experiments are based only on W and QCD jets, the editing effects transfer to all signal categories, pretrained generators, and newly trained regression heads.