Saved in:
Bibliographic Details
Main Authors: Ganon, Ben, Zolfi, Alon, Hofman, Omer, Singh, Inderjeet, Kojima, Hisashi, Elovici, Yuval, Shabtai, Asaf
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.19038
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915187116736512
author Ganon, Ben
Zolfi, Alon
Hofman, Omer
Singh, Inderjeet
Kojima, Hisashi
Elovici, Yuval
Shabtai, Asaf
author_facet Ganon, Ben
Zolfi, Alon
Hofman, Omer
Singh, Inderjeet
Kojima, Hisashi
Elovici, Yuval
Shabtai, Asaf
contents In recent years, large language models (LLMs) have had great success in tasks such as casual conversation, contributing to significant advancements in domains like virtual assistance. However, they often generate responses that are not aligned with human values (e.g., ethical standards, safety), leading to potentially unsafe or inappropriate outputs. While several techniques have been proposed to address this problem, they come with a cost, requiring computationally expensive training or dramatically increasing the inference time. In this paper, we present DIESEL, a lightweight inference-guidance technique that can be seamlessly integrated into any autoregressive LLM to semantically filter undesired concepts from the response. DIESEL can function either as a standalone safeguard or as an additional layer of defense, enhancing response safety by reranking the LLM's proposed tokens based on their similarity to predefined negative concepts in the latent space. Our evaluation demonstrates DIESEL's effectiveness on state-of-the-art conversational models, even in adversarial jailbreaking scenarios that challenge response safety. We also highlight DIESEL's generalization capabilities, showing that it can be used in use cases other than safety, providing general-purpose response filtering.
format Preprint
id arxiv_https___arxiv_org_abs_2411_19038
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle DIESEL -- Dynamic Inference-Guidance via Evasion of Semantic Embeddings in LLMs
Ganon, Ben
Zolfi, Alon
Hofman, Omer
Singh, Inderjeet
Kojima, Hisashi
Elovici, Yuval
Shabtai, Asaf
Computation and Language
Machine Learning
In recent years, large language models (LLMs) have had great success in tasks such as casual conversation, contributing to significant advancements in domains like virtual assistance. However, they often generate responses that are not aligned with human values (e.g., ethical standards, safety), leading to potentially unsafe or inappropriate outputs. While several techniques have been proposed to address this problem, they come with a cost, requiring computationally expensive training or dramatically increasing the inference time. In this paper, we present DIESEL, a lightweight inference-guidance technique that can be seamlessly integrated into any autoregressive LLM to semantically filter undesired concepts from the response. DIESEL can function either as a standalone safeguard or as an additional layer of defense, enhancing response safety by reranking the LLM's proposed tokens based on their similarity to predefined negative concepts in the latent space. Our evaluation demonstrates DIESEL's effectiveness on state-of-the-art conversational models, even in adversarial jailbreaking scenarios that challenge response safety. We also highlight DIESEL's generalization capabilities, showing that it can be used in use cases other than safety, providing general-purpose response filtering.
title DIESEL -- Dynamic Inference-Guidance via Evasion of Semantic Embeddings in LLMs
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2411.19038