ltg
/

File size: 5,317 Bytes
c7b38b2
f8448d1
 
 
 
 
 
 
 
 
 
 
 
 
 
2a9ae2d
c7b38b2
f8448d1
4b3f745
c7b38b2
f8448d1
 
 
 
 
 
 
 
dc5bc99
 
 
63c09a7
 
cf6c1d4
63c09a7
 
f8448d1
 
a181c7b
 
f8448d1
 
 
 
 
2a9ae2d
f8448d1
 
 
 
 
 
 
 
 
 
 
 
2a9ae2d
f8448d1
8aa6567
f8448d1
 
2a9ae2d
f8448d1
8aa6567
f8448d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dede9f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
tags:
- text2text-generation
- definition-modeling
metrics:
- rouge, bleu, bert-f1
model-index:
- name: flan-t5-definition-en-xl
  results: []
language:
- en
widget:
- text: "He ate a sweet apple. What is the definition of apple?"
  example_title: "Definition generation"
- text: "The paper contains a number of original ideas about color perception. What is the definition of original?"
  example_title: "Definition generation"
license: cc-by-sa-4.0
datasets:
- marksverdhei/wordnet-definitions-en-2021
---

# FLAN-T5-Definition XL

This model is a version of [FLAN-T5 XL](https://huggingface.co/google/flan-t5-xl) finetuned on a dataset of English definitions and usage examples.

It generates definitions of English words in context.
Its input is the usage example and the instruction question "What is the definiton of TARGET_WORD?"

This project is a collaboration between the [Dialogue Modelling Group](https://dmg-illc.github.io/dmg/) at the University of Amsterdam 
and the [Language Technology Group](https://www.mn.uio.no/ifi/english/research/groups/ltg/) at the University of Oslo.

## Sizes:
- [FLAN-T5-Definition Base (250M parameters)](https://huggingface.co/ltg/flan-t5-definition-en-base)
- [FLAN-T5-Definition Large (780M parameters)](https://huggingface.co/ltg/flan-t5-definition-en-large)
- [FLAN-T5-Definition XL (3B parameters)](https://huggingface.co/ltg/flan-t5-definition-en-xl)

## Model description

See details in the paper [`Interpretable Word Sense Representations via Definition Generation: The Case of Semantic Change Analysis`](https://aclanthology.org/2023.acl-long.176/) 
(ACL'2023) by Mario Giulianelli, Iris Luden, Raquel Fernandez and Andrey Kutuzov.

## Intended uses & limitations

The model is intended for research purposes, as a source of contextualized dictionary-like lexical definitions.

The fine-tuning datasets were limited to English.
Although the original FLAN-T5 is a multilingual model, we did not thoroughly evaluate its ability to generate definitions in languages other than English. 

Generated definitions can contain all sorts of biases and stereotypes, stemming from the underlying language model.


## Training and evaluation data

Three datasets were used to fine-tune the model:
- *WordNet* ([Ishiwatari et al., NAACL 2019](https://aclanthology.org/N19-1350/)), also [available on HF](https://huggingface.co/datasets/marksverdhei/wordnet-definitions-en-2021)
- *Oxford dictionary or CHA* ([Gadetsky et al., ACL 2018](https://aclanthology.org/P18-2043/))
- English subset of *CodWoE* ([Mickus et al., SemEval 2022](https://aclanthology.org/2022.semeval-1.1/))

FLAN-T5-Definition XL achieves the following results on the WordNet test set:
- BLEU: 32.81
- ROUGE-L: 52.21
- BERT-F1: 92.16

FLAN-T5-Definition XL achieves the following results on the Oxford dictionary test set:
- BLEU: 18.69
- ROUGE-L: 38.72
- BERT-F1: 89.75

## Training procedure
FLAN-T5 XL was fine-tuned in a sequence-to-sequence mode on examples of contextualized dictionary definitions.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- total_train_batch_size: 16
- total_eval_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 20.0

### Framework versions

- Transformers 4.23.1
- Pytorch 1.12.1+rocm5.1.1
- Datasets 2.4.0
- Tokenizers 0.12.1

## Citation

```
@inproceedings{giulianelli-etal-2023-interpretable,
    title = "Interpretable Word Sense Representations via Definition Generation: The Case of Semantic Change Analysis",
    author = "Giulianelli, Mario  and
      Luden, Iris  and
      Fernandez, Raquel  and
      Kutuzov, Andrey",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-long.176",
    doi = "10.18653/v1/2023.acl-long.176",
    pages = "3130--3148",
    abstract = "We propose using automatically generated natural language definitions of contextualised word usages as interpretable word and word sense representations.Given a collection of usage examples for a target word, and the corresponding data-driven usage clusters (i.e., word senses), a definition is generated for each usage with a specialised Flan-T5 language model, and the most prototypical definition in a usage cluster is chosen as the sense label. We demonstrate how the resulting sense labels can make existing approaches to semantic change analysis more interpretable, and how they can allow users {---} historical linguists, lexicographers, or social scientists {---} to explore and intuitively explain diachronic trajectories of word meaning. Semantic change analysis is only one of many possible applications of the {`}definitions as representations{'} paradigm. Beyond being human-readable, contextualised definitions also outperform token or usage sentence embeddings in word-in-context semantic similarity judgements, making them a new promising type of lexical representation for NLP.",
}
```