Table of Contents
Fetching ...

Latent Knowledge as a Predictor of Fact Acquisition in Fine-Tuned Large Language Models

Daniel B. Hier, Tayo Obafemi-Ajayi

TL;DR

This work reframes ontology-grounded fact acquisition in fine-tuned LLMs as a rate-based, time-to-event problem, using survival analysis to separate memorization, generalization, and degradation. Latent knowledge present in pretrained weights emerges as the strongest predictor of rapid fact acquisition for HPO terms, while generalization to unseen GO terms is rare and contingent on both latent knowledge and identifier popularity. Degradation of previously correct mappings occurs, especially for unseen terms, but reinforcement during training provides protection for seen facts. The proposed framework offers actionable metrics for curriculum design, knowledge injection efficiency, and identification of ontology deserts in biomedical NLP applications.

Abstract

Large language models store biomedical facts with uneven strength after pretraining: some facts are present in the weights but are not reliably accessible under deterministic decoding (latent knowledge), while others are scarcely represented. We fine tuned Llama 3.1 8B Instruct to learn ontology term identifier mappings from the Human Phenotype Ontology (800 pairs) and the Gene Ontology (400 training pairs), withholding 400 GO pairs to test generalization. Treating learning as a time to event process across 20 epochs, we used stochastic decoding to detect latent knowledge at baseline and Cox proportional hazards models to identify predictors of acquisition, generalization, and degradation. Baseline deterministic recall for HPO was 2.8%, rising to 71.9% after fine-tuning. Latent knowledge was the strongest predictor of faster fact acquisition (HR 2.6) and was associated with earlier, higher peak learning rates and faster convergence; identifier frequency and curated annotation counts had smaller effects. Generalization to withheld GO facts was uncommon (5.8%) but more likely when latent knowledge was present. Previously correct GO mappings degraded more often for withheld (unseen) terms than for trained (seen) terms, suggesting a protective effect of reinforcement during training. These results show that latent knowledge predicts both the speed of factual learning during fine-tuning and the limited generalization of unseen ontology facts, while resistance to degradation depends on whether facts are reinforced.

Latent Knowledge as a Predictor of Fact Acquisition in Fine-Tuned Large Language Models

TL;DR

This work reframes ontology-grounded fact acquisition in fine-tuned LLMs as a rate-based, time-to-event problem, using survival analysis to separate memorization, generalization, and degradation. Latent knowledge present in pretrained weights emerges as the strongest predictor of rapid fact acquisition for HPO terms, while generalization to unseen GO terms is rare and contingent on both latent knowledge and identifier popularity. Degradation of previously correct mappings occurs, especially for unseen terms, but reinforcement during training provides protection for seen facts. The proposed framework offers actionable metrics for curriculum design, knowledge injection efficiency, and identification of ontology deserts in biomedical NLP applications.

Abstract

Large language models store biomedical facts with uneven strength after pretraining: some facts are present in the weights but are not reliably accessible under deterministic decoding (latent knowledge), while others are scarcely represented. We fine tuned Llama 3.1 8B Instruct to learn ontology term identifier mappings from the Human Phenotype Ontology (800 pairs) and the Gene Ontology (400 training pairs), withholding 400 GO pairs to test generalization. Treating learning as a time to event process across 20 epochs, we used stochastic decoding to detect latent knowledge at baseline and Cox proportional hazards models to identify predictors of acquisition, generalization, and degradation. Baseline deterministic recall for HPO was 2.8%, rising to 71.9% after fine-tuning. Latent knowledge was the strongest predictor of faster fact acquisition (HR 2.6) and was associated with earlier, higher peak learning rates and faster convergence; identifier frequency and curated annotation counts had smaller effects. Generalization to withheld GO facts was uncommon (5.8%) but more likely when latent knowledge was present. Previously correct GO mappings degraded more often for withheld (unseen) terms than for trained (seen) terms, suggesting a protective effect of reinforcement during training. These results show that latent knowledge predicts both the speed of factual learning during fine-tuning and the limited generalization of unseen ontology facts, while resistance to degradation depends on whether facts are reinforced.
Paper Structure (18 sections, 5 figures, 3 tables)

This paper contains 18 sections, 5 figures, 3 tables.

Figures (5)

  • Figure 1: Fact accumulation curves $F(t)$ for 800 HPO term–identifier pairs over 20 epochs. (A) Kaplan–Meier–style cumulative accumulation curve $F(t)$ inverted from the survival function $S(t)$; accumulation converges at 71.9% at epoch 20 (shaded areas show 95% CIs). (B) $F(t)$ stratified by latent knowledge status. At epoch 20, terms with latent knowledge are learned with 98.4% accuracy versus 69.7% for terms without latent knowledge.
  • Figure 2: Dose–response relationship between latent knowledge and fact acquisition. (A) Terms with any latent knowledge show earlier and higher peak accumulation velocities than terms without latent knowledge. (B) Among terms with latent knowledge, higher stochastic accuracy is associated with earlier and more complete fact acquisition, consistent with a graded (dose–effect) influence of latent knowledge on learning dynamics.
  • Figure 3: Generalization to unseen GO term–identifier pairs during fine-tuning. (a) Overall cumulative probability of generalization across all unseen terms. (b) Stratification by latent knowledge shows that generalization is concentrated in the subset of unseen terms supported by latent knowledge.
  • Figure 4: Degradation of GO term–identifier mappings during fine-tuning. (a) Overall degradation across all terms known at baseline. (b) Stratification by seen versus unseen GO terms shows a protective effect of training on degradation.
  • Figure 5: Cox proportional hazards models for (A) fact acquisition in HPO and (B) generalization to unseen GO term–identifier pairs during fine-tuning. Latent knowledge emerged as the strongest predictor of both fact acquisition for HPO terms and generalization for GO terms during fine-tuning.