Programming Refusal with Conditional Activation Steering
Fuente:
arXiv
Salvato in:
| Autori principali: | , , , , , , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2024
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866909498708328448 |
|---|---|
| author | Lee, Bruce W. Padhi, Inkit Ramamurthy, Karthikeyan Natesan Miehling, Erik Dognin, Pierre Nagireddy, Manish Dhurandhar, Amit |
| author_facet | Lee, Bruce W. Padhi, Inkit Ramamurthy, Karthikeyan Natesan Miehling, Erik Dognin, Pierre Nagireddy, Manish Dhurandhar, Amit |
| contents | LLMs have shown remarkable capabilities, but precisely controlling their response behavior remains challenging. Existing activation steering methods alter LLM behavior indiscriminately, limiting their practical applicability in settings where selective responses are essential, such as content moderation or domain-specific assistants. In this paper, we propose Conditional Activation Steering (CAST), which analyzes LLM activation patterns during inference to selectively apply or withhold activation steering based on the input context. Our method is based on the observation that different categories of prompts activate distinct patterns in the model's hidden states. Using CAST, one can systematically control LLM behavior with rules like "if input is about hate speech or adult content, then refuse" or "if input is not about legal advice, then refuse." This allows for selective modification of responses to specific content while maintaining normal responses to other content, all without requiring weight optimization. We release an open-source implementation of our framework at github.com/IBM/activation-steering . |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2409_05907 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Programming Refusal with Conditional Activation Steering Lee, Bruce W. Padhi, Inkit Ramamurthy, Karthikeyan Natesan Miehling, Erik Dognin, Pierre Nagireddy, Manish Dhurandhar, Amit Machine Learning Artificial Intelligence Computation and Language LLMs have shown remarkable capabilities, but precisely controlling their response behavior remains challenging. Existing activation steering methods alter LLM behavior indiscriminately, limiting their practical applicability in settings where selective responses are essential, such as content moderation or domain-specific assistants. In this paper, we propose Conditional Activation Steering (CAST), which analyzes LLM activation patterns during inference to selectively apply or withhold activation steering based on the input context. Our method is based on the observation that different categories of prompts activate distinct patterns in the model's hidden states. Using CAST, one can systematically control LLM behavior with rules like "if input is about hate speech or adult content, then refuse" or "if input is not about legal advice, then refuse." This allows for selective modification of responses to specific content while maintaining normal responses to other content, all without requiring weight optimization. We release an open-source implementation of our framework at github.com/IBM/activation-steering . |
| title | Programming Refusal with Conditional Activation Steering |
| topic | Machine Learning Artificial Intelligence Computation and Language |
| url | https://arxiv.org/abs/2409.05907 |