COMPREHENSIVE ANALYSIS: THE CALIBRATION PHASE (EXP01–07) I built an epistemic gate to stop LLM data poisoning during fine-tuning
Description and use
The author built an epistemic gate that stops data poisoning during LLM fine‑tuning by using a bounded Softplus penalty and a vector‑based filter, preventing loss collapse and improving perplexity.
Problem
Fine‑tuning large language models (LLMs) can be poisoned by false data, causing loss collapse and model degradation.
Outcome
The calibrated epistemic gate with Softplus penalty and vector similarity prevented loss collapse, achieved stable margins (~+10), and reduced perplexity when combined with LoRA.
Workflow
- 1. Define loss functions and filtering mechanisms (EXP01–04).
- 2. Test raw negative log‑prob loss leading to collapse (EXP03).
- 3. Replace with bounded Softplus penalty (EXP05).
- 4. Transition from dictionary lookup to vector gate using cosine similarity (EXP07).
- 5. Validate with real‑world facts and reproducibility checks (EXP06–07).
- 6. Compare architectures (LoRA vs. π_ref) to address perplexity (EXP08–09).
Evidence
The loss diverges to −27, margin reaches +13, but the model destroys itself—the unbounded negative gradient is a bomb
CE(truth) + β•softplus(m + logP(false) − logP(truth)) ✨ The synthesis: relative, bounded punishment. It never changed again
EXP07: Embeddings + cosine similarity (DenseVectorGate)—and the margins suddenly stabilize: +10.2/+10.1/+10.6
- Record date: 2026-09-14T05:32:10.440Z