Sobre el proyectoAbout the project

Cómo está hechoHow it's made

Stack técnico, fuentes de datos, agradecimientos y créditos.Technical stack, data sources, acknowledgements and credits.

El proyectoThe project

Esta página es la versión interactiva de mi TFG en el grado de Ingeniería Informática de la FIB (Universitat Politècnica de Catalunya). Director: Lluís Padró Cirera.This page is the interactive version of my final thesis for the Computer Engineering degree at FIB (Universitat Politècnica de Catalunya). Advisor: Lluís Padró Cirera.

El título completo del trabajo es Compresión Selectiva y Análisis Estructural de Modelos basados en Arquitectura Transformer mediante SVD. Combina dos cosas: interpretabilidad mecánica (probing, activation patching, ablation de cabezas, especialización neuronal) y compresión por SVD informada por esa interpretabilidad.The full title is Selective Compression and Structural Analysis of Transformer-based Models via SVD. It combines two things: mechanistic interpretability (probing, activation patching, head ablation, neuron specialization) and SVD-based compression informed by that interpretability.

Modelo y datosModel and data

El modelo es bert-base-uncased fine-tuneado sobre GoEmotions (28 categorías emocionales, evaluadas sobre 23 tras limpieza de etiquetas). Multi-label con BCEWithLogitsLoss. Checkpoint final: 23emo-final, 109.5M parámetros.The model is bert-base-uncased fine-tuned on GoEmotions (28 emotion categories, evaluated on 23 after label cleanup). Multi-label with BCEWithLogitsLoss. Final checkpoint: 23emo-final, 109.5M parameters.

Las visualizaciones se alimentan de dos fuentes. Las primeras vienen directamente de los CSVs producidos por los notebooks 2 al 9 (61 tablas exportadas: probing por capa, ablación de las 144 cabezas, especialización neuronal con Cohen's d, activation patching, frontera de Pareto, y más). Las segundas se computan en build-time ejecutando el checkpoint sobre 2300 frases del split de test.The visualizations are fed from two sources. The first come directly from the CSVs produced by notebooks 2 through 9 (61 exported tables: layer-wise probing, ablation of the 144 heads, neuron specialization with Cohen's d, activation patching, Pareto frontier, and more). The second are computed at build-time by running the checkpoint on 2,300 sentences from the test split.

Stack

Bibliografía claveKey references

Devlin et al. (2018) BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Demszky et al. (2020) GoEmotions: A Dataset of Fine-Grained Emotions. Tenney et al. (2019) BERT Rediscovers the NLP Pipeline. Ethayarajh (2019) How Contextual are Contextualized Word Representations?. Voita et al. (2019) Analyzing Multi-Head Self-Attention. Michel et al. (2019) Are Sixteen Heads Really Better than One?. Nostalgebraist (2020) interpreting GPT: the logit lens. Belrose et al. (2023) Eliciting Latent Predictions from Transformers with the Tuned Lens.

Para el lado de compresión:For the compression side: Hsu et al. (2022) Language model compression with weighted low-rank factorization. Yu et al. (2017) Compressing Neural Networks: Towards Determining the Optimal Layer-wise Decomposition.

La taxonomía de seis clusters se inspira en Russell (1980) A Circumplex Model of Affect y Plutchik (2001) The Nature of Emotions.The six-cluster taxonomy draws on Russell (1980) A Circumplex Model of Affect and Plutchik (2001) The Nature of Emotions.

AgradecimientosAcknowledgements

A Lluís Padró por la dirección, por las preguntas precisas y por no aceptar atajos. A los autores del dataset GoEmotions y de las librerías abiertas que han hecho posible este trabajo.To Lluís Padró for the supervision, the precise questions and for not accepting shortcuts. To the authors of the GoEmotions dataset and of the open-source libraries that made this work possible.

ContactoContact

guido.biosca0@gmail.com