Spectraformer: A Unified Random Feature Framework for Transformer
Nguyen, Duke, Joshi, Aditya, Salim, Flora
–arXiv.org Artificial Intelligence
Linearization of attention using various kernel approximation and kernel learning techniques has shown promise. Past methods use a subset of combinations of component functions and weight matrices within the random features paradigm. We identify the need for a systematic comparison of different combinations of weight matrix and component functions for attention learning in Transformer. In this work, we introduce Spectraformer, a unified framework for approximating and learning the kernel function in linearized attention of the Transformer. We experiment with broad classes of component functions and weight matrices for three textual tasks in the LRA benchmark. Our experimentation with multiple combinations of component functions and weight matrices leads us to a novel combination with 23.4% faster training time and 25.2% lower memory consumption over the previous SOTA random feature Transformer, while maintaining the performance, as compared to the Original Transformer. Our code is available at: https://github.com/dukeraphaelng/spectraformer .
arXiv.org Artificial Intelligence
May-29-2024
- Country:
- South America > Chile
- Oceania > Australia
- New South Wales (0.04)
- Victoria > Melbourne (0.04)
- North America > United States
- New York > New York County
- New York City (0.14)
- New Jersey > Mercer County
- Princeton (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Georgia > Fulton County
- Atlanta (0.04)
- California
- San Francisco County > San Francisco (0.14)
- San Diego County > San Diego (0.04)
- New York > New York County
- Europe
- Spain > Andalusia
- Cádiz Province > Cadiz (0.04)
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Spain > Andalusia
- Asia
- China > Hong Kong (0.04)
- Middle East
- Genre:
- Research Report (1.00)
- Technology: