While many existing methods combine retrieval and editing [ 13,30,18,24 ] , these approaches rely on a fixed hand - crafted or generic retrieval mechanism . One drawback to this approach is that designing a task - specific retriever is time - consuming , and a generic retriever may not perform well on tasks where x is structured or complex [ 40 ] . Ideally , the retrieval metric would be learned from the data in a task - dependent way : we wish to consider x and x similar only if their corresponding outputs y and y differ by a small , easy - to - perform edit . However , the straightforward way of training a retriever 32nd Conference on Neural Information Processing Systems ( NeurIPS 2018 ) , Montréal , Canada .