Beyond Text: Topic Modeling on Two-Mode Networks
Topic modeling has long been regarded as one of the most representative tools in text analysis. By examining the co-occurrence of words within documents, it uncovers latent topics and has become one of the most widely used techniques in data science and natural language processing.
But should topic modeling be confined only to text? What if you push beyond that boundary and apply it to network data? And how would it differ from community analysis, which is commonly used in social network analysis to classify nodes into groups?
In this article, I introduce an experiment where topic modeling was applied not to traditional Bag-of-Words data, but to a two-mode (bipartite) network. Furthermore, I explore how this approach provides a different perspective compared to community analysis, which is widely used to classify similar nodes.
Data
The dataset used for this analysis comes from Davis, Gardner, and Gardner’s 1941 Deep South study. It records the participation of 18 women in 14 different events—including social club meetings, church activities, and small gatherings—over a period of about nine months. In the study, the researchers modeled the women and the events as two distinct sets of nodes, linking them through participation. This produced a two-mode (bipartite) network that allowed them to examine the underlying social structures and patterns of relationships.
* Source: Davis, A., Gardner, B. B., & Gardner, M. R. (1941). Deep South: A social anthropological study of caste and class. Chicago: The University of Chicago Press.
Below is the visualization generated in NetMiner.
Light blue nodes represent the women, gray nodes represent the events, and the connecting lines indicate participation between them.
Groups with Similar Event Participation: LDA
1. Topic Modeling: LDA
NetMiner’s topic modeling (LDA) feature can be applied not only to unstructured text data but also to two-mode networks.
In this case, I applied LDA to the women–event participation two-mode network, setting the number of topics (k) to 2 so that the women would be divided into two groups.
LDA identifies latent topics based on the patterns of which events each woman attended, grouping together women with similar participation patterns.
<Result: Main Report>
Topic Info: Top 5 representative women for each group
Documentation Classification Statistics: Number of events associated with each group
(When analyzing unstructured text, Topic Info presents keywords for each topic, and Documentation Classification Statistics shows the number of documents classified per topic.)
When dividing the 18 women into two groups with LDA, the representative members of each group were as follows:
Group 1: Nora, Katherine, Sylvia, Helen, Myra
Group 2: Theresa, Evelyn, Brenda, Laura, Frances
These women repeatedly participated in similar types of events, making them the clearest representatives of their respective groups (topics). In contrast, women distributed more evenly across topics tended to participate in both groups’ events, showing less distinct affiliation with a single group.
I highlighted these representative women in the two-mode network visualization. Seeing them placed directly on the graph makes the latent patterns uncovered by LDA feel much more intuitive.
<Result: [T] Word Distribution Over Topic>
NetMiner’s [T] Word Distribution Over Topic normally shows the distribution of words across topics. However, since our input data is a women–event two-mode network, the output displays women (nodes) instead of words.
In other words, this result shows the probability of each woman belonging to one of the two groups (topics). It can be understood as a compressed, low-dimensional representation of each individual’s event participation pattern—a kind of profile summarizing her participation tendencies.
2. Clustering Women with Similar Profiles: k-Means
Next, to take a more quantitative approach, I applied k-means clustering using each woman’s topic distribution as input.
This allowed us to identify groups of women with similar participation patterns in a systematic way.
The [T] Word Distribution Over Topic results were saved as analysis data in NetMiner (via Add To Dataset > Node Attribute).
Once added, this data could be reused as input for another analysis.
The 18 women were divided into 6 clusters based on their event participation patterns using k-Means.
I then added the clustering results back into the dataset and visualized them on the women–event two-mode network, coloring each woman by cluster.
The outcome clearly shows that women who participated in very similar sets of events were grouped into the same cluster.
(The light-blue nodes represent women whose participation patterns were not distinctive enough, effectively left unclassified.)
Identifying Communities
As a side analysis, I also built a women–women network based on their event participation similarity, and divided it into communities (cohesive groups).
How does this differ from the clusters generated by LDA, which was based on participation patterns?
☞ What’s the difference between clustering and community detection?
Clustering groups nodes by their attributes (e.g., age, residence), focusing on similar patterns of individual characteristics.
Community detection, on the other hand, looks at the network structure itself to find groups of nodes that are tightly connected.
In short, clustering is attribute-based classification, while community detection is relationship-based classification.
First, I performed mode projection to convert the women–event two-mode network into a women–women one-mode network.
In this network, the thickness of each edge represents how often two women attended the same events.
I applied the Community(Louvain) algorithm to detect groups that were densely connected.
The analysis revealed two cohesive groups, which are visualized in the figure below with distinct colors.
Conclusion
In this article, I applied topic modeling (LDA)—traditionally used for text analysis—to a two-mode network dataset, and compared its results with k-means clustering and community detection.
Topic modeling compressed each individual’s event participation patterns into a low-dimensional representation, effectively profiling people with similar tendencies.
k-means clustering used these topic distributions to quantitatively divide individuals into groups, making differences in participation patterns more explicit.
Community detection focused on the network structure itself, identifying tightly connected cohesive groups and providing yet another perspective.
Sometimes, stepping away from familiar methods leads to fresh insights.
By applying new analytical approaches to real-world two-mode network data, you may discover entirely different stories hidden within what once seemed obvious.










