|
1 | 1 | # context-probes
|
2 |
| -What is the "context" in a contextual word vector? We investigate what vectors from popular embedders such as BERT and ELMo, along with a non-contextual GLoVe baseline, encode about their contexts. |
| 2 | +What is the "context" in a contextual word vector? We investigate what vectors from popular encoders such as BERT and ELMo, along with a non-contextual GLoVe baseline, encode about their contexts. |
3 | 3 |
|
4 | 4 | ## Folders
|
5 |
| -*targeted_tasks*: This folder holds BERT, ELMo, GPT and GLoVe embedders, along with code for constructing the input to these embedders. |
| 5 | +*targeted_tasks*: This folder holds BERT, ELMo, GPT and GLoVe encoders, along with code for constructing the input to these encoders. |
6 | 6 |
|
7 |
| -*classifiers*: The neural network learners are stored here. _pytorch_classifier.py_ is the main file of interest and has code for a single layer PyTorch perceptron classifier and a three-layer PyTorch multi-layer perceptron classifier. |
| 7 | +*classifiers*: The neural network learners are stored here. _pytorch_classifier.py_ is the main file of interest and has code for a single-layer neural network classifier and a three-layer neural network classifier. Both classifiers are simple multi-layer perceptron (MLP) architectures to increase the interpretability of results and decrease the chance of overfitting. |
8 | 8 |
|
9 |
| -*results*: Holds .csv files with the results of the probing tasks. The files are in tidy data format: each line has the name of the embedder, the architecture (i.e. size) of the classifier network, the index of the word in our five-word sentences for which the contextualized embedding was constructed, and the performance on the test set. |
| 9 | +*results*: Holds .csv files with the results of the probing tasks. The files are in tidy data format: each line has the name of the encoder, the architecture (i.e. size) of the classifier network, the index of the word in our five-word sentences for which the contextualized embedding was constructed, and the performance on the test set. |
10 | 10 |
|
11 |
| -*data*: The version of this folder on the repository holds the final versions of the stimuli we use as input to the embedders in our experiments. Running _data-construction.py_ writes data to this folder. This "data" is the input to the embedders. |
| 11 | +*data*: The version of this folder on the repository holds the final versions of the stimuli we use as input to the encoders in our experiments. Running _data-construction.py_ writes data to this folder. This "data" is the input to the encoders. |
12 | 12 |
|
13 |
| -*stimuli*: Contains the ingredients for the data: the nouns and verbs annotated with positive and negative labels for each of the targeted tasks. _data-construction.py_ uses these ingredients to make the input to the embedders. |
| 13 | +*stimuli*: Contains the ingredients for the data: the nouns and verbs annotated with positive and negative labels for each of the targeted tasks. _data-construction.py_ uses these ingredients to make the input to the encoders. |
14 | 14 |
|
15 |
| -*word_content*: Holds the embedders for the word identity probing tasks. |
| 15 | +*word_content*: Holds the encoders for the word identity probing tasks. |
0 commit comments