Grafy News
Try Grafy free

New GAP architecture merges attention and MLP into one block

A researcher has introduced Gated Attention Projection (GAP), a Transformer alternative that reduces parameter counts by nearly 20% through architectural.

Illustration for the news story: New GAP architecture merges attention and MLP into one blockSource: Reddit ML

A new experimental Transformer architecture aims to improve efficiency by combining the two primary components of standard models into a single operation. According to a report on Reddit ML, a researcher has developed Gated Attention Projection (GAP), which merges attention mechanisms and Multi-Layer Perceptron (MLP) processing into a unified gated block.

In traditional Transformer architectures, attention layers and feed-forward (MLP) sublayers function as separate sequential stages. The GAP approach departs from this convention by integrating these processes, potentially streamlining how the model handles data and reducing the total number of parameters required to achieve comparable results.

How does the GAP architecture work?

Standard Transformers typically rely on a repetitive pattern of alternating attention sublayers and MLP sublayers. The GAP architecture replaces this dual-layer structure with a single gated Transformer block. By merging these two distinct functions—the ability to focus on different parts of a sequence (attention) and the ability to process information through non-linear transformations (MLP)—the model attempts to achieve more efficient computation within a single step. This integration is managed through a gating mechanism that governs how the merged information is projected and processed.

What are the efficiency gains of GAP?

Testing the new architecture against standard Transformers yielded significant differences in parameter density. According to the developer's findings, the model was tested using 100 million scored training tokens from the WikiText-103 dataset.

The results showed that a configuration named GAP20 utilized 19.91% fewer parameters than a standard Transformer. While the researcher noted that a smaller configuration could have reduced parameters by as much as 34.31%, that specific version did not perform as well against the regular Transformer. To balance performance and efficiency, the developer opted to reallocate 14% of the parameter savings back into the model to increase its width, resulting in a final model that maintains approximately 20% fewer parameters than its traditional counterparts.

Why is parameter reduction important in AI?

Reducing the number of parameters in a model is a critical goal for the machine learning community. Fewer parameters generally lead to lower memory requirements and faster inference speeds, making it easier to deploy large-scale models on consumer-grade hardware or edge devices. If a model can maintain high performance while using significantly fewer parameters, it allows for more efficient scaling and potentially lower energy consumption during both training and deployment.

What does this mean for future model development?

While the GAP architecture is currently an experimental development, it highlights a growing interest in moving away from the rigid, standardized block structures that have defined the Transformer era. If architectural innovations can successfully merge processing steps without sacrificing the model's ability to learn complex patterns, it could lead to a new generation of highly optimized, "dense" models that provide more intelligence per parameter. This type of research is essential for making advanced AI more accessible and computationally sustainable.

How can researchers explore new AI papers?

As new architectural concepts like GAP emerge from community discussions and research papers, staying updated requires efficient reading tools. Researchers can use Grafy Reader to upload new technical papers or PDFs related to transformer optimizations. This allows users to search through dense academic text, ask specific questions about architectural changes, and quickly synthesize the implications of new findings in machine learning.

Frequently asked questions

What is the main difference between GAP and a standard Transformer?

A standard Transformer uses separate, sequential sublayers for attention and MLP processing. In contrast, the GAP architecture merges these two distinct components into a single gated Transformer block, aiming to streamline the processing of information within the model.

How many parameters does the GAP20 model use compared to standard models?

The GAP20 model uses approximately 19.91% fewer parameters than a standard Transformer. This reduction was achieved by balancing the savings from the merged architecture with additional width to ensure the model maintained competitive performance levels.

How was the GAP architecture tested?

The researcher tested the GAP architecture against a standard Transformer using 100 million scored training tokens from the WikiText-103 dataset. This testing provided the empirical data used to compare the parameter efficiency and performance of the new gated block structure.

Source: https://www.reddit.com/r/MachineLearning/comments/1xr47tw/i_merged_attention_and_mlp_processing_into_a/


Source: Reddit ML — I merged attention and MLP processing into a single gated Transformer block. GAP [R]