  Two complementary mechanisms are thought to shape social groups: homophily
between agents and structural balance in connected triads. Here we consider $N$
fully connected agents, where each agent has $G$ underlying attributes, and the
similarity between agents in attribute space (i.e., homophily) is used to
determine the link weight between them. To incorporate structural balance we
use a triad-updating rule where only one attribute of one agent is changed
intentionally in each update, but this also leads to accidental changes in link
weights and even link polarities. The link weight dynamics in the limit of
large $G$ is described by a Fokker-Planck equation from which the conditions
for a phase transition to a fully balanced state with all links positive can be
obtained. This "paradise state" of global cooperation is, however, difficult to
achieve requiring $G > O(N^2)$ and $p>0.5$, where the parameter $p$ captures a
willingness to consensus. Allowing edge weights to be a consequence of
attributes naturally captures homophily and reveals that many real-world social
systems would have a subcritical number of attributes necessary to achieve
structural balance.
