All models

Deep Attention Matching Network

Attention-only matcher that scores a response against a multi-turn chat context with stacked self- and cross-attention.

Language · 7,661 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 7,661 operations (4.9 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
88.3M
Operations
7,661
Framework
PyTorch
Recurrent
Yes
Published
ACL 2018
Cited by
372 (as of 5 October 2026)
Authors
Xiangyang Zhou, Lu Li, Daxiang Dong and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14371
Graph hash
ed9943e513f035e4ece3f70234dbbf1b059dbf0ff10e4985335afdf1a6df197f
Skeleton hash
e023c3b65f4963b384c8421caf6f961087300c117a5fdaa5117ee56360003d2b
Architecture hash
7cdcda4e077ab0c00965f9c689061b1a682a5782d139bfbeaf1eefa884168673
Diagram SHA-256
6d146397d28ef63c4a8a91b76aae0c89c81ca9899cb6041dcbdeb0104461532e
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Response selection asks a chatbot to pick the best-matched reply from a set of candidates given the context of a conversation. The Deep Attention Matching Network (DAM) does this matching with a multi-turn context using dependency information based entirely on attention. The design is inspired by the Transformer from machine translation and extends its attention mechanism in two ways. First, representations of text segments at different granularities are built solely with stacked self-attention. Second, truly matched segment pairs are extracted with attention across the context and the response.

The attentive module follows the one used in the Transformer, and the resulting matching scores are stacked into a 3D image from which two-layered 3D convolution with max-pooling distills the final features. In experiments the model considers at most 9 turns and 50 words per utterance, and 5 stacks of self-attention were reported because they scored best on validation. The authors report that the model significantly outperforms state-of-the-art models, with an improvement over the best baseline on R10 @1 of over 4%, and that it is about 2.3 times faster than SMN dynamic in their implementation because its computation is simple.

Key idea. Joint use of stacked self-attention for multi-granularity segment representations and cross-attention for matching context and response, in one uniform network.

  • Deep Attention Matching Network
  • DAM
  • response selection
  • multi-turn response selection
  • retrieval-based chatbot
  • Ubuntu Corpus
  • Douban Conversation Corpus
  • attentive module
  • Baidu

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@inproceedings{Zhou_2018, title={Multi-Turn Response Selection for Chatbots with Deep Attention Matching Network}, url={http://dx.doi.org/10.18653/v1/P18-1103}, DOI={10.18653/v1/p18-1103}, booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)}, publisher={Association for Computational Linguistics}, author={Zhou, Xiangyang and Li, Lu and Dong, Daxiang and Liu, Yi and Chen, Ying and Zhao, Wayne Xin and Yu, Dianhai and Wu, Hua}, year={2018}, pages={1118–1127} }