U4RASD/DRU-RE-EntityPair-TwoHead-NeoAraBERT-NoInteractions
0
DRU-RE EntityPair TwoHead
Arabic relation extraction model based on U4RASD/NeoAraBERT.
Architecture
The marked sentence is encoded by U4RASD/NeoAraBERT. The classifier explicitly extracts:
- the contextual CLS vector,
- the contextual opening subject-marker vector,
- the contextual opening object-marker vector,
- a 42-dimensional directional OneHot entity-type vector.
These are concatenated into 3H + 42 dimensions and compressed through a 1024 -> 512 pair MLP.
The shared pair representation feeds two heads:
- binary relation-existence head: no relation vs relation exists;
- 40-way positive-relation head: relation type, with no
no_relationclass.
For no_relation rows, only the existence loss is used. The positive-relation head is trained only on positive rows.
Threshold
The existence threshold is tuned on labeled val.jsonl to maximize positive micro F1. The threshold used for the official prediction was 0.5000 from explicit_env_override.
Main files
model/pytorch_model.binmodel/modeling_entity_pair_two_head.pyconfigs/run_config.json(includes the exact base encoder and resized tokenizer size)configs/architecture_config.jsonartifacts/existence_threshold_sweep.csvartifacts/submission.zipartifacts/predictions.txt
