Blog

Les établissements utilisateurs des données de Hal peuvent se féliciter de la présence de vocabulaires contrôlés disciplinaires tels que JEL, ACM ou MeSH ✨.

Car malheureusement, on revient de loin confused face : la saisie, des années durant, de mots-clés libres a généré une "dette technique de données" qui rend délicate, par exemple, la caractérisation des profils d'expertise des chercheurs ou des laboratoires à partir des données Hal [ 1 ].

Pour rendre le problème plus parlant, voici la liste des variantes de graphies pour quelques-mots clés, obtenues depuis l'API Hal :


Moyen ÂgeMoyen-ÂgeMoyen âgeMOYEN AGEMoyen ageMoyen ägeMoyen ÄgeMOyen ÂgeMoyen AGeMoyen âgeMoyen ÂgeMOYEN-AGE
Île-de-FranceIle-de-FranceIle-de-franceÎle de FranceIle-de FranceÎle-de-franceIle de franceILE DE FRANCEÏle-de-FranceÎle de franceIle-De-FranceILE-DE-FRANCEÎle-De-FranceÎle-de-France
Partenariat public-privéPartenariat public privéPartenariat Public-PrivéPartenariat public/privéParténariat public-privéPartenariat public-PrivéPartenariat Public PrivéParténariat public-PrivéPartenariat public-privé


Même si ces exemples n'ont pas été choisis tout à fait au hasard face with rolling eyes, ils donnent une petite idée, a posteriori et a contrario, de l'importance qu'il y a à fournir des mécanismes de suggestion ("autocomplétion" ) basés sur des vocabulaires reconnus.

Et pas seulement pour limiter les "variantes" orthographiques 🙈 .

Car idéalement, pour gérer les informations sur la recherche selon les canons des "FAIR Data" sports medal , il faudrait également disposer pour chaque concept d'un identifiant unique (une URI) se prêtant, si possible, à un « déréférencement » : une opération qui consiste à naviguer  woman rowing boat sur le web jusqu'à la source de données indiquée par l'URI (qui est aussi, souvent, une URL : c'est pratique  😊 ). 

Par exemple, pour "Partenariat public-privé", si on disposait d'une URI telle que https://catalogue.bnf.fr/ark:/12148/cb13755654m ou https://www.idref.fr/061611514, on pourrait en tirer une foule de bénéfices  : des traductions, des alignements avec des vocabulaires tiers (Public-private sector cooperation de la Library of congress flag: United States ), des variantes... Ou tout simplement vérifier qu'on a des données correctes face with monocle .

En pratique, c'est un peu compliqué 


Normalement, ce qui précède vous a motivés 🤓 - si vous ne l'étiez pas déjà - à vouloir tirer tout le parti possible des quelques vocabulaires contrôlés (JEL, MeSH, ACM) proposés au sein des données Hal.

 C'est ce que nous avons voulu faire dans le cadre du projet SoVisu+, du consortium CRISalid.

Le consortium CRISalid

La communauté CRISalid réunit plusieurs établissements qui œuvrent ensemble à l'automatisation de la construction de leur "graphe de connaissance institutionnel", socle de la gestions des informations sur la recherche.

view Communauté CRISALID

Prenons le cas du vocabulaire JEL (pour «Journal of Economic Literature»). C'est un système de classification des publications 📊 qui émane l'American Economic Association (AEA) et s'applique aux publications ... dans le domaine de l'économie (vous vous en étiez doutés 🤷‍♂️).

Sur son site web, l'AEA fournit certes le vocabulaire avec ses codes et ses définitions , mais ne pousse pas la gentillesse 🤗 jusqu'à proposer les fameuses "URI" qui permettraient d'intégrer ces concepts parmi d'autres données "sémantiques" 😞. Par exemple, le code "A14" représente "Sociology of Economics", mais son unicité est loin d'être garantie : bien de choses, sur la terre globe showing Americas , sont susceptibles de s’appeler A14, par exemple des autoroutes 🛣️ ou des avions  ✈️. Le code "A14" ne comporte aucun indice magnifying glass tilted left qui permettrait à un système de découvrir l'information associée. On peut parler de vocabulaire « à l'ancienne » 🕰️ en quelque sorte, avec des codes qui étaient peut-être suffisants dans un contexte fermé, mais qui ne font plus sens sur le grand océan du web water wave .

Mais ce sont ces codes 🔢 que l'on retrouve dans les données issues de HAL...

Prenons à titre d'exemple une publication en économie pourvue des fameux domaines JEL : https://hal.science/hal-02169144v1

Et interrogeons à son sujet le endpoint Sparql de Hal. (http://sparql.archives-ouvertes.fr/sparql ) :

Nos classifications JEL figurent bien dans le résultat. Mais comment les exploiter thinking face  ? On voit que l'équipe HAL elle-même a dû être embêtée 😅 par l'absence d'un vrai vocabulaire et a essayé de contourner le problème un créant un prédicat ad hoc "jelSubject" dans une ontologie maison house with garden ... Des pratiques certes courantes sur le web sémantique, mais qui relèvent de la petite cuisine 🍲.

Nous pourrions bien nous donner la peine de rabouter hammer and wrench  les labels et les identifiants en interrogeant l'API JSON de HAL (https://api.archives-ouvertes.fr/search?q=halId_s:hal-02169144&fl=*), à condition de faire confiance à l'ordre des résultats. Mais on est loin de la richesse promise money-mouth face par les vocabulaires contrôlés !

SKOS à la rescousse

À ce stade, on commence à se dire que ce serait quand-même beaucoup plus simple si quelqu'un avait publié le vocabulaire JEL quelque part sur le web dans un format moderne, typiquement SKOS (simple knowledge organization system), qui est le standard du web sémantique pour la représentation des vocabulaires books

Ça tombe bien : quelqu'un l'a fait 👏 ! Le Leibniz-Informationszentrum Wirtschaft (non, n'essayez pas de le prononcer 😅 ). Cette institution a converti le vocabulaire JEL au format SKOS et l'a publié sur l'application Skosmos https://zbw.eu/beta/skosmos/jel/en/. L'information qu'il contient est devenue ainsi accessible aussi bien aux robots 🤖 qu'aux humains 👤.

Une petite «concaténation» plus tard et le tour est joué magic wand : quand Hal nous envoie "G.G1.G13", il ne nous reste plus :

Mais n'avons nous pas vendu un peu vite la trop vite la peau de l'ours bear ...

À l'usage, il s'avère que le site https://zbw.eu/beta/skosmos n'est pas en pleine forme 🤒 et qu'il cesse rapidement de répondre lorsque les requêtes arrivent en rafales... Pour couronner le tout crown , les liens de téléchargement proposés par l’institution sur la page d'accueil du vocabulaire répondent invariablement "404" 😞 .

En serons nous quitte pour pour refaire tout le travail 😓 de formalisation SKOS et republier le vocabulaire dans un nouveau domaine ?

Sauvés par la Wayback Machine

C'est dans ces cas là qu'il faut penser light bulb à la fameuse "Wayback Machine" d'Internet Archive (https://web.archive.org/) 🥁 [ 2 ]. Coup de chance , le fichier SKOS contenant l'ensemble du vocabulaire JEL de la ZBW a été régulièrement archivé, et la dernière fois, pas plus tard qu'en janvier 2024 ! 

https://web.archive.org/web/20240000000000*/https://zbw.eu/beta/external_identifiers/jel/download/jel.rdf.zip

« La confiance n'exclut pas le contrôle » 🤨  : un petit coup de qSkos, le magnifique utilitaire de Christian Mader, permettra de lever les doutes (on peut aussi jouer avec le fichier sur SkosPlay).

~/qSKOS/target$ java -jar qSKOS-cmd.jar analyze -dc mil,bl ../jel_2024.rdf -o report.txt
Initializing evaluation repository for jel_2024.rdf...
trying to create report file report.txt
file.exists()=false
file.canRead()=false
file.canWrite()=false
file.canExecute()=false
Processing issue 1 of 27 (Empty Labels)
Processing issue 2 of 27 (Omitted or Invalid Language Tags)
Processing issue 3 of 27 (Incomplete Language Coverage)
Processing issue 4 of 27 (Undocumented Concepts)
guessing publishing host
Guessed authoritative resource identifier: 'zbw.eu'         
Processing issue 5 of 27 (No Common Languages)              
Processing issue 6 of 27 (Missing Labels)
Processing issue 7 of 27 (Overlapping Labels)
Collecting resource labels
Processing issue 8 of 27 (Orphan Concepts)                  
Processing issue 9 of 27 (Disconnected Concept Clusters)
Processing issue 10 of 27 (Cyclic Hierarchical Relations)   
Creating hierarchy graph
Processing issue 11 of 27 (Valueless Associative Relations)
Processing issue 12 of 27 (Solely Transitively Related Concepts)
Processing issue 13 of 27 (Omitted Top Concepts)
Processing issue 14 of 27 (Top Concepts Having Broader Concepts)
Processing issue 15 of 27 (Hierarchical Redundancy)
Processing issue 16 of 27 (Mapping Relations Misuse)        
Processing issue 17 of 27 (Reflexively Related Concepts)
Processing issue 18 of 27 (Ambiguous Notation References)   
Processing issue 19 of 27 (Unprintable Characters in Labels)
Processing issue 20 of 27 (Missing Out-Links)               
finding resources
Processing issue 21 of 27 (Undefined SKOS Resources)        
Processing issue 22 of 27 (Unidirectionally Related Concepts)
Processing issue 23 of 27 (HTTP IRI Scheme Violation)
Processing issue 24 of 27 (Relation Clashes)
Processing issue 25 of 27 (Mapping Clashes)                 
Processing issue 26 of 27 (Inconsistent Preferred Labels)
Processing issue 27 of 27 (Disjoint Labels Violation)
Report complete!

* Summary of Quality Issue Occurrences:
Empty Labels: OK (no potential problems found)
Omitted or Invalid Language Tags: OK (no potential problems found)
Incomplete Language Coverage: OK (no potential problems found)
Undocumented Concepts: FAIL (997)
No Common Languages: OK (no potential problems found)
Missing Labels: OK (no potential problems found)
Overlapping Labels: FAIL (365)
Orphan Concepts: OK (no potential problems found)
Disconnected Concept Clusters: FAIL (20)
Cyclic Hierarchical Relations: OK (no potential problems found)
Valueless Associative Relations: OK (no potential problems found)
Solely Transitively Related Concepts: OK (no potential problems found)
Omitted Top Concepts: FAIL (1)
Top Concepts Having Broader Concepts: OK (no potential problems found)
Hierarchical Redundancy: OK (no potential problems found)
Mapping Relations Misuse: OK (no potential problems found)
Reflexively Related Concepts: OK (no potential problems found)
Ambiguous Notation References: OK (no potential problems found)
Unprintable Characters in Labels: OK (no potential problems found)
Missing Out-Links: FAIL (997)
Undefined SKOS Resources: OK (no potential problems found)
Unidirectionally Related Concepts: FAIL (977)
HTTP IRI Scheme Violation: FAIL (1)
Relation Clashes: OK (no potential problems found)
Mapping Clashes: OK (no potential problems found)
Inconsistent Preferred Labels: OK (no potential problems found)
Disjoint Labels Violation: OK (no potential problems found)

Zéro erreur keycap: 0 sur les critères de qualité essentiels ! Une performance 1st place medal qu'on se doit de saluer.

Pour nous, voilà qui offrait une vraie issue door : une fois le vocabulaire récupéré, il suffisait de le charger dans un serveur adapté aux données sémantiques (Apache Jena Fuseki) et d'empaqueter le tout dans un container Docker package !

Le tout est publié sur Github et le Dockerhub sous le doux nom de "svp-jel-proxy' (les informaticiens sont des poètes... 📜 )

C'est juste une toute petite surcouche sur les "Docker Tools" d'Apache Jena Fuseki  - au passage, dommage qu'on ne puisse pas s'appuyer plutôt sur une image Docker officielle 🤔.

Le vocabulaire JEL du Leibniz-Informationszentrum Wirtschaft sera désormais disponible bottle with popping cork  au sein de notre système "SoVisu+" sous forme d'un microservice, afin d'assister l'intégration des données de Hal au graphe de connaissance institutionnel !

Do it yourself

À ce stade, vous brûlez 🤩 d'impatience de manipuler vous-même ce composant, et on le comprend bien.

Prérequis

On suppose que vous disposez d'un environnement en ligne de commande de type Unix, comme un Mac, le Windows subsystem for linux, ou pourquoi pas - on a tous le droit de rêverfirst quarter moon face - une vraie machine sous Linux, et que vous y avez déjà installé Docker.

Démarrez rocket  svp-jel-proxy sur un port de votre choix (dans cet exemple, 8888) :

docker container run --rm -it -p 8888:3030 crisalidesr/svp-jel-proxy

Votre machine héberge désormais un Fuseki chargé avec le vocabulaire Jel et disponible à l'adresse http://localhost:8888/jel/sparql. 

Pour la suite, installez un outil tel que Postman qui vous facilitera l'édition de requêtes. Utilisez de préférence le verbe HTTP POST, sans quoi vous aurez du mal avec les sauts de lignes.

Pour tester l'affichage de la notice complète de http://zbw.eu/beta/external_identifiers/jel#E24

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX void: <http://rdfs.org/ns/void#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dc: <http://purl.org/dc/terms/>
CONSTRUCT { ?concept rdf:type skos:Concept ; skos:prefLabel ?prefLabel ; skos:altLabel ?altLabel ; skos:notation ?notation ; skos:relatedMatch ?relatedMatch ; skos:narrowMatch ?narrowMatch ; skos:broadMatch ?broadMatch ; skos:inScheme ?scheme ; dc:isPartOf ?dataset ; rdfs:label ?label . ?scheme rdf:type skos:ConceptScheme ; skos:prefLabel ?schemeLabel . ?dataset rdf:type void:Dataset ; rdfs:label ?datasetLabel .}
WHERE { BIND(<http://zbw.eu/beta/external_identifiers/jel#E24> AS ?concept)
OPTIONAL { ?concept skos:prefLabel ?prefLabel . }
OPTIONAL { ?concept skos:altLabel ?altLabel . }
OPTIONAL { ?concept skos:notation ?notation . }
OPTIONAL { ?concept skos:relatedMatch ?relatedMatch . }
OPTIONAL { ?concept skos:narrowMatch ?narrowMatch . }
OPTIONAL { ?concept skos:broadMatch ?broadMatch . }
OPTIONAL { ?concept skos:inScheme ?scheme . ?scheme skos:prefLabel ?schemeLabel . }
OPTIONAL { ?concept dc:isPartOf ?dataset . ?dataset rdfs:label ?datasetLabel . }
OPTIONAL { ?concept rdfs:label ?label . FILTER (LANG(?label) = "en" || LANG(?label) = "de" || LANG(?label) = "fr" || LANG(?label) = "es") }}

En guise de conclusion

On prend la mesure au travers de cet exemple du caractère fragile du déploiement des technologies du web sémantique. La pratique est souvent bien loin de la théorie books , selon laquelle les données vont s'agréger miraculeusement magic wand  par la seule vertu des URI et des inférences. Même en utilisant des plateformes nationales , ayant pignon sur rue office building , telles que Hal, les établissements doivent faire eux-même une grande partie du chemin🚶‍♂️ jusqu'aux "linked data"...

Raison de plus pour travailler en mode mutualisé, sachant qu'il sera toujours plus facile de réaliser la maintenance 🔧  corrective/adaptative sur des composants partagés. Imaginez que demain

  • le Leibniz-Informationszentrum Wirtschaft corrige 🔧 les problèmes de son serveur
  • ... ou publie une nouvelle version NEW button du vocabulaire JEL...
  • ... ou que HAL ou une autre institution classical building  publie le vocabulaire dans son propre domaine...
  • ... ou que HAL remplace les codes input numbers par des URI link dans les données...

Notre solution n'apparaîtra plus que comme un bricolage 🪛 provisoire qui aura vocation à être modifié ou remplacé !

Le cas des économistes bar chart étant traité, c'est le tour des médecins 🩺 : dans un prochain billet, nous essaierons d'exploiter la classification Mesh au sein des données HAL.


Notes


  1. On n'oubliera pas toutefois de mentionner ici les louables efforts de l'équipe scanR pour fournir des versions des métadonnées Hal réalignées sur Idref/Rameau et WikiData grinning face  !
  2. Si vous ne connaissez pas ou mal Internet archive, on vous recommande d'écouter la radio radio .





One of the issues to be resolved by the CRISalid community, specifically within our "SoVisu+" project,  is achieving a comprehensive recording of scientific production by research institutions.

The "SoVisu+ Harvester" project aims to provide a robust and flexible solution for parallel querying of the many platforms that reference researchers' publications : on the French level, archives like Hal, Sudoc, OpenEdition etc. and aggregators such as a Scanr, data.idref.fr; on the international level OpenAlex, Pubmed, Wos, Scopus...). Additionally, the tool ensures the conversion of these references to a common standardized model (inspired by the ABES SciencePlus model, which in turn is based on the most popular ontologies in the field), in order to record them in the institutional knowledge graph.

Institutions will then 'just' have to work on collecting and aligning their researchers' identifiers (idref, idHal ORCID, etc.), a task that can be aided by the mass alignment services offered by ABES/IdRef, and soon by the SoVisu+ software itself, which will offer this feature.

Solving one problem makes another worse

However, in addressing the challenge of gathering data from different platforms, the SoVisu+ Harvester introduces a new challenge around deduplication.

It's not unusual for bibliographic references to have been entered manually, on several platforms, by different researchers or support staff, and for their metadata to differ slightly. At the level of an institution, it can represent a significant challenge to distinguish between real duplicates and false duplicates - publications on similar subjects by the same authors, variations on an article or derivative works, preprints, etc. - especially when metadata are poor and when identifiers such as DOIs are missing. The problem of deduplication is one of those for which traditional algorithmic approaches, such as rule engines, have revealed limitations.

Don't GPT 4 or Llama 2 make the problem easy? 

One might think that with the advent of the large language models of the GPT-3 generation, the solution to the problem is just around the corner: can't anyone experience that a modern chat is capable, if given the appropriate prompt, of discriminating between true and false duplicates? 

And even if a generalist chat can't do it very well, wouldn't it just take a little fine-tuning for it to perform as well as a library professional?  Simply deploy such an LLM behind an API and you're done.

Perhaps this is only due to the current state of the art of LLMs, but we identify two problems with this idea :

  • The first problem is that if an LLM has to compare all publications in pairs to determine which are duplicates, it will generate a huge number of queries, or extremely long prompts. 

Whether the model is accessed in "Saas" (software as a service) mode and charged on a per token basis, or whether you've deployed it on your own GPUs, on premise or in the cloud, it will either end up with a big bill, or with long waiting times.

Therefore, in any case, a first step is needed to identify duplicate candidates, and this step should be designed economically : it can't rely on recent, resource-intensive large language models.

  • The second problem is that the prompt engineering approach will inevitably require LLMs with billions of parameters.

Even if the first stage of identifying candidate duplicates has been implemented, it's still preferable to work cost-efficiently. Basically, the deduplication issue can be reduced to a classification problem: this type of problem can typically be addressed using encoding-only transformers, such as the Google Bert-derived models. So why should we need a generative LLM? Deploying generative AI instead of non-generative AI, whether from an engineering, economic, or ecological perspective, is not regarded as a good practice.

SVP-merger project: solving the problem of duplicates with transformers, in a non-generative use.

Therefore, we would like to investigate an approach that doesn't rely on generative AI.

For duplicate candidates identification

We believe that the duplicate candidates identification stage could be achieved:

  • either via a semantic search (projection of bibliographic references embeddings into a high-dimensional vector space and nearest neighbor search) 
  • or even simply with the good old scoring/ranking functionalities of similar records offered by Lucene-based search engines (Solr, Elastic)

The good news is that we no longer have to choose between the two strategies: SolR and Elastic both offer support for text representation as dense vectors, and the latest versions of Elastic even come with a combination of the two approaches (Hybrid search with reciprocal rank fusion). However, if it becomes evident that semantic search is the most efficient approach,, this may pose the question of fine-tuning or even re-training the encoder model (see below), especially if we want to perform embeddings on the entire bibliographic record, and not just on the title.

It's worth noting that this sequence of calls (semantic search - LLM) is very similar to current RAG (retrieval augmented generation) architectures, which are becoming a real design pattern in the field. Therefore, it may be possible to implement it via an orchestrator such as LangChain, which offers, and this is good news, on the shelf integrations for Solr and Elastic.

For duplicate resolution

Here comes the tricky part: automatically discriminating true duplicates from false ones.

It was quite surprising for us to discover that, while exploring the landscape of state-of-the-art tools for deduplicating bibliographic references, no one seems to have tried to address the problem with a "cross-encoder" such as those proposed by the popular Sentence Transformers ecosystem.  It appears to us, however, that this is a straightforward and well-established way of solving deduplication problems involving natural language content. A few works have used Bert to calculate semantic similarities between items, but they don't benefit from the Sentence Transformer architecture, nor train classifiers. (Gyawali 2020)

As a reminder, Sentence Transformers are an optimization of the Bert family models. Sentence Transformers use the architecture of siamese Bert networks to obtain better quality embeddings at a higher level of granularity than the word. It is possible to plug a downstream task (typically a classification task) into the pre-trained model, then train the task on a specific set of data, which also results in fine-tuning of the model. The cross encoder option is optimal whenever the task in question requires the classification of sentences taken in pairs (cause and effect, synonims/antonyms, duplicates, etc.). 

Solution overview

The diagram below shows the architecture of the solution proposed in this two-stage approach:

  1. Embedding of the bibliographic reference and nearest neighbor search within a semantic index (or a hybrid index containing both structured metadata and vectors).
  2. Assigning each potential duplicate pair a "duplicate" or "non-duplicate" label using a neural classifier based on a Bert cross-encoder.

SVP merger project challenges

Training the downstream classification task

The main disadvantage of the Bert cross-encoder based approach compared to the use of generative AI is that zero-shot and few-shot querying method are not available: training the Bert based cross-encoder classifier will require training data of sufficient quality and quantity.

This question is far from being insurmountable. Indeed, we have a number of approaches for generating this kind of training data :

  • Our SVP Harvester tool is already advanced enough to provide us with near-duplicates of real life that could then be manually annotated with an application designed to boost annotation productivity such as Doccano.
  • Another technique is to collect references with identical DOIs, but whose metadata differs between platforms (Hammerton 2012).
  • And what about using a conversational LLM to generate training data from a palette of carefully chosen examples?

The importance of this task of generating training datasets should not be underestimated: by packaging the data for platforms such as HuggingFace Hub or Kaggle, we open the way to a process of continuous improvement of the model,. This iterative process may even take a participative form through the organization of challenges.

Re-training Bert from scratch? Hopefully not...

Another, more fundamental, uncertainty concerns the ability of Bert-based models to provide efficient vector representations of bibliographic references. The use of pre-trained models, like any transfer learning approach, is based on the idea that the model has extracted from its training corpus structural features that will be relevant to the target task. The corpora on which Bert and its derived models have been trained are made of sentences whose syntax and logic are not homologous to those of bibliographic references, except for the title. As a result, it may be necessary to re-train Bert, and then Sentence Bert, on a corpus entirely composed of bibliographical references, which is a more ambitious project.

A call for collaboration

We're aware that we're not the only team dealing with this problem, which is common in the fields of bibliometrics and research information management (for example, there seems to be a project underway at WorldCat). Our particular requirement is that we need deduplication to operate on bibliographic metadata for which an English version is not always available.

Don't hesitate to contact us

We are of course open to the possibility of collaboration with other teams or individuals. If you are interested in contributing to the project in any way, or if you have an alternative proposal to the analysis proposed in these lines, or if you already have a project underway, or if you think you can contribute to the development of training data, or if you already have data that could be used as training data, or if you need such an application component for your own projects, please do not hesitate to contact us at contact@crisalid.org.