Carve VFM: Carving Specialists out of Generalists, Automatic Task-Specific Compression of Vision Foundation Models

Lotfi Abdelkrim Mecharbat, Abdelrahman Elsayed, Ibrahim Almakky, Martin Takáč, Mohammad YaqubarXiv 2026

TL;DR

Carve VFM is a framework that automatically extracts compact, task-specific "specialist" models from large Vision Foundation Models (VFMs) in just minutes. By jointly optimizing where to prune and how to repair the resulting damage using a novel "recoverability-aware" fitness score, it produces dense models that are faster and more accurate than standard pruning methods or native edge architectures.

What Problem Does This Paper Address?

Vision Foundation Models (VFMs) like DINOv3 or CLIP are powerful "generalists," but their massive size makes them difficult to deploy on edge devices or in high-throughput production environments. When we only need a model to perform a specific task—like distinguishing between types of medical tissues or car models—most of that general-purpose capacity is wasted.

Existing solutions have significant drawbacks:

  • Fine-tuning adapts the model but doesn't make it smaller.
  • Knowledge Distillation creates smaller models but requires a costly, slow training process guided by a "teacher" model.
  • Structured Pruning removes components to shrink the model directly, but aggressive pruning often destroys accuracy because it treats "what to cut" and "how to fix it" as separate problems.

The authors identify a "recoverability gap": a component shouldn't just be judged by its importance, but by how easily its lost function can be reconstructed by the weights that remain.

Methods

Carve VFM introduces a three-stage pipeline to "carve" a specialist out of a generalist:

  1. Task-Related Statistics: A single forward/backward pass of a small calibration set (512 samples) is used to cache input statistics and gradient importance.
  2. Budgeted Subnetwork Search: An evolutionary algorithm searches for the optimal "capacity allocation" across layers. It decides how many MLP channels and attention heads to keep in each layer to fit a specific parameter budget.
  3. Innovation: It uses a recoverability-aware fitness criterion. Instead of just looking at raw importance, it estimates if the surviving weights can be "refitted" to mimic the original model's behavior.
  4. Carving and Repair: The model is physically shrunk. The authors developed a mergeable iterative repair process using closed-form low-rank corrections. This "folds" the behavior of the removed parts back into the surviving weights, resulting in a standard dense model with no extra inference overhead.
The Carve VFM pipeline: from statistics collection to evolutionary search and final physical repair.

Datasets

The authors evaluated Carve VFM across twelve diverse benchmarks using four source models (DINOv3 ViT-S, B, L, and MetaCLIP-2):

  • General Recognition: CIFAR-10, CIFAR-100, Caltech-256.
  • Fine-grained Recognition: FGVC-Aircraft, CUB-200 (Birds), Stanford Cars, Oxford-IIIT Pets.
  • Texture/Scene Recognition: DTD (Describable Textures), MIT Indoor-67.
  • Medical Imaging: BloodMNIST, PneumoniaMNIST, OrganAMNIST.

Key Insights and Ideas

  • Allocation is Task-Specific: There is no "one-size-fits-all" pruning strategy. As shown in Figure 1, the optimal layers to prune vary wildly depending on whether you are looking at aircraft or medical cells. Uniformly pruning every layer is rarely the best choice.
  • Recoverability Matters: A "highly important" feature might be easily replaceable by its neighbors. By accounting for this redundancy during the search phase, Carve VFM finds subnetworks that are much easier to "repair" after pruning.
  • MLPs are the "Low-Hanging Fruit": The search consistently finds that most parameter savings should come from reducing MLP capacity, while attention mechanisms are preserved more conservatively, especially in earlier layers.
  • Speed: Because the repair is mathematical (closed-form) rather than training-based, a specialist can be produced in minutes on a single GPU.
Task-specific allocation: The heatmaps show that the "best" layers to keep vary significantly across different datasets.

Key Results

  • State-of-the-Art Pruning: Carve VFM achieved the highest mean accuracy in seven out of eight backbone-budget configurations compared to other dense structured-pruning methods.
  • Efficiency Gains: Carved models delivered 1.3–2.0× higher GPU throughput than the uncompressed versions and reduced peak memory usage by 26–51%.
  • Beating Native Edge Models: When fully fine-tuned, a 14M parameter "carved" specialist reached 88.1% accuracy, outperforming the strongest native compact model, ConvNeXt-Pico (85.8%), despite the latter being specifically designed for efficiency.
Quantitative results across twelve benchmarks showing Carve VFM consistently outperforming baselines.

Limitations and Future Work

  • Task Scope: The current evaluation is limited to image classification. The authors suggest extending the method to dense prediction tasks (like segmentation) and multimodal models.
  • Data Requirements: While it only needs 512 samples, it still requires labeled calibration data. Future work could explore using self-supervised "surrogates" to remove this requirement.
  • Extreme Compression: At very tight budgets (e.g., 6M parameters), there is still a significant accuracy gap compared to the full model, suggesting that even better "frozen" representations are needed for extreme edge deployment.

Summary updated

BibTeX
@misc{mecharbat2026carve,
  author = {Lotfi Abdelkrim Mecharbat and Abdelrahman Elsayed and Ibrahim Almakky and Martin Takáč and Mohammad Yaqub},
  title = {{Carve VFM: Carving Specialists out of Generalists, Automatic Task-Specific Compression of Vision Foundation Models}},
  year = {2026},
  eprint = {2610.16813},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.16813},
}
Figure