BBScoreV2: Learning Time-Evolution and Latent Alignment from Stochastic Representation

Tianhao Zhang, Zhecheng Sheng, Zhexiao Lin, Chen Jiang, Dongyeop Kang

TL;DR

This paper introduces BBScoreV2, a novel evaluation metric for long text sequences that leverages stochastic representations to capture both temporal and structural information. By modeling text as a Brownian bridge process, BBScoreV2 offers a more robust and flexible way to assess text coherence and distinguish human-written text from AI-generated content.

What Problem Does This Paper Address?

Evaluating the quality of long text generated by models is a significant challenge. While autoregressive models are good at generating text, understanding and quantifying its coherence, temporal flow, and structural integrity remains difficult. Existing methods often struggle with capturing these nuances, especially when dealing with varying text lengths or when trying to generalize across different domains. The paper aims to bridge this gap by developing a metric that can effectively encode and evaluate the time-dependent and structural properties of text, moving beyond simple pairwise comparisons or domain-specific heuristics.

Methods

The core of this work lies in the development of BBScoreV2, a likelihood-based evaluation metric. The authors propose using a Brownian bridge (BB) process to model the latent representations of text sequences. Here's a breakdown of their approach:

  • Stochastic Representation: They leverage pre-trained language models (like GPT-2, LLaMA3) to obtain token embeddings. These embeddings are then passed through a multi-layer perceptron (MLP) to map them into a latent space. The key insight is that by optimizing for a stochastic objective, these latent representations, which might initially be unordered, can be structured to reflect the temporal evolution of the text.
  • Brownian Bridge (BB) Process: The BB process is a stochastic process that starts and ends at fixed points. The authors model the sequence of latent representations as a path within this BB process. This allows them to capture the "time-evolution" of the text.
  • BBScoreV2 Metric: This metric is derived from the likelihood of a sequence under the learned BB model. It considers both the temporal dependencies (how the sequence evolves over time) and structural dependencies (correlations between different dimensions of the latent representation) captured by the BB process. A lower BBScoreV2 indicates a less likely sequence under the model, suggesting lower coherence or structure.
  • Encoder Training: The MLP encoder is trained using a contrastive learning (CL) loss. This loss encourages the encoder to learn latent representations that can differentiate between positive and negative samples, effectively learning the underlying stochastic process.

Datasets

The paper uses several datasets for training and evaluation:

  • WikiSection: A dataset of Wikipedia articles about cities, used for training and evaluating the encoder and BBScoreV2. It contains 2165 articles for training and 658 for testing.
  • WikiText: A much larger dataset of verified Wikipedia articles, used for training the encoder in out-of-domain (O.O.D.) settings.
  • HC3 (Human ChatGPT Comparison Corpus): Used for human-AI discrimination tasks. It contains comparative answers from humans and ChatGPT. The authors use it in both Q&A and answer-only settings.
  • Mixed Shuffle Test: A novel benchmark introduced by the authors, which extends the standard shuffle task. It compares shuffled articles against shuffled articles drawn from the entire dataset, making it more robust and challenging.

Key Insights and Ideas

  • Unordered to Ordered Latent Space: Raw language model embeddings, even for shuffled text, tend to form clusters. However, they don't inherently encode temporal information. The proposed MLP encoder, trained with a stochastic objective, can effectively structure these embeddings into temporally ordered latent trajectories.
  • BBScoreV2's Dual Nature: The metric's strength lies in its ability to capture both temporal progression and structural relationships within the latent space. This dual focus is crucial for a comprehensive understanding of text coherence.
  • Length-Insensitive Evaluation: A significant advantage of BBScoreV2 is its ability to compare articles of different lengths, a limitation of many existing coherence evaluation methods.
  • Domain-Generalizability: The method shows robustness in out-of-domain settings, suggesting that the learned temporal and structural patterns are fundamental and generalize well.
  • Human vs. AI Text Distinction: The learned stochastic representations can effectively distinguish between human-written and AI-generated text, indicating that AI-generated text may exhibit different temporal and structural dynamics.

Key Results

  • Coherence Evaluation: BBScoreV2 significantly outperforms existing methods (like BBScore, Entity Grid, Unified Coherence) on global discrimination and shuffle tasks, especially with larger block shuffling sizes. For instance, on the Mixed Shuffle Task, BBScoreV2 consistently surpasses SOTA methods.
  • Human-AI Discrimination: BBScoreV2 achieves competitive accuracy in distinguishing human-written text from AI-generated text (e.g., ChatGPT). In one setting, BBScoreV2 achieved 70.67% accuracy, outperforming BBScore (37.53%) and even DetectGPT (which requires more inferences for comparable accuracy).
  • Computational Efficiency: BBScoreV2 exhibits a quadratic relationship between article length and computation time (theoretically O(T^2)), with processing each article taking approximately ~10^-3 seconds, making it feasible for real-time applications.
  • LM Backbone Impact: While larger language models (LLaMA3) generally perform well, the MLP module plays a crucial role in shaping the stochastic representation, and sometimes smaller models like GPT2 (124M) can outperform larger ones in specific tasks.

Limitations and Future Work

  • Human Preference Evaluation: The current study lacks evaluation against human judgment, which is a key limitation for assessing alignment with human perception of coherence.
  • Limited Datasets for AI Discrimination: The human-AI discrimination task was not evaluated on a broader range of datasets, limiting the generalizability of these findings.
  • Computational Resources: The authors acknowledge that limited computational resources prevented more extensive comparisons.

Future work suggested includes:

  • Large-scale human evaluation to validate BBScoreV2's alignment with human judgment.
  • Extending BBScoreV2 to more diverse domains and tasks like domain identification.
  • Exploiting its length-insensitivity for generative models that maintain semantic coherence across varying lengths.
  • Exploring more expressive bridge processes (beyond Brownian bridge) to enhance representational capacity for richer downstream analysis and generation.

Summary updated

BibTeX
@inproceedings{zhang2025bbscorev,
  author = {Tianhao Zhang and Zhecheng Sheng and Zhexiao Lin and Chen Jiang and Dongyeop Kang},
  title = {{BBScoreV2: Learning Time-Evolution and Latent Alignment from Stochastic Representation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=lTPgh8zwJ8},
}
Figure