Measuring similarity in co-occurrence data using ego-networks

Xiaomeng Wang, Yijun Ran, Tao Jia

TL;DR

Researchers have developed a new similarity measure for co-occurrence data (like tags on a post or authors on a paper) that uses "ego-networks" to filter out the noise of indirect associations. This new index, $\sigma_{ego}$, consistently outperforms traditional network-based metrics and even rivals deep-learning embeddings like word2vec in tasks like term clustering and relationship prediction.

What Problem Does This Paper Address?

In many fields—from social media tagging to brain mapping—we deal with co-occurrence data: instances where multiple entities appear together (e.g., several tags on one Stack Overflow question). Traditionally, researchers analyze this by building an aggregated network, where every entity in a group is connected to every other entity, forming a "clique."

The problem? Aggregated networks are noisy. They often create "indirect associations." 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 "transitive noise" degrades the performance of standard similarity measures like Jaccard or Cosine similarity, leading to poor recommendations or inaccurate community detection.

Methods

The authors propose a shift from global aggregated networks to local ego-networks.

  1. Ego-Network Construction: For any given entity (the "ego"), the researchers filter the dataset to include only the instances where that specific entity appears. This creates a sub-network of its direct "alters."
  2. The $\sigma_{ego}$ Index: They define a new similarity index that calculates how many common neighbors two nodes share within the context of the ego-network, rather than the whole graph.
  3. Global Correction: To ensure the metric isn't biased by "hubs" (entities that are popular everywhere), they include a normalization factor based on the total number of nodes in the system ($|V|$) and the global degree of the target node.

The resulting algorithm is computationally efficient—it has the same complexity as simple common-neighbor counts—making it much faster and more interpretable than training high-dimensional embeddings.

Datasets

The study evaluates the new metric using two large-scale, real-world datasets:

  • SOFData (Stack Overflow): Over 5 million questions and 45,000 programming terms. This dataset is used to see how well the metric can cluster related technologies (e.g., "java" and "jdbc").
  • PACSData (Physics and Astronomy Classification Scheme): Data from American Physical Society journals. This provides a hierarchical ground truth, allowing the authors to test if the metric correctly identifies "similar" physics topics based on their official classification.

Key Insights and Ideas

  • The "Indirect" Trap: Traditional metrics are easily fooled by "bridge" nodes. For example, in the paper, "vb.net" and "jsp" appear similar in an aggregated network because they share many indirect neighbors, despite being unrelated technologies. $\sigma_{ego}$ correctly identifies them as dissimilar by focusing on their direct co-occurrence context.
  • A New Dimension: The researchers found that $\sigma_{ego}$ is weakly correlated with existing measures. This means it isn't just a "slightly better Jaccard index"; it captures a fundamentally different dimension of similarity that other tools miss.
  • Topology vs. Weights: Surprisingly, even without considering "link weights" (how many times two things co-occur), the topological structure of the ego-network alone provides enough information to outperform weight-based traditional methods.

Key Results

  • Superior Prediction: In predicting whether two entities are truly related, $\sigma_{ego}$ achieved an AUC of 0.953 on the Stack Overflow data, significantly beating word2vec (0.849) and traditional network measures like the Jaccard index (0.577).
  • Better Clustering: When used for hierarchical clustering, $\sigma_{ego}$ produced much more logical groupings of programming terms. While Jaccard similarity tended to lump all mainstream languages into one giant, messy cluster, $\sigma_{ego}$ successfully separated them into meaningful sub-groups (e.g., web development vs. database management).
  • Robustness: The ratio of "ego-neighbors" to "aggregated neighbors" is small for most pairs, proving that the ego-network approach successfully prunes a massive amount of redundant/noisy information.

Limitations and Future Work

The authors acknowledge a few areas for improvement:

  • Ignoring Weights: The current version of $\sigma_{ego}$ treats all co-occurrences as equal. Incorporating "link weights" (the frequency of co-occurrence) could potentially make the index even more powerful.
  • Directed Relationships: The current model focuses on undirected co-occurrence. Exploring how this logic applies to directed networks (like follower-following relationships) remains an open question.
  • Real-world Systems: While tested on tags and citations, the authors suggest the index should be applied to more diverse biological or ecological systems to uncover hidden mechanisms in those fields.

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},
}

Loading related content...

Figure