通过分层选择机制提升句子表示的语义精度。
S2Sent: Nested Selectivity Aware Sentence Representation Learning
- 在Transformer后加入可学习选择器,分层融合不同层级特征。
- 相比基线方法,性能显著提升且参数与推理开销几乎不变。
- 适合需要高效高精度句子表示的NLP任务场景。
基于Transformer编码器与对比学习的组合是当前句子表示学习的主流范式,通常依赖编码器最后一层的隐藏状态。然而,Transformer中不同层的语义感知能力存在差异。从可解释性角度看,知识神经元的语义潜力受输入刺激调节,因此跨层表示融合需优化。为平衡语义冗余与损失,本文提出S²Sent句子表示选择机制,在Transformer编码器下游引入参数化嵌套选择器。该选择器从模块化视角执行空间选择(SS)与嵌套频率选择(FS)。SS采用基于空间挤压的自门控机制生成自适应权重,实现低冗余融合并捕捉嵌入特征间依赖关系;嵌套FS用不同DCT基函数替代全局平均池化,实现低语义损失的空间挤压。大量实验表明,S²Sent在保持极小额外参数与推理延迟的前提下,显著优于基线方法,同时具备高可集成性与可扩展性。
原文摘要 · Abstract (English)
The combination of Transformer-based encoders with contrastive learning represents the current mainstream paradigm for sentence representation learning. This paradigm is typically based on the hidden states of the last Transformer block of the encoder. However, within Transformer-based encoders, different blocks exhibit varying degrees of semantic perception ability. From the perspective of interpretability, the semantic perception potential of knowledge neurons is modulated by stimuli, thus rational cross-block representation fusion is a direction worth optimizing. To balance the semantic redundancy and loss across block fusion, we propose a sentence representation selection mechanism S\textsuperscript{2}Sent, which integrates a parameterized nested selector downstream of the Transformer-based encoder. This selector performs spatial selection (SS) and nested frequency selection (FS) from a modular perspective. The SS innovatively employs a spatial squeeze based self-gating mechanism to obtain adaptive weights, which not only achieves fusion with low information redundancy but also captures the dependencies between embedding features. The nested FS replaces GAP with different DCT basis functions to achieve spatial squeeze with low semantic loss. Extensive experiments have demonstrated that S\textsuperscript{2}Sent achieves significant improvements over baseline methods with negligible additional parameters and inference latency, while highlighting high integrability and scalability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。