Measuring similarity in co-occurrence data using ego-networks

Xiaomeng Wang, Yijun Ran, Tao Jia · DOI

Abstract

The co-occurrence association is widely observed in many empirical data. Mining the information in co-occurrence data is essential for advancing our understanding of systems such as social networks, ecosystems, and brain networks. Measuring similarity of entities is one of the important tasks, which can usually be achieved using a network-based approach. Here we show that traditional methods based on the aggregated network can bring unwanted indirect relationships. To cope with this issue, we propose a similarity measure based on the ego network of each entity, which effectively considers the change of an entity's centrality from one ego network to another. The index proposed is easy to calculate and has a clear physical meaning. Using two different datasets, we compare the new index with other existing ones. We find that the new index outperforms the traditional network-based similarity measures, and it can sometimes surpass the embedding method. Meanwhile, the measure by the new index is weakly correlated with those by other methods, hence providing a different dimension to quantify similarities in co-occurrence data. Altogether, our work makes an extension in the network-based similarity measure and can be potentially applied in several related tasks.

The Challenge of Co-occurrence Data

In fields ranging from social media tagging to brain mapping, researchers frequently encounter co-occurrence data: instances where multiple entities appear together, such as several tags on a single Stack Overflow question or multiple authors on a research paper. Traditionally, these datasets are analyzed by constructing an aggregated network. In this model, every entity in a group is connected to every other entity, forming a "clique."

However, aggregated networks are inherently noisy. They often generate "indirect associations" or transitive noise. For example, if Tag A frequently appears with Tag B, and Tag B frequently appears with Tag C, an aggregated network might suggest Tag A and Tag C are highly similar, even if they represent completely different technologies that never actually co-occur. This noise degrades the performance of standard similarity measures like Jaccard or Cosine similarity, leading to inaccurate community detection and poor recommendations.

Methodology: From Aggregated to Ego-Networks

To address the limitations of global aggregated networks, this research proposes a shift toward local ego-networks. The process involves two primary steps:

  1. Ego-Network Construction: For any given entity (the "ego"), the dataset is filtered to include only the instances where that specific entity appears. This creates a sub-network consisting solely of its direct "alters," effectively pruning the transitive noise found in the broader aggregated graph.
  2. The $\sigma_{ego}$ Index: A new similarity index is defined to calculate common neighbors within the specific context of the ego-network. Unlike global metrics, this approach considers how an entity's centrality changes from one local context to another.
Figure 2: Comparison between the construction of a complete aggregated network and a filtered ego-network for node 'a'.

To ensure the metric is not biased by "hubs" (highly popular entities), a global correction factor is applied based on the total number of nodes and the global degree of the target node. This algorithm remains computationally efficient, sharing the same complexity as simple common-neighbor counts, making it faster and more interpretable than high-dimensional deep-learning embeddings.

Empirical Evaluation

The study evaluates the $\sigma_{ego}$ metric using two large-scale, real-world datasets:

  • SOFData (Stack Overflow): Comprising over 5 million questions and 45,000 programming terms, used to test technology clustering (e.g., "java" and "jdbc").
  • PACSData (Physics and Astronomy Classification Scheme): Data from American Physical Society journals, providing a hierarchical ground truth to verify if the metric identifies similar physics topics based on official classifications.

Key Results and Performance

The proposed $\sigma_{ego}$ index consistently outperformed traditional network-based metrics and rivaled advanced embedding methods. In relationship prediction on the Stack Overflow dataset, $\sigma_{ego}$ achieved an AUC of 0.953, significantly surpassing word2vec (0.849) and the Jaccard index (0.577).

Figure 5: Precision comparison across different values of k for the Stack Overflow (a) and PACS (b) datasets. The ego-network approach (pink line) shows high precision compared to traditional metrics.

Beyond raw prediction accuracy, the metric proved superior in clustering tasks. While traditional measures like Jaccard similarity often lump mainstream languages into a single "messy" cluster, $\sigma_{ego}$ successfully separated them into logical sub-groups, such as web development versus database management. Furthermore, the researchers found that $\sigma_{ego}$ is only weakly correlated with existing measures, suggesting it captures a fundamentally different dimension of similarity that other tools overlook.

Conclusion

By focusing on the topological structure of local ego-networks rather than global aggregated weights, the $\sigma_{ego}$ index provides a robust and efficient way to prune redundant information in co-occurrence data. This method offers a powerful alternative for similarity measurement in complex systems, with potential applications spanning social network analysis, ecology, and beyond.

Summary updated

Abstract

The co-occurrence association is widely observed in many empirical data. Mining the information in co-occurrence data is essential for advancing our understanding of systems such as social networks, ecosystem, and brain network. Measuring similarity of entities is one of the important tasks, which can usually be achieved using a network-based approach. Here we show that traditional methods based on the aggregated network can bring unwanted in-directed relationship. To cope with this issue, we propose a similarity measure based on the ego network of each entity, which effectively considers the change of an entity's centrality from one ego network to another. The index proposed is easy to calculate and has a clear physical meaning. Using two different data sets, we compare the new index with other existing ones. We find that the new index outperforms the traditional network-based similarity measures, and it can sometimes surpass the embedding method. In the meanwhile, the measure by the new index is weakly correlated with those by other methods, hence providing a different dimension to quantify similarities in co-occurrence data. Altogether, our work makes an extension in the network-based similarity measure and can be potentially applied in several related tasks.
BibTeX
@article{wang2020measuring,
  author = {Xiaomeng Wang and Yijun Ran and Tao Jia},
  title = {{Measuring similarity in co-occurrence data using ego-networks}},
  journal = {Chaos: An Interdisciplinary Journal of Nonlinear Science},
  year = {2020},
  url = {https://openreview.net/forum?id=U6esgQkj3B},
}
Figure