Submitted:
01 April 2025
Posted:
02 April 2025
Read the latest preprint version here
Abstract
Keywords:
1. Introduction
- RQ №1
- Can transformers and graph-based solutions correctly capture the notion of sentence entailment? Theoretical results (Section 4.1) remark that similarity metrics mainly considering symmetric properties of the data are unsuitable for capturing the notion of logical entailment, for which we at least need quasi-metric spaces or divergence measures. This paper offers the well-known metric of confidence [17] for this purpose and contextualises it within logical-based semantics for full-text.
- RQ №2
-
Can transformers and graph-based solutions correctly capture the notion of sentence similarity? The previous result should implicitly derive the impossibility of deriving the notion of equivalence as entailment implies equivalence through if-and-only-if but not vice versa, we aim at deriving similar results through empirical experiments substantiating the claims in specific contexts. We then design datasets addressing the following questions:
- (a)
- Can transformers and graph-based solutions capture logical connectives? Current experiments (Section 4.2.1) show that vector embeddings generated by transformers cannot adequately capture the information contained in logical connectives, which can only be considered after elevating such connectives as first-class citizens (Simple Graphs vs. Logical Graphs). Furthermore, given the experiments’ outcome, vector embedding likely favours entities’ position in the text and discards logical connectives occurring within the text as stop words.
- (b)
- Can transformers and graph-based solutions distinguish between active and passive sentences? Preliminary experiments (Section 4.2.2) show that structure alone is insufficient to implicitly derive semantic information, which requires extra disambiguation processing to derive the correct representation desiderata (Simple and Logical graphs vs. Logical). Furthermore, these experiments reaffirm the considerations on the positionality and the stop word from the previous research question, as vector embeddings cannot clearly distinguish between active and passive sentences (Logical vs. Transformer-based approaches).
- (c)
- Can transformers and graph-based solution correctly capture the notion of logical implication (e.g.) in spatiotemporal reasoning? Spatiotemporal reasoning requires specific part-of and is-a reasoning that is, to the best of our knowledge and at the time of the writing, unprecedented in current literature on logical-based interpretation of the text. Consequently, we argue that these notions cannot be captured by embeddings alone and by graph-based representations using merely structural information, as this requires categorising the logical function of each entity occurring within the text as well as correctly addressing the interpretation of the logical connectives occurring (Section 4.2.3).
- RQ №3
- Is our proposed technique scalable? Benchmarks over a set of 200 sentences retrieved from sentences occurring within ConceptNet [18] (Section 4.3) remark that our pipeline works in at most linear time over the number of the sentences, thus remarking the optimality of the envisioned approach.
- RQ №4
- Can a single rewriting grammar and algorithm capture most factoid sentences? Our discussion (Section 5) remarks that this preliminary work improves over the sentence representation from our previous solution, but there are still ways to improve the current pipeline. We also argue the following: given that training-based systems are also based on annotated data to correctly identify patterns and return correct results (Section 2.2), the output provided by training-based algorithms can be only as correct as the ability of the human to consider all the possible cases for validation. Thus, rather than postulating the need for training-based approaches in the hope the algorithm will be able to generalise over unseen patterns within the data, we speculate the inverse approach should be investigated. This is because the only possible way to achieve an accurate semantic representation of the text is through accurate linguistic reconstruction using derivational-based and pattern-matching approaches (Section 2.3).
2. Related Works
2.1. General Explainable and Verified Artificial Intelligence
2.2. Natural Language Processing
2.3. Linguistics and Grammatical Structure
2.3.1. Italian Linguistics
3. Materials and Methods
3.1. Extensions to the Generalised Graph Grammar Language and Graph Grammar Rewriting Rules for ud
3.2. A Priori Explanation
3.2.1. Syntactic Analysis Using Stanford CoreNLP
- start and end characters respective to their character position within the sentence: these constitute provenance information that is also pertained in the ad hoc explanation phase (Section 3.3), thus allowing the enrichment of purely syntactic sentence information with a more semantic one.
- text value referring to the original matched text
-
monad for the possible replacement value
- -
- We detail in the Discussion (Section 5), that this might eventually be used to replace words in the logical rewriting stage.
3.2.2. Generation of SetOfSingletons
Coordination
Multi-Word Entities
Multiple Logical Functions
3.2.3. Handling Extras
| Algorithm 1: Merge SetOfSingletons |
![]() |
3.3. Ad Hoc Explanation
3.3.1. Initial Graph Construction
3.3.2. Graph Rewriting with the GSM
3.3.3. Recursive Relationship Generation
| Algorithm 2: Construct Final Kernel |
![]() |
- If it does have a kernel as a property, and this kernel’s position is contained within our position pairs (collected on Line 5), then we update the target of our kernel to this property as to make an entire kernel describing the action associated to the subject, and introduced by the semi-modal verb.
- Otherwise, we check if the edge label is none, and whether the source is an adjective and target is an entity, or vice versa. If so, then we update the entity with the properties of the adjective. For example, in the text: “clear your vision”, this is initially rewritten as None(clear, vision) and is transformed to be(vision[JJ: clear], ?), based on this condition.
- Line 23:
- Replaces any occurrence of an acl_relcl edge within the properties, where the source ID is contained within the acl_map, appended to on Line 14 within Algorithm A3, and thus replaced with the node associated in the map. This enables the replacement of any pronoun with the exact entity it is referring to: as our pipeline retains provenance information, this does not come at the cost of losing any information under the circumstance that there are multiple instances of the same entity. We discuss how this has changed from our previous pipeline in Section 5.6.
- Line 24:
- it checks if we do not have a relationship (where kernel is none) and rewrites this into an edge kernel (Algorithm A3). An edge kernel is where a node of type verb is rewritten to an edge label with no source or target, for example if we had the node `work’ with no other edges, then we return a kernel as such: work(?, None). Otherwise, we deal with verbs that were not rewritten as an edge in our GGG phase and, due to the grammatical structure, were represented as an entity property: action (or actioned) will remark that the entity performs (or receives) the action indicated in action (or actioned). If we have a node with action (or actioned), this entity becomes the source (or target) of the relationship respectively.
- Line 25:
- Removes duplicated properties occurring in both relationship arguments and their properties: if an entity is contained within the relationship additional properties but is present as either the source or the target of such relationship, then they are removed from properties. This is performed recursively for all kernels.
- Line 26:
- Rewrites the properties within each kernel as their logical functions. Section 3.3.4 discusses this important phase in more detail.
- Line 27:
- Last, we deal with phrasal verbs having their adverb separated from the edge relationship name and occurring within the relationship property. If one is found, it is appended to the end of the edge label, which works for some cases, such as `come back’, which is initially come(?[adv:back], None), and therefore becomes come back(?, None), however, it can produce some grammatically incorrect edge label names. For `how to use it’, we get `to use(?[adv:how], it)’, which should have “how” appended to the beginning of the edge label, but currently we get `to use how(?, it)’. This can easily fixed by considering whether the resulting edge belongs to a phrasal verb, and only under that circumstance we can retain such a change.
3.3.4. Logical Sentence Analysis
| Algorithm 3:Logical Properties Rewriting Function |
![]() |
3.3.5. Final FOL Representation
3.4. Ex Post Explanation
3.4.1. Sentence Embedding
3.4.2. Simple Graphs vs. Logical Graphs
Simple Graphs
Logical Graphs
3.4.3. Logical Representation
Tabular Semantics per Sentence
Determining General Implications Through Machine Teaching
- equivalence:
- if is structurally equivalent to .
- mutual exclusion
- :if either or is the explicit negation of the other, or whether their negation appear within the expansion of the other ( and respectively).
- implication:
- if occurs in one of the expansions
4. Results
4.1. Theoretical Results
4.1.1. Cosine Similarity
4.1.2. Confidence Metrics
4.2. Clustering
Deriving Distance Matrices from our Similarity Metrics and Sentences
Clustering Algorithms of Choice

4.2.1. Capturing Logical Connectives and Reasoning


4.2.2. Capturing Simple Semantics and Sentence Structure

4.2.3. Capturing Simple Spatiotemporal Reasoning


4.3. Sentence Scalability Rewriting
5. Discussion
5.1. Improving Multi-Word Entity Recognition with Specifications
5.2. Using Short Sentences
5.3. Handling Incorrect Verbs
- Given node does not contain a det property AND
- Given node does not contain `on’ within a found case [46] property AND
-
Either of the following conditions are met:
- (a)
- Given node has at least 1 incoming edge AND has a case property
- (b)
- Given node is the last occurring in the graph AND has a root property
- (c)
- Given node is the last occurring in the graph AND has a parent with a root property which is connected by a compound edge
5.4. Handling Incorrect Subject-Verb Relationships
5.5. Handling Incorrect Spelling (Typos)
5.6. Other Improvements from Previous Pipeline
5.6.1. Characterising Entities by Their Logical Function
5.6.2. Dealing with Multiple Distinct Logical Functions
5.6.3. Pronoun Resolution
5.6.4. Dealing with Subordinate Clauses
6. Conclusions and Future Works
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| AI | Artificial Intelligence |
| BFS | Breadth-First Search. |
| CWA | Closed-World Assumption |
| DFS | Depth-First Search |
| DG | Dependency Graph |
| FOL | First-Order Logic |
| GGG | Generalised Graph Grammar |
| GPE | GeoPolitical Entity |
| GQL | Graph Query Language |
| GSM | Generalised Semistructured Model |
| HAC | Hierarchical Agglomerative Clustering |
| KB | Knowledge Base |
| LaSSI | Logical, Structural and Semantic text Interpretation |
| LR | Logical Representation |
| MEU | Multi-Word Entity Unit |
| meuDB | Multi-Word Entity Unit DataBase |
| MG | Montague Grammar |
| NLP | Natural Language Processing |
| NN | Neural Network |
| POS | Part of Speech |
| QA | Question Answering |
Appendix A. Recursive Sentence Rewriting
Appendix A.1. Promoting Edges to Binary/Unary Relationships
| Algorithm A1:Construct Final Kernel |
![]() |
Appendix A.2. Identifying the Clause Node Entry Points
| Algorithm A2:Construct Final Kernel (Algorithm 2 cont.) |
![]() |
Appendix A.3. Generating Binary Relationships (Kernels)
| Algorithm A3:Construct Final Relationship (Kernel) (Algorithm 2 cont.) |
![]() |
Appendix A.3.1. Kernel Assignment
| Algorithm A4: Construct Final Kernel (Algorithm A3 cont.) |
![]() |
Appendix B. Rewriting Semantics for Logical Function Rules in Parmenides
| Algorithm A5: Logical Node Rewriting Function |
![]() |
Appendix C. Classical Semantics, Bag Semantics, and Relational Algebra
Appendix C.1. Enumerating the Set of Possible Worlds Holding for a Formula
Appendix C.2. Knowledge-Based Driven Propositional Semantics
- :
- If we lose specificity due to some missing copula information.
- :
- By interpreting a missing value from one of the property arguments as a missing information entailing any possible value for this field, whether the right element is a non-missing value.
- :
- If we interpret the second object as being a specific instance of the first one.
- ↠:
- A general implication state that cannot be easily categorised by any of the former cases while including any of the former.
Appendix C.2.1. Multi-Valued Term Equivalence
Appendix C.2.2. Multi-Valued Proposition Equivalence
Appendix D. Proofs
- ⇒
- Left to right: If two equations are the same, they will have the same set of the possible worlds. Given this, their intersection will be always equivalent to one of the two sets, from which it derives that the support of either of the two formulas is always true.
- ⇐
- Right to left: When the confidence is 1, then by definition both the numerator and denominator are of the same size. Therefore and . By the commutativity of the intersection, we then derive that are of the same size and represent the same set. Thus, it holds that .
References
- Tammet, T.; Järv, P.; Verrev, M.; Draheim, D. An Experimental Pipeline for Automated Reasoning in Natural Language (Short Paper). In Proceedings of the Automated Deduction – CADE 29; Pientka, B., Tinelli, C., Eds.; Cham, 2023; pp. 509–521. [Google Scholar]
- Hicks, M.T.; Humphries, J.; Slater, J. ChatGPT is bullshit. Ethics and Information Technology 2024, 26, 38. [Google Scholar] [CrossRef]
- Bender, E.M.; Gebru, T.; McMillan-Major, A.; Shmitchell, S. On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? In Proceedings of the Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, New York, NY, USA, 2021; FAccT ’21. pp. 610–623. [Google Scholar]
- Chen, Y.; Wang, D.Z. Knowledge expansion over probabilistic knowledge bases. In Proceedings of the International Conference on Management of Data, SIGMOD 2014, Snowbird, UT, USA, 22-27 June 2014; Dyreson, C.E., Li, F., Özsu, M.T., Eds.; ACM, 2014; pp. 649–660. [Google Scholar]
- Bergami, G. A framework supporting imprecise queries and data. CoRR 2019, abs/1912.12531. [Google Scholar]
- Kyburg, H.E. Probability and the Logic of Rational Belief; Wesleyan University Press: Middletown, CT, USA, 1961. [Google Scholar]
- Brown, B. Inconsistency measures and paraconsistent consequence. In Measuring Inconsistency in Information; Grant, J., Martinez, M.V., Eds.; College Press, 2018; chapter 8; pp. 219–234. [Google Scholar]
- Graydon, M.S.; Lehman, S.M. Examining Proposed Uses of LLMs to Produce or Assess Assurance Arguments; NTRS - NASA Technical Reports Server.
- Dallachiesa, M.; Ebaid, A.; Eldawy, A.; Elmagarmid, A.; Ilyas, I.F.; Ouzzani, M.; Tang, N. NADEEF: a commodity data cleaning system. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, New York, NY, USA, 2013; SIGMOD ’13. pp. 541–552. [Google Scholar]
- Andrzejewski, W.; Bębel, B.; Boiński, P.; Wrembel, R. On tuning parameters guiding similarity computations in a data deduplication pipeline for customers records: Experience from a R&D project. Information Systems 2024, 121, 102323. [Google Scholar]
- Picado, J.; Davis, J.; Termehchy, A.; Lee, G.Y. Learning Over Dirty Data Without Cleaning. In Proceedings of the 2020 International Conference on Management of Data, SIGMOD Conference 2020, online conference, Portland, OR, USA, 14-19 June 2020; Maier, D., Pottinger, R., Doan, A., Tan, W., Alawini, A., Ngo, H.Q., Eds.; ACM, 2020; pp. 1301–1316. [Google Scholar]
- Virgilio, R.D.; Maccioni, A.; Torlone, R. Approximate querying of RDF graphs via path alignment. Distributed Parallel Databases 2015, 33, 555–581. [Google Scholar] [CrossRef]
- Tenghao, J. FAQ question Answering method based on semantic similarity matching. In Proceedings of the ISCSIC; 2022; pp. 93–100. [Google Scholar]
- He, X.; Tian, Y.; Sun, Y.; Chawla, N.V.; Laurent, T.; LeCun, Y.; Bresson, X.; Hooi, B. G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering. [CrossRef]
- Zhang, T. GAIA - A Multi-media Multi-lingual Knowledge Extraction and Hypothesis Generation System. In Proceedings of the Proceedings of the 2018 Text Analysis Conference, TAC 2018, NIST, 2018. Gaithersburg, Maryland, USA, 13-14 November 2018. NIST, 2018. [Google Scholar]
- Fox, O.R.; Bergami, G.; Morgan, G. LaSSI: Logical, Structural, and Semantic text Interpretation. In Proceedings of the Database Engineered Applications; Springer, 2025. IDEAS ’24 (in press) [Google Scholar]
- Wong, P.C.; Whitney, P.; Thomas, J. Visualizing Association Rules for Text Mining. In Proceedings of the 1999 IEEE Symposium on Information Visualization, USA, 1999; INFOVIS ’99. p. 120.
- Speer, R.; Chin, J.; Havasi, C. ConceptNet 5.5: An Open Multilingual Graph of General Knowledge. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4-9 February 2017; Singh, S., Markovitch, S., Eds.; AAAI Press, 2017; pp. 4444–4451. [Google Scholar] [CrossRef]
- Seshia, S.A.; Sadigh, D.; Sastry, S.S. Toward verified artificial intelligence. Commun. ACM 2022, 65, 46–55. [Google Scholar] [CrossRef]
- Li, F.; Jagadish, H.V. NaLIR: an interactive natural language interface for querying relational databases. In Proceedings of the 2014 ACM SIGMOD International Conference on Management of Data, New York, NY, USA, 2014; SIGMOD ’14. pp. 709–712. [Google Scholar] [CrossRef]
- Bergami, G.; Fox, O.R.; Morgan, G. Extracting Specifications through Verified and Explainable AI: Interpretability, Interoperabiliy, and Trade-offs (In Press). In Explainable Artificial Intelligence for Trustworthy Decisions in Smart Applications; Springer; chapter 2.
- Sun, X. Structure Regularization for Structured Prediction. In Proceedings of the Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems, Montreal, Quebec, Canada, 8-13 December 2014; Ghahramani, Z., Welling, M., Cortes, C., Lawrence, N.D., Weinberger, K.Q., Eds.; 2014; pp. 2402–2410. [Google Scholar]
- Manning, C.; Surdeanu, M.; Bauer, J.; Finkel, J.; Bethard, S.; McClosky, D. The Stanford CoreNLP Natural Language Processing Toolkit. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations; Bontcheva, K., Zhu, J., Eds.; Baltimore, Maryland, June 2014; pp. 55–60. [Google Scholar] [CrossRef]
- et. al, J.N. conj. Available online: https://universaldependencies.org/en/dep/conj.html (accessed on 13 February 2025).
- et. al, J.N. cc. Available online: https://universaldependencies.org/en/dep/cc.html (accessed on 13 February 2025).
- Jurafsky, D.; Martin, J.H. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition with Language Models, 3rd ed.12 January 2025; Online manuscript released January 12, 2025. [Google Scholar]
- Group, S.N.
- Cardona, G. Pāṇini – His Work and its Traditions, 2 ed.; Vol. 1, Motilal Banarsidass: London, 1997. [Google Scholar]
- Christensen, C.H. Arguments for and against the Idea of Universal Grammar. Leviathan: Interdisciplinary Journal in English 2019, 12–28. [Google Scholar] [CrossRef]
- Hauser, M.D.; Chomsky, N.; Fitch, W.T. The Faculty of Language: What Is It, Who Has It, and How Did It Evolve? Science 2002, 298, 1569–1579. [Google Scholar] [CrossRef]
- Montague, R. ENGLISH AS A FORMAL LANGUAGE. In Logic and philosophy for linguists; De Gruyter Mouton: Berlin, Boston, 1975; pp. 94–121. [Google Scholar] [CrossRef]
- Montague, R. English as a formal language. In Linguaggi nella Societa e nella Tecnica; Edizioni di Communità: Milan, Italy, 1970; pp. 189–224. [Google Scholar]
- Dardano, M.; Trifone, P. Italian grammar with linguistics notions (in Italian); Zanichelli: Milan, 2002. [Google Scholar]
- terdon. terminology - Syntactic analysis in English: correspondence between Italian complements and English ones, url=https://english.stackexchange.com/questions/628592/syntactic-analysis-in-english-correspondence-between-italian-complements-and/628597#628597, urldate=10.02.2025.
- Bergami, G.; Fox, O.R.; Morgan, G. Matching and Rewriting Rules in Object-Oriented Databases. Mathematics 2024, 12. [Google Scholar] [CrossRef]
- et. al, J.N. English Dependency Relations. Available online: https://universaldependencies.org/en/dep/ (accessed on 24 February 2025).
- Ahlers, D. Assessment of the accuracy of GeoNames gazetteer data. In Proceedings of the Proceedings of the 7th Workshop on Geographic Information Retrieval, New York, NY, USA, 2013; GIR ’13. pp. 74–81. [Google Scholar]
- Chang, A.X.; Manning, C. SUTime: A library for recognizing and normalizing time expressions. In Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC`12); Calzolari, N., Choukri, K., Declerck, T., Doğan, M.U., Maegaard, B., Mariani, J., Moreno, A., Odijk, J., Piperidis, S., Eds.; Istanbul, Turkey, 2012; pp. 3735–3740. [Google Scholar]
- Qi, P.; Zhang, Y.; Zhang, Y.; Bolton, J.; Manning, C.D. Stanza: A Python Natural Language Processing Toolkit for Many Human Languages. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations; 2020. [Google Scholar]
- Speer, R.; Chin, J.; Havasi, C. ConceptNet 5.5: an open multilingual graph of general knowledge. In Proceedings of the AAAI; AAAI Press, 2017. AAAI’17. pp. 4444–4451. [Google Scholar]
- Group, T.P.G.D. PostgreSQL: Documentation: 17: F.16. fuzzystrmatch — determine string similarities and distanceAppendix F. Additional Supplied Modules and Extensions. Available online: https://www.postgresql.org/docs/current/fuzzystrmatch.html (accessed on 18.02.2025).
- Bergami, G.; Zegadło, W. Towards a Generalised Semistructured Data Model and Query Language. SIGWEB Newsl. 2023, 2023. [Google Scholar] [CrossRef]
- Bonifati, A.; Murlak, F.; Ramusat, Y. Transforming Property Graphs. 2024; arXiv:cs.DB/2406.13062. [Google Scholar]
- Bergami, G.; Fox, O.R.; Morgan, G. Matching and Rewriting Rules in Object-Oriented Databases. Preprints 2024. [Google Scholar] [CrossRef]
- 2025, C.U.P..A. Modality: forms - Grammar - Cambridge Dictionary. Available online: https://dictionary.cambridge.org/grammar/british-grammar/modality-forms#:~:text=Dare%2C%20need%2C%20ought%20to%20and%20used%20to%20 (accessed on 17 March 2025).
- et. al, J.N. case. Available online: https://universaldependencies.org/en/dep/case.html (accessed on 5 March 2025).
- et. al, J.N. case. Available online: https://universaldependencies.org/en/dep/nmod.html (accessed on 5 March 2025).
- Jatnika, D.; Bijaksana, M.A.; Suryani, A.A. Word2Vec Model Analysis for Semantic Similarities in English Words. In Proceedings of the Enabling Collaboration to Escalate Impact of Research Results for Society: The 4th International Conference on Computer Science and Computational Intelligence, ICCSCI 2019, Yogyakarta, Indonesia, 12-13 September 2019; Budiharto, W., Ed.; Elsevier, 2019; 157, Procedia Computer Science. pp. 160–167. [Google Scholar] [CrossRef]
- Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient Estimation of Word Representations in Vector Space. In Proceedings of the 1st International Conference on Learning Representations, ICLR 2013, Scottsdale, Arizona, USA, 2-4 May 2013; Workshop Track Proceedings. Bengio, Y., LeCun, Y., Eds.; [Google Scholar]
- Rosenberger, J.; Wolfrum, L.; Weinzierl, S.; Kraus, M.; Zschech, P. CareerBERT: Matching resumes to ESCO jobs in a shared embedding space for generic job recommendations. Expert Systems with Applications 2025, 275, 127043. [Google Scholar] [CrossRef]
- Liu, H.; Bao, H.; Xu, D. Concept Vector for Similarity Measurement Based on Hierarchical Domain Structure. Comput. Informatics 2011, 30, 881–900. [Google Scholar]
- Nickel, M.; Kiela, D. Poincaré Embeddings for Learning Hierarchical Representations. In Proceedings of the Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, Long Beach, CA, USA, 4-9 December 2017; Guyon, I., von Luxburg, U., Bengio, S., Wallach, H.M., Fergus, R., Vishwanathan, S.V.N., Garnett, R., Eds.; 2017; pp. 6338–6347. [Google Scholar]
- Raedt, L.D. Logical and Relational Learning; Springer-Verlag: Berlin Heidelberg, 2008. [Google Scholar]
- Asperti, A.; Ciabattoni, A. Logica ad Informatica.
- Simard, P.Y.; Amershi, S.; Chickering, D.M.; Pelton, A.E.; Ghorashi, S.; Meek, C.; Ramos, G.A.; Suh, J.; Verwey, J.; Wang, M.; et al. Machine Teaching: A New Paradigm for Building Machine Learning Systems. CoRR, 2017; arXiv:abs/1707.06742. [Google Scholar]
- Ramos, G.; Meek, C.; Simard, P.; Suh, J.; and, S.G. Interactive machine teaching: a human-centered approach to building machine-learned models. Human–Computer Interaction 2020, 35, 413–451. [Google Scholar] [CrossRef]
- Mosqueira-Rey, E.; Hernández-Pereira, E.; Alonso-Ríos, D.; Bobes-Bascarán, J.; Fernández-Leal, Á. Human-in-the-loop machine learning: a state of the art. Artificial Intelligence Review 2023, 56, 3005–3054. [Google Scholar] [CrossRef]
- Bergami, G. A new Nested Graph Model for Data Integration. Ph.D. thesis, University of Bologna, Bologna, Italy, 2018. [Google Scholar] [CrossRef]
- Carnielli, W.; Esteban Coniglio, M. Paraconsistent Logic: Consistency, Contradiction and Negation; Springer: Switzerland, 2016. [Google Scholar]
- Hinman, P.G. Fundamentals of Mathematical Logic; A K Peters/CRC Press, 2005. [Google Scholar]
- Kleene, S.C. Introduction to Metamathematics; P. Noordhoff N.V.: Groningen, 1952. [Google Scholar]
- Strobl, L.; Merrill, W.; Weiss, G.; Chiang, D.; Angluin, D. What Formal Languages Can Transformers Express? A Survey. Transactions of the Association for Computational Linguistics 2024, 12, 543–561. [Google Scholar] [CrossRef]
- Hugging Face. sentence-transformers (Sentence Transformers). Available online: https://huggingface.co/sentence-transformers (accessed on 24 February 2025).
- Wang, W.; Wei, F.; Dong, L.; Bao, H.; Yang, N.; Zhou, M. MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers. 2020; arXiv:cs.CL/2002.10957. [Google Scholar]
- Song, K.; Tan, X.; Qin, T.; Lu, J.; Liu, T.Y. MPNet: Masked and Permuted Pre-training for Language Understanding. 2020; arXiv:cs.CL/2004.09297. [Google Scholar]
- Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. MPNet: Masked and Permuted Pre-training for Language Understanding. 2019; arXiv:cs.CL/1907.11692. [Google Scholar]
- Defays, D. An efficient algorithm for a complete link method. The Computer Journal 1977, 20, 364–366. [Google Scholar] [CrossRef]
- Nielsen, F. , 2016; pp. 195–211. https://doi.org/10.1007/978-3-319-21903-5_8.Clustering. In Introduction to HPC with MPI for Data Science; Springer International Publishing: Cham, 2016; pp. 195–211. [Google Scholar] [CrossRef]
- Zaki, M.J.; Meira, W., Jr. Data Mining and Machine Learning: Fundamental Concepts and Algorithms, 2nd ed.; Cambridge University Press, 2020. [Google Scholar]
- Partitioning Around Medoids (Program PAM). In Finding Groups in Data; John Wiley & Sons, Ltd, 1990; chapter 2, pp. 68–125, [https://onlinelibrary.wiley.com/doi/pdf/10.1002/9780470316801.ch2]. [CrossRef]
- Arthur, D.; Vassilvitskii, S. k-means++: the advantages of careful seeding. In Proceedings of the Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, New Orleans, Louisiana, USA, 7-9 January 2007; Bansal, N., Pruhs, K., Stein, C., Eds.; SIAM, 2017; pp. 1027–1035. [Google Scholar]
- O’Neil, E.J.; O’Neil, P.E.; Weikum, G. The LRU-K Page Replacement Algorithm For Database Disk Buffering. In Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, Washington, DC, USA, 26-28 May 1993; ACM Press, 1993; pp. 297–306. [Google Scholar] [CrossRef]
- Johnson, T.; Shasha, D.E. 2Q: A Low Overhead High Performance Buffer Management Replacement Algorithm. In Proceedings of the VLDB’94, Proceedings of 20th International Conference on Very Large Data Bases, Santiago de Chile, Chile, 12-15 September 1994; Bocca, J.B., Jarke, M., Zaniolo, C., Eds.; Morgan Kaufmann, 1994; pp. 439–450. [Google Scholar]
- Brown, T.B.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language Models are Few-Shot Learners. CoRR 2020, arXiv:abs/2005.14165. [Google Scholar]
- Harrison, J. Handbook of Practical Logic and Automated Reasoning; Cambridge University Press, 2009. [Google Scholar]
- Chen, D.; Manning, C.D. A Fast and Accurate Dependency Parser using Neural Networks. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, Doha, Qatar, 25-29 October 2014; A meeting of SIGDAT, a Special Interest Group of the ACL. Moschitti, A., Pang, B., Daelemans, W., Eds.; 2014; pp. 740–750. [Google Scholar] [CrossRef]
- Kruskal, J.B.; Wish, M. Multidimensional Scaling; Quantitative Applications in the Social Sciences, SAGE Publications, Inc.
- Mead, A. Review of the Development of Multidimensional Scaling Methods. Journal of the Royal Statistical Society. Series D (The Statistician) 1992, 41, 27–39. [Google Scholar] [CrossRef]
- Agarwal, S.; Wills, J.; Cayton, L.; Lanckriet, G.R.G.; Kriegman, D.J.; Belongie, S.J. Generalized Non-metric Multidimensional Scaling. In Proceedings of the Eleventh International Conference on Artificial Intelligence and Statistics, AISTATS 2007, San Juan, Puerto Rico, 21-24 March 2007; Meila, M., Shen, X., Eds.; JMLR.org. 2007; 2, JMLR Proceedings. pp. 11–18. [Google Scholar]
- Quist, M.; Yona, G. Distributional Scaling: An Algorithm for Structure-Preserving Embedding of Metric and Nonmetric Spaces. J. Mach. Learn. Res. 2004, 5, 399–420. [Google Scholar]
- Costa, C.F.; Nascimento, M.A.; Schubert, M. Diverse nearest neighbors queries using linear skylines. GeoInformatica 2018, 22, 815–844. [Google Scholar] [CrossRef]
- Botea, V.; Mallett, D.; Nascimento, M.A.; Sander, J. PIST: An Efficient and Practical Indexing Technique for Historical Spatio-Temporal Point Data. GeoInformatica 2008, 12, 143–168. [Google Scholar] [CrossRef]
- Hopcroft, J.E.; Ullman, J.D. Introduction to Automata Theory, Languages and Computation; Addison-Wesley, 1979. [Google Scholar]
- et. al, J.N. dep. Available online: https://universaldependencies.org/en/dep/dep.html (accessed on 27 February 2025).
- Weber, D. English Prepositions in the History of English Grammar Writing. AAA: Arbeiten aus Anglistik und Amerikanistik 2012, 37, 227–243. [Google Scholar]
- Asperti, A.; Ricciotti, W.; Sacerdoti Coen, C. Matita Tutorial. Journal of Formalized Reasoning 2014, 7, 91–199. [Google Scholar] [CrossRef]
- Nykamp, D.Q. The dot product.












| Logical Function | (Sub)Type | Example (underlined) |
|---|---|---|
| Space | Stay in place | “I sit on a tree.” |
| Space | Motion to place | “I go to Bologna.” |
| Space | Motion from place | “I come from Italy.” |
| Space | Motion through place | “Going across the city center.” |
| Cause | – | “Newcastle is closed for congestion” |
| Time | Continuous | “The traffic lasted for hours” |
| Time | Defined | “On Saturdays, traffic is flowing” |
| #W | ||||
|---|---|---|---|---|
| #1 | 0 | 0 | 0 | 0 |
| #2 | 0 | 1 | 0 | 1 |
| #3 | 1 | 0 | 0 | 1 |
| #4 | 1 | 1 | 1 | 1 |
| Method | []Simple Graphs |
[]Logical Graphs |
Logical | T1 | T2 | T3 | T4 |
|---|---|---|---|---|---|---|---|
| HAC | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| k-Medoids | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| Method | [Simple] Graphs |
[]Logical Graphs |
Logical | T1 | T2 | T3 | T4 |
|---|---|---|---|---|---|---|---|
| HAC | 1.0000 | 1.0000 | 1.0000 | 0.3750 | 0.3750 | 0.3750 | 0.3750 |
| k-Medoids | 1.0000 | 1.0000 | 1.0000 | 0.3750 | 0.3750 | 0.3750 | 0.3750 |
| Method | []Simple Graphs |
[]Logical Graphs |
Logical | T1 | T2 | T3 | T4 |
|---|---|---|---|---|---|---|---|
| HAC | 0.7407 | 0.9074 | 1.0000 | 0.7963 | 0.7963 | 0.7963 | 0.7963 |
| k-Medoids | 0.7407 | 0.9074 | 1.0000 | 0.7963 | 0.7963 | 0.7963 | 0.8241 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).







