Controllable Style Arithmetic with Language Models

Weiqi Wang, Wengang Zhou, Zongmeng Zhang, Jie Zhao, Houqiang LiACL 2025

Abstract

Controlling the linguistic style of Large Language Models (LLMs)—such as their verbosity, complexity, or sentiment—typically requires cumbersome prompting or computationally expensive fine-tuning. This paper presents Style Arithmetic (SA), a novel parameter-space method that enables precise, fine-grained stylistic control. By calculating "style vectors" from the difference between models fine-tuned on contrasting datasets, SA allows users to adjust style intensity through simple linear weight manipulation. Our results demonstrate that SA provides smooth interpolation, task-agnostic transferability, and multi-dimensional composition, all while maintaining the inference speed of the base model.

Introduction

While LLMs excel at reasoning and knowledge retrieval, steering their specific "voice" remains difficult. Current approaches like prompt engineering often lack precision, while fine-tuning separate models for every stylistic variation is resource-intensive. Collaborative decoding methods offer control but at the cost of significantly increased inference latency.

Style Arithmetic (SA) addresses these issues by treating linguistic styles as vectors in the model's parameter space. This allows for "dialing" a style up or down by simply adding or subtracting these vectors from a base model's weights.

Methodology: The Style Vector

The core of SA lies in the extraction and application of style vectors. The process involves three main steps:

  1. Extraction: A base model is fine-tuned on two contrasting datasets representing the extremes of a stylistic dimension (e.g., "very concise" vs. "very verbose").
  2. Vector Calculation: A style vector ($\sigma$) is defined as the difference between the parameters of these two fine-tuned models: $\sigma = \theta_{S^+} - \theta_{S^-}$.
  3. Arithmetic Control: To generate text with a specific style intensity, the base model's weights ($\theta_{base}$) are modified using a scaling factor ($\lambda$): $$\theta_{SA} = \theta_{base} + \lambda \sigma$$
Geometric representation of style vectors in the parameter space.

This linear approach allows for interpolation (choosing a middle ground) and extrapolation (pushing the style beyond the training data limits). Furthermore, multiple style vectors can be composed (e.g., Base + $\lambda_1$Verbosity + $\lambda_2$Politeness) to control several dimensions simultaneously.

Experimental Results

The researchers evaluated SA across diverse benchmarks, including Alpaca (general chat), GSM8K (math), and MBPP (coding).

Qualitative Impact

As shown in Figure 1, increasing the style intensity (SA value) leads to progressively more sophisticated and verbose outputs for the same prompt. Unlike standard fine-tuning (FT), which often produces static results, SA allows for a continuous spectrum of stylistic expression.

Examples of style control applied to a simple prompt.

Key Findings

  • Task-Agnostic Transfer: Style vectors learned on general chat data (Alpaca) successfully transferred to specialized models for math (GSM8K) and coding (MBPP). This suggests that linguistic style is represented in the weights independently of domain-specific knowledge.
  • Linearity and Precision: SA achieved significantly lower Normalized Mean Square Error (NMSE) in style control compared to prompting. The relationship between the scaling factor $\lambda$ and the resulting stylistic metrics is remarkably linear.
  • Zero Inference Overhead: Because SA merges weights before inference, it maintains 1x inference latency. This is a major advantage over decoding-time methods that require running multiple models.
  • Performance Preservation: Even at high stylistic intensities, models retained their core reasoning capabilities. For instance, a model could be made extremely verbose without losing its ability to solve complex math problems correctly.

Conclusion and Future Work

Style Arithmetic provides a powerful, efficient framework for steering LLM behavior. However, limitations remain: the method currently requires models to share the same architecture and vocabulary. Future research will focus on developing a more rigorous theoretical understanding of why linguistic styles map so linearly in high-dimensional parameter spaces and extending the method to heterogeneous architectures.

Summary updated

BibTeX
@inproceedings{wang2025controllable,
  author = {Weiqi Wang and Wengang Zhou and Zongmeng Zhang and Jie Zhao and Houqiang Li},
  title = {{Controllable Style Arithmetic with Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure