# An Embedding-Based Approach to Repairing OWL Ontologies
## 5 Experiments
### Experimental Settings  
All experiments were performed on a laptop with 1.99 GHz Intel CoreTM CPU and 16 GB RAM, using a 64-bit Windows 11 operating system. A time limit of 1000 s is set to compute a diagnosis for an incoherent ontology based on the pre-computed MIPS and similarities between axioms. Each algorithm is evaluated with respect to its effectiveness and efficiency. When repairing an ontology by using a repair algorithm, the effectiveness of this algorithm indicates the number of removed axioms to resolve the incoherence in the ontology. The efficiency of the algorithm is the time to compute a diagnosis by taking an ontology and the information obtained by the preparation phase as inputs. In our experiments, two pre-trained models Sentence-BERT and CoSENT are used with different configurations, and we call them four models (see below) for simplicity. The configurations are obtained according to the experimental results provided in PyPi. * m1: The implementation of Sentence-BERT with model name \"paraphrase-multilingual-MiniLM-L12-v2\" and encoder type of averaging. \begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline
**Ontology** & **TBox** & **ABox** & **SubCl** & **DisjCl** & **SubPr** & **Domain** & **Range** & **CL** & **OP** & **DP** \\ \hline ALOD2 Vec-conf-edas & 826 & 115 & 156 & 450 & 0 & 86 & 86 & 142 & 43 & 43 \\ ATBox-cmt-confof & 427 & 0 & 97 & 70 & 0 & 95 & 95 & 68 & 62 & 33 \\ CHEM-A & 110 & 0 & 46  
* m2: The implementation of CoSENT with model name \"bert-base-nli-mean-tokens\" and encoder type of \"first-last-avg\". * m3: The implementation of CoSENT with model name \"bert-base-uncased\" and encoder type of \"first-last-avg\". * m4: The implementation of Sentence-BERT with model name \"bert-base-nli-mean-tokens\" and encoder type of \"cls\". Here, \"cls\" is a special word and has no meaning. Its embedding should only contain semantic information of its context, which is regarded as sentence embedding. \"first-last-avg\" means averaging the word embeddings in the first and last layer of the model. We evaluate the threshold-based repair algorithm and the signature-based one with two similarity metrics, and thus obtain the following four algorithms:  
* ThrCoAlg: Repair an ontology by using the threshold-based algorithm (i.e., Algorithm 1) with Cosine Distance (i.e., Definition 5). * ThrEucAlg: Repair an ontology by using the threshold-based algorithm with Euclidean Distance (i.e., Definition 6). * SigCoAlg: Repair an ontology by using the signature-based algorithm with Cosine Distance. Furthermore, four traditional ranking strategies are chosen to compare with ours because they have been frequently used in the existing works. Four repair algorithms (see below) are then designed by integrating each ranking strategy within the same framework. That is, such a repair algorithm is obtained by replacing the strategy of computing a degree for an axiom in Algorithm 1 while keeping the rest of Algorithm 1 nearly unchanged. * BaseAlg: This is a baseline algorithm to compute a minimal diagnosis based on all MIPS directly without ranking the axioms. Namely, it applies the ILP-based approach to all MIPS directly without computing degrees for axioms. * ScoreAlg: This is a score-based algorithm, and associates a score to an axiom in MIPS, where the score correspondences to the number of MIPS containing this axiom [22]. Different with Algorithm 1, ScoreAlg chooses those axioms with the highest score from each MIPS. * SigAlg: This is a signature-based algorithm, and ranks an axiom by summing the reference counts in other axioms for all entities appearing in the axiom [27]. An entity here can be a class name, a property name or an individual name. The rest of this algorithm is the same as Algorithm 1. * LogicAlg: It is a logic-based algorithm, and ranks an axiom by considering the impact on an ontology when the axiom is removed from the ontology [27]. The impact of an axiom is actually measured by how many entailments are lost when removing the axiom.