Papers › Uni-Encoder: A Fast and Accurate Response Selection Paradigm for Generation-Based...

Uni-Encoder: A Fast and Accurate Response Selection Paradigm for Generation-Based Dialogue Systems

2 Jun 2021arXiv:2106.01263archive 2025-07-28

Chiyu Song, Hongliang He, Haofei Yu, Pengfei Fang, Leyang Cui, Zhenzhong Lan

Sample-and-rank is a key decoding strategy for modern generation-based dialogue systems. It helps achieve diverse and high-quality responses by selecting an answer from a small pool of generated candidates. The current state-of-the-art ranking methods mainly use an encoding paradigm called Cross-Encoder, which separately encodes each context-candidate pair and ranks the candidates according to their fitness scores. However, Cross-Encoder repeatedly encodes the same lengthy context for each candidate, resulting in high computational costs. Poly-Encoder addresses the above problems by reducing the interaction between context and candidates, but with a price of performance drop. In this work, we develop a new paradigm called Uni-Encoder, that keeps the full attention over each pair as in Cross-Encoder while only encoding the context once, as in Poly-Encoder. Uni-Encoder encodes all the candidates with the context in one forward pass. We use the same positional embedding for all candidates to ensure they are treated equally and design a new attention mechanism to avoid confusion. Our Uni-Encoder can simulate other ranking paradigms using different attention and response concatenation methods. Extensive experiments show that our proposed paradigm achieves new state-of-the-art results on four benchmark datasets with high computational efficiency. For instance, it improves R10@1 by 2.9% with an approximately 4X faster inference speed on the Ubuntu V2 dataset.

PaperPDFCode

Code

dll-wu/uni-encoder officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Computational EfficiencyConversational Response Selection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Conversational Response Selection Douban Uni-Enc+BERT-FP MAP 0.648 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Enc+BERT-FP MRR 0.688 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Enc+BERT-FP P@1 0.518 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Enc+BERT-FP R10@1 0.327 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Enc+BERT-FP R10@2 0.557 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Enc+BERT-FP R10@5 0.865 #2 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder MAP 0.622 #7 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder MRR 0.662 #7 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder P@1 0.481 #7 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder R10@1 0.303 #7 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder R10@2 0.514 #7 of 16 Archive leaderboard report
Conversational Response Selection Douban Uni-Encoder R10@5 0.852 #7 of 16 Archive leaderboard report
Conversational Response Selection Persona-Chat Uni-Encoder MRR 0.922 #1 of 2 Archive leaderboard report
Conversational Response Selection Persona-Chat Uni-Encoder R20@1 0.869 #1 of 2 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Enc+BERT-FP R10@1 0.916 #3 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Enc+BERT-FP R10@2 0.965 #3 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Enc+BERT-FP R10@5 0.994 #3 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Encoder R10@1 0.886 #6 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Encoder R10@2 0.946 #6 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v1, Ranking) Uni-Encoder R10@5 0.989 #6 of 25 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v2, Ranking) Uni-Encoder R10@1 0.859 #1 of 1 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v2, Ranking) Uni-Encoder R10@2 0.938 #1 of 1 Archive leaderboard report
Conversational Response Selection Ubuntu Dialogue (v2, Ranking) Uni-Encoder R10@5 0.990 #1 of 1 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections