Memorial de projetos : análise do modelo transformer aplicado à tradução automática de textos
Resumo
Resumo: Neste trabalho apresenta-se um memorial técnico sobre a arquitetura de aprendizado de máquina conhecida como Transformers, considerada um dos avanços mais significativos no campo do Aprendizado Profundo nas últimas décadas. Proposta por Vaswani no artigo Attention Is All You Need, essa arquitetura representou uma mudança estrutural na forma como modelos computacionais processam sequências de dados. Diferentemente das abordagens tradicionais baseadas em recorrência, como as Redes Neurais Recorrentes (RNNs) e suas variações Long Short-Term Memory (LSTM) e Gated Recurrent Units (GRU), o Transformer fundamenta-se exclusivamente em mecanismos de atenção, eliminando a dependência sequencial e permitindo processamento paralelo dos dados. Essa inovação tornou possível maior eficiência computacional e melhor escalabilidade em cenários de grande volume de informações, além de mitigar problemas clássicos como o desaparecimento e explosão do gradiente em sequências longas. O mecanismo de autoatenção (selfattention) possibilita que cada elemento de uma sequência estabeleça relações diretas com todos os demais, capturando dependências de longo alcance e modelando contextos complexos de forma global. A introdução da codificação posicional permitiu preservar informações de ordem sem o uso de estruturas recorrentes, mantendo a integridade semântica das sequências. O impacto inicial dessa arquitetura foi observado no Processamento de Linguagem Natural (PLN), especialmente em tarefas como tradução automática, sumarização e geração de texto, mas sua aplicação rapidamente se expandiu para áreas como visão computacional, reconhecimento de fala, bioinformática e modelos multimodais. Atualmente, os Transformers constituem a base dos principais modelos de linguagem de larga escala e sistemas generativos contemporâneos. O objetivo deste estudo é analisar os fundamentos teóricos e matemáticos do Transformer, compreender as motivações que levaram ao seu desenvolvimento e examinar suas contribuições em relação aos modelos anteriores, bem como discutir os impactos científicos e tecnológicos decorrentes de sua ampla adoção na inteligência artificial moderna. Abstract: This work presents a technical report on the machine learning architecture known as Transformers, considered one of the most significant advances in the field of Deep Learning in recent decades. Proposed by Vaswani in the article Attention Is All You Need, this architecture represented a structural shift in the way computational models process sequential data. Unlike traditional recurrence-based approaches, such as Recurrent Neural Networks (RNNs) and their Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU) variants, the Transformer is built entirely upon attention mechanisms, eliminating sequential dependency and enabling fully parallel data processing. This innovation allowed for greater computational efficiency and improved scalability in large-scale data scenarios, while mitigating classical issues such as vanishing and exploding gradients in long sequences. The self-attention mechanism enables each element of a sequence to establish direct relationships with all other elements, capturing long-range dependencies and modeling complex contextual interactions in a global manner. The introduction of positional encoding made it possible to preserve order information without relying on recurrent structures, maintaining the semantic integrity of sequences. The initial impact of this architecture was observed in Natural Language Processing (NLP), particularly in tasks such as machine translation, summarization, and text generation, but its application quickly expanded to areas including computer vision, speech recognition, bioinformatics, and multimodal models. Currently, Transformers form the foundation of state-of-the-art large-scale language models and contemporary generative systems. The objective of this study is to analyze the theoretical and mathematical foundations of the Transformer, understand the motivations behind its development, examine its contributions in comparison to previous models, and discuss the scientific and technological impacts resulting from its widespread adoption in modern artificial intelligence.