GAPrune: Gradient-Alignment Pruning for Domain-Aware Embeddings

Yixuan Tang, Yi Yang

State-of-the-art text embedding models have increasingly shifted from smaller architectures like BERT to massive Large Language Models (LLMs) containing billions of parameters. While these models excel at general language tasks, they often struggle with domain-specific nuances. For instance, understanding that the word "liability" carries a specific negative sentiment in a financial context, differing from its neutral general usage, requires specialized knowledge.

To address this, researchers typically fine-tune these massive models, creating a "deployment paradox": the best-performing models become too computationally expensive to deploy in real-world, resource-constrained environments. Traditional model pruning—removing unnecessary weights—offers a solution. However, existing pruning methods treat all parameters uniformly. They often accidentally prune weights crucial for domain knowledge or retain weights that cause "interference" between general language patterns and specialized domain logic.

The GAPrune Methodology

To solve the deployment paradox, the authors introduce GAPrune, a novel pruning framework designed to compress large-scale embedding models while actively enhancing their performance in specialized domains. GAPrune operates in three sequential stages:

  1. Representative Sampling: Instead of relying on massive datasets, the method uses k-means clustering to select 5,000 highly diverse, representative samples from both general and domain-specific corpora.
  2. Parameter Characterization: Each parameter is analyzed through two distinct lenses:
  3. Fisher Information: Measures how sensitive the model's output is to a specific parameter across both general and target domains.
  4. Gradient Alignment: The core innovation. It calculates the cosine similarity between the gradients of the general task and the domain task. If gradients align, the parameter helps both; if they oppose, the parameter creates a conflict.
  5. DAI Scoring: These signals are combined into a single Domain Alignment Importance (DAI) score. This formula prioritizes parameters that offer high net value for the domain, possess significant representational capacity, and align well with general linguistic foundations.
Comparison of GAPrune against existing pruning methods

As illustrated above, unlike magnitude or standard importance-based pruning, GAPrune explicitly targets and removes parameters that cause conflicts between general and domain-specific objectives. The parameters with the lowest DAI scores are pruned, resulting in a sparse model primed for its specific domain.

Key Insights: Pruning as Specialization

A striking insight from the paper is that pruning isn't merely about making a model smaller; it acts as a form of "architectural specialization." By removing conflicting parameters, the model becomes more efficient at learning specialized knowledge.

The authors also found that standard Fisher-based pruning is relatively domain-agnostic. Adding Gradient Alignment is crucial because it identifies why a parameter is important and whether it helps or hinders domain adaptation. Furthermore, GAPrune tends to preserve more parameters in the later layers of the LLM, aligning with the understanding that high-level semantic representations—critical for retrieval tasks—are formed in deeper layers.

Datasets and Key Results

The study evaluates GAPrune across two highly technical domains: Finance (using the 18-task FinMTEB benchmark) and Chemistry (using the 19-task ChemTEB benchmark). General foundation data was drawn from MSMARCO and SQuAD.

Performance of pruning methods on FinMTEB and ChemTEB benchmarks

The results highlight GAPrune's superiority over existing baselines:

  • One-Shot Performance: At 50% sparsity (removing half the weights), GAPrune maintained performance within 2.5% of the original dense models without any retraining, significantly outperforming magnitude and Fisher-based baselines.
  • Post-Retraining Gains: Sparse models created by GAPrune provide a superior foundation for retraining. Because conflicting weights are already removed, the model adapts faster. After just 100 steps of retraining, the GAPrune-compressed model achieved a +4.51% improvement on FinMTEB and +1.73% on ChemTEB compared to the original, unpruned dense model.
  • Efficiency & Robustness: For the Qwen3-Embedding-4B model, GAPrune resulted in a 33.4% reduction in FLOPs. Furthermore, the method remained effective even at extreme sparsity levels (60-65%) where traditional pruning methods suffered catastrophic collapse.

Limitations and Future Work

While highly effective, the paper focuses on unstructured pruning (removing individual weights). Achieving actual wall-clock speedups from unstructured sparsity often requires specialized hardware or software kernels. Additionally, the current framework is "one-shot." The authors suggest that an iterative pruning approach—pruning and retraining in cycles—might push sparsity even higher while maintaining performance. Finally, exploring more diverse domains like law or medicine would further validate the universal applicability of the DAI score.

Summary updated

BibTeX
@inproceedings{tang2026gaprune,
  author = {Yixuan Tang and Yi Yang},
  title = {{GAPrune: Gradient-Alignment Pruning for Domain-Aware Embeddings}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=GLELajHnCo},
}
Figure