[Paper Review] Recurrent Neural Network Encoder with Attention for Community Question Answering
This paper proposes a recurrent neural network (RNN) encoder with attention for community question answering (cQA), enabling end-to-end learning of question-comment relevance without linguistic features. By leveraging attention to focus on salient words and applying transfer learning, the model achieves a 10% improvement in mean average precision (MAP) over retrieval-based methods and matches strong feature-engineered baselines on SemEval-2016 tasks, demonstrating robustness across diverse, noisy, and multilingual inputs.
We apply a general recurrent neural network (RNN) encoder framework to community question answering (cQA) tasks. Our approach does not rely on any linguistic processing, and can be applied to different languages or domains. Further improvements are observed when we extend the RNN encoders with a neural attention mechanism that encourages reasoning over entire sequences. To deal with practical issues such as data sparsity and imbalanced labels, we apply various techniques such as transfer learning and multitask learning. Our experiments on the SemEval-2016 cQA task show 10% improvement on a MAP score compared to an information retrieval-based approach, and achieve comparable performance to a strong handcrafted feature-based method.
Motivation & Objective
- To develop a general, end-to-end neural framework for community question answering (cQA) that avoids reliance on handcrafted linguistic features.
- To address data sparsity and label imbalance in cQA by applying transfer learning and multitask learning.
- To improve sequence modeling in cQA by integrating a neural attention mechanism that enables dynamic focus on relevant words across long input sequences.
- To evaluate the model’s generalization across languages and domains, including multilingual and low-resource scenarios.
- To demonstrate that the attention-enhanced RNN encoder is complementary to traditional information retrieval (IR) systems, enabling performance gains through ensemble methods.
Proposed method
- The model uses a bidirectional LSTM encoder to learn dense, contextual representations of question and comment pairs.
- An attention mechanism is applied to the LSTM hidden states, allowing the model to dynamically attend to the most relevant words in each sequence during classification.
- The final context-aware representation is fed into a feedforward neural network for binary classification of relevance.
- Transfer learning is employed by pretraining the RNN on larger, related corpora to improve generalization on limited cQA datasets.
- Multitask learning is applied by jointly training on multiple cQA tasks (A, B, C) to improve robustness and data efficiency.
- Metadata (e.g., user profile, timestamps) is incorporated as additional inputs to a feedforward neural network classifier to enhance performance.
Experimental results
Research questions
- RQ1Can a general-purpose RNN encoder with attention outperform retrieval-based methods in community question answering without relying on linguistic features or external resources?
- RQ2How does the attention mechanism improve sequence modeling in cQA, especially for long or noisy input sequences?
- RQ3To what extent can transfer learning and multitask learning mitigate data sparsity and label imbalance in low-resource cQA settings?
- RQ4Is the proposed RNN-attention framework robust and effective across different languages and domains, including multilingual and informal text?
- RQ5How complementary is the neural model to traditional IR systems, and can their combination yield superior performance on cQA tasks?
Key findings
- The RNN-attention model achieved a 10% relative improvement in mean average precision (MAP) over an information retrieval baseline on the SemEval-2016 cQA Task A.
- On Task A, the model outperformed a strong feature-rich baseline when sufficient training data was available, achieving a MAP of 0.639 compared to the baseline’s 0.632.
- On Task B, where training data was limited, the model matched the performance of the feature-rich system (MAP 0.659 vs. 0.685) and significantly outperformed the IR baseline.
- On Task C, the model achieved a MAP of 0.324, comparable to the feature-rich system (0.339), and combined with IR, it reached a MAP of 0.394, showing strong complementarity.
- Qualitative analysis confirmed that the attention mechanism effectively focuses on key semantic content—such as location or action—while suppressing noise, like excessive punctuation or filler words.
- The model demonstrated robustness on long, short, and noisy sentences, maintaining focused attention patterns even in complex or informal inputs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.