稀疏自编码器通过从稀疏瓶颈层重构激活,为从语言模型中提取可解释特征提供了一种有前景的无监督方法。由于语言模型学习了许多概念,自编码器需要非常大才能恢复所有相关特征。然而,研究自编码器扩展的性质是困难的,因为需要在重构目标和稀疏目标之间取得平衡,并且存在死亡潜变量的问题。我们提出使用k-稀疏自编码器[Makhzani and Frey, 2013]来直接控制稀疏性,简化调参并改善重构-稀疏前沿。此外,我们发现了即使在尝试的最大规模下也能产生很少死亡潜变量的修改方法。利用这些技术,我们发现了关于自编码器大小和稀疏性的清晰扩展规律。我们还引入了几个新的评估特征质量的指标,这些指标基于假设特征的恢复、激活模式的可解释性以及下游效应的稀疏性。这些指标通常都随着自编码器大小的增加而改善。为了证明我们方法的可扩展性,我们在GPT-4激活上训练了一个具有1600万潜变量的自编码器,使用了400亿个token。我们发布了开源模型的训练代码和自编码器,以及一个可视化工具。
英文摘要:
Sparse autoencoders provide a promising unsupervised approach for extracting interpretable features from a language model by reconstructing activations from a sparse bottleneck layer. Since language models learn many concepts, autoencoders need to be very large to recover all relevant features. However, studying the properties of autoencoder scaling is difficult due to the need to balance reconstruction and sparsity objectives and the presence of dead latents. We propose using k-sparse autoencoders [Makhzani and Frey, 2013] to directly control sparsity, simplifying tuning and improving the reconstruction-sparsity frontier. Additionally, we find modifications that result in few dead latents, even at the largest scales we tried. Using these techniques, we find clean scaling laws with respect to autoencoder size and sparsity. We also introduce several new metrics for evaluating feature quality based on the recovery of hypothesized features, the explainability of activation patterns, and the sparsity of downstream effects. These metrics all generally improve with autoencoder size. To demonstrate the scalability of our approach, we train a 16 million latent autoencoder on GPT-4 activations for 40 billion tokens. We release training code and autoencoders for open-source models, as well as a visualizer.
The classical sparse coding model represents visual stimuli as a linear combination of a handful of learned basis functions that are Gabor-like when trained on natural image data. However, the Gabor-like filters learned by classical sparse coding far overpredict well-tuned simple cell receptive field (SCRF) profiles. A number of subsequent models have either discarded the sparse dictionary learning framework entirely or have yet to take advantage of the surge in unrolled, neural dictionary learning architectures. A key missing theme of these updates is a stronger notion of \emph{structured spa…
Ostwestfalen-Lippe University of Applied Sciences(东威斯特伐利亚-利珀应用科学大学);Phoenix Contact Electronics GmbH(菲尼克斯电气电子有限公司)
Digitalization leads to data transparency for production systems that we can benefit from with data-driven analysis methods like neural networks. For example, automated anomaly detection enables saving resources and optimizing the production. We study using rarely occurring information about labeled anomalies into Variational Autoencoder neural network structures to overcome information deficits of supervised and unsupervised approaches. This method outperforms all other models in terms of accuracy, precision, and recall. We evaluate the following methods: Principal Component Analysis, Isolati…
Recently, it has been observed that when representations are learnt in a way that encourages sparsity, improved performance is obtained on classification tasks. These methods involve combinations of activation functions, sampling steps and different kinds of penalties. To investigate the effectiveness of sparsity by itself, we propose the k-sparse autoencoder, which is an autoencoder with linear activation function, where in hidden layers only the k highest activities are kept. When applied to the MNIST and NORB datasets, we find that this method achieves better classification results than den…
College of Economics and Management, Shandong University of Science and Technology(山东科技大学经济管理学院)
We propose a novel filter for sparse big data, called an integrated autoencoder (IAE), which utilizes auxiliary information to mitigate data sparsity. The proposed model achieves an appropriate balance between prediction accuracy, convergence speed, and complexity. We implement experiments on a GPS trajectory dataset, and the results demonstrate that the IAE is more accurate and robust than some state-of-the-art methods.
Graph-Regularized Sparse Autoencoders for LLM Safety Steering
ELLIS Institute Tübingen(图宾根ELLIS研究所);Max Planck Institute for Intelligent Systems(智能系统马克斯·普朗克研究所);Intesa Sanpaolo(Intesa Sanpaolo公司);University of Southern California(南加州大学)
SplInterp: Improving our Understanding and Training of Sparse Autoencoders
School of Mathematics University of Birmingham(数学学院英国伯明翰大学);Ideami Studios(Ideami工作室);Department of Mathematics and Statistics University of Limerick(数学与统计学学院英国利默里克大学);XRAI Inc.(XRAI公司);Department of Computer Science Brown University(计算机科学系布朗大学)
EURECOM(欧洲通信研究院);University of California, Irvine(加州大学欧文分校)
Autoencoders and their variants are among the most widely used models in representation learning and generative modeling. However, autoencoder-based models usually assume that the learned representations are i.i.d. and fail to capture the correlations between the data samples. To address this issue, we propose a novel Sparse Gaussian Process Bayesian Autoencoder (SGPBAE) model in which we impose fully Bayesian sparse Gaussian Process priors on the latent space of a Bayesian Autoencoder. We perform posterior estimation for this model via stochastic gradient Hamiltonian Monte Carlo. We evaluate …
University of Gothenburg(哥德堡大学);Chalmers University of Technology(查尔姆斯理工大学)
High-dimensional data sets are often analyzed and explored via the construction of a latent low-dimensional space which enables convenient visualization and efficient predictive modeling or clustering. For complex data structures, linear dimensionality reduction techniques like PCA may not be sufficiently flexible to enable low-dimensional representation. Non-linear dimension reduction techniques, like kernel PCA and autoencoders, suffer from loss of interpretability since each latent variable is dependent of all input dimensions. To address this limitation, we here present path lasso penalize…
Recent approaches in the theoretical analysis of model-based deep learning architectures have studied the convergence of gradient descent in shallow ReLU networks that arise from generative models whose hidden layers are sparse. Motivated by the success of architectures that impose structured forms of sparsity, we introduce and study a group-sparse autoencoder that accounts for a variety of generative models, and utilizes a group-sparse ReLU activation function to force the non-zero units at a given layer to occur in blocks. For clustering models, inputs that result in the same group of active…
Matrix factorization (MF) and Autoencoder (AE) are among the most successful approaches of unsupervised learning. While MF based models have been extensively exploited in the graph modeling and link prediction literature, the AE family has not gained much attention. In this paper we investigate both MF and AE's application to the link prediction problem in sparse graphs. We show the connection between AE and MF from the perspective of multiview learning, and further propose MF+AE: a model training MF and AE jointly with shared parameters. We apply dropout to training both the MF and AE parts, …
Disentangling Dense Embeddings with Sparse Autoencoders
The Australian National University(澳大利亚国立大学);Stanford University(斯坦福大学);Columbia University(哥伦比亚大学);Space Telescope Science Institute(空间望远镜科学研究所);Johns Hopkins University(约翰斯·霍普金斯大学)
Temporal Sparse Autoencoders: Leveraging the Sequential Nature of Language for Interpretability
Harvard School of Engineering and Applied Science(哈佛工程与应用科学学院);Kempner Institute for the Study of Natural & Artificial Intelligence(自然与人工智能研究学院);Harvard Business School(哈佛商学院)
University of Louisville(路易斯维尔大学);University of Social Science(社会科学大学);Information Technology Institute(信息技术研究所)
We demonstrate a new deep learning autoencoder network, trained by a nonnegativity constraint algorithm (NCAE), that learns features which show part-based representation of data. The learning algorithm is based on constraining negative weights. The performance of the algorithm is assessed based on decomposing data into parts and its prediction performance is tested on three standard image data sets and one text dataset. The results indicate that the nonnegativity constraint forces the autoencoder to learn features that amount to a part-based representation of data, while improving sparsity and…
This paper aims to improve the feature learning in Convolutional Networks (Convnet) by capturing the structure of objects. A new sparsity function is imposed on the extracted featuremap to capture the structure and shape of the learned object, extracting interpretable features to improve the prediction performance. The proposed algorithm is based on organizing the activation within and across featuremap by constraining the node activities through $\ell_{2}$ and $\ell_{1}$ normalization in a structured form.