Simulating reinforced sentiment

An interactive illustration of a core finding from my dissertation, Simulating affective information diffusion using natural language in online social networks, constructed from the model's real transition-probability data. Every agent below is a synthetic composite; no agent in this network is representative of a real person.

Beta: a simplified illustration, not the full simulation
For illustration purposes only. This simulation does not predict anyone's real behaviour. It executes a fixed, seeded run of a simplified version of the model. It is animated to depict a live simulation, but does not incorporate randomness or variability: each run executes the same as the last, with the states of the agents always resulting in the same behaviour.

A network of agents

Twelve agents form one connected component (Users 01–12). Three additional agents (Users 13–15, in the corners) are depicted as isolates with no ties: these isolates represent the baseline case, depicting how an agent behaves without any connections. Click one agent to follow its behaviour, or select a second agent to compare a pair of users, then run the simulation to watch every agent's state play out tick by tick. Arrows show who influences whom; an agent can only be reinforced by agents whose arrows point towards it.

How this works

Deterministic versus stochastic. The model used in the initial study is stochastic by design: it takes thousands of runs for a pattern to become reliable, and a single unrepeatable run is closer to noise than to a finding. This demo does not employ randomness on every run execution. Each agent's tick-by-tick path is generated from a fixed seed (2026 + agent_id × 97, one per agent), using the same step-by-step sampling logic the real model uses. Re-running the simulation, reloading the page or rebuilding the site will reproduce the identical run.

The underlying model data. Each agent's chance of transitioning to a new state is determined by a transition-probability table derived from real Twitter data, and split by attribute and current state. For example, an agent diagnosed with depression that is currently positive has a 71.6% chance of staying positive, 10.1% of becoming neutral and 18.3% of becoming negative on its next post (n=454); one that is currently negative is 58.5% negative, 14.2% neutral and 27.3% positive (n=289). Agents not diagnosed have 64.7% positive persistence (n=405) and 64.6% negative persistence (n=384), with the remainder split the same way. Additional criteria to transition are determined by an agent's historical states, their chances of generating a post online, and their posting inactivity.

How reinforcement is shown. Emotional reinforcement is an observed outcome of the study's full simulation: an agent connected to another experiencing the same sentiment state would form a reinforcing dyad that would amplify their existing emotional tendencies. It is an observed phenomenon that emerges from thousands of runs as opposed to being a single parameter in the transition table, so this demo represents it (with a fixed persistence boost). While an agent shares its state with at least one agent that influences it, probability shifts towards staying in that state, using the same proportional-redistribution approach the model uses. The boost is to demonstrate the reinforcement, and is kept modest so it is a fair representation of the actual model's posting probabilities.

One rule specific to this demo. A run of this simulation is only 24 ticks, with each tick representing 24 hours. To keep that short window readable, agent behaviour has been altered to best illustrate reinforcement taking place. Ties are directional, which means that an agent is only reinforced by agents that influence it (an arrow pointing towards it, or a mutual tie). Reinforcement describes the phemenon where an agent that shares its state with an agent that it is connected with can remain in that state for longer; isolated and unreinforced agents therefore tend to change states more frequently compared to reinforced agents.

The network and its agents. The network configuration, comprising variations in connection types (as well as a mix of unidirectional and bidirectional reciprocated ties), attempts to mirror the real network's structure. However, every agent shown is synthetic, with no one-to-one mapping to actual participants.

CONTACT

Kurt Marais

Lecturer | Department of Logistics
Stellenbosch University | Stellenbosch, South Africa
Phone: +27 21 808 3877
Email: maraisk@sun.ac.za

Back to top