SAFT: Structure-Aware Fine-Tuning of LLMs for AMR-to-Text Generation
Rafiq Kamel, Filippo Guerranti, Simon Geisler, Stephan Günnemann
TL;DR
This paper introduces SAFT, a lightweight, architecture-agnostic method to inject graph structure into decoder-only LLMs for AMR-to-text generation. By transforming AMR graphs into semantically-preserving graphs and deriving AmrPEs from the magnetic Laplacian, SAFT injects structure-aware guidance directly into input embeddings during fine-tuning. Empirically, SAFT achieves state-of-the-art results on AMR 3.0, with notable advantages on structurally complex and document-level inputs, and demonstrates that the benefits scale with graph complexity while maintaining modest computational overhead. The approach offers a general pathway for bridging structured data and language models, with potential extensions to other graph-structured inputs beyond AMR.
Abstract
Large Language Models (LLMs) are increasingly applied to tasks involving structured inputs such as graphs. Abstract Meaning Representations (AMRs), which encode rich semantics as directed graphs, offer a rigorous testbed for evaluating LLMs on text generation from such structures. Yet, current methods often arbitrarily linearize AMRs, discarding key structural cues, or rely on architectures incompatible with standard LLMs. We introduce SAFT, a structure-aware fine-tuning approach that injects graph topology into pretrained LLMs without architectural changes. We compute direction-sensitive positional encodings from the magnetic Laplacian of transformed AMRs and project them into the embedding space of the LLM. While possibly applicable to any graph-structured inputs, we focus on AMR-to-text generation as a representative and challenging benchmark. SAFT sets a new state-of-the-art on AMR 3.0 with a 3.5 BLEU improvement over baselines. Gains scale with graph complexity, highlighting the value of structure-aware representations in enhancing LLM performance. SAFT offers a general and effective pathway for bridging structured data and language models.
