This repository is the official implementation of [Alexandria](paper link).
To create a conda environment named Alexandria and install requirements run:
conda env create -f environment.yml
Additionally, Alexandria requires docker (that can be run without sudo). Run scripts/pull_docker_images.sh to download the necessary images.
We publish the following datasets:
See datasets notebook for an example of how to load the datasets provided below. The extraction notebook shows how to use Alexandria to extract text and tables from papers.
See the evaluation notebook for the full example of how to evaluate Alexandria on the Arxive dataset.
- pre-training language model on the ArxivPapers dataset
You can download pre-trained models here:
- axcell — an archive containing the taxonomy, abbreviations, table type classifier and table segmentation model. See the results-extraction notebook for an example of how to load and run the models
- language model — ULMFiT language model pretrained on the ArxivPapers dataset
Alexandria achieves the following performance:
| Dataset | Macro F1 | Micro F1 |
|---|---|---|
| PWC Leaderboards | XXX | XXX |
| NLP-TDMS | XXX | XXX |
- We do all evaluations with the abstracts using Lama 3 8b, 70b and Phi 3 Mini (Also Mixtral 87b and Mixtral 822b).
- Then we do exactly the same thing again for entire papers with a sliding window where the content is first
- a) paraphrased into simple, short sentences and at the same time, number salad and artifacts are filtered out... and
- b) then knowledge graph segments are created from these simple, short sentences. ...
- In addition, we do a sentence embedding and a bag of words from each of these simple, paraphrased short sentences.
- When reconstructing the original text, we can then compare how
- a) the reconstruction works directly with the knowledge graph as the only input and
- b) how the reconstruction works when you give the knowledge graph and the bag of words as input and then again c) give the knowledge graph and the bag of words as context and then reconstruct the individual sentences from the respective bag of words sentence by sentence and the reconstruction candidates with the original sentence embedding comparison and those with the highest cosine similarity are selected
The pipeline is described in the following paper: