  Homophily is the seemingly ubiquitous tendency for people to connect and
interact with other individuals who are similar to them. This is a
well-documented principle and is fundamental for how society organizes.
Although many social interactions occur in groups, homophily has traditionally
been measured using a graph model, which only accounts for pairwise
interactions involving two individuals. Here, we develop a framework using
hypergraphs to quantify homophily from group interactions. This reveals natural
patterns of group homophily that appear with gender in scientific collaboration
and political affiliation in legislative bill co-sponsorship, and also reveals
distinctive gender distributions in group photographs, all of which cannot be
fully captured by pairwise measures. At the same time, we show that seemingly
natural ways to define group homophily are combinatorially impossible. This
reveals important pitfalls to avoid when defining and interpreting notions of
group homophily, as higher-order homophily patterns are governed by
combinatorial constraints that are independent of human behavior but are easily
overlooked.
