Optimizing the Learnable RoPE Theta Parameter in Transformers
Rotary Position Embedding (RoPE) enhances Transformer models by encoding relative positions through a frequency parameter <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\theta $ </tex-math></inline-formula>, but conventional implementations fix <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\theta $ </tex-math></inline-formula>, constraining adaptability. We conduct the first systematic study of learnable RoPE <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\theta $ </tex-math></inline-formula>, introducing four optimization strategies—separate learning rates, layer-wise initialization, cosine annealing scheduling, and sigmoid-based constraints—to stabilize and refine positional learning. Our approach demonstrates modest but consistent benefits across multiple datasets including Tiny Shakespeare, WikiText-103, and IWSLT’14, achieving measurable gains in validation loss, perplexity, and BLEU scores relative to a fixed-<inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\theta $ </tex-math></inline-formula> baseline while maintaining high inference throughput and requiring minimal architectural modifications. Ablation experiments quantify each strategy’s contribution and offer practical integration guidelines. This adaptive position encoding framework provides a foundation for large-scale pretraining and diverse sequence modeling applications.
Authors
- Musheng Chen (ORCID: https://orcid.org/0000-0001-6491-3632)
- Zhigao Huang (ORCID: https://orcid.org/0000-0002-3836-6986)
Institutions
- Quanzhou Normal University (CN)
Publication Details
- Journal
- IEEE Access
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/access.2025.3590604
- Citations
- 3
- Primary Topic
- Non-Destructive Testing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.14