  The voter model is an archetypal stochastic process that represents opinion
dynamics. In each update, one agent is chosen uniformly at random. The selected
agent then copies the current opinion of a randomly selected neighbour. We
investigate the voter model on a network with an exogenous community structure:
two cliques (i.e. complete subgraphs) randomly linked by $X$ interclique edges.
We show that, counterintuitively, the mean consensus time is typically not a
monotonically decreasing function of $X$. Cliques of fixed proportions with
opposite initial opinions reach a consensus, on average, most quickly if $X$
scales as $N^{3/2}$, where $N$ is the number of agents in the network. Hence,
to accelerate a consensus between cliques, agents should connect to more
members in the other clique as $N$ increases but not to the extent that cliques
lose their identity as distinct communities. We support our numerical results
with an equation-based analysis. By interpolating between two asymptotic
heterogeneous mean-field approximations, we obtain an equation for the mean
consensus time that is in excellent agreement with simulations for all values
of $X$.
