<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sameer Singh on Medium]]></title>
        <description><![CDATA[Stories by Sameer Singh on Medium]]></description>
        <link>https://medium.com/@sameer_?source=rss-d40dbcfcfb6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0C9NZHfYp86HpTDf</url>
            <title>Stories by Sameer Singh on Medium</title>
            <link>https://medium.com/@sameer_?source=rss-d40dbcfcfb6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 01:35:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sameer_/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Summary: Learning Neural Templates for Text Generation (EMNLP 2018)]]></title>
            <link>https://medium.com/uci-nlp/summary-learning-neural-templates-for-text-generation-emnlp-2018-d5a61fe47c79?source=rss-d40dbcfcfb6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5a61fe47c79</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[emnlp18]]></category>
            <category><![CDATA[summary]]></category>
            <dc:creator><![CDATA[Sameer Singh]]></dc:creator>
            <pubDate>Tue, 23 Oct 2018 07:45:57 GMT</pubDate>
            <atom:updated>2018-10-23T07:45:57.922Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://arxiv.org/abs/1808.10122">[1808.10122] Learning Neural Templates for Text Generation</a></p><p><strong>Authors: </strong><a href="https://swiseman.github.io/">Sam Wiseman</a>, <a href="http://www.eecs.harvard.edu/shieber/">Stuart M. Shieber</a>, <a href="http://nlp.seas.harvard.edu/rush.html">Alexander M. Rush</a></p><p>Consider the task of text generation conditioned on some factual information, e.g. a sentence that describes a restaurant, given a structured table its attributes. There are two existing approaches: (1) traditional <em>template-based </em>generation (“&lt;name&gt; is a &lt;cuisine&gt; restaurant in &lt;location&gt;”) that tends to express correct factual information, but is not fluent/natural, and (2) newer <em>encoder/decoder</em> models that generate fluent text, but sometimes hallucinate facts, and are difficult to control and interpret. This paper combines these two paradigms by introducing <em>neural templates</em>, where the template is defined by a sequence of discrete labels, while the instantiation is using neural <em>emission</em> for each label. The following figure gives an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*2TsA1H9HptBeVCOHUzKLpA.png" /><figcaption>Source: Original paper (<a href="https://arxiv.org/pdf/1808.10122.pdf">https://arxiv.org/pdf/1808.10122.pdf</a>)</figcaption></figure><p>The most interesting part of the paper is the model that combines Hidden Semi-Markov Models (HSMMs) with neural decoders. In HMMs, there is a latent sequence of <em>z </em>classes (one for each token) that each generates a single token. In HSMMs, the latent sequence <em>z</em> corresponds to a sequence of <em>segments</em>, where each <em>z</em> generates a segment containing multiple tokens. Forward-backward is still efficient for HSMMs, especially if you limit the maximum length of any segment. This paper extends this model to be neural by making the emission (of multi-token segments) to be RNNs. Figure time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*3XtTPbisLW8rfhMMq4vVyA.png" /></figure><p>The model learns the latent templates, with only pairs of <em>(x,y) </em>available during training. There are a bunch of additional things that make it practical: backpropagating through the dynamic program, limiting maximum length, having an autoregressive component (only on <em>y</em>), factorizing the transition matrix, disallowing certain transitions, etc. The results, on <a href="http://www.macs.hw.ac.uk/InteractionLab/E2E/">E2E </a>and <a href="https://github.com/DavidGrangier/wikipedia-biography-dataset">WikiBio</a>, are <em>competitive</em> with sequence decoder models, however, the neural template models definitely lead to more interpretable and controllable generation.</p><p>This was a fun paper to read; it combines the advantages of template-based intuition with the neural approaches in a clean, elegant manner. The dynamic programming of semi-Markov models is quite impressive (I was more familiar with <a href="http://www.cs.cmu.edu/~wcohen/postscript/semiCRF.pdf">the semi-CRF variant</a>), and it’s great to see it applied again. Still, I feel the model is trying to capture a bit too much in its states, and may need many states (<em>K</em>) to cover the subtleties of language. I wonder how it would do on straight-up, unconditional language modeling, since finding controllable templates can be pretty useful in general (think dialogs!).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a61fe47c79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uci-nlp/summary-learning-neural-templates-for-text-generation-emnlp-2018-d5a61fe47c79">Summary: Learning Neural Templates for Text Generation (EMNLP 2018)</a> was originally published in <a href="https://medium.com/uci-nlp">UCI NLP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Summary: Building Language Models for Text with Named Entities (ACL 2018)]]></title>
            <link>https://medium.com/uci-nlp/summary-building-language-models-for-text-with-named-entities-acl-2018-26031b60f58d?source=rss-d40dbcfcfb6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/26031b60f58d</guid>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[language-modeling]]></category>
            <category><![CDATA[acl18]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Sameer Singh]]></dc:creator>
            <pubDate>Mon, 15 Oct 2018 17:53:22 GMT</pubDate>
            <atom:updated>2018-10-15T17:53:22.541Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://arxiv.org/abs/1805.04836">[1805.04836] Building Language Models for Text with Named Entities</a></p><p><strong>Authors:</strong> <a href="https://sites.google.com/site/parvezmdrizwan/">Md Rizwan Parvez</a>, <a href="https://sites.google.com/site/saikatchakraborty038/">Saikat Chakraborty</a>, <a href="http://rayb.info/">Baishakhi Ray</a>, <a href="http://kwchang.net/">Kai-Wei Chang</a></p><p>Language models don’t work well with named entities because the vocabulary is fairly open (consisting of many rare/infrequent words). There may not be enough information in the training data to adequately learn how these words. From an example in the paper, for modeling recipes, you might have many different variations of <em>cooking oil</em>, such as <em>canola oil, grape oil</em> (really? sounds tasty!), <em>sunflower oil,</em> and <em>olive oil</em>. Since each of them may not appear many times in the training corpus (<em>grape oil </em>for example!), we probably won’t learn a good model for generating such entities.</p><p>However, the entity <em>types</em> are pretty finite, and hence the language model should first just generate the types, and given the entity type, generate the tokens of the entity. This is what the paper proposes. In the above example, this means the model would generate <em>cooking oil</em> as the entity type first (the <strong>type model</strong>), and then generate the specific entity (the <strong>entity composite model</strong>). Here’s a figure from the paper, with <em>vegetable</em> and <em>protein</em> as the types, and <em>broccoli</em> and <em>chicken</em> as the entities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i4uKBB-hsUYqbl2IbBeD-Q.png" /><figcaption>From the original paper (link: <a href="https://arxiv.org/abs/1805.04836">https://arxiv.org/abs/1805.04836</a>)</figcaption></figure><p>Training assumes that the corpus is typed already, and thus both of these models can be trained independently (on nearly identical data, except that entities are replaced by their types for the type model). The generation combines the two probabilities by multiplying them (slightly more involved since you have to compute the probability the next word is not an entity).</p><p>The paper evaluates on two benchmarks. The first is a corpus of recipes where only the ingredients are typed (into 8 <em>super-</em>ingredients) manually using a lexicon based approach. The second is a corpus of open-source Android projects where the types are automatically annotated using the syntax tree. The source code was processed for language modeling to be feasible: only method scopes are modeled, cleaning of string variables and global information, and modeling <em>changes</em> to existing methods. Proposed methods obtain better perplexity compared to complex language models (even with type information), and the authors also include interesting case studies, such as <em>fill in the blank</em> evaluation on the recipes.</p><p>Overall, this is a simple yet elegant approach to modeling named entities, and increasingly important as language modeling becomes key for NLP. There are some concerns here about the need to give the types (apart from the annotation effort, what are the right set of types? can this be latent?), multi-token entities (shouldn’t the composite model decide how many tokens?), and other considerations (why should we restrict ourselves to named entities? should training both models be independent?). <a href="https://arxiv.org/abs/1808.10122">Recent paper at EMNLP 2018</a> by Harvard NLP addresses many of these concerns for <em>data to text</em> domain, and extending it to pure language modeling would be quite exciting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26031b60f58d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uci-nlp/summary-building-language-models-for-text-with-named-entities-acl-2018-26031b60f58d">Summary: Building Language Models for Text with Named Entities (ACL 2018)</a> was originally published in <a href="https://medium.com/uci-nlp">UCI NLP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Summary: Pathologies of Neural Models Make Interpretations Difficult (EMNLP 2018)]]></title>
            <link>https://medium.com/uci-nlp/summary-pathologies-of-neural-models-make-interpretations-difficult-emnlp-2018-62280abe9df8?source=rss-d40dbcfcfb6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/62280abe9df8</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[interpretability]]></category>
            <category><![CDATA[emnlp18]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[summary]]></category>
            <dc:creator><![CDATA[Sameer Singh]]></dc:creator>
            <pubDate>Mon, 08 Oct 2018 04:43:11 GMT</pubDate>
            <atom:updated>2018-10-08T04:43:11.660Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://arxiv.org/abs/1804.07781">[1804.07781] Pathologies of Neural Models Make Interpretations Difficult</a></p><p><strong>Authors:</strong> <a href="http://users.umiacs.umd.edu/~shifeng/">Shi Feng</a>, <a href="http://www.ericswallace.com/">Eric Wallace</a>, <a href="http://alving.me/">Alvin Grissom II</a>, <a href="https://people.cs.umass.edu/~miyyer/">Mohit Iyyer</a>, <a href="https://www.entilzha.io/">Pedro Rodriguez</a>, <a href="http://users.umiacs.umd.edu/~jbg/">Jordan Boyd-Graber</a></p><p>Interpretability of machine learning often focuses on what are the most important parts of the input for the model: that’s what the gradient-based saliency methods do, that’s what <a href="https://arxiv.org/abs/1602.04938">LIME</a> does, and that’s what the methods for identifying adversaries do. The underlying notion is to identify parts of the input that, if removed, result in a different prediction by the model.</p><p>Instead, this paper focuses on <em>input reduction</em>, removing as much of the input as possible, without changing the prediction. Similar ideas have appeared recently with different names: I personally like <em>overstability</em>, like in <a href="https://arxiv.org/abs/1809.02079">another paper at EMNLP 2018</a>, and we used <em>sufficient conditions</em> to describe <a href="http://sameersingh.org/files/papers/anchors-aaai18.pdf">a related concept AAAI 2018</a>. These approaches find the parts of the input that the model is <strong>not</strong> looking at: ones we can remove without changing the prediction.</p><p>Back to the paper, they study three important NLP tasks (SQuAD, VQA, and SNLI) and pick a model each. They remove tokens iteratively by picking ones with the smallest gradient till the prediction changes, thus finding the <em>largest change</em> to the input that doesn’t change the prediction. They also include a beam-search variation of this greedy approach. The examples, some shown below, are really “impressive”!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*Ic_hAHH5PGa3h6N6wceCcw.png" /><figcaption>From the original paper (link: <a href="https://arxiv.org/abs/1804.07781">https://arxiv.org/abs/1804.07781</a>)</figcaption></figure><p>The paper, after confirming this reduction is pathological and is no way meaningful to humans, goes on to provide some insightful thoughts on why is it that saliency/importance based methods pick parts so different from the reduction ones. In particular, they point out how neural nets can be over-confident about arbitrary-looking input, and how gradient/saliency-based methods (or even LIME, since it makes a linear approximation) do not capture the strong second-order effects that are clearly present in the neural networks. As an additional contribution, they introduce an entropy-based data-augmentation loss (“the model should not be confident on these reduced inputs!”) and show that it addresses the problem (to some extent).</p><p>Being a big fan of such tools for analyzing neural networks, this paper was a really fun read for me. It provides even more examples of how these systems are brittle, but doesn’t just go “haha, look at this terrible model”, but instead gives useful insights for <em>why </em>this might happen, and some potentially impactful ideas on addressing this. To continue this line of research, I am curious about characterizing these observations somehow in a useful way, e.g. in retrospect, if we had this tool a few years ago, how would it helped us diagnose that SQuAD models are mostly performing a version of lexical matching?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62280abe9df8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/uci-nlp/summary-pathologies-of-neural-models-make-interpretations-difficult-emnlp-2018-62280abe9df8">Summary: Pathologies of Neural Models Make Interpretations Difficult (EMNLP 2018)</a> was originally published in <a href="https://medium.com/uci-nlp">UCI NLP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>