Joint Learning of Network Topology and Opinion Dynamics Based on Bandit Algorithms

Yu Xing, Xudong Sun, Karl H. JohanssonarXiv 2023

TL;DR

This paper introduces a multi-armed bandit framework to simultaneously infer social network structures and the diverse individual rules governing how opinions evolve. By treating different opinion models as "arms" in a bandit algorithm, the proposed method effectively learns mixed-model dynamics, significantly outperforming standard regression techniques in both topology recovery and opinion prediction.

What Problem Does This Paper Address?

Understanding how opinions spread through a population is a cornerstone of social science and control theory. However, most existing mathematical models make a simplifying—and often unrealistic—assumption: that every agent in a network follows the same update rule. In reality, a network might contain "stubborn" individuals who cling to initial beliefs, "followers" who average their neighbors' views, and "contrarians" who react negatively to certain peers.

The challenge is that the network structure (who influences whom) and the dynamics (how they influence each other) are deeply coupled. If you don't know the rule an agent uses, you can't accurately map their connections; if you don't know their connections, you can't identify their rule. This paper tackles the "joint learning" problem: given only a trajectory of observed opinions over time, can we figure out both the underlying graph and the specific mathematical model each person is using?

Methods

The authors propose a learning algorithm inspired by Automated Machine Learning (AutoML) and Multi-Armed Bandits (MAB).

  1. Candidate Models: They consider four classic opinion dynamics models as "arms":
  2. DeGroot: Simple weighted averaging of neighbors.
  3. Friedkin-Johnsen (FJ): Averaging plus a "stubbornness" factor tied to one's initial opinion.
  4. Repelling Negative (MRP): Includes negative edges where agents move away from the opinions of certain neighbors.
  5. Social Hegselmann-Krause (HK): A bounded-confidence model where agents only listen to those with similar opinions.
  6. The $\epsilon$-Greedy Strategy: The algorithm maintains a "Q-table" for each agent, representing the payoff (inverse validation error) for each model type.
  7. Exploitation: Most of the time, it refines the network estimate using the current best-guess model.
  8. Exploration: With a small probability ($\epsilon$), it tries out a different model or a random tweak to the network topology to see if the validation error drops.
  9. Optimization: For linear-style models (DeGroot, FJ, MRP), the authors use $l_1$-norm minimization to encourage sparsity, reflecting the fact that most people are only influenced by a small fraction of a large network. For the non-linear HK model, they employ a distance-based heuristic to estimate confidence bounds.
  10. Refinement ($\epsilon$-Greedy+): An improved version of the algorithm (Algorithm 9) incorporates physical constraints, such as enforcing that the underlying graph is undirected (if $i$ influences $j$, $j$ influences $i$) to fix inconsistent adjacency estimates.

Datasets

The study relies on synthetic numerical experiments to provide a ground-truth for evaluation.

  • Setup: A network of $n=20$ agents, divided into four groups of five, with each group following one of the four candidate dynamics.
  • Topology: Graphs are generated using the Erdős-Rényi model, ensuring they are sparse and connected.
  • Trajectories: Opinion data is generated for $T=20$ time steps. The data is split into training sets (to fit parameters) and validation sets (to calculate the bandit payoff).

Key Insights and Ideas

  • Dynamics as Hyperparameters: The core "aha" moment is treating the choice of a dynamical model as a discrete hyperparameter that can be optimized using bandit logic.
  • Symmetry as a Regularizer: One of the most effective tweaks was enforcing graph symmetry. In social networks, influence is often mutual; using this assumption helps prune "ghost" connections that appear due to noise or coincidental opinion alignment.
  • Overcoming the Single-Model Bias: By allowing for a mixture of rules, the algorithm avoids the massive errors that occur when, for example, a linear regression (like OLS) tries to fit a highly non-linear bounded-confidence model.

Key Results

The authors compared their bandit approach ($\epsilon$G) against an Initial Estimate (IE), Random Search (RS), Ordinary Least Squares (OLS), Sparse Solutions (SS), and Gaussian Process Regression (GPR).

  • Topology Recovery: As shown in Figure 4, the refined bandit algorithm ($\epsilon$G+) achieves significantly better True Positive Rates (TPR) for network recovery than the baseline methods, especially as the number of samples ($T$) increases.
Fig. 1. Performance of algorithms IE, εG, RS, OLS, and SS for network topology recovery.
  • Prediction Accuracy: The bandit-based methods consistently showed lower Root Mean Square Error (RMSE) in predicting future opinions. As seen in Figure 2, OLS performs the worst because it cannot capture non-linear dynamics, while the bandit methods leverage their "model library" to find the right fit.
Prediction error (RMSE) boxplots for various algorithms

Limitations and Future Work

  • Scalability: The experiments were conducted on a small scale ($n=20$). Scaling this to thousands of agents would require more efficient search strategies than the current $\epsilon$-greedy approach.
  • Fixed Model Library: The algorithm can only select from the four models provided. If the real-world dynamics follow a completely different mathematical structure, the algorithm will only find the "least-bad" fit among its known arms.
  • Real-World Validation: While the numerical results are promising, the authors note that future work should involve testing the algorithm against large-scale empirical datasets from actual social media platforms.

Summary updated

BibTeX
@misc{xing2023joint,
  author = {Yu Xing and Xudong Sun and Karl H. Johansson},
  title = {{Joint Learning of Network Topology and Opinion Dynamics Based on Bandit Algorithms}},
  year = {2023},
  eprint = {2306.15695},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.15695},
}
Figure