Methods for Knowledge Graph Construction from Text Collections: Development and Applications
Abstract
Virtually every sector of society is experiencing a dramatic growth in the volume of unstructured textual data that is generated and published, from news and social media online interactions, through open access scholarly communications and observational data in the form of digital health records and online drug reviews. The volume and variety of data across all this range of domains has created both unprecedented opportunities and pressing challenges for extracting actionable knowledge for several application scenarios. However, the extraction of rich semantic knowledge demands the deployment of scalable and flexible automatic methods adaptable across text genres and schema specifications. Moreover, the full potential of these data can only be unlocked by coupling information extraction methods with Semantic Web techniques for the construction of full-fledged Knowledge Graphs, that are semantically transparent, explainable by design and interoperable. In this thesis, we experiment with the application of Natural Language Processing, Machine Learning and Generative AI methods, powered by Semantic Web best practices, to the automatic construction of Knowledge Graphs from large text corpora, in three use case applications: the analysis of the Digital Transformation discourse in the global news and social media platforms; the mapping and trend analysis of recent research in the Architecture, Engineering, Construction and Operations domain from a large corpus of publications; the generation of causal relation graphs of biomedical entities from electronic health records and patient-authored drug reviews. The contributions of this thesis to the research community are in terms of benchmark evaluation results, the design of customized algorithms and the creation of data resources in the form of Knowledge Graphs, together with data analysis results built on top of them.
Figures & tables
| Target dependency paths | |
| Relation Verb | Relation Predicate | Example |
|---|---|---|
| fuel | FUEL | ‘How the UR+ Ecosystem is Fueling Cobot Market Growth’ |
| driven by | FUEL | ‘Digital transformation in Ho Chi Minh is being driven by remote working’ |
| accelerated by | FUEL | ‘huge social trends being accelerated by the pandemic.’ |
| identify | IDENTIFY | ‘Machine learning can identify signs of Alzheimers in patients ’ |
| quantify | IDENTIFY | ‘Research quantifies G’s potential in roaming and manufacturing ’ |
| predict | IDENTIFY | ‘AI-supported test can predict eye disease that leads to blindness’ |
| Extraction Method | Precision |
|---|---|
| OpenIE Extractor | 0.52 |
| PoST Extractor | 0.17 |
| Dependency-based Extractor | 0.77 |
| Entity and Relationship Refiner | 0.31 |
| Triplétoile | 0.82 |
| Subject Entity | Relation | Object Entity |
|---|---|---|
| pandemic | accelerate | digital_transformation |
| artificial_intelligence | impact | insurance_sector |
| microsoft | buy | riskiq |
| data-driven_insight | drive | decision-making |
| agile_business | demand | effective_marketing_capability |
| hootsuite | buy | ai_chatbot_firm |
| Subject Entity | Relation | Object Entity | Support |
|---|---|---|---|
| Italy | report | coronavirus death | 374 |
| clinical trial | involve | patient | 128 |
| interactive graphic | track | global spread | 90 |
| fitch | undertake | sensitivity analysis | 75 |
| administration | approve | drug | 47 |
| meningitis immunity | fight | endometrial cancer | 35 |
| DBpedia Entity Type | #Matched Entities | #Unique Entities |
|---|---|---|
| DBpedia:Organisation | 20050 | 2640 |
| DBpedia:Company | 15667 | 1736 |
| DBpedia:Country | 12124 | 324 |
| DBpedia:Disease | 7881 | 918 |
| DBpedia:Person | 6594 | 2611 |
| DBpedia:ChemicalSubstance | 6583 | 1378 |
| Train | Test | |
|---|---|---|
| Sentences | 816 | 200 |
| Negative Sentences | 536 | 124 |
| Task Entities | 512 | 123 |
| Method Entities | 388 | 89 |
| Metric Entities | 51 | 22 |
| Used-for Relations | 196 | 42 |
| Extraction Method | Precision |
|---|---|
| Random Triples | 0.695 |
| High Support | 0.758 |
| Low Support | 0.637 |
| LLM-generated | 0.683 |
| Entity Type | Examples |
|---|---|
| Drug | morphine, ibuprofen |
| Adverse Drug Event (ADE) | nausea, seizures |
| Reason | vitamin K deficiency |
| Dosage | 2 units, stress dose |
| Strength | 10 mg, 60 mg/0.6 mL |
| Form | capsule, syringe, tablet |
| MIMICause Relation | HF label | # Train Instances | # Eval Instances | # Test Instances |
|---|---|---|---|---|
| Cause(e1,e2) | 0 | 254 | 64 | 36 |
| Cause(e2,e1) | 1 | 266 | 67 | 37 |
| Enable(e1,e2) | 2 | 126 | 31 | 17 |
| Enable(e2,e1) | 3 | 126 | 32 | 18 |
| Prevent(e1,e2) | 4 | 188 | 47 | 26 |
| Prevent(e2,e1) | 5 | 179 | 45 | 25 |
| text | drug | effect | label |
|---|---|---|---|
| Methemoglobinemia after axillary block with bupivacaine and additional injection of lidocaine in the operative field. | bupivacaine | Methemoglobinemia | 1 |
| Methemoglobinemia after axillary block with bupivacaine and additional injection of lidocaine in the operative field. | lidocaine | Methemoglobinemia | 1 |
| Cutaneous sarcoidosis during interferon alfa and ribavirin treatment of hepatitis C virus infection: two cases. | ribavirin | cutaneous sarcoidosis | 1 |
| Cutaneous sarcoidosis during interferon alfa and ribavirin treatment of hepatitis C virus infection: two cases. | ribavirin | infection | 0 |
| Cutaneous sarcoidosis during interferon alfa and ribavirin treatment of hepatitis C virus infection: two cases. | interferon | hepatitis | 0 |
| Drug | Condition | Review |
|---|---|---|
| ciprofloxacin | urinary tract infection | i had a urinary tract infection so bad that when i pee it smells but when i started taking ciprofloxacin it worked it’s a good medicine for a urinary tract infections. |
| ziana | acne | when i first started using ziana, i only had acne in between my eyebrows, chin, and the nose area. my acne worsened while using it and then it got better. but after about 4 months of using it, it became ineffective. so i now have acne between my eyebrows, chin, cheeks, forehead, and the nose area. its great at first but after a while it made my face even worse than before i used the product. |
| nuvaring | birth control | i tried the nuvaring. this was my first form of any birth control. this was very easy to put inside and very easy to take out. i didn’t feel the ring ever. i thought it was amazing until i started to get huge deep pimples. they were impossible to get rid of. |
| Model | Size | Method | N examples | Micro F1 | Macro F1 | |
|---|---|---|---|---|---|---|
| BL | BERT+Ent | 110M | FT | 1953 | - | 0.54 |
| Clinical-BERT+Ent | 110M | FT | 1953 | - | 0.56 | |
| zero-shot | MistralOrca | 7B | InstPrompt | - | 0.096 | 0.064 |
| DeepSeek-Qwen-Distill | 32B | InstPrompt | - | 0.267 | 0.172 | |
| MistralOrca | 7B | SumAsk | - | 0.449 | 0.343 | |
| DeepSeek-Qwen-Distill | 32B | SumAsk | - | 0.338 | 0.163 |
| Prompt Dimension | v0 | v1 | v2 | v3 | v4 | Std Dev (%) | |
| instr. prompt | Persona | 0.096 | 0.100 | 0.189 | 0.141 | 0.141 | |
| Phrasing | 0.096 | 0.059 | 0.063 | 0.052 | 0.107 | ||
| Definitions | 0.096 | 0.115 | 0.0929 | 0.171 | 0.237 | ||
| Format | 0.096 | 0.130 | 0.126 | 0.167 | 0.118 | ||
| Explain | 0.096 | 0.078 | 0.163 | 0.115 | 0.089 | ||
| Ordering | 0.096 | 0.223 | 0.282 | 0.301 | 0.278 |
| Model | 20% ADE | ADE balanced | |
|---|---|---|---|
| F1 | macro F1 | micro F1 | |
| Mistral-7B-v0.1 | 0.956 | 0.850 | 0.851 |
| MistralOrca | 0.959 | 0.766 | 0.772 |
| Llama-2-7b | 0.913 | 0.698 | 0.712 |
| Llama-3.1-8B-Instruct | 0.978 | 0.685 | 0.708 |
| gemma-2-9b | 0.948 | 0.789 | 0.793 |
| Relation Type | Cohen | Fleiss | Precision |
|---|---|---|---|
| Cause | 0.706 | 0.707 | 0.70 |
| Enable | 0.591 | 0.576 | 0.60 |
| Prevent | 0.831 | 0.808 | 0.78 |
| Hinder | 0.763 | 0.746 | 0.60 |
| Other | 0.770 | 0.741 | 0.97 |
| Overall | 0.739 | 0.728 | 0.73 |
| Drug | Causal_Relation | Condition | Support |
|---|---|---|---|
| mirena | Cause | birth control | 60 |
| accutane | Cause | acne | 33 |
| viibryd | Enable | depression | 5 |
| methotrexate | Enable | psoriasis | 2 |
| lexapro | Prevent | anxiety | 269 |
| vyvanse | Prevent | adhd | 142 |
| Condition Ontology | Coverage | Drug Ontology | Coverage |
|---|---|---|---|
| OCHV | 246 | RXNORM | 869 |
| IOBC | 242 | MESH | 831 |
| MEDDRA | 232 | NCIT | 812 |
| MESH | 229 | OCHV | 789 |
| MDM | 227 | MDM | 687 |
| SNOMEDCT | 226 | CHEBI | 589 |
| Hyperparameter | Explanation | Value Range | |
|---|---|---|---|
| UMAP | n_neighbors | the number of neighboring data points UMAP will look at when attempting to learn the manifold structure of the data | [5,15,30] |
| min_dist | the minimum distance apart that points are allowed to be in the low dimensional representation | [0.0,0.1] | |
| n_components | the dimensionality of the reduced space | [2,5,10,30] | |
| HDBSCAN | min_cluster_size | affects the final number of generated clusters | [5,10,20,50,100,200] |
| min_samples | the minimum number of points required in the neighborhood of a point for it to be considered a core point | [None,1,2,5] | |
| metric | used to calculate the distances | [”euclidean”,”cosine”] |
| Embedding Model | Silhouette Clustered Ratio | Num Clusters |
|---|---|---|
| BERT | 0.9387 | 1107 |
| BERT | 0.9287 | 918 |
| BERT | 0.9171 | 1063 |
| Sentence-BERT | 0.6852 | 869 |
| Sentence-BERT | 0.6794 | 978 |
| Sentence-BERT | 0.6767 | 1050 |
| Topic | Count | Representation | Terms |
|---|---|---|---|
| 0 | 39619 | Energy Efficiency and Thermal Comfort in Building Environments | [’energy’, ’thermal’, ’lighting’, ’building’, ’comfort’, ’buildings’, ’temperature’, ’heat’, ’study’, ’performance’] |
| 1 | 22740 | Indoor Air Quality and Sustainable Air Conditioning Systems | [’air’, ’indoor’, ’ventilation’, ’conditioning’, ’cooling’, ’quality’, ’temperature’, ’energy’, ’concentrations’, ’control’] |
| 2 | 14635 | Urban Development Strategies and Sustainable City Planning | [’urban’, ’land’, ’planning’, ’development’, ’city’, ’spatial’, ’cities’, ’growth’, ’public’, ’expansion’] |
| 3 | 10650 | Enhancing Child-Friendly Urban Spaces Through Design | [’design’, ’space’, ’product’, ’architectural’, ’public’, ’architecture’, ’students’, ’library’, ’research’, ’study’] |
| 4 | 10244 | Smart city development and urban data management | [’smart’, ’city’, ’parking’, ’cities’, ’data’, ’occupancy’, ’urban’, ’information’, ’development’, ’based’] |
| 5 | 9518 | Urban Resilience and Green Infrastructure in Climate Change Planning | [’urban’, ’resilience’, ’infrastructure’, ’water’, ’climate’, ’green’, ’planning’, ’cities’, ’flood’, ’change’] |
| Parameter | HF parameter | Prompt | Value |
|---|---|---|---|
| Use sampling | do_sample | all | False |
| 4 bit quantization | load_in_4bit | all | True |
| quantization scheme | bnb_4bit_quant_type | all | nf4 |
| maximum num of new tokens | max_new_tokens | InstPrompt | 256 |
| iCL | 256 | ||
| CoT | 512 |
| Parameter | HF parameter | Value |
|---|---|---|
| LoRA rank | r | 8 |
| LoRA alpha | lora_alpha | 32 |
| LoRA dropout | lora_dropout | 0.05 |
| LoRA target modules | target_modules | [”q_proj”, ”v_proj”] |
| Validation Metric | metric_for_best_model | eval_loss |
| Train batch size | per_device_train_batch_size | 8 |
KG Construction
Knowledge graph construction turns text, tables, images, and databases into structured entities and relationships that machines can query and reason over.
See all 186 papers