Layered Expert Knowledge Injection (LEKIA)
- LEKIA is a layered framework that organizes expert knowledge into Theoretical, Practical, and Evaluative layers to guide LLM reasoning.
- The framework enables robust domain adaptation and safety alignment with measurable improvements in medical QA, program repair, and multimodal safety.
- By decoupling knowledge injection from model weight updates, LEKIA empowers expert-owned control for enhanced factual grounding and dynamic adaptation.
Searching arXiv for the cited LEKIA-related papers and closely related knowledge-injection frameworks to ground the article. Layered Expert Knowledge Injection Architecture (LEKIA) is a term explicitly introduced for an Architectural Alignment framework in which an intelligent intermediary guides a LLM’s reasoning process without altering its weights through a Theoretical Layer, a Practical Layer, and an Evaluative Layer (Zhao et al., 20 Jul 2025). Closely related literature describes analogous layered schemes for general medical knowledge injection, domain instruction tuning, task specialization, multimodal intervention-layer control, and layered context injection for program repair, suggesting a broader architectural pattern in which expert knowledge is organized into separable stages or modules rather than injected as a single undifferentiated signal (Li et al., 2023, Prasad et al., 4 Jun 2026, Ehsani et al., 30 Jun 2025).
1. Origins and conceptual scope
The explicit LEKIA formulation emerged from work on high-stakes, human-centered deployment, where deep, dynamic expert knowledge injection and nuanced value alignment are treated as a coupled problem rather than as separate engineering tasks. In that formulation, LEKIA realizes “Expert-owned AI behavior design” through Architectural Alignment: the base LLM remains fixed, while an external layered structure defines core principles, practical exemplars, and real-time evaluative correction (Zhao et al., 20 Jul 2025). The immediate motivation is that knowledge-focused methods such as Retrieval-Augmented Generation can improve factual grounding yet do not encode how an expert frames, prioritizes, or applies knowledge, whereas alignment-focused post-training methods are costly to update and hard for domain experts to control directly (Zhao et al., 20 Jul 2025).
Related antecedents use different terminology but instantiate comparable layering logics. In medical adaptation, a general LLM is turned “from a medical beginner towards a medical expert” by a strictly ordered three-stage optimization path: general medical knowledge injection, medical domain instruction tuning, and specific medical task adaptation (Li et al., 2023). In automated program repair, expert context is stratified into Bug Knowledge, Repository Knowledge, and Project Knowledge layers, injected incrementally only when lower layers are insufficient (Ehsani et al., 30 Jun 2025). In iterative generative modeling, knowledge infusion is recast as an intervention-layer problem over boundary, transition function, intermediate state, and parameters, giving surface, trajectory, latent, and parametric layers (Prasad et al., 4 Jun 2026). Taken together, these works suggest that LEKIA is best understood both as a named framework and as a general architectural idiom for structuring expert knowledge.
2. Layer models and formal structure
A central property of LEKIA-style systems is that they separate knowledge functions by architectural responsibility. The resulting layers differ across domains, but they recurrently divide foundational principles, interaction formats, task-specific refinements, and evaluative or verification logic.
| Archetype | Layers | Representative instantiation |
|---|---|---|
| Architectural alignment | Theoretical, Practical, Evaluative | Psychological support assistant (Zhao et al., 20 Jul 2025) |
| Staged domain adaptation | Knowledge injection, instruction tuning, task adaptation | AntGLM-Med-10B (Li et al., 2023) |
| Intervention-layer control | Surface, trajectory, latent, parametric | Iterative generative models (Prasad et al., 4 Jun 2026) |
| Context escalation | Bug, Repository, Project | Program repair (Ehsani et al., 30 Jun 2025) |
| Reasoning-edit decoupling | Plan, fill, validate | DecKER (Wang et al., 31 May 2025) |
The most general formalization in the literature models generation as a trajectory of internal states,
and defines four intervention layers according to which component is modified: input/output boundary, transition rule, intermediate state, or parameters (Prasad et al., 4 Jun 2026). This decomposition is important because it relocates “knowledge injection” from a technique label to a structural question: where in the generative process should expert knowledge enter?
A second formalization appears in dialogue generation, where the response is factorized through an intermediate knowledge variable,
Here, one model generates textual knowledge and another generates the response conditioned on that knowledge, yielding an explicit two-layer decomposition between knowledge formation and response realization (Tuan et al., 2020). In knowledge editing, the same separation is recast procedurally: DecKER first generates a masked reasoning path, then resolves factual edits through retrieval and conflict checking, and only afterward selects the best completed path (Wang et al., 31 May 2025). These formulations collectively indicate that LEKIA is not tied to a single model family; it is a method for assigning distinct epistemic roles to distinct architectural layers.
3. Injection mechanisms and layer placement
LEKIA implementations vary from prompt-level scaffolding to deep parametric augmentation. In staged medical adaptation, the first layer uses continual pretraining with GLM autoregressive blank infilling over 15.39B medical tokens, the second uses supervised instruction tuning on medical instructions and exam-style data, and the third uses task-specific adaptation with LoRA, C-Poly, and Verification-of-Choice prompting (Li et al., 2023). This arrangement separates broad domain acquisition, instruction-following behavior, and benchmark specialization rather than asking one optimization step to accomplish all three.
Layer placement itself is treated as a design variable. “Llama SLayer 8B: Shallow Layers Hold the Key to Knowledge Injection” reports that performance dips after removal or expansion of shallow layers are larger than those for deeper layers, motivating a post-pretraining “S strategy” of selectively enhancing shallow layers while pruning less effective deep ones (Chen et al., 2024). This suggests that a LEKIA need not distribute expert capacity uniformly across depth.
Other systems isolate knowledge modules even more sharply. DMoE attaches independently updatable LoRA experts only to the final-layer feed-forward network and combines them at inference as
with a BM25 router and token-level entropy trigger deciding when expert modules are activated (Yue et al., 12 Jun 2026). DIEKAE instead adds layer-specific encoder branches that inject additive difference signals into the frozen base model,
and trains those encoders by matching hidden-state differences without back-propagating through the base LLaMA2-7B (Galatolo et al., 2024). MeKi equips every Transformer layer with token-level memory experts stored in ROM and uses re-parameterization to fold training-time projections into static lookup tables, thereby scaling capacity through storage space rather than FLOPs and introducing zero inference latency overhead (Ding et al., 3 Feb 2026). Across these cases, LEKIA appears as a spectrum: prompt-level, adapter-level, layer-branch, and memory-resident injection are all compatible so long as the architecture preserves separable expert functions.
4. Knowledge substrates, curation, and representation
A recurring result in the literature is that LEKIA depends as much on knowledge curation as on model architecture. “Revisiting the Knowledge Injection Frameworks” shows that aligned knowledge injection can be surprisingly fragile: in several fine-tuning settings, random knowledge or even Gaussian noise performs comparably to aligned knowledge, indicating that raw alignment heuristics alone do not guarantee meaningful use of injected expertise (Fu et al., 2023). The paper’s proposed remedy is pruning and purification through conceptual knowledge , which reduces the size and noisiness of the injected knowledge space (Fu et al., 2023). This is a direct warning against equating “more external knowledge” with “better expert injection.”
The knowledge substrates used in LEKIA-style systems are correspondingly diverse. AntGLM-Med’s first stage uses medical books, PubMed abstracts, doctor-written articles, question-answer pairs, exam questions rewritten as medical knowledge points, and textified knowledge-graph data from Omaha, totaling approximately 15.39B pretraining tokens (Li et al., 2023). Program-repair layering begins with buggy functions, failing tests, stack traces, runtime variable values, “angelic” variable values, and GitHub issue descriptions, then expands to co-occurring files, structural dependencies, latest changes, documentation chunks, and issue-resolution history (Ehsani et al., 30 Jun 2025). In the special-education LEKIA deployment, the Theoretical Layer encodes Guided Behavioral Empathy, the Practical Layer stores approximately 200 annotated “Golden Seeds,” and the Evaluative Layer stores expert-authored alignment rules that are iteratively revised when failure modes appear (Zhao et al., 20 Jul 2025). A related industrial agent framework codifies explicit procedural rules as Python functions and injects tacit visualization design principles through prompt templates and RAG over manuals and code examples (Uulu et al., 21 Jan 2026). In multimodal safety alignment, the knowledge source is an MMKG with approximately textual nodes, approximately visual prototypes, and typed relations such as Indicates, Counter_to, and Mitigates (Prasad et al., 4 Jun 2026). LEKIA therefore operates over corpora, graphs, rules, exemplars, and memory banks rather than over a single canonical knowledge format.
5. Empirical performance and domain-specific instantiations
Reported results consistently support the claim that layered injection yields additive gains when the layers are well matched to distinct failure classes.
| Setting | Representative system | Reported outcome |
|---|---|---|
| Medical QA | AntGLM-Med-10B (Li et al., 2023) | PubMedQA accuracy rises from 57.2% for base AntGLM-10B to 80.6% after the full three-stage pipeline |
| Program repair | Layered bug/repository/project context (Ehsani et al., 30 Jun 2025) | 79% fix rate (250/314) with Llama 3.3, a 23% improvement over previous work |
| Multimodal safety | Surface + trajectory–latent + output-surface stack (Prasad et al., 4 Jun 2026) | 70.97% reduction in knowledge-violating outputs on SDXL relative to vanilla generation |
| Special-education support | LEKIA-based assistant (Zhao et al., 20 Jul 2025) | 206% improvement in output quality, with expert-level ratings in all cases |
| In-context knowledge editing | DecKER-BoN on Llama-3.1-8B-Instruct (Wang et al., 31 May 2025) | 59.0 on MQuAKE-CF-3k-v2, above reported ICE and parametric-edit baselines |
| On-device LLM scaling | MeKi-1.7B (Ding et al., 3 Feb 2026) | Average score 59.7 versus 56.0 for the dense 1.7B baseline, with 13.7 vs. 13.8 tokens/s |
These results illuminate different aspects of LEKIA efficacy. In medical adaptation, performance increases monotonically across the ordered stages, which the authors present as empirical justification for broad knowledge first, structured medical instruction second, and task-centric adaptation third (Li et al., 2023). In program repair, all bug types improve when repository-level context is added, whereas only a subset gain from project-level knowledge, indicating that layer utility is task dependent rather than universal (Ehsani et al., 30 Jun 2025). In multimodal safety, each additional intervention layer addresses failure classes that prior layers cannot reach, confirming the complementarity prediction of the four-layer framework (Prasad et al., 4 Jun 2026). In on-device scaling, MeKi’s results show that LEKIA can be used not only for alignment or domain adaptation but also as a capacity-scaling strategy under hardware constraints (Ding et al., 3 Feb 2026). A plausible implication is that LEKIA’s empirical value lies less in any one specific mechanism than in the disciplined partitioning of expert functions.
6. Limitations, controversies, and open directions
The principal controversy surrounding LEKIA-style systems concerns whether injected knowledge is genuinely used as knowledge or merely as regularization noise. The most direct evidence is the “sanity problem” identified in knowledge-injection frameworks, where aligned tuples, random tuples, and Gaussian-noise substitutes can yield nearly identical downstream performance (Fu et al., 2023). This result does not invalidate LEKIA, but it sharply constrains its design: knowledge purification, abstraction, and selective scoring are not optional adjuncts; they are preconditions for meaningful injection.
Other limitations arise from inter-layer interference and incomplete coverage. The multimodal intervention-layer framework explicitly notes that surface, trajectory, latent, and parametric layers can conflict, and calls for a shared knowledge source and consistency predicate to reduce destructive interference (Prasad et al., 4 Jun 2026). The named LEKIA framework for psychological support acknowledges expert-bounded capability, internal incoherence across layers, maintenance overhead, and the risk that a small expert group encodes incomplete or biased practice (Zhao et al., 20 Jul 2025). In program repair, many unresolved bugs remain structurally isolated or lack enough co-occurring files and dependencies, and the paper argues that layered prompting alone is insufficient for GUI and network bugs that require interactive exploration (Ehsani et al., 30 Jun 2025). In layer-aware post-pretraining, the shallow-layer hypothesis is demonstrated only on approximately 7–8B models and on code, math, and law corpora, leaving transfer to much larger models or other domains as an open question (Chen et al., 2024).
The literature therefore points toward several future directions. One is adaptive layer selection: choosing dynamically whether a failure is prompt-level, structural, or distributional, and then invoking surface, trajectory, latent, or parametric interventions accordingly (Prasad et al., 4 Jun 2026). Another is explicit consistency tooling across expert-authored layers, particularly where theoretical constitutions, exemplars, and evaluative rules may drift apart (Zhao et al., 20 Jul 2025). A third is tighter integration with agentic or interactive systems, so that layered knowledge injection is combined with exploration, testing, and environment feedback rather than remaining a static prompt or adapter stack (Ehsani et al., 30 Jun 2025). More broadly, the accumulated evidence suggests that LEKIA’s long-term significance will depend on whether it can turn expert knowledge from a monolithic prompt artifact into a maintainable, testable, and auditable architecture.