Task Vectors as semantic sliders for text generation
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
This study investigates how task vectors, computed as the difference in weightsbetween a pretrained language model and its finetuned counterpart, can be usedto modulate model behavior in a controlled and interpretable way. Through aseries of experiments, we explore the effects of scaling individual task vectors andcombining multiple vectors on output characteristics such as toxicity, coherence,and stylistic content. Our findings show that scaling task vectors influencesmodel behavior in a generally monotonic manner, with small to moderate scalingfactors preserving output coherence while allowing for meaningful behavioraladjustments. Toxicity levels increase non-linearly with higher positive scaling,while perplexity remains relatively stable within a certain range, suggestinga “sweet spot” for effective modulation. Furthermore, combining task vectorsproduces partially additive effects, with some interactions resulting in dominantor unpredictable behaviors. These results support the idea that task vectors offera semantically meaningful and partially navigable subspace for guiding languagemodel outputs.
Place, publisher, year, edition, pages
2025.
Keywords [en]
Task vectors, Weight space manipulation, Large language model, Stylistic control
National Category
Natural Language Processing
Identifiers
URN: urn:nbn:se:uu:diva-561319OAI: oai:DiVA.org:uu-561319DiVA, id: diva2:1974435
Educational program
Master Programme in Language Technology
Supervisors
Examiners
2025-07-082025-06-232025-07-08Bibliographically approved