Generating Personalized E‑commerce Review Replies with Product Information

This paper presents a sequence‑to‑sequence model that fuses product‑detail tables with customer comments, using gated multimodal attention, copy mechanisms and reinforcement learning to automatically produce high‑quality, context‑aware replies for e‑commerce platforms, and validates the approach with extensive experiments on a large Taobao dataset.

Alibaba Cloud Developer
Alibaba Cloud Developer
Alibaba Cloud Developer
Generating Personalized E‑commerce Review Replies with Product Information

Comment Reply Generation Task

On e‑commerce platforms, users leave comments about purchased items, and sellers must reply to address issues and maintain sales. Writing a reply for every comment is labor‑intensive, and generic replies fail to solve user problems. This work proposes an automatic reply generation model that incorporates product information.

Task Definition

Given a comment

of length n and a product‑information table T containing field‑value pairs, the goal is to generate a reply Y of length m. The model maximizes P(Y|X,T).

Product‑Information Field Representation

Each word in the product table is associated with a field name and its position within the field. The field representation is built from the embedding of the field name and a positional embedding (from‑start and from‑end). This allows the model to retain field‑level semantics.

Model Architecture

The architecture consists of four components: a comment encoder (blue), a product‑information encoder (green), a reply decoder (red), and a Gated Multimodal Unit (GMU, yellow).

Comment Encoder

Words are one‑hot encoded, embedded, and processed by a two‑layer bidirectional GRU. The forward and backward hidden states are concatenated to form word‑level comment features.

Product‑Information Encoder

The product table is treated as a sequence of word tokens and field representations. Each step receives the concatenation of a word embedding and its field embedding, processed by a two‑layer bidirectional GRU.

Reply Decoder

The decoder is a two‑layer GRU that generates the reply token by token, starting from a start symbol and ending with an end symbol. At each step it receives the embedding of the previously generated word.

Gated Multi‑Source Attention

After encoding, hidden states from the comment and product encoders are combined using a gated multimodal attention mechanism. The attention computes separate comment and product context vectors, then fuses them via a GMU.

Copy Mechanism

The decoder can copy words directly from the comment or the product table. Copy scores are computed for each source, and a final distribution over the vocabulary is obtained by combining generation and copy probabilities.

Training Objective

The model is first trained with maximum‑likelihood loss. To mitigate exposure bias, Self‑Critical Sequence Training (SCST) is applied, using BLEU as the reward. The final loss combines the MLE loss and the reinforcement‑learning loss.

Experiments

Dataset

A Taobao dataset was constructed containing 100,000 (comment, product‑info, reply) triples from the clothing category. Average comment length is 39 tokens, reply length 72 tokens, and each product record has about 15 fields.

Evaluation Metrics

ROUGE‑1, ROUGE‑2, ROUGE‑L

METEOR

BLEU‑1~4 (average)

Human evaluation (scores 0,1,2)

Baselines

Seq2Seq + Attention

Pointer‑Generator

CopyNet

CopyNet + Product Info (PI)

Results

Our model outperforms all baselines on automatic metrics and human scores. Incorporating product information yields consistent improvements, and reinforcement learning further boosts performance.

Ablation Study

Removing reinforcement learning, the GMU gate, the copy mechanism, or field representations each degrades performance, confirming the importance of all components.

Conclusion

The paper introduces the comment‑reply generation task for e‑commerce, demonstrates that product information is crucial for high‑quality replies, and proposes a seq2seq model with gated multimodal attention, copy mechanisms and reinforcement learning. Experiments on a large Taobao dataset show significant gains over strong baselines.

References

1. Bahdanau, Cho, Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv:1409.0473, 2014.

2. Lebret et al. Neural Text Generation from Structured Data with Application to the Biography Domain. EMNLP 2016.

3. Arevalo et al. Gated Multimodal Units for Information Fusion. arXiv:1702.01992, 2017.

4. Ranzato et al. Sequence Level Training with Recurrent Neural Networks. arXiv:1511.06732, 2015.

5. See, Liu, Manning. Get to the Point: Summarization with Pointer‑Generator Networks. ACL 2017.

6. Gu et al. Incorporating Copying Mechanism in Sequence‑to‑Sequence Learning. ACL 2016.

7. Rennie et al. Self‑Critical Sequence Training for Image Captioning. CVPR 2017.

8. https://pypi.org/project/pyrouge/

9. http://www.cs.cmu.edu/~alavie/METEOR/

10. https://www.nltk.org

reinforcement learninge‑commercecopy mechanismgated multimodal attentionproduct information fusionreview reply generationSequence-to-Sequence
Alibaba Cloud Developer
Written by

Alibaba Cloud Developer

Alibaba's official tech channel, featuring all of its technology innovations.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.