CLFeb 19, 2025

Self-Regularization with Sparse Autoencoders for Controllable LLM-based Classification

arXiv:2502.14133v33 citationsh-index: 13Has CodeKDD
Originality Incremental advance
AI Analysis

This work addresses generalizability, fairness, and privacy challenges in LLM-based text classification by enabling control over latent features, though it builds incrementally on existing sparse autoencoder and regularization techniques.

The paper tackles the problem of unintended features in LLM embeddings for text classification by proposing a self-regularization framework using sparse autoencoders to identify and remove such features, improving classifier generalizability on tasks like toxic chat detection, reward modeling, and disease diagnosis.

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 impact of these unintended features on 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 self-regularization framework can improve the classifier's generalizability by regularizing those features that are not semantically correlated to the task. This work pioneers controllable text classification on LLM latent spaces by leveraging interpreted features to address generalizability, fairness, and privacy challenges. The code and data are publicly available at https://github.com/JacksonWuxs/Controllable_LLM_Classifier.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes