Replanteando la atención: Explorando redes neuronales feed-forward superficiales como alternativa a las capas de atención en transformadores
Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers
November 17, 2023
Autores: Vukasin Bozic, Danilo Dordervic, Daniele Coppola, Joseph Thommes
cs.AI
Resumen
Este trabajo presenta un análisis de la efectividad de utilizar redes feed-forward superficiales estándar para imitar el comportamiento del mecanismo de atención en el modelo Transformer original, una arquitectura de vanguardia para tareas de secuencia a secuencia. Sustituimos elementos clave del mecanismo de atención en el Transformer con redes feed-forward simples, entrenadas utilizando los componentes originales mediante destilación de conocimiento. Nuestros experimentos, realizados en el conjunto de datos IWSLT2017, revelan la capacidad de estos "Transformers sin atención" para rivalizar con el rendimiento de la arquitectura original. A través de estudios de ablación rigurosos y experimentando con varios tipos y tamaños de redes de reemplazo, ofrecemos ideas que respaldan la viabilidad de nuestro enfoque. Esto no solo arroja luz sobre la adaptabilidad de las redes feed-forward superficiales para emular mecanismos de atención, sino que también subraya su potencial para simplificar arquitecturas complejas en tareas de secuencia a secuencia.
English
This work presents an analysis of the effectiveness of using standard shallow
feed-forward networks to mimic the behavior of the attention mechanism in the
original Transformer model, a state-of-the-art architecture for
sequence-to-sequence tasks. We substitute key elements of the attention
mechanism in the Transformer with simple feed-forward networks, trained using
the original components via knowledge distillation. Our experiments, conducted
on the IWSLT2017 dataset, reveal the capacity of these "attentionless
Transformers" to rival the performance of the original architecture. Through
rigorous ablation studies, and experimenting with various replacement network
types and sizes, we offer insights that support the viability of our approach.
This not only sheds light on the adaptability of shallow feed-forward networks
in emulating attention mechanisms but also underscores their potential to
streamline complex architectures for sequence-to-sequence tasks.