File size: 4,137 Bytes
b96674d
 
af683f4
 
d7cd8ae
6c892ea
 
 
 
 
 
82d6f17
b96674d
251b686
b96674d
 
 
528a696
 
b96674d
bd7a6a6
b96674d
 
 
 
 
528a696
af683f4
0bfbe46
af683f4
8178aa9
af683f4
8178aa9
 
 
 
 
 
 
af683f4
e9c4c90
 
4a151bd
af683f4
b96674d
bd7a6a6
af683f4
9a0e32a
af683f4
 
b96674d
 
 
9a0e32a
528a696
b96674d
 
 
 
8178aa9
 
528a696
b96674d
9a0e32a
b96674d
8178aa9
 
 
b96674d
 
 
 
528a696
b96674d
 
 
 
 
 
 
 
 
 
 
bd7a6a6
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
---
library_name: transformers
language:
- en
inference: false
tags:
- emotion recognition
- valence
- arousal
- stories
- fairytales
pipeline_tag: text-classification
---
## Modeling Emotional Trajectories in Written Stories

<!-- Provide a quick summary of what the model is/does. -->

This model is intended to predict emotions (valence, arousal) in written stories. For all details see [the paper](http://arxiv.org/abs/2406.02251) and 
[the accompanying github repo](https://github.com/lc0197/emotional_trajectories_stories).



### Model Description

<!-- Provide a longer summary of what this model is. -->

As described in [the paper](http://arxiv.org/abs/2406.02251), this model is finetuned from [DeBERTaV3-large](https://huggingface.co/microsoft/deberta-v3-large) and predicts sentence-wise valence/arousal values between 0 and 1. 

This particular checkpoint was trained with a window size of 4. 

All available checkpoints and their performance measured by Concordance Correlation Coefficient (CCC):

| Model                                                                  | Valence dev/test   | Arousal dev/test   |
|------------------------------------------------------------------------|--------------------|--------------------|
|[stories-emotion-c0](https://huggingface.co/chrlukas/stories-emotion-c0)| .7091/.7187        | .5815/.6189        |
|[stories-emotion-c1](https://huggingface.co/chrlukas/stories-emotion-c1)| .7715/.7875        | .6458/.6935        |
|[stories-emotion-c2](https://huggingface.co/chrlukas/stories-emotion-c2)| .7922/.8074        | .6667/.6954        |
|[stories-emotion-c4](https://huggingface.co/chrlukas/stories-emotion-c4)| .8078/.8146        | .6763/.7115        |
|[stories-emotion-c8](https://huggingface.co/chrlukas/stories-emotion-c8)| **.8223**/**.8237**| **.6829**/**.7120**|

We provide the best out of 5 seeds for each context size. Hence, the numbers in this table differ from the result table in the paper, where the mean performance across 5 seeds is reported.

Technically, this model predicts token-wise valence/arousal values. Sentences are concatenated via the ``[SEP]`` token, where the valence/arousal predictions for an ``[SEP]`` token
are meant to be the predictions for the sentence preceding it. All other tokens' predictions should be ignored. For reference, see the figure in the paper:

![image](tales_vertical.png)

The [accompanying repo](https://github.com/lc0197/emotional_trajectories_stories) provides a convenient script to use the model for prediction.

### Model Sources

<!-- Provide the basic links for the model. -->

- **Repository:** [Github](https://github.com/lc0197/emotional_trajectories_stories)
- **Paper:** [ArXiv](http://arxiv.org/abs/2406.02251)

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
This model is intended to predict emotions (valence, arousal) in written stories. It was mainly trained on stories for children. 
Please note that the model is not production-ready and provided here for demonstration purposes only. 
For details on the datasets used, please refer to the [paper](http://arxiv.org/abs/2406.02251).

In the [github repository](https://github.com/lc0197/emotional_trajectories_stories), a convenient script to predict V/A in existing texts is provided. Example call: 

``
python3 predict.py --input_csv input_file.csv --output_csv output_file.csv --checkpoint_dir chrlukas/stories-emotion-c4 --window_size 4 --batch_size 4
``

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->
Please see the *Limitations* section in [the paper](http://arxiv.org/abs/2406.02251). Please note that the model is not production-ready and provided here for demonstration purposes only. 


## Citation [optional]

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

**BibTeX:**


## Model Card Contact

For further inquiries, please contact lukas1[dot]christ[at]uni-a[dot].de