Skip to content

Commit 52ddf1b

Browse files
authored
Update readme.md
1 parent 8503489 commit 52ddf1b

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

readme.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
11
# Multimodal named historical entity recognition
2-
This master's thesis focuses on issues associated with multimodal recognition and the creation of multimodal dataset..
2+
This is the source code for my master's thesis which focused on multimodal named entity recognition. We wanted to explore the depths of multimodal recognition and to see if additional modality helps with this task.
3+
We have used BERT and Llama 3.1 as main modules for the *text modality*. ViT and AlexNet based CNN were used to process image data.
4+
# Datasets
5+
We have created a custom historical dataset from Czech-Bavarian books which we are sadly unable to publish.
6+
We have used Twitter17 and Twitter2015 datasets which are publicly available and can be used to perform a robust evaluation.
7+
8+
# Proposed models
9+
Architecture of proposed models is depicted below. The images are hideous, I will resize them eventually (right).
10+
## Linear fusion model
11+
This model is fairly simple and standard - it concatenates the features from text and vision module and makes a prediction from them
12+
![alt text](architecture/linear_fusion_bert_twitter.png)
13+
## Cross attention fusion model
14+
I wanted to explore the possible cross-attention fusion with modalities. It is possible and the model performs well for all three datasets.
15+
![alt text](architecture/cross_attention_bert_twitter.png)
16+
## Partial prediction
17+
My personal favourite altought it might be a bit dumb. The idea is to make a prediction from the text and the image features alone and then fuse them together to make a final prediction. This model works surprisingly well.
18+
![alt text](architecture/partial_prediction.png)
19+
20+
# Results
21+
The best results for T17 and T15 datasets. I have used token-wise macro F1 which is a very strict metric for this task.
22+
| Dataset | Model | Macro F1 score (%)
23+
| :--------: | :-------: | :-------: |
24+
| T17 | Linear fusion, BERT+VIT | 83.12%
25+
| T17 | Cross attention, BERT+CNN | 82.72%
26+
| T17 | Partial prediction, BERT+CNN | 80.35%
27+
| T15 | Linear fusion, BERT+VIT | 75.32%
28+
| T15 | Cross attention, BERT+VIT | 75.93%
29+
| T15 | Partial prediction, BERT+VIT | 74.93%
30+
31+
# Improvements
32+
The devils lies in the dataset preprocessing. A more complex preprocessing (I have tried filterening non-word characters using predicates in [here](src/data/text_data_processor/FilteringJsonDataProcessor.py).
33+
This does not seem to help the model very much. A viable way is to pretrain the model on some custom dataset which could help with the heavy class imbalance.
34+
Another interesting path could be to filter out entire tweets with low class variabily.
35+
I have looked at other solutions from various researchers much smarter than me but it seems like they are tailoring their model architecture to perform well specifically on T17 dataset as they achive better results that us but we beat them on T15.

0 commit comments

Comments
 (0)