[BISTU 2020] Mining the Dev-Social Graph: SFF-Specific NER using BI-LSTM and Word Embeddings

Feature-Specific Named Entity Recognition in Software Development Social Content

2019-08-01
Ning Li, Liwei Zheng, Ying Wang, Bin Wang
Summary
Problem
Method
Results
Takeaways
Abstract

This paper introduces an approach for Software Function Feature (SFF)-specific Named Entity Recognition (NER) in social content like CSDN and Stack Overflow. The authors utilize a BI-LSTM (Bidirectional Long Short-Term Memory) model combined with Word2Vec word embeddings to identify 6 categories of technical entities, achieving an F1-score of 71.7%.

Executive Summary

TL;DR: This paper tackles the "noise" of software development social networks (like CSDN and Stack Overflow) to extract structured knowledge. By deploying a BI-LSTM network with Word2Vec embeddings, the authors identify critical software function features (SFF), bridging the gap between raw forum discussions and structured knowledge graphs.

Positioning: This work acts as a foundational domain-adaptation study, moving NER from traditional "News/Medical" domains into the specialized, messy world of Software Engineering (SE).

Problem & Motivation: The "Free-Form" Chaos

Software developers communicate in a hybrid language. A single post on CSDN might contain:

  • Natural Language: Chinese or English descriptions.
  • Technical Identifiers: APIs, Frameworks, and Platforms.
  • Noise: Snippets of source code, URLs, and non-standard abbreviations.

Existing SOTA models for news (identifying People/Orgs) fail here because they cannot distinguish between a variable name in code and a critical software entity in text. Furthermore, previous SE-NER models ignored "Undefined Functions"—custom function names that carry heavy semantic weight but are almost always Out-of-Vocabulary (OOV).

Methodology: Bridging Code and Context

The authors propose a three-stage pipeline to handle this complexity:

1. Data Sanitization

To prevent the model from getting lost in actual code logic, they use regular expressions (following Dagenais et al.) to strip out block code and links, focusing the recognition purely on the "Software Function Feature" descriptions.

2. Semantic Vectorization (Word2Vec)

They utilize the Skip-gram model with negative sampling. Since the data contains English terms (Java, Python) inside Chinese sentences, they opted for Word Embedding over Character Embedding to better capture the semantics of technical terms.

3. The BI-LSTM Architecture

The core of the system is a Bidirectional LSTM that processes sequences with the BIOES (Beginning, Internal, End, Other, Single) tagging schema.

Model Architecture Figure 1: The dual-layer BI-LSTM framework designed to condense 128-dimensional vectors into tag probabilities.

The model utilizes a CRF (Conditional Random Field) layer logic (implied via the Viterbi algorithm in the text) to find the highest scoring label sequence, ensuring that the predicted tags (like B-PL followed by I-PL) are logically consistent.

Experiments & Results: The "Undefined" Challenge

The system was tested on a dataset of Python-related Q&A from CSDN.

MetricBI-LSTM Performance
Precision74.805%
Recall69.019%
F1-Score71.702%

Key Insight from Ablation/Error Analysis: The model struggled most with the "Undefined Function" (UF) category. Why? Developers use highly inconsistent naming conventions for their own functions (e.g., exchangeTwoNumber() vs printResults()). These appear infrequently, leading to a lack of training samples and a high OOV rate.

Sample Result Figure 2: Example of manual entity annotation versus model recognition of frames and functions.

Critical Analysis & Conclusion

Takeaway

The inclusion of the "Undefined Function" category is a significant step toward "true" understanding of developer intent. By recognizing these, researchers can eventually map specific user issues to specific logic blocks in a Knowledge Graph.

Limitations

  • Temporal Decay: Word2Vec embeddings are static. In the fast-moving software world, new libraries (e.g., Mojo, JAX) would require retraining the entire embedding space.
  • Context Window: The sequence length is capped at 80 words, which might truncate complex technical discussions.

Future Outlook

The authors aim to move toward Relationship Extraction. Identifying that "Python" (PL) uses "NumPy" (Fram) is the next logical step in building a comprehensive Software Engineering Knowledge Graph.

Find Similar Papers

Try Our Examples

  • Find recent papers from 2023-2025 that use Transformer-based models (like BERT or RoBERTa) for Software-Specific Named Entity Recognition in developer forums.
  • Which paper first established the 5-category taxonomy (PL, Plat, API, Fram, Stan) for software entities used as a baseline in this study, and how has it evolved?
  • What are the state-of-the-art methods for "Joint Code-Text Embedding" that could improve the recognition of Undefined Functions in mixed natural language and source code environments?
Contents
[BISTU 2020] Mining the Dev-Social Graph: SFF-Specific NER using BI-LSTM and Word Embeddings
1. Executive Summary
2. Problem & Motivation: The "Free-Form" Chaos
3. Methodology: Bridging Code and Context
3.1. 1. Data Sanitization
3.2. 2. Semantic Vectorization (Word2Vec)
3.3. 3. The BI-LSTM Architecture
4. Experiments & Results: The "Undefined" Challenge
5. Critical Analysis & Conclusion
5.1. Takeaway
5.2. Limitations
5.3. Future Outlook