Abstract
We introduce Contrastive Distillation (CD), a self-supervised method designed to enhance knowledge transfer between disparate tasks. By manifesting a model's latent knowledge into explicit token sequences (rationales) and utilizing an episodic memory, CD enables sample-efficient adaptation in low-data regimes. Our approach uses a Bayesian sampling strategy to generate high-quality training pairs, bridging the gap between "implicit" weight updates and "explicit" reasoning. Experiments on bAbI and Com2Sense benchmarks show significant improvements over standard fine-tuning, demonstrating the power of text as a portable medium for transfer.
Introduction
The standard "pre-train then fine-tune" paradigm often fails under significant distribution shifts or when target data is scarce. While humans adapt by reasoning through "why" and "how," current AI models often lack the mechanisms to explicitly bridge task-specific knowledge. We propose Contrastive Distillation as a self-supervised loss policy that forces models to externalize their internal reasoning into tokens, creating a "connective tissue" for transfer learning.
Methodology
The core of our approach is the transformation of latent variables from weights into explicit tokens. This is achieved through two primary mechanisms: Bayesian Contrastive Distillation and a modular agent architecture.
Bayesian Contrastive Distillation
The model generates "prior" rationales (pre-answer) and "posterior" rationales (post-answer). By comparing these, we create high-quality training pairs that are more informative than random negative samples.
Agent Architecture
The agent is decomposed into four functional modules:
- Proposer: Suggests the current task $C_t$.
- Solver: Generates the answer and associated rationales ($x_t, r_0, f_0$).
- Verifier: Evaluates the quality of the generated output.
- Updater: Manages updates to the model weights and the episodic memory $M_t$.
Episodic Memory
We implement a flat, key-value memory using FAISS. This allows the model to store generated rationales and retrieve them later using PCA-based sampling, enabling the model to "improvise" by applying reasoning structures from past experiences to new contexts.
Experimental Results
We evaluated our method on the bAbI (logical reasoning) and Com2Sense (commonsense reasoning) datasets, focusing on low-data configurations (5-100 training points). Performance was measured using the BLEURT score (range -2 to 1).
- bAbI to Com2Sense: The baseline T5 model achieved a score of -1.62, while our CD-memory model improved this to -1.08.
- Com2Sense to bAbI: The baseline scored -1.31, whereas the CD-memory model reached -0.65.
Qualitative analysis suggests the model successfully adapts the logical structure of bAbI rationales to solve commonsense problems in Com2Sense.
Discussion and Limitations
While Contrastive Distillation improves sample efficiency, it introduces a compute-generalization tradeoff due to the overhead of decoding rationales. Current limitations include a reliance on teacher oracles (e.g., GPT-3) for initial training and occasional coherence issues in multi-step reasoning. Future work will explore self-generation in larger models and multi-hop reasoning via beam search.
Conclusion
Contrastive Distillation demonstrates that explicit text is a superior medium for transfer compared to implicit weight updates. By externalizing reasoning, models can more effectively bridge disparate domains, paving the way for more autonomous and adaptable AI systems.
Summary updated