Table of Contents
Fetching ...

Latent Traits and Cross-Task Transfer: Deconstructing Dataset Interactions in LLM Fine-tuning

Shambhavi Krishna, Atharva Naik, Chaitali Agarwal, Sudharshan Govindan, Taesung Lee, Haw-Shiuan Chang

TL;DR

The paper presents a framework for understanding cross-task transfer in fine-tuned LLMs by constructing an $I imes N$ performance matrix of LoRA adapters evaluated across $N$ tasks and applying PCA to extract latent traits. It demonstrates that hidden dataset properties—such as generation length, class distribution, and linguistic sensitivities—drive transfer in ways not predicted by domain similarity, revealing asymmetric transfers and surprising gains from classification data to mathematical reasoning. The findings advocate a modular, data-driven approach to LLM adaptation, enabling a 'tool-belt' of skill adapters for robust, out-of-domain generalization. Empirically, the work uses Llama-based LoRA with 10 diverse datasets and shows how latent traits can guide source-dataset selection and improve prediction of transfer effects across models and tasks.

Abstract

Large language models are increasingly deployed across diverse applications. This often includes tasks LLMs have not encountered during training. This implies that enumerating and obtaining the high-quality training data for all tasks is infeasible. Thus, we often need to rely on transfer learning using datasets with different characteristics, and anticipate out-of-distribution requests. Motivated by this practical need, we propose an analysis framework, building a transfer learning matrix and dimensionality reduction, to dissect these cross-task interactions. We train and analyze 10 models to identify latent abilities (e.g., Reasoning, Sentiment Classification, NLU, Arithmetic) and discover the side effects of the transfer learning. Our findings reveal that performance improvements often defy explanations based on surface-level dataset similarity or source data quality. Instead, hidden statistical factors of the source dataset, such as class distribution and generation length proclivities, alongside specific linguistic features, are actually more influential. This work offers insights into the complex dynamics of transfer learning, paving the way for more predictable and effective LLM adaptation.

Latent Traits and Cross-Task Transfer: Deconstructing Dataset Interactions in LLM Fine-tuning

TL;DR

The paper presents a framework for understanding cross-task transfer in fine-tuned LLMs by constructing an performance matrix of LoRA adapters evaluated across tasks and applying PCA to extract latent traits. It demonstrates that hidden dataset properties—such as generation length, class distribution, and linguistic sensitivities—drive transfer in ways not predicted by domain similarity, revealing asymmetric transfers and surprising gains from classification data to mathematical reasoning. The findings advocate a modular, data-driven approach to LLM adaptation, enabling a 'tool-belt' of skill adapters for robust, out-of-domain generalization. Empirically, the work uses Llama-based LoRA with 10 diverse datasets and shows how latent traits can guide source-dataset selection and improve prediction of transfer effects across models and tasks.

Abstract

Large language models are increasingly deployed across diverse applications. This often includes tasks LLMs have not encountered during training. This implies that enumerating and obtaining the high-quality training data for all tasks is infeasible. Thus, we often need to rely on transfer learning using datasets with different characteristics, and anticipate out-of-distribution requests. Motivated by this practical need, we propose an analysis framework, building a transfer learning matrix and dimensionality reduction, to dissect these cross-task interactions. We train and analyze 10 models to identify latent abilities (e.g., Reasoning, Sentiment Classification, NLU, Arithmetic) and discover the side effects of the transfer learning. Our findings reveal that performance improvements often defy explanations based on surface-level dataset similarity or source data quality. Instead, hidden statistical factors of the source dataset, such as class distribution and generation length proclivities, alongside specific linguistic features, are actually more influential. This work offers insights into the complex dynamics of transfer learning, paving the way for more predictable and effective LLM adaptation.

Paper Structure

This paper contains 22 sections, 21 figures, 6 tables.

Figures (21)

  • Figure 1: Illustration of our motivations. LLMs such as Llama can be equipped with many different performance enhancers such as LoRA fine-tuned on a specific dataset. Our goal is to discover the potential impacts on out-of-domain tasks and side effects of each equipment.
  • Figure 2: Discovering the latent traits of LoRA through PCA. The performance matrix stores the performance of $I$ LoRAs on $N$ tasks. A PCA factorizes the performance matrix into two matrices: the top four eigenvectors/bases in the bottom left and the linear weights that combine the eigenvectors/bases in the right. More red means the values are higher. Based on the eigenvectors, we identify the meaning of each principal component as our latent traits, and we can use the linear weights of the LoRA trained on Flipkart as its influence to the other datasets through the traits.
  • Figure 3: Unintuitive side effects of using LoRA adapters as specialized 'tools'. This figure illustrates surprising behaviors where a tool's performance is not predicted by its label: domain similarity can be misleading, skill transfer is often asymmetric, and hidden statistical properties like class balance and output length proclivities are transferred to new tasks with unexpected consequences.
  • Figure 4: Generation length differences across Meta Math, Goat and Magicoder datasets.
  • Figure 5: Confusion Matrices on Flipkart: M[IMDB] (left) vs. M[Pile] (right).
  • ...and 16 more figures