Papers › Style Vectors for Steering Generative Large Language Model

Style Vectors for Steering Generative Large Language Model

2 Feb 2024arXiv:2402.01618archive 2025-07-28

Kai Konen, Sophie Jentzsch, Diaoulé Diallo, Peer Schütt, Oliver Bensch, Roxanne El Baff, Dominik Opitz, Tobias Hecking

This research explores strategies for steering the output of large language models (LLMs) towards specific styles, such as sentiment, emotion, or writing style, by adding style vectors to the activations of hidden layers during text generation. We show that style vectors can be simply computed from recorded layer activations for input texts in a specific style in contrast to more complex training-based approaches. Through a series of experiments, we demonstrate the effectiveness of activation engineering using such style vectors to influence the style of generated text in a nuanced and parameterisable way, distinguishing it from prompt engineering. The presented research constitutes a significant step towards developing more adaptive and effective AI-empowered interactive systems.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.01618")

Code

Syntology Ran 8 of 12 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

dlr-sc/style-vectors-for-steering-llms officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 8 ran; 0 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
7ran
4unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from dlr-sc/style-vectors-for-steering-llms. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

adapt_df dlr-sc/style-vectors-for-steering-llms/utils/evaluation_helper.py official repository ran MIT (permissive) · 33c601ebd0d6a447 · report
adapt_df_plot dlr-sc/style-vectors-for-steering-llms/utils/evaluation_helper.py official repository ran MIT (permissive) · 7e6d12ac4f3a1a63 · report
check_path dlr-sc/style-vectors-for-steering-llms/utils/dataset_loader.py official repository ran MIT (permissive) · 6836652221387f57 · report
compute_intermediate_size dlr-sc/style-vectors-for-steering-llms/utils/convert_llama_weights_to_hf.py official repository ran fingerprinted MIT (permissive) · 0c540da8d3df6b6e · report
goemo_get_only_ekman dlr-sc/style-vectors-for-steering-llms/utils/data_prep.py official repository ran MIT (permissive) · 0ed4db56f772b47e · report
load_activations_goemo dlr-sc/style-vectors-for-steering-llms/utils/steering_vector_loader.py official repository ran MIT (permissive) · 3e322054e0f29cdf · report
load_trained_vectors_yelp dlr-sc/style-vectors-for-steering-llms/utils/steering_vector_loader.py official repository ran fingerprinted MIT (permissive) · a841a4f3727f14d5 · report
read_json dlr-sc/style-vectors-for-steering-llms/utils/convert_llama_weights_to_hf.py official repository ran · our draft was wrong MIT (permissive) · c5bcf01d18bba63d · report
load_llm_model dlr-sc/style-vectors-for-steering-llms/utils/llm_model_utils.py official repository unverified MIT (permissive) · 96cffb1973d6bf56 · report
meta_load dlr-sc/style-vectors-for-steering-llms/utils/dataset_loader.py official repository unverified MIT (permissive) · 36a7b7ac7a958d29 · report
optuna_hp_space dlr-sc/style-vectors-for-steering-llms/shakespeare_classifier/experiments_config.py official repository unverified MIT (permissive) · 111030aec8cc5f8a · report
write_model dlr-sc/style-vectors-for-steering-llms/utils/convert_llama_weights_to_hf.py official repository unverified MIT (permissive) · cfeea96bf995824a · report

Tasks

Language ModelingLanguage ModellingLarge Language ModelPrompt EngineeringText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections