Advancing Opinion Dynamics Modeling with Neural Diffusion-Convection-Reaction Equation

Chenghua Gong, Yihang Jiang, Hao Li, Rui Sun, Juyuan Zhang, Tianjun Gu, Liming Pan, Linyuan LüarXiv 2026

TL;DR

The authors introduce Opinn, a physics-informed neural framework that models social opinion evolution by mapping it to a physical Diffusion-Convection-Reaction (DCR) system. By embedding these physical principles directly into a Neural Ordinary Differential Equation (Neural ODE) architecture, Opinn bridges the gap between oversimplified sociological models and black-box deep learning, achieving state-of-the-art forecasting accuracy on both real-world and synthetic datasets.

What Problem Does This Paper Address?

Understanding and predicting how opinions evolve on social media is crucial for tackling polarization, monitoring public sentiment, and ensuring digital security. Currently, researchers use two main approaches:

  1. Mechanical models (like DeGroot or Hegselmann-Krause): These use explicit mathematical rules to describe how people influence each other. While highly interpretable, they are far too simple to capture volatile, real-world human behavior.
  2. Data-driven models (like GNNs and Transformers): These excel at finding patterns in data but act as uninterpretable "black boxes" that can easily fail when data is noisy or sparse.

Recently, researchers have tried using Physics-Informed Neural Networks (PINNs) to combine the best of both worlds. However, existing PINN approaches suffer from two major flaws: they use incomplete physical priors (ignoring the interplay between local, global, and internal factors), and they enforce physical rules using soft penalty terms in the loss function. This soft enforcement often leads to "gradient pathology," where the network struggles to balance data accuracy with physical constraints during optimization.

Methods

Figure 3: The overall architecture of Opinn comprises three core components: (1) an encoder to map the observed user opinions into latent system states; (2) a neural dynamics module to model the trajectory of opinion dynamical system; and (3) a decoder to generate opinion predictions by integrating neural representations with dynamical priors.

Opinn addresses these challenges by framing opinion dynamics through the lens of interacting particle theory using a Diffusion-Convection-Reaction (DCR) system. The authors elegantly map real-world social behaviors to three distinct physical processes:

  • Diffusion (Local Assimilation): Models how individuals gradually align their opinions with their immediate social circle (local consensus).
  • Convection (Global Drift): Models directional opinion shifts driven by macro-level forces, such as external policy interventions or algorithmic recommendations.
  • Reaction (Endogenous Shifts): Models internal cognitive changes, such as individual stubbornness or independent ideological shifts.

Instead of adding these physical laws as soft penalties in the loss function, Opinn builds them directly into the network's architecture using Neural ODEs.

As shown in Figure 3, the framework consists of:

  1. An Encoder (GRU): Maps historical user opinions into a latent space.
  2. A Neural Dynamics Module: Parameterizes the DCR components using graph convolutions (for diffusion) and a customized attention mechanism (for convection). It uses learnable gating weights ($\omega$ and $\delta$) to adaptively balance the three physical forces.
  3. A Decoder (MLP): Projects the integrated physical-neural states back to predict future opinion values.

Datasets

The framework was evaluated on two types of datasets:

  • Real-World Datasets: Four datasets collected from X (Twitter) and Weibo covering major public events: Delhi Election, U.S. Election, Israel-Palestine, and COVID-19. Stances were quantified on a continuous scale from -1 (negative) to +1 (positive) using GPT-3.5 with chain-of-thought prompting, verified by human auditors.
  • Synthetic Datasets: Three simulated datasets (Syn-Consensus, Syn-Polarization, and Syn-Clustering) generated using a scale-free network structure to test the model's ability to capture distinct evolutionary archetypes.

Key Insights and Ideas

  • The DCR Unified Field Theory for Opinions: The paper provides a beautiful theoretical bridge showing that classical sociological models are actually special, isolated cases of the DCR system. For instance, the DeGroot model simplifies to pure uniform diffusion, the Hegselmann-Krause model acts as selective convection, and the Friedkin-Johnsen model operates as a basic reaction-diffusion process.
  • Hard Constraints > Soft Penalties: By embedding the DCR system directly into the vector field of a Neural ODE, the model guarantees that the latent representations strictly preserve physical semantics. This completely bypasses the optimization pathologies that plague standard penalty-based PINNs.
  • Mechanistic Interpretability via Gating: The learnable coefficients ($\omega, \delta$) act as a window into the dataset's underlying sociology. For example, the model learned higher reaction weights for real-world datasets than synthetic ones, quantitatively proving that real human internal dynamics are far more complex than simulated stubbornness.

Key Results

Opinn consistently outperformed 16 representative baselines (including mechanical models, pure deep learning models like iTransformer, and other PINN frameworks):

  • Forecasting Accuracy: Opinn achieved state-of-the-art performance across all horizons (30 and 60 time steps). Notably, it achieved an 8.62% reduction in Mean Absolute Error (MAE) over the best-performing baseline on the highly volatile Israel-Palestine dataset.
  • Few-Shot Generalization: When trained on only 30% of the data, Opinn maintained a significant performance edge over purely data-driven models, proving that its physical inductive biases make it highly data-efficient.
  • Ablation Verification: Removing any single component (diffusion, convection, or reaction) led to a drop in performance, confirming that all three physical dimensions are necessary to model real-world social dynamics accurately.

Limitations and Future Work

  • Feature Limitations: The model currently only considers opinion values over time. It does not incorporate richer user attributes like demographics (age, gender) or personal interest profiles.
  • Computational Bottleneck: The global convection component relies on an attention mechanism that scales quadratically ($O(N^2)$) with the number of users. This limits the model's direct scalability to massive, population-scale social networks without employing subgraph sampling or linearized attention variants.
  • LLM Dependency: The reliance on LLMs for initial opinion annotation introduces potential biases inherent to the language models themselves.

Summary updated

BibTeX
@misc{gong2026advancing,
  author = {Chenghua Gong and Yihang Jiang and Hao Li and Rui Sun and Juyuan Zhang and Tianjun Gu and Liming Pan and Linyuan Lü},
  title = {{Advancing Opinion Dynamics Modeling with Neural Diffusion-Convection-Reaction Equation}},
  year = {2026},
  eprint = {2602.05403},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05403},
}
Figure