Standard self-attention mechanisms in Transformer models are inherently "query-blind." They model pairwise dependencies between tokens identically, regardless of the specific task or user prompt. In the context of Query-based Summarization (Qsumm), this is a significant limitation. This paper introduces Conditional Self-Attention (CSA), a novel module designed to reshape internal sequence dependencies based on an external query, leading to state-of-the-art results in Qsumm tasks.
The Problem: Static Dependencies in a Dynamic Task
In Qsumm, the objective is to extract or generate information from a passage that is specifically relevant to a user's query. For instance, in a text about "Renewable Energy," the relationship between the words "solar" and "cost" is vital if the query concerns economics, but secondary if the query focuses on "environmental impact."
Traditional approaches often simply concatenate the query to the passage. However, this does not explicitly force the self-attention mechanism to prioritize query-relevant relationships. The authors argue that the internal structure of a document should be viewed through a task-specific "lens."
Methods: The CSA Module
The proposed Conditional Self-Attention (CSA) module is a composite function that replaces standard self-attention. It operates through three distinct phases:
- Cross-Attention Scoring: The module computes a "condition-dependency score" for every token in the input sequence relative to the external query. This can be achieved using either additive or multiplicative attention mechanisms.
- Scaling: Input tokens are scaled by these scores. This process effectively "mutes" tokens that are irrelevant to the query while "amplifying" those with high relevance.
- Conditional Self-Attention: Finally, self-attention is applied to these scaled tokens.
By integrating the query at this fundamental level, the resulting context-aware embeddings are guided by the user's intent from the very first layer. To handle long documents efficiently, the authors implement a CSA-Transformer using a hierarchical block structure. Long passages are split into smaller blocks, processed with shared parameters, and then compressed into a final representation.
Experimental Evaluation
The model was rigorously tested on two distinct datasets:
- Debatepedia: A collection of 12,000 instances for abstractive summarization, featuring short debate snippets.
- HotpotQA: A multi-hop QA dataset adapted for extractive summarization. The "supporting facts" served as the target summary for the given questions.
Key Results
The CSA-Transformer demonstrated substantial improvements over vanilla Transformers and Universal Transformers (UT).
On the Debatepedia dataset, the CSA (Add) variant achieved a ROUGE-1 score of 46.44, significantly outperforming the vanilla Transformer's 28.16. On the HotpotQA dataset, the CSA (Mul) variant reached a ROUGE-1 of 59.57, nearly doubling the baseline performance of 35.45.
The choice between additive and multiplicative attention proved task-dependent. Additive attention was more effective for the smaller, abstractive Debatepedia set, while multiplicative attention excelled on the larger, extractive HotpotQA set. Qualitatively, the CSA module was found to emphasize not just keywords, but also logical connectors (e.g., "therefore") that were contextually relevant to the query.
Conclusion and Future Work
Conditional Self-Attention provides a powerful mechanism for dynamic contextualization in NLP. By making self-attention "query-aware," the model moves beyond static document representations. While the current implementation shows great promise, future research may explore applying CSA to multi-query scenarios or complex logical reasoning tasks on graph-structured data.
Summary updated