The Devil is in the Details: Evaluating Limitations of Transformer-based Methods for Granular Tasks
Contextual embeddings derived from transformer-based neural language models\nhave shown state-of-the-art performance for various tasks such as question\nanswering, sentiment analysis, and textual similarity in recent years.\nExtensive work shows how accurately such models can represent abstract,\nsemantic information present in text. In this expository work, we explore a\ntangent direction and analyze such models' performance on tasks that require a\nmore granular level of representation. We focus on the problem of textual\nsimilarity from two perspectives: matching documents on a granular level\n(requiring embeddings to capture fine-grained attributes in the text), and an\nabstract level (requiring embeddings to capture overall textual semantics). We\nempirically demonstrate, across two datasets from different domains, that\ndespite high performance in abstract document matching as expected, contextual\nembeddings are consistently (and at times, vastly) outperformed by simple\nbaselines like TF-IDF for more granular tasks. We then propose a simple but\neffective method to incorporate TF-IDF into models that use contextual\nembeddings, achieving relative improvements of up to 36% on granular tasks.\n