SCAR: Sparse Conditioned Autoencoders for Concept Detection and Steering in LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Härle, Ruben, Friedrich, Felix, Brack, Manuel, Deiseroth, Björn, Schramowski, Patrick, Kersting, Kristian
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909416666693632
author Härle, Ruben
Friedrich, Felix
Brack, Manuel
Deiseroth, Björn
Schramowski, Patrick
Kersting, Kristian
author_facet Härle, Ruben
Friedrich, Felix
Brack, Manuel
Deiseroth, Björn
Schramowski, Patrick
Kersting, Kristian
contents Large Language Models (LLMs) have demonstrated remarkable capabilities in generating human-like text, but their output may not be aligned with the user or even produce harmful content. This paper presents a novel approach to detect and steer concepts such as toxicity before generation. We introduce the Sparse Conditioned Autoencoder (SCAR), a single trained module that extends the otherwise untouched LLM. SCAR ensures full steerability, towards and away from concepts (e.g., toxic content), without compromising the quality of the model's text generation on standard evaluation benchmarks. We demonstrate the effective application of our approach through a variety of concepts, including toxicity, safety, and writing style alignment. As such, this work establishes a robust framework for controlling LLM generations, ensuring their ethical and safe deployment in real-world applications.
format Preprint
id arxiv_https___arxiv_org_abs_2411_07122
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SCAR: Sparse Conditioned Autoencoders for Concept Detection and Steering in LLMs
Härle, Ruben
Friedrich, Felix
Brack, Manuel
Deiseroth, Björn
Schramowski, Patrick
Kersting, Kristian
Computation and Language
Large Language Models (LLMs) have demonstrated remarkable capabilities in generating human-like text, but their output may not be aligned with the user or even produce harmful content. This paper presents a novel approach to detect and steer concepts such as toxicity before generation. We introduce the Sparse Conditioned Autoencoder (SCAR), a single trained module that extends the otherwise untouched LLM. SCAR ensures full steerability, towards and away from concepts (e.g., toxic content), without compromising the quality of the model's text generation on standard evaluation benchmarks. We demonstrate the effective application of our approach through a variety of concepts, including toxicity, safety, and writing style alignment. As such, this work establishes a robust framework for controlling LLM generations, ensuring their ethical and safe deployment in real-world applications.
title SCAR: Sparse Conditioned Autoencoders for Concept Detection and Steering in LLMs
topic Computation and Language
url https://arxiv.org/abs/2411.07122