mlsanityData to 14 Oct 2026

BrainSurgery: Reproducible and Reliable Declarative Weight Manipulations for Model Editing and Upcycling

arXiv 2606.09707 ↗First posted 8 Jun 2026cs.LG cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

As deep learning models scale, managing, inspecting, and modifying large checkpoints has become increasingly challenging. Researchers often need to alter model weights for layer restructuring, precision casting, low-rank factorization, and architectural debugging, yet these workflows often rely on fragile ad-hoc Python scripts. Here, we introduce BrainSurgery, a tool for robust and reproducible "tensor surgery" on neural network checkpoints, and provide a system demonstration covering four examples and three case studies from model upcycling to LoRA extraction. By abstracting storage formats and memory management, BrainSurgery executes complex transformations through declarative YAML plans. It supports structural modifications, mathematical transformations, and tensor reshaping through expressive regex and structural targeting, while built-in assertions validate tensor shapes, data types, and values to prevent silent errors. We envision that BrainSurgery will provide a strong foundation for future research through its reproducible and validated operations.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 10 of its 23 references that are in the map. First posted on arXiv 8 Jun 2026.

Builds on

10 of 23 references.

References · 10

  1. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  2. 2016Overcoming catastrophic forgetting in neural networkscited by 4,787
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  4. 2022Mass-Editing Memory in a Transformercited by 1,001
  5. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  6. 2024Model Merging in LLMs, MLLMs, and Beyond: Methods, Theories, Applications and Opportunitiescited by 254
  7. 2024A Unified Framework for Model Editingcited by 57
  8. 2024NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internalscited by 45
  9. 2023NeuroSurgeon: A Toolkit for Subnetwork Analysiscited by 9
  10. 2025PHLoRA: data-free Post-hoc Low-Rank Adapter extraction from full-rank checkpointcited by 5

Built on by

Not cited yet.