Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyntaxBart - AAAI 24 Student Abstract

If you use the code or cite our work, please reference this one as follows :

@inproceedings{DBLP:conf/aaai/RingwaldGFMA24,
  author       = {Célian Ringwald and
                  Fabien Gandon and
                  Catherine Faron and
                  Franck Michel and
                  Hanna Abi Akl},
  editor       = {Michael J. Wooldridge and
                  Jennifer G. Dy and
                  Sriraam Natarajan},
  title        = {Well-Written Knowledge Graphs: Most Effective {RDF} Syntaxes for Triple
                  Linearization in End-to-End Extraction of Relations from Texts (Student
                  Abstract)},
  booktitle    = {Thirty-Eighth {AAAI} Conference on Artificial Intelligence, {AAAI}
                  2024, Thirty-Sixth Conference on Innovative Applications of Artificial
                  Intelligence, {IAAI} 2024, Fourteenth Symposium on Educational Advances
                  in Artificial Intelligence, {EAAI} 2014, February 20-27, 2024, Vancouver,
                  Canada},
  pages        = {23631--23632},
  publisher    = {{AAAI} Press},
  year         = {2024},
  url          = {https://doi.org/10.1609/aaai.v38i21.30502},
  doi          = {10.1609/AAAI.V38I21.30502},
}

Research question

How does the choice of a syntax impact the generation of triples using datatype properties?

The Dataset

For this purpose we finetuned the two version of the BART model (base/large) on a relation extraction on seven syntaxes. This experiment is limited to the objects of the class dbo:Person of the Enlish chapter of the DBpedia, by only focusing on the following relations : rdfs:label, dbo:birthDate, dbo:deathDate, dbo:birthYear, dbo:deathYear.

The Syntaxes

The seven syntaxes competed are the following :

A sample of the dataset represented with each syntaxes is available here

Results of the experiments

All the results of these experiments are available on weights & Biases

bart writing on chalkboard questions related to the current experience

Important notes

This code is based on a fork of REBEL. The majors updates made are the following :

  • create_dataset/ dir. contains all scripts needed for creating the datasets
  • conf/ dir.
  • src/ dir. mainly score.py adapted for being able to parse each syntax

Initialize environment (from REBEL)

In order to set up the python interpreter we utilize conda , the script setup.sh creates a conda environment and install pytorch and the dependencies in "requirements.txt".

Finetuning BART :

> conda activate MINICONDA_ENV
> export WANDB_API_KEY=API_KEY
> python ./src/train.py model=bart_base_model data=bart_turtle train=dbpedia_train

LOADING A TRAINED MODEL

Due to a "version incompatibility regarding the use of hydra/omegaconf" "Ugly hack" from REBEL issues :

Must comment out the line File "/home//virtualenv/luke/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 157, in load_from_checkpoint checkpoint[cls.CHECKPOINT_HYPER_PARAMS_KEY].update(kwargs)

python ./src/test.py model=bart_base_model data=bart_turtle train=dbpedia_train do_predict=True checkpoint_path="path_to_checkpoint"

About

AAAI Student Abstract - Well-written Knowledge Graphs

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages