Controlled Text Generation via Language Model Arithmetic
Not on the map. Why?
Abstract (arXiv)
As Large Language Models (LLMs) are deployed more widely, customization with respect to vocabulary, style, and character becomes more important. In this work, we introduce model arithmetic, a novel inference framework for composing and biasing LLMs without the need for model (re)training or highly specific datasets. In addition, the framework allows for more precise control of generated text than direct prompting and prior controlled text generation (CTG) techniques. Using model arithmetic, we can express prior CTG techniques as simple formulas and naturally extend them to new and more effective formulations. Further, we show that speculative sampling, a technique for efficient LLM sampling, extends to our setting. This enables highly efficient text generation with multiple composed models with only marginal overhead over a single model. Our empirical evaluation demonstrates that model arithmetic allows fine-grained control of generated text while outperforming state-of-the-art on the task of toxicity reduction. We release an open source easy-to-use implementation of our framework at https://github.com/eth-sri/language-model-arithmetic.
Key facts. Cited by 51 papers in the map (data through 7 Oct 2026). Builds on 34 of its 44 references that are in the map. First posted on arXiv 24 Nov 2023.
Builds on
34 of 44 references.
References · 34
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2019Release Strategies and the Social Impacts of Language Modelscited by 505
22 more
- 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
- 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 374
- 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 336
- 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
- 2023Accelerating LLM Inference with Staged Speculative Decodingcited by 151
- 2023Stay on topic with Classifier-Free Guidancecited by 90
- 2022TweetNLP: Cutting-Edge Natural Language Processing for Social Mediacited by 71
- 2021Controlled Text Generation as Continuous Optimization with Multiple Constraintscited by 70
- 2022Gradient-Based Constrained Sampling from Language Modelscited by 64
- 2022Can Large Language Models Truly Understand Prompts? A Case Study with Negated Promptscited by 56
- 2022Critic-Guided Decoding for Controlled Text Generationcited by 45
- 2022Controllable Text Generation with Neurally-Decomposed Oraclecited by 41
- 2022Detoxifying Text with MaRCo: Controllable Revision with Experts and Anti-Expertscited by 36
- 2022Unified Detoxifying and Debiasing in Language Generation via Inference-time Adaptive Optimizationcited by 32
- 2023PREADD: Prefix-Adaptive Decoding for Controlled Text Generationcited by 29
- 2022CounterGeDi: A controllable approach to generate polite, detoxified and emotional counterspeechcited by 28
- 2023Don't lose the message while paraphrasing: A study on content preserving style transfercited by 25
- 2020Raiders of the Lost Kek: 3.5 Years of Augmented 4chan Posts from the Politically Incorrect Boardcited by 24
- 2022Twitter Topic Classificationcited by 22
- 2022Controllable Text Generation with Language Constraintscited by 18
- 2022Classifiers are Better Experts for Controllable Text Generationcited by 10
- 2022GEDI: GEnerative and DIscriminative Training for Self-Supervised Learningcited by 6
Built on by
Citing papers per year: 2024: 27; 2025: 19; 2026: 5.
51 papers.
Sort:
By area:
- 2024Model Merging in LLMs, MLLMs, and Beyond: Methods, Theories, Applications and Opportunitiescited by 247
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
- 2024Reversing the Forget-Retain Objectives: An Efficient LLM Unlearning Framework from Logit Differencecited by 85
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024Controlling Language and Diffusion Models by Transporting Activationscited by 59
- 2024GenARM: Reward Guided Generation with Autoregressive Reward Model for Test-time Alignmentcited by 54
- 2024EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluationscited by 33
- 2025PARM: Multi-Objective Test-Time Alignment via Preference-Aware Autoregressive Reward Modelcited by 27
- 2024SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Modelscited by 22
- 2024DataGen: Unified Synthetic Dataset Generation via Large Language Modelscited by 22
- 2024LLM-based multi-agent poetry generation in non-cooperative environmentscited by 15
- 2025Drift: Decoding-time Personalized Alignments with Implicit User Preferencescited by 13
38 more
- 2024RSA-Control: A Pragmatics-Grounded Lightweight Controllable Text Generation Frameworkcited by 11
- 2025Measuring and Guiding Monosemanticitycited by 10
- 2024Divide, Reweight, and Conquer: A Logit Arithmetic Approach for In-Context Learningcited by 9
- 2024DiffLM: Controllable Synthetic Data Generation via Diffusion Language Modelscited by 9
- 2025Synthetic Text Generation for Training Large Language Models via Gradient Matchingcited by 9
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Taskscited by 8
- 2024Rethinking Weight-Averaged Model-mergingcited by 8
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scalecited by 8
- 2024Constrained Decoding with Speculative Lookaheadscited by 6
- 2025Preference Learning for AI Alignment: a Causal Perspectivecited by 6
- 2024Aggregation of Reasoning: A Hierarchical Framework for Enhancing Answer Selection in Large Language Modelscited by 5
- 2025From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Modelscited by 5
- 2025JAM: Controllable and Responsible Text Generation via Causal Reasoning and Latent Vector Manipulationcited by 5
- 2026When Shared Knowledge Hurts: Spectral Over-Accumulation in Model Mergingcited by 5
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Modelscited by 4
- 2025Semantic Probabilistic Control of Language Modelscited by 4
- 2024Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controllercited by 3
- 2024On the Low-Rank Parametrization of Reward Models for Controlled Language Generationcited by 3
- 2024COrAL: Order-Agnostic Language Modeling for Efficient Iterative Refinementcited by 3
- 2025Evolutionary Guided Decoding: Iterative Value Refinement for LLMscited by 3
- 2025Bridging the Perception-Cognition Gap:Re-engineering SAM2 with Hilbert-Mamba for Robust VLM-based Medical Diagnosiscited by 3
- 2026UniARM: Towards a Unified Autoregressive Reward Model for Multi-Objective Test-Time Alignmentcited by 3
- 2024"Reasoning" with Rhetoric: On the Style-Evidence Tradeoff in LLM-Generated Counter-Argumentscited by 2
- 2024Continuous Language Model Interpolation for Dynamic and Controllable Text Generationcited by 2
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2025Optimal Brain Iterative Merging: Mitigating Interference in LLM Mergingcited by 2
- 2025Palette of Language Models: A Solver for Controlled Text Generationcited by 2
- 2025Universal Reasoner: A Single, Composable Plug-and-Play Reasoner for Frozen LLMscited by 2
- 2026Ensembling Language Models with Sequential Monte Carlocited by 2
- 2024Contrastive Perplexity for Controlled Generation: An Application in Detoxifying Large Language Modelscited by 1
- 2024Linguistically-Controlled Paraphrase Generationcited by 1
- 2025ContrastScore: Towards Higher Quality, Less Biased, More Efficient Evaluation Metrics with Contrastive Evaluationcited by 1
- 2025LaPA2: Length-Aware Prefix and Prompt Attention Augmentation for Long-Form Controllable Text Generationcited by 1
- 2025C3TG: Conflict-aware, Composite, and Collaborative Controlled Text Generationcited by 1
- 2025Shapley-based Data Valuation for LLM Alignment via Sequential Preference Optimizationcited by 1
- 2026Don't Mix Rewards, Mix Policies: Policy Decomposition and Optimization for Multi-Reward RLcited by 1
- 2024GCOF: Self-iterative Text Generation for Copywriting Using Large Language Modelcited by 0
- 2025Token-Level Inference-Time Alignment for Vision-Language Modelscited by 0
50 most cited of 51 All 51 (JSON)
- 2026Don't Mix Rewards, Mix Policies: Policy Decomposition and Optimization for Multi-Reward RL31 Jul 2026
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2026UniARM: Towards a Unified Autoregressive Reward Model for Multi-Objective Test-Time Alignment10 Feb 2026
- 2026When Shared Knowledge Hurts: Spectral Over-Accumulation in Model Merging5 Feb 2026
- 2026Agents of Diffusion: Enhancing Diffusion Language Models with Multi-Agent Reinforcement Learning for Structured Data Generation (Extended Version)12 Jan 2026
- 2025Bridging the Perception-Cognition Gap:Re-engineering SAM2 with Hilbert-Mamba for Robust VLM-based Medical Diagnosis30 Dec 2025
- 2025Shapley-based Data Valuation for LLM Alignment via Sequential Preference Optimization12 Dec 2025
- 2025C3TG: Conflict-aware, Composite, and Collaborative Controlled Text Generation12 Nov 2025
- 2025Token-Level Inference-Time Alignment for Vision-Language Models20 Oct 2025
- 2025LaPA2: Length-Aware Prefix and Prompt Attention Augmentation for Long-Form Controllable Text Generation6 Aug 2025
- 2025Measuring and Guiding Monosemanticity24 Jun 2025
- 2025Preference Learning for AI Alignment: a Causal Perspective6 Jun 2025
38 more
- 2025Universal Reasoner: A Single, Composable Plug-and-Play Reasoner for Frozen LLMs25 May 2025
- 2025PARM: Multi-Objective Test-Time Alignment via Preference-Aware Autoregressive Reward Model6 May 2025
- 2025Semantic Probabilistic Control of Language Models4 May 2025
- 2025ContrastScore: Towards Higher Quality, Less Biased, More Efficient Evaluation Metrics with Contrastive Evaluation2 Apr 2025
- 2025Palette of Language Models: A Solver for Controlled Text Generation14 Mar 2025
- 2025Evolutionary Guided Decoding: Iterative Value Refinement for LLMs4 Mar 2025
- 2025JAM: Controllable and Responsible Text Generation via Causal Reasoning and Latent Vector Manipulation28 Feb 2025
- 2025Synthetic Text Generation for Training Large Language Models via Gradient Matching24 Feb 2025
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale23 Feb 2025
- 2025Drift: Decoding-time Personalized Alignments with Implicit User Preferences20 Feb 2025
- 2025Optimal Brain Iterative Merging: Mitigating Interference in LLM Merging17 Feb 2025
- 2025From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Models6 Feb 2025
- 2024Constrained Decoding with Speculative Lookaheads9 Dec 2024
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Models30 Nov 2024
- 2024Rethinking Weight-Averaged Model-merging14 Nov 2024
- 2024DiffLM: Controllable Synthetic Data Generation via Diffusion Language Models5 Nov 2024
- 2024Linguistically-Controlled Paraphrase Generation31 Oct 2024
- 2024Controlling Language and Diffusion Models by Transporting Activations30 Oct 2024
- 2024EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluations30 Oct 2024
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Tasks29 Oct 2024
- 2024RSA-Control: A Pragmatics-Grounded Lightweight Controllable Text Generation Framework24 Oct 2024
- 2024Divide, Reweight, and Conquer: A Logit Arithmetic Approach for In-Context Learning14 Oct 2024
- 2024COrAL: Order-Agnostic Language Modeling for Efficient Iterative Refinement12 Oct 2024
- 2024GenARM: Reward Guided Generation with Autoregressive Reward Model for Test-time Alignment10 Oct 2024
- 2024Programming Refusal with Conditional Activation Steering6 Sep 2024
- 2024LLM-based multi-agent poetry generation in non-cooperative environments5 Sep 2024
- 2024Model Merging in LLMs, MLLMs, and Beyond: Methods, Theories, Applications and Opportunities14 Aug 2024
- 2024On the Low-Rank Parametrization of Reward Models for Controlled Language Generation5 Jul 2024
- 2024DataGen: Unified Synthetic Dataset Generation via Large Language Models27 Jun 2024
- 2024SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Models18 Jun 2024
- 2024Reversing the Forget-Retain Objectives: An Efficient LLM Unlearning Framework from Logit Difference12 Jun 2024
- 2024Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controller4 Jun 2024
- 2024Aggregation of Reasoning: A Hierarchical Framework for Enhancing Answer Selection in Large Language Models21 May 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2024Continuous Language Model Interpolation for Dynamic and Controllable Text Generation10 Apr 2024
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositories31 Mar 2024
- 2024GCOF: Self-iterative Text Generation for Copywriting Using Large Language Model21 Feb 2024
- 2024"Reasoning" with Rhetoric: On the Style-Evidence Tradeoff in LLM-Generated Counter-Arguments13 Feb 2024
50 newest of 51 All 51 (JSON)
- 2024GenARM: Reward Guided Generation with Autoregressive Reward Model for Test-time Alignmentcited by 54
- 2025PARM: Multi-Objective Test-Time Alignment via Preference-Aware Autoregressive Reward Modelcited by 27
- 2024SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Modelscited by 22
- 2025Drift: Decoding-time Personalized Alignments with Implicit User Preferencescited by 13
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scalecited by 8
- 2025Preference Learning for AI Alignment: a Causal Perspectivecited by 6
- 2024On the Low-Rank Parametrization of Reward Models for Controlled Language Generationcited by 3
- 2026UniARM: Towards a Unified Autoregressive Reward Model for Multi-Objective Test-Time Alignmentcited by 3
- 2025Shapley-based Data Valuation for LLM Alignment via Sequential Preference Optimizationcited by 1
- 2026Don't Mix Rewards, Mix Policies: Policy Decomposition and Optimization for Multi-Reward RLcited by 1
- 2026Don't Mix Rewards, Mix Policies: Policy Decomposition and Optimization for Multi-Reward RL31 Jul 2026
- 2026UniARM: Towards a Unified Autoregressive Reward Model for Multi-Objective Test-Time Alignment10 Feb 2026
- 2025Shapley-based Data Valuation for LLM Alignment via Sequential Preference Optimization12 Dec 2025
- 2025Preference Learning for AI Alignment: a Causal Perspective6 Jun 2025
- 2025PARM: Multi-Objective Test-Time Alignment via Preference-Aware Autoregressive Reward Model6 May 2025
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale23 Feb 2025
- 2025Drift: Decoding-time Personalized Alignments with Implicit User Preferences20 Feb 2025
- 2024GenARM: Reward Guided Generation with Autoregressive Reward Model for Test-time Alignment10 Oct 2024
- 2024On the Low-Rank Parametrization of Reward Models for Controlled Language Generation5 Jul 2024
- 2024SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Models18 Jun 2024
- 2024Aggregation of Reasoning: A Hierarchical Framework for Enhancing Answer Selection in Large Language Modelscited by 5
- 2025JAM: Controllable and Responsible Text Generation via Causal Reasoning and Latent Vector Manipulationcited by 5
- 2024"Reasoning" with Rhetoric: On the Style-Evidence Tradeoff in LLM-Generated Counter-Argumentscited by 2
- 2025Universal Reasoner: A Single, Composable Plug-and-Play Reasoner for Frozen LLMscited by 2
- 2025Universal Reasoner: A Single, Composable Plug-and-Play Reasoner for Frozen LLMs25 May 2025
- 2025JAM: Controllable and Responsible Text Generation via Causal Reasoning and Latent Vector Manipulation28 Feb 2025
- 2024Aggregation of Reasoning: A Hierarchical Framework for Enhancing Answer Selection in Large Language Models21 May 2024
- 2024"Reasoning" with Rhetoric: On the Style-Evidence Tradeoff in LLM-Generated Counter-Arguments13 Feb 2024
- 2024Controlling Language and Diffusion Models by Transporting Activationscited by 59
- 2024DiffLM: Controllable Synthetic Data Generation via Diffusion Language Modelscited by 9
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Modelscited by 4
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Models30 Nov 2024
- 2024DiffLM: Controllable Synthetic Data Generation via Diffusion Language Models5 Nov 2024
- 2024Controlling Language and Diffusion Models by Transporting Activations30 Oct 2024
- 2024Model Merging in LLMs, MLLMs, and Beyond: Methods, Theories, Applications and Opportunitiescited by 247
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluationscited by 33
- 2024RSA-Control: A Pragmatics-Grounded Lightweight Controllable Text Generation Frameworkcited by 11
- 2025Measuring and Guiding Monosemanticitycited by 10
- 2024Divide, Reweight, and Conquer: A Logit Arithmetic Approach for In-Context Learningcited by 9
- 2025Synthetic Text Generation for Training Large Language Models via Gradient Matchingcited by 9
- 2024Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Taskscited by 8
- 2024Rethinking Weight-Averaged Model-mergingcited by 8
- 2024Constrained Decoding with Speculative Lookaheadscited by 6
- 2025From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Modelscited by 5
12 most cited of 28 All 28 (JSON)
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2026When Shared Knowledge Hurts: Spectral Over-Accumulation in Model Merging5 Feb 2026
- 2025C3TG: Conflict-aware, Composite, and Collaborative Controlled Text Generation12 Nov 2025
- 2025LaPA2: Length-Aware Prefix and Prompt Attention Augmentation for Long-Form Controllable Text Generation6 Aug 2025
- 2025Measuring and Guiding Monosemanticity24 Jun 2025
- 2025Semantic Probabilistic Control of Language Models4 May 2025
- 2025ContrastScore: Towards Higher Quality, Less Biased, More Efficient Evaluation Metrics with Contrastive Evaluation2 Apr 2025
- 2025Palette of Language Models: A Solver for Controlled Text Generation14 Mar 2025
- 2025Evolutionary Guided Decoding: Iterative Value Refinement for LLMs4 Mar 2025
- 2025Synthetic Text Generation for Training Large Language Models via Gradient Matching24 Feb 2025
- 2025Optimal Brain Iterative Merging: Mitigating Interference in LLM Merging17 Feb 2025
- 2025From Rational Answers to Emotional Resonance: The Role of Controllable Emotion Generation in Language Models6 Feb 2025
12 newest of 28 All 28 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Synthetic Data Generation Using Large Language Models: Advances in Text and Code
- 2024A Survey on Data Synthesis and Augmentation for Large Language Models
- 2023Synthetic Data Generation in Low-Resource Settings via Fine-Tuning of Large Language Models
- 2025A Survey on Parallel Text Generation: From Parallel Decoding to Diffusion Language Models
- 2024Quasi-random Multi-Sample Inference for Large Language Models
- 2024A Comprehensive Survey of Accelerated Generation Techniques in Large Language Models
- 2024Cookbook: A framework for improving LLM generative abilities via programmatic data generating templates
- 2024Inference acceleration for large language models using "stairs" assisted greedy generation