Sentiment-Oriented Transformer-Based Variational Autoencoder Network for Live Video Commenting

Fengyi Fu, Shancheng Fang, Weidong Chen, Zhendong Mao

Introduction

Automatic Live Video Commenting (ALVC) is the task of generating real-time, human-like "danmaku" (bullet screen) comments based on video content and existing surrounding comments. This interactive medium is a hallmark of modern live-streaming platforms. However, existing ALVC models face two primary challenges: a lack of diversity in generated comments and an inability to handle the inherent data imbalance in live-streaming datasets, where certain sentiments are underrepresented.

Figure 4: Illustration of the one-to-many nature of live video commenting, where a single video frame elicits diverse emotional reactions from viewers.

As shown in the figure above, a single moment in a video—such as a specific step in an origami tutorial—can trigger a wide spectrum of subjective reactions, ranging from frustration ("So difficult!") to encouragement ("In fact, it's not difficult. Come on!"). Traditional deterministic models struggle to capture this "one-to-many" mapping, often producing generic, objective descriptions instead of varied, sentiment-rich responses.

The So-TVAE Framework

To address these limitations, this research introduces the Sentiment-oriented Transformer-based Variational Autoencoder (So-TVAE). The framework moves beyond standard VAE architectures by incorporating sentiment-aware components and batch-level information sharing.

Architecture Overview

The So-TVAE architecture consists of three core innovations designed to enhance diversity and mitigate data scarcity:

  1. Sentiment-oriented Diversity Encoder: Instead of a single Gaussian distribution, the model utilizes a Gaussian Mixture Model (GMM) in its latent space. Each component of the mixture is tied to a specific sentiment (Positive, Neutral, Negative), allowing the model to sample different latent vectors to generate comments with specific emotional tones.
  2. Sentiment-oriented Random Mask: To prevent the model from over-relying on latent vectors at the expense of video context, a random masking mechanism is employed. This forces the decoder to balance the diversity provided by the latent space with the actual visual and textual cues from the video.
  3. Batch Attention Module: This module addresses data imbalance by exploring relationships between different samples within a training batch. By "borrowing" information from other samples, the model can learn to generate rare sentiments even when they are missing from a specific video's ground truth.
Figure 5: The architecture of the So-TVAE model, highlighting the Transformer Encoder, the GMM-based latent space (N), and the Batch Multi-modal Attention mechanism.

Experimental Results

The model was rigorously evaluated on two large-scale Bilibili datasets, Livebot (895,000 comments) and VideoIC (5.3 million comments), as well as the Netease News dataset for generalization testing.

  • Quantitative Performance: So-TVAE outperformed state-of-the-art models (such as MML-CG and U-Trans) by an average of 26.4% across standard metrics including Recall@k and Mean Rank.
  • Diversity and Human Evaluation: Specialized diversity metrics (BLEU_self) confirmed that So-TVAE produces significantly more varied output than traditional beam-search methods. In blind human evaluations, the model received higher scores for fluency, relevance, and "correctness" (human-likeness).

Conclusion and Future Directions

So-TVAE represents a significant step forward in making AI-generated live comments feel more human and emotionally resonant. By structuring the latent space around sentiment and using batch-level attention, the model successfully captures the diverse reactions typical of live audiences. Future work will focus on incorporating additional modalities, such as audio and on-screen text (OCR), to further refine the model's understanding of a video's specific "vibe" and context.

Summary updated

BibTeX
@article{fu2024sentiment,
  author = {Fengyi Fu and Shancheng Fang and Weidong Chen and Zhendong Mao},
  title = {{Sentiment-Oriented Transformer-Based Variational Autoencoder Network for Live Video Commenting}},
  journal = {ACM Trans. Multim. Comput. Commun. Appl.},
  year = {2024},
  doi = {10.1145/3633334},
}
Figure