# Same Function, Different Gradients: Evaluating Gradient Reliability under Reparameterization

DevFeed: [Same Function, Different Gradients: Evaluating Gradient Reliability under Reparameterization](<https://devfeed.tech/articles/same-function-different-gradients-evaluating-gradient-reliability-under-reparameterization-114635.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.02052>)

Author: Bum Jun Kim

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Post-training optimization](<https://devfeed.tech/topics/post-training-optimization.md>), [AI Models](<https://devfeed.tech/topics/ai-models.md>), [lora](<https://devfeed.tech/topics/lora.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [attention](<https://devfeed.tech/tags/attention.md>), [audits](<https://devfeed.tech/tags/audits.md>), [clipping](<https://devfeed.tech/tags/clipping.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [debug](<https://devfeed.tech/tags/debug.md>), [function](<https://devfeed.tech/tags/function.md>), [global](<https://devfeed.tech/tags/global.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [gradient](<https://devfeed.tech/tags/gradient.md>), [llama](<https://devfeed.tech/tags/llama.md>), [lora](<https://devfeed.tech/tags/lora.md>), [masks](<https://devfeed.tech/tags/masks.md>), [measurement](<https://devfeed.tech/tags/measurement.md>), [median](<https://devfeed.tech/tags/median.md>), [medium](<https://devfeed.tech/tags/medium.md>), [model](<https://devfeed.tech/tags/model.md>), [overlap](<https://devfeed.tech/tags/overlap.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [predictions](<https://devfeed.tech/tags/predictions.md>), [reliability](<https://devfeed.tech/tags/reliability.md>)

## AI overview

Gradient-based importance decisions can change when a model is reparameterized, even though its input-output function and predictions stay the same. The proposed Gradient Reliability under Reparameterization (GRR) audit rewrites trained models in equivalent parameter coordinates, checks that predictions are preserved, and compares gradient-derived decisions. Across audits of GLUE classifiers, a ViT, GPT-2 models, a 1.1B-parameter Llama-style model, and six LoRA adapters, gradients and decisions changed. In 66 GLUE attention audits, raw head-gradient rankings had a median top-3 overlap of just 1/3, and pruning rankings and masks changed even under the mildest tested rescalings. In the largest of 14 global-pruning audits, masks differed in four of 22 pruned heads, with validation accuracy of 50.92% and 94.84% for the compared masks on one ELECTRA SST-2 model.

## Source excerpt

arXiv:2611.02052v1 Announce Type: new Abstract: Gradients are no longer used only to train models: Gradient magnitudes are now measurement instruments, used to rank attention heads for pruning, to decide per-example clipping in private training, to allocate adapter rank budgets, and to debug models. Across these workflows, larger gradient magnitudes are taken to mean greater importance. Even for a fixed input--output function, these gradients are computed in one of many possible parameter coordinate systems. For example, attention scores depend on the query and key projections only through the paired product $W_QW_K^\top$. Scaling a head's query projection by $c$ and the corresponding key projection by $1/c$ therefore leaves every output logit unchanged. This change in parameter coordinates rescales the corresponding query and key gradient norms by $1/c$ and $c$, respectively. To test whether gradient-based decisions remain unchanged under these coordinate changes, we introduce Gradient Reliability under Reparameterization (GRR). GRR rewrites a trained model in new parameter coordinates that compute exactly the same function, verifies that predictions are unchanged, and then tests whether the decisions derived from the gradients are unchanged too. Our audits span GLUE classifiers, a ViT on CIFAR-10, GPT-2-medium and GPT-2-large, a 1.1B-parameter Llama-style model on WikiText-2, and six trained LoRA adapters. Empirically, predictions are preserved throughout, but both the gradients and the gradient-based decisions change. Across 66 GLUE attention audits, the median top-3 overlap of raw head-gradient rankings is only $1/3$, and rankings and pruning masks change even under the mildest rescalings we test. In the largest of 14 global-pruning audits, the shifted ranking selects head masks that differ in four of 22 pruned heads and reach $50.92\%$ and $94.84\%$ validation accuracy on one ELECTRA SST-2 model.