Elamur Research⌕
☰
home / papers / 2020 / How does Punctuation Affect Neural Models in Natural Language Inference

How does Punctuation Affect Neural Models in Natural Language Inference

Paper · 2020 · Adam Ek, Jean-Philippe Bernardy and Stergios Chatzikyriakidis

Summary

This paper asks whether neural Natural Language Inference (NLI) classifiers handle punctuation correctly. Such a model should ignore punctuation that carries no meaning, such as a missing final stop, and should notice punctuation that changes meaning, such as a comma that separates two list members. The authors built two altered versions of MNLI. One adds a full stop to every sentence. The other strips every non-alphanumeric character. They trained a BiLSTM, HBMP and BERT on each version and tested them on the other. The RNN models lost roughly 30 accuracy points when training and test punctuation did not match. BERT stayed almost unchanged. The authors also wrote a small set of premise/hypothesis pairs whose labels depend on commas or quotation marks. On these, every model scored near chance. Punctuation is rarely meaningful in MNLI, so models learn to treat it as noise at best. The authors argue that NLI datasets need examples where punctuation matters and that models may benefit from syntactic structure.

Key points

  • The training corpus is MNLI: 433k sentence pairs from ten genres, with only five genres in training and matched/mismatched dev/test splits. Punctuation makes up about 11.5% of its tokens.
  • There are three data variants: orig (unchanged), p (a final stop added everywhere) and ¬p (all non-alphanumeric characters removed).
  • The models are a BiLSTM with max pooling, HBMP (Talman et al., 2019) with GloVe 840B vectors, and BERT base fine-tuned with Adam (lr 0.00002, batch 24). The two sentence encoders combine sentences as [p; h; p−h; p∗h].
  • When training and test punctuation matched, the RNN models scored about .72–.73. When they did not match, accuracy fell to about .41–.44. BERT stayed between .816 and .839 in all settings.
  • On the 18 hand-built punctuation-sensitive problems, accuracy was 61.1% for HBMP p, 48.8% for HBMP ¬p, 44.4% for BERT p and 48.8% for BERT ¬p. BERT's p and ¬p models gave identical predictions on the quotation cases.

Interesting ideas

  • I1. The paper builds minimal pairs where only comma placement differs and the gold label flips, for example "my mother, Anna, Smith and John" against "my mother Anna, Smith and John" when counting people thanked. This exposes systems that treat punctuation as noise.
  • I2. The authors separate perturbations the system should ignore, like a dropped final stop, from those it should react to, like a meaning-bearing comma. They then test invariance and sensitivity as two distinct hypotheses.
  • I3. They train on one punctuation variant and test on another, which shows a model's dependence on surface tokens cheaply and without new annotation.
  • I4. One contrast hinges on "No, god is good" versus "no god", where a comma decides between a vocative/interjection and a negative quantifier. This tiny change has a large logical effect.
  • I5. The paper probes quotation scope by contrasting "I hear John says 'come here'" with "I hear 'John says come here'", where quote marks change who is speaking. Both HBMP models failed on the second form, and BERT gave the same answers whether trained with or without punctuation.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (tree): a similar contrast suite could check whether the parser chooses apposition or conjunction correctly depending on commas, before frames are built on top.
  • I2 (learn): evaluation could include both kinds as controls, so that answers must stay stable under the first kind and must change under the second.
  • I3 (learn): stripping or normalising punctuation in held-out inputs is an inexpensive negative control for spotting pipeline stages that lean on punctuation by accident.
  • I4 (frames): such pairs could test whether frame building and speech-act detection keep an interjection separate from a quantifier that negates the subject.
  • I5 (frames): similar pairs could check that reported-speech frames attach the speaker and the quoted content according to where the quotation marks fall.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 9,086 worksArtificial Intelligence · 8,889 worksArts and Humanities · 9,296 worksLanguage and Linguistics · 9,206 works

🧭 Topics 1Research subjects and languages the work is about.Reasoning · 510 works

Cite

Cite as Adam Ek, Jean-Philippe Bernardy and Stergios Chatzikyriakidis. 2020. How does Punctuation Affect Neural Models in Natural Language Inference. Proceedings of the Probability and Meaning Conference (PaM 2020).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{ek2020how,
  title = {{How does Punctuation Affect Neural Models in Natural Language Inference}},
  author = {Adam Ek, Jean-Philippe Bernardy and Stergios Chatzikyriakidis},
  booktitle = {Proceedings of the Probability and Meaning Conference (PaM 2020)},
  year = {2020},
  url = {https://aclanthology.org/2020.pam-1.15/}
}

References

13 references, 5 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Jean-Philippe Bernardy and Stergios Chatzikyriakidis. 2019. What kind of natural language inference are nlp systems learning: Is this enough? In 13th International Conference on Agents and Artificial Intelligence. find
  2. Jean-Philippe Bernardy and Stergios Chatzikyriakidis. 2020. Improving the precision of natural textual entailment problem datasets. In Proceeding of LREC 2020.
  3. Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. 2015. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326. ↗
  4. Stergios Chatzikyriakidis, Robin Cooper, Simon Dobnik, and Staffan Larsson. 2017. An overview of natural language inference data collection: The way forward? In Proceedings of the Computing Natural Language Inference Workshop. find
  5. Alexis Conneau, Douwe Kiela, Holger Schwenk, Loic Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. arXiv:1705.02364. arXiv preprint Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. ↗
  6. Max Glockner, Vered Shwartz, and Yoav Goldberg. 2018. Breaking nli systems with sentences that require simple lexical inferences. arXiv preprint arXiv:1805.02266. ↗
  7. Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532–1543. ↗
  8. Adam Poliak, Jason Naradowsky, Aparajita Haldar, Rachel Rudinger, and Benjamin Van Durme. 2018. Hypothesis only baselines in natural language inference. arXiv preprint arXiv:1805.01042. ↗
  9. Aarne Talman and Stergios Chatzikyriakidis. 2018. Testing the generalization power of neural network models across nli benchmarks. arXiv preprint arXiv:1810.09774. ↗
  10. Aarne Talman, Anssi Yli-Jyrä, and Jörg Tiedemann. 2019. Sentence embeddings in nli with iterative refinement encoders. Natural Language Engineering, 25(4):467–482. ↗
  11. Haohan Wang, Da Sun, and Eric P Xing. 2019. What if we simply swap the two text fragments? a straightforward yet effective way to test the robustness of methods to confounding signals in nature language inference tasks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 7136–7143. find
  12. Adina Williams, Nikita Nangia, and Samuel R Bowman. 2017. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426. ↗
  13. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier-ric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. 2019. Transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771. ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/ek-2020-how-does-punctuation-affect-neural/