Extracting Interpretable Task-Specific Circuits from Large Language Models for Faster Inference

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: García-Carrasco, Jorge, Maté, Alejandro, Trujillo, Juan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909436133507072
author García-Carrasco, Jorge
Maté, Alejandro
Trujillo, Juan
author_facet García-Carrasco, Jorge
Maté, Alejandro
Trujillo, Juan
contents Large Language Models (LLMs) have shown impressive performance across a wide range of tasks. However, the size of LLMs is steadily increasing, hindering their application on computationally constrained environments. On the other hand, despite their general capabilities, there are many situations where only one specific task is performed, rendering all other capabilities unnecessary and wasteful. This leads us to the following question: Is it possible to extract the minimal subset from an LLM that is able to perform a specific task in a faster, standalone manner? Recent works on Mechanistic Interpretability (MI) have shown that specific tasks are performed by a localized subset of components, or circuit. However, current techniques used to identify the circuit cannot be used to extract it for its standalone usage. In this work, we propose a novel approach to automatically extract the subset of the LLM that properly performs a targeted task requiring no additional training and a small amount of data samples. We evaluate our approach on different tasks and show that the resulting models are (i) considerably smaller, reducing the number of parameters up to 82.77% and (ii) more interpretable, as they focus on the circuit that is used to carry out the specific task, and can therefore be understood using MI techniques.
format Preprint
id arxiv_https___arxiv_org_abs_2412_15750
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Extracting Interpretable Task-Specific Circuits from Large Language Models for Faster Inference
García-Carrasco, Jorge
Maté, Alejandro
Trujillo, Juan
Machine Learning
Large Language Models (LLMs) have shown impressive performance across a wide range of tasks. However, the size of LLMs is steadily increasing, hindering their application on computationally constrained environments. On the other hand, despite their general capabilities, there are many situations where only one specific task is performed, rendering all other capabilities unnecessary and wasteful. This leads us to the following question: Is it possible to extract the minimal subset from an LLM that is able to perform a specific task in a faster, standalone manner? Recent works on Mechanistic Interpretability (MI) have shown that specific tasks are performed by a localized subset of components, or circuit. However, current techniques used to identify the circuit cannot be used to extract it for its standalone usage. In this work, we propose a novel approach to automatically extract the subset of the LLM that properly performs a targeted task requiring no additional training and a small amount of data samples. We evaluate our approach on different tasks and show that the resulting models are (i) considerably smaller, reducing the number of parameters up to 82.77% and (ii) more interpretable, as they focus on the circuit that is used to carry out the specific task, and can therefore be understood using MI techniques.
title Extracting Interpretable Task-Specific Circuits from Large Language Models for Faster Inference
topic Machine Learning
url https://arxiv.org/abs/2412.15750