Improving LLM Reasoning through Interpretable Role-Playing Steering

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wang, Anyi, Shu, Dong, Wang, Yifan, Ma, Yunpu, Du, Mengnan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912610897625088
author Wang, Anyi
Shu, Dong
Wang, Yifan
Ma, Yunpu
Du, Mengnan
author_facet Wang, Anyi
Shu, Dong
Wang, Yifan
Ma, Yunpu
Du, Mengnan
contents Role-playing has emerged as an effective technique for enhancing the reasoning capabilities of large language models (LLMs). However, existing methods primarily rely on prompt engineering, which often lacks stability and interpretability. In this paper, we introduce Sparse Autoencoder Role-Playing Steering (SRPS), a novel framework that identifies and manipulates internal model features associated with role-playing behavior. Our approach extracts latent representations from role-play prompts, selects the most relevant features based on activation patterns, and constructs a steering vector that can be injected into the model's residual stream with controllable intensity. Our method enables fine-grained control over role-specific behavior and offers insights into how role information influences internal model activations. Extensive experiments across various reasoning benchmarks and model sizes demonstrate consistent performance gains. Notably, in the zero-shot chain-of-thought (CoT) setting, the accuracy of Llama3.1-8B on CSQA improves from 31.86% to 39.80%, while Gemma2-9B on SVAMP increases from 37.50% to 45.10%. These results highlight the potential of SRPS to enhance reasoning ability in LLMs, providing better interpretability and stability compared to traditional prompt-based role-playing.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07335
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Improving LLM Reasoning through Interpretable Role-Playing Steering
Wang, Anyi
Shu, Dong
Wang, Yifan
Ma, Yunpu
Du, Mengnan
Computation and Language
Artificial Intelligence
Role-playing has emerged as an effective technique for enhancing the reasoning capabilities of large language models (LLMs). However, existing methods primarily rely on prompt engineering, which often lacks stability and interpretability. In this paper, we introduce Sparse Autoencoder Role-Playing Steering (SRPS), a novel framework that identifies and manipulates internal model features associated with role-playing behavior. Our approach extracts latent representations from role-play prompts, selects the most relevant features based on activation patterns, and constructs a steering vector that can be injected into the model's residual stream with controllable intensity. Our method enables fine-grained control over role-specific behavior and offers insights into how role information influences internal model activations. Extensive experiments across various reasoning benchmarks and model sizes demonstrate consistent performance gains. Notably, in the zero-shot chain-of-thought (CoT) setting, the accuracy of Llama3.1-8B on CSQA improves from 31.86% to 39.80%, while Gemma2-9B on SVAMP increases from 37.50% to 45.10%. These results highlight the potential of SRPS to enhance reasoning ability in LLMs, providing better interpretability and stability compared to traditional prompt-based role-playing.
title Improving LLM Reasoning through Interpretable Role-Playing Steering
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2506.07335