Software.zhishi.schema: A Software Programming Taxonomy Derived from Stackoverflow

Jiangang Zhu, Haofen Wang, Beijun Shen

Abstract

Researchers have developed Software.zhishi.schema, a massive, specialized taxonomy for the programming world built by mining StackOverflow. By applying semi-supervised machine learning and graph pruning to millions of user-generated tags, they created a map of over 38,000 concepts that significantly outperforms general-purpose tools like WordNet in understanding software-specific language.

Introduction

In software engineering, understanding the relationship between terms is crucial for tasks like linking bug reports to code or measuring document similarity. However, existing taxonomies fall short. WordNet is too general and lacks technical depth, while Wikipedia-based models like Yago struggle to keep pace with the lightning-fast evolution of programming frameworks and libraries.

There is a "semantic gap" where fine-grained terms (e.g., specific library functions or niche tools) simply do not exist in standard knowledge bases. This research aims to fill this gap by leveraging the "living" vocabulary of StackOverflow, where developers constantly create and refine tags to describe the current state of the industry.

Methods

The authors propose a multi-stage pipeline to transform messy social tagging data into a structured hierarchy. The process begins with the raw data from StackOverflow (users, tags, and questions) and proceeds through training data generation and feature extraction.

The multi-stage pipeline for constructing Software.zhishi.schema from StackOverflow data.

1. Feature Extraction

Instead of just looking at the text of a tag, the model uses a variety of "signals" to determine if one tag is a sub-concept of another (subsumption):

  • Lexical Features: Analyzing common sub-strings.
  • Co-occurrence Features: Using "Normalized Google Distance" to see how often tags appear together in questions, wiki descriptions, or are used by the same sets of users.
  • Topic-based Features: Measuring the divergence between the "topics" associated with different tags.
  • Wikipedia-based Features: Comparing tags against Wikipedia's broader knowledge base using Explicit Semantic Analysis (ESA).

2. Semi-supervised Learning

They use a "self-training" framework where the model starts with a small set of known relationships and iteratively labels new ones, growing its knowledge base over time.

3. Graph Pruning & DAG Construction

To prevent logical errors (like a tag being its own grandparent), they apply Cycle Conflict and Transitive Redundancy constraints. They treat the predicted relationships as a weighted graph and use Edmonds’ algorithm to extract an optimal Directed Acyclic Graph (DAG), ensuring the final taxonomy is logically sound and tree-structured.

Key Insights and Ideas

  • Tags as a Pulse: The paper treats StackOverflow tags as a real-time reflection of technical evolution. Because they are created "on the fly" by users, they capture the fast-changing nature of the field better than curated encyclopedias.
  • The Power of Metadata: A clever feature used is User-based distance (CU). If the same group of expert users tends to use two different tags, those tags are likely semantically related, even if their names look nothing alike.
  • Global vs. Local Logic: While machine learning might locally predict relationships, global constraints (DAG construction) are necessary to prevent circular logic and ensure usability.

Key Results

The resulting dataset, Software.zhishi.schema, contains 38,205 concepts and 36,249 subsumption relations.

  • High Accuracy: After seven iterations of self-training, the model achieved a subsumption accuracy of 85.96%.
  • Superior Domain Knowledge: In a word similarity task, the new taxonomy achieved a Spearman correlation of 0.4608, vastly outperforming WordNet (0.0238) and Wikipedia-based ESA (0.2244).
  • Deep Hierarchies: The system successfully mapped complex paths, providing clear subclass and superclass relationships for technical terms.
Examples of the generated taxonomy showing hierarchical relationships for tree-related concepts.

Limitations and Future Work

While the paper demonstrates a significant leap over general taxonomies, a few areas remain for exploration. Accuracy gains began to level off after several iterations, suggesting a ceiling for the current self-training approach. Additionally, the system relies on the quality of StackOverflow's crowd-sourced data; noise in social tagging could propagate into the taxonomy. Future work involves integrating this taxonomy directly into IDEs or automated bug-tracking systems to test its real-world utility.

Summary updated

BibTeX
@inproceedings{zhu2015software,
  author = {Jiangang Zhu and Haofen Wang and Beijun Shen},
  title = {{Software.zhishi.schema: A Software Programming Taxonomy Derived from Stackoverflow}},
  booktitle = {ISWC (Posters \& Demos)},
  year = {2015},
}
Figure