Putting Words in BERT’s Mouth: Navigating Contextualized Vector Spaces with Pseudowords

30729

Authors

nan

Abstract

AbstractWe present a method for exploring regions around individual points in a contextualized vector space (particularly, BERT space), as a way to investigate how these regions correspond to word senses. By inducing a contextualized “pseudoword” vector as a stand-in for a static embedding in the input layer, and then performing masked prediction of a word in the sentence, we are able to investigate the geometry of the BERT-space in a controlled manner around individual instances. Using our method on a set of carefully constructed sentences targeting highly ambiguous English words, we find substantial regularity in the contextualized space, with regions that correspond to distinct word senses; but between these regions there are occasionally “sense voids”—regions that do not correspond to any intelligible sense.

Keywords

nan

Full Content

Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 10300–10313 November 7–11, 2021. c⃝2021 Association for Computational Linguistics 10300 Putting Words in BERT’s Mouth: Navigating Contextualized Vector Spaces with Pseudowords Taelin Karidi1 Yichu Zhou2 Nathan Schneider3 Omri Abend1 Vivek Srikumar2 1Hebrew University of Jerusalem, {taelin.karidi, omri.abend}@mail.huji.ac.il 2University of Utah, {flyaway, svivek}@cs.utah.edu 3Georgetown University, nathan.schneider@georgetown.edu Abstract We present a method for exploring regions around individual points in a contextualized vector space (particularly, BERT space), as a way to investigate how these regions corre- spond to word senses. By inducing a con- textualized “pseudoword” as a stand-in for a static embedding in the input layer, and then performing masked prediction of a word in the sentence, we are able to investigate the geom- etry of the BERT-space in a controlled man- ner around individual instances. Using our method on a set of carefully constructed sen- tences targeting ambiguous English words, we find substantial regularity in the contextualized space, with regions that correspond to distinct word senses; but between these regions there are occasionally “sense voids”—regions that do not correspond to any intelligible sense.1 1 Introduction Vector spaces defined over static word vectors are somewhat interpretable, as the points are limited to the vocabulary. Contextualized representations (CRs), by contrast, are mysterious because of the unbounded number of distinct contextualized em- beddings, and no obvious way to discover the word and context that would correspond to an arbitrary point in the space. Attempts have been made to characterize the information captured in contextu- alized representations (Rogers et al., 2020; Tenney et al., 2019; Liu et al., 2019), but some of the tech- niques used (e.g., probing classifiers) have been subject to criticism for their indirectness. We propose a new technique called Masked Pseudoword Probing (MaPP) that allows con- trolled exploration of the space of a contextualized masked LMs (specifically, English BERT; Devlin et al., 2019). MaPP takes advantage of the static embedding at the first layer of BERT and “hallu- 1Our code and dataset are available at https://github. com/tai314159/PWIBM-Putting-Words-in-Bert-s-Mouth 1 BERT(The event is in October.) Learn pseudoword in place of that is customized to reconstruct . static inputs: contextualized outputs: Run masked prediction with the modified input vector. BERT(The event is in [MASK].) October ✓ July ✓ winter ✓ London ✗ ##ic ✗ Examine top predictions for sense match. Run BERT for a sentence. ➋ ➊ ➌ ➍ <latexit sha1_base64="rtRl6Yut6LufEGEe8AOUfx1c0dU=" >ADkHicfZJbaxQxFMfTHa1vW3roy/BUhCRZXba6u6TFX0QWyh2xasmSyZy40mQxJZi8O+RC+BX8Lj74Ln4NXxUzuy3Ldlo PBA7/3z+Xc3LCnKfa+P7PlYZ36/bqnbW7zXv3Hzx81FrfONKyUAz6THKpTkKqgacZ9E1qOJzkCqgIORyH528rfjwCpVOZHZpDmeC xlkapYwaJw1aCRHUJGFUfraDkhiYmPIwAWsJrgMYQWauR6m+Qc+sxWQojR60Nv12r+fv7Oxiv73rB0HQdYm/HXR7Hdxp+7PY3Fs9+ PX965dv+4P1RstZIVwlzJOtT7t+Lk5K6kyKeNgm6TQkFN2TmMoZ42weMtJQxJ5VZm8Exd8lUPzI2YOCs2qQCNK2XJQoXWUxE6R 4X0VaJ17HTwkTdM1dwXhjI2PwtUcGxkbhqPB6mCpjhU5dQplJXBGYJVZQZ9z1N8g5ckQo+unM/5aCokep5SaiKBZ1YV3RMXlTZ/4 yu2RdGlzW3SAZjJoWg2bAkY1te/s7YXoWj0YKOajRawKgG4wWMazBZwKQGXVUklHxYNVvyclIzTJcNU2vdDF0OCr45OQranZft4MA NU4DmsYaeoKfoGeqgV2gPvUf7qI8Y+oF+oz/or7fhdb3X3pu5tbFysecxWgrvwz/q7zpu</latexit>zThe zevent zis zin ... <latexit sha1_base64="yEw52jcYOQbo5QxAJyMNMUtfnw="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CaphrSxZsNC6FJFz1EhfZbX4N3ZSmKQ3d FnzwtCMzGdJCg6NhPWmYMwUJYaXrsFEMRcCkjFWmBi3z1b4grqQir5y32dU4WNVLtViFUq8My60Gn4uO7+Z3R7vjC6rUdZnRKpB A4i6twaqvLXzO1V+FksqCTBk0WMGnAdAHTBhwv4LgBXaowkjyuly15NWsYymVDa27octDgf9uDoO3+0EB+6YAjCvVfAQPAI7wAf PwB54CfbBABDwAXwCX8BX75v30zvzfs2t3srFO/fBUnm/wD5ARof</latexit>z⇤ in <latexit sha1_base64="PFrDajDHYwuGYWrQW/ks/ZLSBpw=" >ADP3icfZLNbtNAFIWnLpQSfpqWBQs2I6pKCKHINi0ku0qwYINoJdJW6kTReDx2Rp3xWDPjJMah2DC7BgAw/BljdAPA7xJY d4QoSg1cydLR+Y6te69vlHOmje9/XfPWr1zduLZ5vXj5q3bW+3tnRMtC0Von0gu1VmENeUso3DKdnuaJYRJyeRhfPan46pkoz mb02ZU4HAqcZSxjBxlnD9l0ksBlFSfXGDitk6NRUTFsLh+1dv9Pr+fv7B9DvHPhGHad8B+H3V4Ag4/q93DjeNvX969/XA03PbaK JakEDQzhGOtzwM/N4MK8MIp7aFCk1zTC5wSqtZ3xbuOSuGiVTuyQycuSu5urfciKmLQsME1bB2ViJYaF2KyCVqpC+z2vwbOy9M0 h1ULMsLQzMy7yUpODQS1nuCMVOUGF46gYlibghIRlhYtw2W+g5dUMq+tJ91VOFTZSPawQVqnAU+uGTtGjWv0vyLJF0KnWHsrohE ghcBZXaGKrxY+Z2MtwPF7ScYMmS5g0YLqEaQOlnDUgG4qFEke18uWvJo2AuVqoLTW3dDiUOC/xUnYCZ50wmN3TCGY1ya4B+6DByA AT8EheAGOQB8QYMF78BF8j57370f3s951Fv784dsFLer9/QGBqL</latexit>zis <latexit sha1_base64="2dLuqRUZLU0BWNzWO4niWO+3Cc=" >ADQnicfZLPbtNAEMa3BkoJ/9Jyg8uKqhJCyHJMS5NbJThwQbQSaSvVUbRej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y3Ve1rXbm5vloP8WJ2E/2O+H8LeUbjcoG3ylDwjL0hADsgReUuOyZBwck+kc/ki/fV+7 98H5eW72N5Z3HZC28X78BPSASeg=</latexit>xin Figure 1: Illustration of the MaPP method as used in the …

Content truncated to 500 words

Labeled Text

AbstractWe present a method for exploring regions around individual points in a contextualized vector space (particularly, BERT space), as a way to investigate how these regions correspond to word senses. By inducing a contextualized “pseudoword” vector as a stand-in for a static embedding in the input layer, and then performing masked prediction of a word in the sentence, we are able to investigate the geometry of the BERT-space in a controlled manner around individual instances. Using our method on a set of carefully constructed sentences targeting highly ambiguous English words, we find substantial regularity in the contextualized space, with regions that correspond to distinct word senses; but between these regions there are occasionally “sense voids”—regions that do not correspond to any intelligible sense.

Publication Details

Paper ID:
30729
Year:
2021
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan