Controlling Language and Diffusion Models by Transporting Activations

Pau Rodríguez López, Arno Blaas, Michal Klein, Luca Zappella, N. Apostoloff +2 more
10/1/2024

No official code found. Best implementation: apple/ml-act (66 stars, last commit 2024-11-22).

Abstract

The increasing capabilities of large generative models and their ever more widespread deployment have raised concerns about their reliability, safety, and potential misuse. To address these issues, recent works have proposed to control model generation by steering model activations in order to effectively induce or prevent the emergence of concepts or behaviors in the generated output. In this paper we introduce Activation Transport (AcT), a general framework to steer activations guided by optimal transport theory that generalizes many previous activation-steering works. AcT is modality-agnostic and provides fine-grained control over the model behavior with negligible computational overhead, while minimally impacting model abilities. We experimentally show the effectiveness and versatility of our approach by addressing key challenges in large language models (LLMs) and text-to-image diffusion models (T2Is). For LLMs, we show that AcT can effectively mitigate toxicity, induce arbitrary concepts, and increase their truthfulness. In T2Is, we show how AcT enables fine-grained style control and concept negation.

View on arXivView PDF

Code Implementations(1)

apple/ml-actCommunity100%
6616PythonNov 20, 20241 years agoNOASSERTION

Cite this paper

@article{lpez2024controlling,
  title  = {Controlling Language and Diffusion Models by Transporting Activations},
  author = {Pau Rodríguez López and Arno Blaas and Michal Klein and Luca Zappella and N. Apostoloff and Marco Cuturi and Xavier Suau},
  year   = {2024},
  eprint = {2410.23054},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.23054},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.23054.svg)](https://codeofpaper.com/paper/2410.23054)

Discussion