Introduction
Generating natural language descriptions from structured data—a task known as Data-to-Text—remains a significant challenge in artificial intelligence. While modern large language models produce fluent text, they frequently "hallucinate" facts, especially when interpreting numerical data like stock market trends. A standard model might observe a stable chart and incorrectly report a "sharp decline."
To address this, researchers have developed TRUCE (TRUth Conditional gEneration). TRUCE mitigates hallucinations by introducing a "logical bottleneck": the model must first identify a mathematically true "program" (e.g., "a peak at the end") before the text generator is allowed to write a caption. This ensures that every generated sentence is factually grounded in the underlying data.
The TRUCE Architecture
The core innovation of TRUCE is its truth-conditional architecture. Unlike traditional encoder-decoder models that map raw numerical signals directly to words—often learning spurious correlations—TRUCE forces the decoder to condition only on a verified latent program.
The framework operates in four distinct stages:
- Module Composition: The system utilizes a library of learnable neural modules.
Patternmodules use 1D convolutions to detect shapes (e.g., peaks, dips, increases), whileLocatemodules use a mixture of Gaussians to identify temporal windows (e.g., "the beginning," "the middle"). - Program Execution: These modules are combined into programs, such as
DecreaseANDMiddle. - Truth Scoring: Each program is executed against the input time series to produce a "soft truth value" between 0 and 1, indicating how well the pattern matches the data.
- Conditioned Generation: The model samples a program that is "true" for the data. The text decoder then generates a caption based only on this program. By hiding the raw, noisy data from the decoder, the model is prevented from hallucinating details not present in the verified program.
Experimental Evaluation
The researchers evaluated TRUCE using two primary datasets: the SYNTH dataset, containing 720 time series with six ground-truth patterns, and the STOCK dataset, comprising 1,900 real-world stock price sequences paired with 5,700 human-written descriptions.
Key Results
The primary metric for success was Correctness (COR), a human-evaluated measure of whether the caption accurately describes the chart.
- Accuracy: On synthetic data, TRUCE achieved 92% correctness, significantly outperforming the best neural baseline (53%). On the noisy STOCK dataset, TRUCE maintained 88.4% correctness, while baselines reached only 65.9%.
- Zero-Shot Generalization: TRUCE demonstrated robust performance on time series of varying lengths. When tested on sequences twice as long as those in the training set, TRUCE's accuracy remained high (97% on SYNTH), whereas baselines struggled to adapt to the new temporal scale.
Discussion and Future Directions
TRUCE's success stems from its interpretability by design. Because the model selects a latent program, users can inspect the specific pattern the AI detected, making the "thought process" transparent. Furthermore, the compositionality of the modules allows the model to learn efficiently; a "peak" module learned in one context can be reused across different timeframes.
However, TRUCE is currently limited by its predefined module library. While it excels at describing trends and peaks, it may struggle with complex financial behaviors that do not fit the pattern + locate template. Future work involves expanding the module library to include complex mathematical operations and more sophisticated temporal logic to capture a wider range of data nuances.
Summary updated