Knowledge Grafting in AI
- Knowledge grafting is a transfer paradigm where models incorporate external carriers—such as network blocks, feature maps, parameter updates, or KV-cache states—to enhance functionality without full retraining.
- It enables modular integration by inserting specialized components at designated points in the computational pipeline, addressing challenges like few-shot learning, edge deployment, and multimodal adaptation.
- Empirical results demonstrate that techniques like progressive block grafting and cache-state restoration can closely match teacher performance while dramatically reducing data, compute, and energy requirements.
Knowledge grafting denotes a family of transfer procedures in which a model, module, or inference process acquires selected capabilities from an external source by inserting a restricted knowledge carrier—such as a wrapped network block, an intermediate feature map, a compressed parameter update, a LoRA adapter block, a latent intervention, or a key–value cache state—rather than retraining the entire system end to end. Across recent arXiv usage, the term covers progressive network replacement for few-shot knowledge distillation, scion/rootstock feature transfer for edge deployment, SkillPack-based capability storage for LLMs, compatibility-aware adapter splicing for multimodal LLMs, intervention-layer knowledge infusion in iterative generators, and byte-exact cache restoration during inference (Shen et al., 2020, Almurshed et al., 25 Jul 2025, Du et al., 24 May 2025, Dai et al., 30 Jun 2025, Prasad et al., 4 Jun 2026, Schelpe, 15 Jul 2026).
1. Taxonomic scope of the term
Taken together, the literature suggests that “knowledge grafting” is not a single algorithm but a transfer paradigm defined by what is grafted and where it enters the computational pipeline. The grafted object may be an architectural block, a feature representation, a parameter delta, a low-rank adapter, an intermediate latent edit, or an inference-time state artifact.
| Form of grafting | Grafted object | Representative source |
|---|---|---|
| Progressive block grafting | Student blocks wrapped by adaptors | (Shen et al., 2020) |
| Feature-map grafting | Pooled donor feature maps (“scions”) into a small “rootstock” | (Almurshed et al., 25 Jul 2025) |
| Capability grafting in LLMs | Compressed module-wise parameter updates (“SkillPack”) | (Du et al., 24 May 2025) |
| Parameter splicing in MLLMs | Selectively fused LoRA blocks via CAPS | (Dai et al., 30 Jun 2025) |
| Layered knowledge infusion | Surface, trajectory, latent, and parametric interventions | (Prasad et al., 4 Jun 2026) |
| Cache-state grafting | Byte-exact KV-cache state artifacts | (Schelpe, 15 Jul 2026) |
This breadth matters because the operational meaning of “knowledge” changes across works. In some settings it is a discriminative function that preserves teacher logits; in others it is a subset of donor features, a task-specific update , a domain-specialized low-rank subspace, or a verified inference trace. A plausible implication is that the unifying property is not representational format but modular transfer under constrained data, memory, compute, or forgetting budgets.
2. Architectural and feature-level grafting
An early and technically precise precursor is “Progressive Network Grafting for Few-Shot Knowledge Distillation” (Shen et al., 2020). The teacher is defined as
and the student as . The few-shot setting assumes an -way -shot unlabeled dataset . The method uses a dual-stage distillation scheme. In the block-wise grafting stage, a student block is wrapped by two adaptation convolutions, , and inserted into an otherwise fixed teacher: 0. Only the parameters of 1 are updated using 2, where 3. In the progressive grafting stage, trained wrapped blocks are connected one by one, 4, and jointly optimized with 5. When 6, the teacher has been fully replaced; the linear 7 adaptors are then fused into neighboring student convolutions to recover the original student architecture.
The reported results establish the few-shot regime as a central motivation for grafting. With teacher VGG16 and student VGG16-half, the method reaches 8 on CIFAR-10 and 9 on CIFAR-100 in the 5-shot setting, compared with teacher accuracies of 0 and 1, and with full-data KD at 2 and 3. On ILSVRC-2012 with ResNet34 to ResNet18 and 10 shots per class, it attains 4 top-1 and 5 top-5, while the teacher reaches 6 and 7, and a fully trained ResNet18 reaches 8 and 9 (Shen et al., 2020). The paper further reports that single-block grafting converges 0 faster and generalizes better under 1-shot, and that partial grafting of only deep blocks can retain 1 top-1 on ImageNet.
A more literal use of the term appears in “Knowledge Grafting: A Mechanism for Optimizing AI Model Deployment in Resource-Constrained Environments” (Almurshed et al., 25 Jul 2025). Here, knowledge grafting is defined as selectively transferring intermediate feature maps learned by a large donor model into a smaller rootstock model. In the reported setup, the donor is VGG16 pretrained on ImageNet without its top classification block; the donor is trained on DeepWeeds with 17,509 images and 8 classes. Candidate scions are donor layers 8, 9, and 10; each feature map 2 is reduced by Global Average Pooling, 3, concatenated as 4, and mapped to predictions by 5. The resulting grafted rootstock has 1,934,665 parameters and size 7.38 MB, compared with 16,880,201 parameters and 64.39 MB for the donor. Validation accuracy rises from 6 to 7, validation loss falls from 8 to 9, and test accuracy reaches 0 with test loss 1 (Almurshed et al., 25 Jul 2025).
The significance of these two lines of work is different but complementary. Progressive network grafting keeps the teacher context fixed while student blocks learn to preserve end-to-end logits under extreme data scarcity. Feature-map grafting, by contrast, treats selected donor representations as reusable “scions” for a lightweight architecture targeted at edge deployment. Both attack the size–performance trade-off, but one is organized around functional imitation and the other around selective representational reuse.
3. Parameter-space grafting in language and multimodal models
In LLMs, grafting is formulated explicitly as storage and reapplication of task-induced parameter updates. “Knowledge Grafting of LLMs” introduces GraftLLM, where cross-capability transfer begins from target parameters 2, proceeds through SFT and DPO to updated parameters 3, and extracts 4 (Du et al., 24 May 2025). This update is compressed module-wise into a SkillPack, 5, with 6, and later grafted back by 7. The compression is module-aware: embeddings and the output head use magnitude pruning with keep-ratio 8; MLP weights use full SVD followed by mixed-precision quantization; attention weights use low-rank SVD of rank 9 followed by group-wise quantization. The paper states that the overall storage cost is 0–1 of 2. Empirically, GraftLLM matches within 3–4 of full fine-tuning while adding only 5 of 6 parameters, achieves a 7 win-rate on AlpacaEval2.0 with only 8 parameter overhead, reaches 7.70 on MT-Bench, and in continual learning attains an overall average of 64.3 with just 9 0 storage, compared with 62.2 for Model Tailor (Du et al., 24 May 2025).
For multimodal LLMs, “Graft: Integrating the Domain Knowledge via Efficient Parameter Synergy for MLLMs” shifts the carrier from full parameter deltas to LoRA blocks (Dai et al., 30 Jun 2025). A frozen pretrained MLLM is augmented by a set of domain experts 1, one adapter per domain. Compatibility-Aware Parameter Splicing (CAPS) computes a local functional attribution score 2, a global information-theoretic signal 3, and combines them through
4
Each fused LoRA block is then 5. Before fusion, the method computes activation statistics 6, 7, and 8, forms a sensitivity score 9, and aggregates a domain compatibility score 0. The reported Spearman correlation is 1 between 2 and both solo performance and downstream fused gain. On benchmarks including MathVista, HumanEval, MMMU, and MME, LoRA-based Graft reaches 3 on MathVista, 4 pass@1 on HumanEval, and 1488.4 on MME; the Math+Code ablation gives 52.0/15.9 for local-only, 51.7/12.2 for global-only, and 52.2/15.9 for dual local+global fusion (Dai et al., 30 Jun 2025).
These two approaches share a core commitment: the base model remains structurally intact, while specialized capability is externalized into a modular carrier that can be fused, selected, or rolled back. This is the mechanism behind the “forget-free continual learning” claim in GraftLLM and the “zero inference overhead” claim in Graft after fused adapters are collapsed into the base model.
4. Inference-state grafting and byte-exact restoration
A different interpretation appears in “Smarter and Cheaper at Once: Byte-Exact KV-Cache Grafting Turns a Frozen Small Model into a Verified-Knowledge Flywheel” (Schelpe, 15 Jul 2026). Here the grafted object is not architecture or weights but the transformer’s internal KV cache state 5. A stored state captured from tokens 6 is restored into a fresh process by allocating empty KV buffers, copying the stored keys and values into those buffers, and continuing inference on new tokens 7. Formally, with
8
and graft operator 9, the comparison is between
0
and 1. Byte-exactness is defined by 2, which implies zero KL divergence and identical argmax.
The exactness claim is highly conditional. Under rotary position embeddings, own-position graft is stated to be the unique numerically exact operating point: the cache must be restored at the same absolute positions, under a deterministic runtime and the same hardware architecture and compiler/runtime versions. Any positional relocation produces a small floating-point discrepancy because
3
bit-for-bit after rounding in fp32 arithmetic. The paper reports byte-for-byte identical logits under a pinned deterministic configuration, with zero KL divergence and 100% argmax agreement over fifty samples, and states that byte-identical stores move between machines of the same architecture (Schelpe, 15 Jul 2026).
The empirical claims are correspondingly narrow and concrete. On AIME 2025, a frozen Gemma-4-12B moves from 80.0% to 93.3% once a verified solution library is grafted; the eight unsolved problems are stored as one 441 MB cache block, and 6 of 8 are recovered for a total of 28/30. On the recurring case, base best-of-5 sampling uses 401,026 tokens and solves 0/8, whereas grafted recurrence uses 61 tokens total and solves 8/8, a factor of 6,574 fewer decode tokens, approximately 1,700× faster wall time, and 3,000×–8,700× less energy. The same store extends usable context from 32,768 to 2,854,766 tokens at zero extra GPU memory, with 88 separate blocks and per-access cost of approximately 0.29 s plus approximately 35 token warm-up (Schelpe, 15 Jul 2026).
This form of grafting departs sharply from conventional fine-tuning or adapter fusion. The knowledge carrier is an inference artifact, not a parameter update, and the model weights remain frozen throughout.
5. Layered intervention as a general framework
“Where Should Knowledge Enter? A Layered Framework for Knowledge Infusion in Multimodal Iterative Generative Models” generalizes the problem by treating knowledge infusion as an intervention-layer problem (Prasad et al., 4 Jun 2026). The formal setup is an iterative trajectory 4, with
5
and 6, together with an external knowledge source 7 and a consistency predicate 8. The framework identifies four intervention layers: surface infusion at the input/output boundary, trajectory infusion that modifies the transition function at inference time, latent infusion that edits the intermediate state, and parametric infusion that alters 9 before inference. The composed operator is written as
0
The paper instantiates the framework in diffusion models and argues for three design principles: match layers to failure classes, compose for complementary coverage, and manage inter-layer interference by using a single shared 1. In a controlled safety-alignment experiment on the Detonate benchmark with 25 K hateful-prompt variants and 4 samples per prompt, using frozen SDXL and SD-v1.5, three layers were deployed cumulatively. On SDXL, toxicity falls from .31 to .17 after surface input infusion, to .11 after trajectory+latent infusion, and to .09 after surface output infusion; on SD-v1.5, it falls from .28 to .16, then to .10, then to .08. The overall SDXL reduction from .31 to .09 is reported as 70.97% versus vanilla generation. CLIP alignment and aesthetic quality rise monotonically; no p-values are reported, but improvements are described as consistent across two architectures, and SAFREE and SLD are outperformed at each layer (Prasad et al., 4 Jun 2026).
Within the broader grafting literature, this framework is important because it relocates the concept from a specific implementation trick to a structural question: whether knowledge enters at the boundary, the transition, the latent state, or the parameters. This suggests a unifying vocabulary for otherwise heterogeneous methods.
6. Limits, misconceptions, and research directions
Several limitations recur across the literature. In progressive network grafting, highly heterogeneous architectures such as VGG to ResNet can degrade more, and excessively small blocks may under-parameterize or become slow (Shen et al., 2020). In feature-map grafting for edge models, scion layer indices are chosen manually, other donor/rootstock pairs remain untested, no dedicated mechanism is provided for merging or fine-tuning grafted weights beyond concatenation and retraining, and raw accuracy remains below larger state-of-the-art models by 2 5–7 pp despite the size gain (Almurshed et al., 25 Jul 2025). In GraftLLM, decompression adds latency compared to LoRA, capability transfer depends on high-quality SFT+DPO, and compression hyperparameters are hand-tuned (Du et al., 24 May 2025). In CAPS-based MLLM fusion, the method presupposes validation-time attribution and compatibility estimation rather than naive arithmetic averaging (Dai et al., 30 Jun 2025). In KV-cache grafting, byte-exactness is guaranteed only within the same architecture and pinned deterministic configuration, own-position graft cannot be relocated, transfer succeeds only when the cached program is parametric in changed values, and recurrence degrades on multi-example archives such as LiveBench (Schelpe, 15 Jul 2026).
These limitations also clarify common misconceptions. Knowledge grafting is not equivalent to full-model merging: some methods keep the base frozen and attach only compressed updates or low-rank blocks, while KV-cache grafting changes no weights at all. It is not inherently exact: byte-exact restoration is a special property of own-position cache graft under deterministic conditions, not a generic feature of grafting. Nor is grafting necessarily a one-time compression method: in GraftLLM it is a carrier for continual learning and model fusion, whereas in the layered framework it is a compositional strategy for intervention across a generation trajectory.
The proposed extensions are correspondingly diverse. The few-shot distillation work proposes combining grafting with data augmentation or synthetic data, searching for blocks with NAS, and extending block grafting to segmentation or detection by grafting feature-pyramid blocks (Shen et al., 2020). The edge-deployment work proposes automated scion selection via evolutionary or genetic algorithms, architecture-aware grafting for ResNets, Transformers, and LLMs, dynamic input-dependent feature routing, advanced weight interpolation such as Slerp or cross-attention based fusion of multiple donors, and real-hardware measurements of latency, power, and memory (Almurshed et al., 25 Jul 2025). GraftLLM points to more efficient decompression, learned compression pipelines, and integration with MoE layers (Du et al., 24 May 2025). The layered framework emphasizes multi-layer composition under a shared knowledge source (Prasad et al., 4 Jun 2026). A plausible implication is that future “knowledge grafting” research will be organized less by model family than by the interface at which reusable knowledge is extracted, stored, and reinserted.