Paper Reading AI Learner

Self-Regularization with Latent Space Explanations for Controllable LLM-based Classification

2025-02-19 22:27:59
Xuansheng Wu, Wenhao Yu, Xiaoming Zhai, Ninghao Liu

Abstract

Modern text classification methods heavily rely on contextual embeddings from large language models (LLMs). Compared to human-engineered features, these embeddings provide automatic and effective representations for classification model training. However, they also introduce a challenge: we lose the ability to manually remove unintended features, such as sensitive or task-irrelevant features, to guarantee regulatory compliance or improve the generalizability of classification models. This limitation arises because LLM embeddings are opaque and difficult to interpret. In this paper, we propose a novel framework to identify and regularize unintended features in the LLM latent space. Specifically, we first pre-train a sparse autoencoder (SAE) to extract interpretable features from LLM latent spaces. To ensure the SAE can capture task-specific features, we further fine-tune it on task-specific datasets. In training the classification model, we propose a simple and effective regularizer, by minimizing the similarity between the classifier weights and the identified unintended feature, to remove the impacts of these unintended features toward classification. We evaluate the proposed framework on three real-world tasks, including toxic chat detection, reward modeling, and disease diagnosis. Results show that the proposed framework can significantly improve the classifier's generalizability by regularizing those features that are not semantically correlated to each task. This work pioneers controllable text classification on LLM latent spaces by leveraging interpreted features to address generalizability, fairness, and privacy challenges. We will release our code and data once accepted.

Abstract (translated)

现代文本分类方法高度依赖于大型语言模型(LLM)生成的上下文嵌入。与人工设计的特征相比,这些嵌入能自动且有效地为分类模型训练提供表示方式。然而,这也带来了一个挑战:我们失去了手动移除敏感或任务无关特征的能力,以确保符合监管要求或提升分类模型的一般适用性。这种限制出现的原因是LLM嵌入具有不透明性和难以解释的特点。在本文中,我们提出了一种新颖的框架,用于识别和规范化LLM潜在空间中的非意图特征。具体来说,我们首先预训练了一个稀疏自动编码器(SAE),以从LLM潜在空间中提取可解释的特征。为了确保SAE能够捕捉到特定任务的相关特征,我们在特定任务的数据集上进一步微调了它。在训练分类模型时,我们提出了一种简单且有效的正则化方法:通过最小化分类器权重与识别出的非意图特征之间的相似性来移除这些非意图特征对分类的影响。我们在三个现实世界任务中评估了所提出的框架,包括有毒聊天检测、奖励建模和疾病诊断。结果表明,该框架能够显著提高分类器的一般适用性,通过规范化那些在语义上与每个特定任务无关的特征。这项工作开创了基于解释特征解决大型语言模型潜在空间中的可控制文本分类问题的方法,以应对一般适用性、公平性和隐私方面的挑战。一旦被接受,我们将发布我们的代码和数据集。

URL

https://arxiv.org/abs/2502.14133

PDF

https://arxiv.org/pdf/2502.14133.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot