Enhancing Cross-task Transfer of Large Language Models via Activation Steering

Xinyu Tang, Zhihao Lv, Xiaoxue Cheng, Junyi Li, Wayne Xin Zhao +3 more
7/17/2025
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Large language models (LLMs) have shown impressive abilities in leveraging pretrained knowledge through prompting, but they often struggle with unseen tasks, particularly in data-scarce scenarios. While cross-task in-context learning offers a direct solution for transferring knowledge across tasks, it still faces critical challenges in terms of robustness, scalability, and efficiency. In this paper, we investigate whether cross-task transfer can be achieved via latent space steering without parameter updates or input expansion. Through an analysis of activation patterns in the latent space of LLMs, we observe that the enhanced activations induced by in-context examples have consistent patterns across different tasks. Inspired by these findings, we propose CAST, a novel Cross-task Activation Steering Transfer framework that enables effective transfer by manipulating the model's internal activation states. Our approach first selects influential and diverse samples from high-resource tasks, then utilizes their contrastive representation-enhanced activations to adapt LLMs to low-resource tasks. Extensive experiments across both cross-domain and cross-lingual transfer settings show that our method outperforms competitive baselines and demonstrates superior scalability and lower computational costs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tang2025enhancing,
  title  = {Enhancing Cross-task Transfer of Large Language Models via Activation Steering},
  author = {Xinyu Tang and Zhihao Lv and Xiaoxue Cheng and Junyi Li and Wayne Xin Zhao and Zujie Wen and Zhiqiang Zhang and Jun Zhou},
  year   = {2025},
  eprint = {2507.13236},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.13236v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.13236.svg)](https://codeofpaper.com/paper/2507.13236)

Discussion