Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Models
Zhao, Yida, Lou, Chao, Tu, Kewei
–arXiv.org Artificial Intelligence
Syntactic Transformer language models aim to achieve better generalization through simultaneously modeling syntax trees and sentences. While prior work has been focusing on adding constituency-based structures to Transformers, we introduce Dependency Transformer Grammars (DTGs), a new class of Transformer language model with explicit dependency-based inductive bias. DTGs simulate dependency transition systems with constrained attention patterns by modifying attention masks, incorporate the stack information through relative positional encoding, and augment dependency arc representation with a combination of token embeddings and operation embeddings. When trained on a dataset of sentences annotated with dependency trees, DTGs achieve better generalization while maintaining comparable perplexity with Transformer language model baselines. DTGs also outperform recent constituency-based models, showing that dependency can better guide Transformer language models. Our code is released at https://github.com/zhaoyd1/Dep_Transformer_Grammars.
arXiv.org Artificial Intelligence
Jul-24-2024
- Country:
- Asia
- Europe
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Czechia > Prague (0.04)
- Denmark > Capital Region
- Copenhagen (0.04)
- France > Grand Est
- Meurthe-et-Moselle > Nancy (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Italy > Tuscany
- Florence (0.04)
- Spain
- Catalonia > Barcelona Province
- Barcelona (0.04)
- Galicia > Madrid (0.04)
- Catalonia > Barcelona Province
- United Kingdom
- England > Greater Manchester
- Manchester (0.04)
- Scotland > City of Edinburgh
- Edinburgh (0.04)
- England > Greater Manchester
- Belgium > Brussels-Capital Region
- North America
- Canada > Ontario
- Toronto (0.04)
- United States
- California
- San Diego County > San Diego (0.04)
- San Francisco County > San Francisco (0.14)
- Maryland > Baltimore (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Oregon > Multnomah County
- Portland (0.04)
- Texas > Travis County
- Austin (0.04)
- Washington > King County
- Seattle (0.04)
- California
- Canada > Ontario
- Oceania > Australia
- Genre:
- Research Report (1.00)
- Technology: