Abstract
Large Language Models (LLMs) often struggle with semantic grounding—the ability to accurately convey specific intended messages without hallucination or omission. This paper proposes a framework that treats the LLM as part of a semantic auto-encoder. By integrating a semantic parser to verify outputs against original inputs, we introduce sampling and "greedy finetuning" techniques. These methods significantly enhance semantic accuracy, improving Triple F1 scores by up to 11% absolute on the WebNLG 3.0 dataset while maintaining natural language fluency.
Introduction
While modern LLMs demonstrate remarkable fluency, they frequently function as "stochastic parrots," generating text based on statistical patterns rather than a deep understanding of underlying facts. This lack of semantic grounding leads to outputs that may be fluent but factually inconsistent with the intended input. Verifying whether an LLM's output is semantically correct relative to a set of facts remains a significant challenge.
This research addresses the problem by formalizing semantic grounding as a computationally verifiable task. Given a set of data in the form of entity-relationship triples, the goal is to ensure the resulting text contains exactly those facts, no more and no less.
Methodology: The Semantic Auto-encoder
The authors conceptualize the generation process as a closed loop consisting of three stages:
- Input: A set of semantic triples (e.g.,
[Agnes Kant | nationality | Netherlands]). - Language Model (LM): The generator that translates these triples into natural language.
- Semantic Parser (SP): A verifier that extracts triples back out of the generated text.
In a perfectly grounded system, the triples extracted by the parser should be identical to the input triples. To optimize for this, two primary techniques are proposed:
Sampling
Instead of relying on greedy search (selecting the most likely token at each step), the model generates multiple candidate sentences. The semantic parser then scores these candidates based on how well they reconstruct the original input triples. The candidate with the highest F1 score is selected as the final output.
Greedy Finetuning
This optimization approach iteratively updates the LM's parameters to maximize the probability that the semantic parser will correctly reconstruct the input. To handle the non-differentiable nature of discrete text generation, the authors employ a straight-through gradient estimator, allowing backpropagation from the frozen parser back into the language model.
Experimental Setup
The framework was evaluated using the WebNLG 3.0 English dataset, which contains RDF (Resource Description Framework) triples paired with human-written reference sentences. The evaluation included both "seen" categories and "unseen" categories to test the model's generalization capabilities.
Key Results
The proposed methods were benchmarked against a T5-XXL baseline. Results indicate that semantic grounding can be significantly improved without compromising text quality.
As shown in the results, the ensemble method (Greedy Finetuning + Sampling) improved the Triple F1 score by 11% absolute (from 0.54 to 0.65) compared to the greedy baseline. Crucially, fluency metrics remained stable; the baseline BLEU score of 0.54 was nearly maintained at 0.53 by the best-performing ensemble method. Human evaluations corroborated these findings, noting that the "Greedy + Sampling" approach achieved the highest recall of intended facts.
Discussion and Limitations
The "semantic auto-encoder" loop demonstrates that grounding can be a measurable objective. However, several challenges remain:
- Parser Dependency: The system's effectiveness is bottlenecked by the accuracy of the semantic parser.
- Representation Limits: RDF triples may lack the expressiveness required for complex, open-domain natural language.
- Computational Overhead: Greedy finetuning is resource-intensive. Future work may explore parameter-efficient methods like prompt tuning to reduce the cost of inference-time optimization.
Summary updated