[Paper Review] Efficient Natural Language Response Suggestion for Smart Reply
The paper presents a fast feed-forward model using n-gram embeddings and hierarchical quantization to score and rank smart reply candidates, outperforming Seq2Seq in quality with much lower computational cost and latency.
This paper presents a computationally efficient machine-learned method for natural language response suggestion. Feed-forward neural networks using n-gram embedding features encode messages into vectors which are optimized to give message-response pairs a high dot-product value. An optimized search finds response suggestions. The method is evaluated in a large-scale commercial e-mail application, Inbox by Gmail. Compared to a sequence-to-sequence approach, the new system achieves the same quality at a small fraction of the computational requirements and latency.
Motivation & Objective
- Reduce computational cost and latency for smart reply response suggestions in a real-world email app.
- Investigate feed-forward, non-recurrent architectures for modeling input-response compatibility.
- Enable fast, scalable retrieval from a large fixed set of candidate responses.
- Leverage multiple features and bias correction to improve response quality.
- Demonstrate end-to-end improvements in a production Gmail Inbox Smart Reply setting.
Proposed method
- Represent input emails and responses with fixed-dimensional features formed by summing n-gram embeddings (bag of n-grams).
- Train neural scoring models to assign S(x,y) for input x and candidate y, with joint and dot-product architectures.
- Use a dot-product factorization S(x,y)=hx^T hy to precompute response vectors and enable efficient MIPS-style search.
- Train with multiple negatives in a batch to approximate P(y|x) and optimize a negative log-likelihood objective (Eq. 5).
- Incorporate multiple email features via a multi-loss architecture to improve scoring using different input signals.
- Apply response biasing via a language-model-based term α log PLM(y) to encourage generic responses.
- Employ hierarchical quantization (HQ) combining vector quantization and product quantization with a learned rotation to enable fast approximate search over responses.
Experimental results
Research questions
- RQ1Can a feed-forward, non-recurrent model with n-gram embeddings match or exceed Seq2Seq in response suggestion quality?
- RQ2What is the performance trade-off between joint scoring and dot-product scoring architectures for response selection?
- RQ3How do multiple features and negative sampling strategies affect ranking accuracy?
- RQ4How effective is hierarchical quantization for fast, high-recall retrieval of top responses?
- RQ5What online performance gains (conversion rate, latency) can be achieved in a production smart reply system?
Key findings
- Dot-product (embedding-based) models achieve near or better precision than joint models while training more efficiently.
- On a test set of 100 candidates, P@1 is 49% for the joint model and 48% (batch 25) or 52% (batch 50) for the dot-product model.
- Online system iterations show substantial latency reductions with comparable or improved conversion rates: two-pass approach yields 67% conversion with 10% latency; single-pass with enhanced negatives and multi-loss features yields 104% conversion with 2% latency relative to Seq2Seq; hierarchical quantization further doubles speed with no quality loss.
- Incorporating response bias via a language-model term improves the quality of suggestions (row 3 in Table 3).
- Training with a larger batch of negatives and multi-loss architecture improves performance over the baseline Seq2Seq in online experiments (row 4).
- Final single-pass system using dot-product scoring and hierarchical search achieves similar or better quality with only a fraction of computation (row 5 and row 6).
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.