CoPE: A Lightweight Complex Positional Encoding
Recent studies have demonstrated the effectiveness of position encoding in transformer architectures. By incorporating positional information, this approach provides essential guidance for modeling dependencies between elements across different sequence positions. We introduce CoPE (a lightweight Complex Positional Encoding), a novel architecture that leverages complex-valued encoding to encode both content and positional information. Our approach replaces traditional positional encodings with complex embeddings where the real part captures semantic content and the imaginary part encodes positional information. We introduce phase-aware attention in the first layer of the transformer model to capture position-dependent patterns, followed by standard attention layers for higher-levels. We show that CoPE doesn't exhibit long term decay and is compatible with linear attention. Experimental evaluation on the GLUE benchmark suggest that our approach achieves superior performance with less computational complexity, compared to RoPE, Sinusoidal and Learned positional encodings.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Improving Machine Learning-Based Robot Self-Collision Checking with Input Positional Encoding
This manuscript investigates the integration of positional encoding -- a technique widely used in computer graphics -- into the input vector of a binary classification model for self-collision detection. The results demo…
Binary ClassificationLightweight Text Classifier using Sinusoidal Positional Encoding
Large and complex models have recently been developed that require many parameters and much time to solve various problems in natural language processing. This paper explores an efficient way to avoid models being too co…
Positiontext-classificationText ClassificationLightWeather: Harnessing Absolute Positional Encoding to Efficient and Scalable Global Weather Forecasting
Recently, Transformers have gained traction in weather forecasting for their capability to capture long-term spatial-temporal correlations. However, their complex architectures result in large parameter counts and extend…
Weather ForecastingFusion Matters: Length-Aware Analysis of Positional-Encoding Fusion in Transformers
Transformers require positional encodings to represent sequence order, yet most prior work focuses on designing new positional encodings rather than examining how positional information is fused with token embeddings. In…
Text ClassificationDyWPE: Signal-Aware Dynamic Wavelet Positional Encoding for Time Series Transformers
Existing positional encoding methods in transformers are fundamentally signal-agnostic, deriving positional information solely from sequence indices while ignoring the underlying signal characteristics. This limitation i…
Time Series Analysis