Graph-Based Tri-Attention Network for Answer Ranking in CQA

Wei Zhang, Zeyuan Chen, Chao Dong, Wen Wang, Hongyuan Zha, Jianyong Wang

Abstract

In Community Question Answering (CQA) platforms, identifying high-quality answers is crucial for user experience. While community votes are the standard metric for quality, they often take significant time to accumulate. This paper introduces the Graph-Based Tri-Attention Network (GTAN), a novel framework that models hidden correlations between answers and dynamic respondent expertise to rank answers automatically. By integrating a heterogeneous graph neural network (GNN) to capture inter-answer relationships and an alternating tri-attention mechanism to create context-aware representations, GTAN significantly outperforms existing state-of-the-art methods on StackOverflow, Zhihu, and Quora datasets.

Introduction

CQA platforms like StackOverflow and Quora serve as vital knowledge-sharing hubs. However, the sheer volume of answers makes manual filtering impossible. While voting systems help surface quality content, there is a substantial lag between answer submission and vote maturation. Data analysis reveals that while the majority of answers (64%) are posted within 100 minutes of a question, it can take months for even a small fraction (18%) of total votes to be recorded. This delay necessitates automated ranking systems that can identify high-quality content early in its lifecycle.

Cumulative distribution of answer and vote occurrences over time, highlighting the significant delay in vote accumulation.

Existing automated ranking models often treat answers as independent units and use static representations for respondents. These approaches fail to capture the shared context between answers to the same question or the multi-faceted nature of a respondent's expertise.

Proposed Methodology: GTAN

The Graph-Based Tri-Attention Network (GTAN) addresses these limitations through two core components: a CQA-based GNN and an alternating tri-attention mechanism.

High-level architecture of the GTAN model, illustrating the flow from heterogeneous graph construction to score generation.

CQA-Based Graph Neural Network

GTAN constructs a heterogeneous graph for each question, featuring nodes for the question (Q), its various answers (A, B), and the words (W) they contain. Edges connect questions and answers to their constituent words, weighted by TF-IDF. This structure allows the model to learn from the textual overlap and semantic relationships between different answers to the same question. A gating mechanism is incorporated into the GNN layers to prevent "over-smoothing" and maintain distinct node features.

Alternating Tri-Attention Mechanism

Following the initial graph-based embedding, GTAN applies a three-way attention process to refine representations:

  • Respondent Gating: Filters a respondent's historical profile to highlight expertise relevant to the current question-answer pair.
  • Question Attention: Dynamically adjusts the question's representation based on the specific answer being evaluated, acknowledging that different answers may address different facets of a complex query.
  • Answer Attention: Refines the answer representation by integrating insights from both the targeted question and the respondent's specific expertise.

Experimental Evaluation

The model was rigorously tested on three diverse datasets: StackOverflow (technical/English), Zhihu (general/Chinese), and Quora (general/English).

Key Results

GTAN consistently outperformed baseline models such as Doc2Vec, CNTN, and AUANN across all metrics. On StackOverflow, it achieved a Precision at 1 (P@1) of 0.4230. On Zhihu, NDCG@3 improved to 0.6134, and on Quora, it reached a Mean Reciprocal Rank (MRR) of 0.8368. Ablation studies confirmed that the GNN component is the most vital contributor to performance, validating the hypothesis that modeling inter-answer correlations is essential for accurate ranking. Furthermore, GTAN demonstrated superior efficiency, achieving a 4x training speedup over RNN-based models due to the parallelizable nature of GNNs and attention layers.

Conclusion

GTAN represents a significant step forward in CQA answer ranking by moving beyond independent answer modeling. By leveraging the structural relationships between answers and the context-specific expertise of respondents, it provides a more nuanced and accurate quality assessment. Future work will focus on addressing the "cold-start" problem for new respondents who lack a historical profile on the platform.

Summary updated

BibTeX
@inproceedings{zhang2021graph,
  author = {Wei Zhang and Zeyuan Chen and Chao Dong and Wen Wang and Hongyuan Zha and Jianyong Wang},
  title = {{Graph-Based Tri-Attention Network for Answer Ranking in CQA}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i16.17700},
}
Figure