Skip to main content
QUICK REVIEW

[Paper Review] Ultra-Fast, Low-Storage, Highly Effective Coarse-grained Selection in Retrieval-based Chatbot by Using Deep Semantic Hashing

Tian Lan, Xian-Ling Mao|arXiv (Cornell University)|Dec 17, 2020
Advanced Image and Video Retrieval TechniquesComputer Science22 references6 citations
TL;DR

This paper proposes DSHC, a deep semantic hashing method for ultra-fast, low-storage coarse-grained response selection in retrieval-based chatbots. By stacking a two-autoencoder hashing module on top of a pre-trained dense representation model and optimizing with three loss functions, DSHC achieves near-dense performance with significantly reduced storage and search time—demonstrating 15x faster search than BM25 and 1.7–6.7 MB index storage, while maintaining high effectiveness.

ABSTRACT

We study the coarse-grained selection module in retrieval-based chatbot. Coarse-grained selection is a basic module in a retrieval-based chatbot, which constructs a rough candidate set from the whole database to speed up the interaction with customers. So far, there are two kinds of approaches for coarse-grained selection module: (1) sparse representation; (2) dense representation. To the best of our knowledge, there is no systematic comparison between these two approaches in retrieval-based chatbots, and which kind of method is better in real scenarios is still an open question. In this paper, we first systematically compare these two methods from four aspects: (1) effectiveness; (2) index stoarge; (3) search time cost; (4) human evaluation. Extensive experiment results demonstrate that dense representation method significantly outperforms the sparse representation, but costs more time and storage occupation. In order to overcome these fatal weaknesses of dense representation method, we propose an ultra-fast, low-storage, and highly effective Deep Semantic Hashing Coarse-grained selection method, called DSHC model. Specifically, in our proposed DSHC model, a hashing optimizing module that consists of two autoencoder models is stacked on a trained dense representation model, and three loss functions are designed to optimize it. The hash codes provided by hashing optimizing module effectively preserve the rich semantic and similarity information in dense vectors. Extensive experiment results prove that, our proposed DSHC model can achieve much faster speed and lower storage than sparse representation, with limited performance loss compared with dense representation. Besides, our source codes have been publicly released for future research.

Motivation & Objective

  • To systematically compare sparse (e.g., BM25) and dense (e.g., BERT-based) representation methods in retrieval-based chatbots across four dimensions: effectiveness, search time, storage, and human evaluation.
  • To address the high computational and storage costs of dense representation methods, which hinder real-world deployment despite superior performance.
  • To design a hashing-based coarse-grained selection method that preserves semantic similarity while drastically reducing storage and search latency.
  • To validate the proposed method through extensive experiments on four public response selection datasets and human evaluation.

Proposed method

  • Propose a two-stage DSHC model: first, a pre-trained dense representation model (e.g., BERT) generates dense embeddings for utterances.
  • Stack a hashing optimizing module consisting of two autoencoders on top of the dense representation to learn compact binary hash codes.
  • Optimize the autoencoders using three loss functions: preserved loss (to maintain semantic similarity), hash loss (to enforce binary constraints), and quantization loss (to minimize reconstruction error).
  • Use learned hash codes for efficient similarity search via Hamming distance computation, enabling fast and memory-efficient candidate retrieval.
  • Train the entire DSHC model end-to-end with backpropagation, ensuring that the hash codes preserve rich semantic and similarity information from the original dense vectors.
  • Deploy the model on GPU for high-speed inference, leveraging parallelism in Hamming distance computation.

Experimental results

Research questions

  • RQ1How do sparse (e.g., BM25) and dense (e.g., BERT-based) representation methods compare in terms of effectiveness, search time, storage, and human preference in retrieval-based chatbots?
  • RQ2Can a hashing-based method preserve the semantic quality of dense representations while achieving ultra-fast search and low storage?
  • RQ3What is the trade-off between performance and efficiency when using hash codes derived from deep semantic representations?
  • RQ4How does the proposed DSHC model compare to BM25 and dense baselines in human evaluation and standard retrieval metrics?
  • RQ5To what extent can the proposed hashing module maintain semantic similarity while reducing dimensionality and storage?

Key findings

  • Dense representation methods significantly outperform sparse methods (e.g., BM25) in effectiveness, with correlation scores up to 0.9832 on the LCCC dataset, but require 1.2–4.8 GB storage and 122–572 ms search time.
  • DSHC-128 achieves a 15x speedup over BM25 (4ms vs. 89.5ms per query on E-Commerce), with only 1.7 MB index storage—dramatically lower than dense models.
  • DSHC-128 achieves Top-20 recall of 0.185 on E-Commerce and 0.027 on Zh50w, outperforming BM25 (0.025 and 0.0627) and approaching dense model performance.
  • Human evaluation shows DSHC wins in 31.33–53.17% of comparisons against dense models and 47.67–60.17% against BM25, with high Cohen’s kappa (0.67–0.85), indicating strong annotator consistency.
  • DSHC-512 achieves near-dense performance (e.g., 0.944 correlation on LCCC) with 24 MB storage and 23.5 ms search time, offering a strong balance of speed, size, and accuracy.
  • The proposed DSHC model reduces storage by over 99% compared to dense models (e.g., from 4.8 GB to 24 MB on LCCC) while maintaining high retrieval quality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.