Markov Logic Based Inference Engine for CDSS

CDSS (Clinical Decision Support System) is typically a diagnostic application and a modern technology that can be employed to provide standardized and quality medical facilities to the medical patients especially when expert doctors are not available at the medical centres. These days the use of the CDSSs is quite common in medical practice at remote areas. A CDSS can be very helpful not only in preventive health care but also in computerized diagnosis. However, a typical problem of CDSS based diagnosis is uncertainty. Typically, an ambiguity can occur when a patient is not able to explain the symptoms of his disease in a better way. The typically used forward chaining mechanisms in rule based decision support systems perform reasoning with uncertain data. ML (Markov Logic) is a new technique that has ability to deal with uncertainty of data by integrating FOL (First-Order-Logic) with probabilistic graphical models. In this paper, we have proposed the architecture of a ML based inference engine for a rule based CDSS and we have also presented an algorithm to use ML based forward chaining mechanism in the proposed inference engine. The results of the experiments show that the proposed inference engine would be intelligent enough to diagnose a patient’s disease even from uncertain or incomplete/partial information.

successfully used for diagnosis of diseases by physicians to improve the health care process [1] especially for patient of the remote areas. Typically, a CDSS can be knowledge-based or algorithm based. In this paper, we aim to use a knowledge-based CDSS for virtual telemedicine [1]. However, a key problem in using a CDSS for telemedicine is handling of uncertainty.
Uncertainty exists practically in every phase of clinical decision making process [2]. Here, uncertainties and ambiguities in patient's data may occur due to patient's with the problem of knowledge uncertainty in recent years, including stochastic logic programs [3], probabilistic relational models [4], Bayesian logic programs [5], relational dependency networks [6], and others. Such approaches typically combine probabilistic graphical models with a subset of FOL (e.g. Horn clauses), and can be quite complex. Recently, Richardson and Domingos [7] have introduced ML, a language that is conceptually simple, yet provides the full expressiveness of graphical models and FOL in finite domains. ML extends FOL by attaching weights to formulas However, most of the above mentioned approaches have some problems of applicability in real domains, mainly because its complexity and domain restrictiveness. Recently, a new area of research, called ML has emerged. ML has proven to provide interesting capabilities on learning and reasoning about uncertainty in many real world domains. ML is a novel representation formalism that combines FOL with probabilistic graphical models.
In this paper, we have proposed architecture of an inference engine that is based on ML for CDSS. In practice, our inference engine must cope with uncertainties in the data, uncertainties about which characteristics are most useful for handling the data, uncertainties in the associations between variables, and uncertainties in the value of the action that is used as a result of inference.

Markov Logic
Recent work on event pair wise comparison neglects logical constraints among temporal relations of different types that are believed to be supportive. Therefore, ML model is proposed that jointly asserts relations of all relation types concurrently [8].  [14]. Medical science was one of top domains in which all these ideas can be applied [15]. In the last two decades, the designers of these systems have started to adapt them as they can be used more conveniently to support patient care practices in reality [16]. It has been discussed that most of the initial systems were diagnostic decision support systems. The finest accessible clinical knowledge is well organized, available to clinicians, and captured in an arrangement that expedites effective help for the whole decision making process.

Inference Engine
An inference mechanism or an inference engine is a software system that is premeditated for inducement of inference by exploring problems in the light of expert's knowledge which is provided in the knowledge base of both technically and economically [18]. In any expert system, the inference engine is the most important portion that performs the mechanism of "the thinking" by depending upon the contents of the knowledge base. It is proved that the method of materials choice can be viewed as one of an actual option for building an inference engine of an expert system in the materials selection [17].

USED METHODOLOGY
In order to apply the AI in a CDSS, a newly emerging technique has been used that is called as ML. The ML deals particularly with the vagueness and uncertainty. Finally, there has to be a communication mechanism between the operator/user and system, a way of inputting the patient data into the system and getting the output of the system to the user who will make the actual decision.

Forward Chaining Inference Engine
An inference engine is developed for a rule-based system whose basic components are Attributes, Conditions, Rule-1. IF X has temperature THEN X has fever.
Rule-2. IF Y has temperature AND Y has runny nose THEN Y has fever and flu.
The inference engine will preprocess the rules and extract the following conditions;:

Rule Control
In the literature of the Decision support systems, two problems in the control section were identified and the problems are lectured by the inference engine. However, there is a possibility that in a particular situation, there can be two or more rule available to run. Here, an inference engine has to decide in such situation to finalize a single rule to run.

Rule Selection Process
An Inference engine is also called as a Rule Interpreter sine the task is to find and match rules to the requirements and then fine those particular rules. Following are typical steps followed in the rule selection process: (i) First of all, one needs to match the available patterns of a rule against the factual data and finalize the rule. (ii) Choose one rule to fire, using any of the conflict resolution strategies.
(iii) Perform actions in conclusion; probably altering (add/remove) facts in working memory define by the consequent of the rule.
(iv) Flag the rule that has been fired  Inference Engine starts at Rule (a) and go forward/down the knowledge base till a rule "fires'' is found.

First Cycle
Rule c fires: conclusion M is true.
New knowledge found.
No other rule fires.
End of first iteration.
Goal not found.
New knowledge found is that M.
Go for second iteration.
Second Cycle: Rule b fires: conclusion O is true.
New knowledge found.
Rule d fires: conclusion L is true.
L is true Goal found Proved

Markov Logic Based Inference Engine Architecture
Generally, the major responsibility of the inference engine is to accomplish the rational process and the inference mechanism depending upon the information or rules contained in the knowledge base. There are some other significant components that are needed to run the overall system. Following is the way, Markov network represents the joint distribution: Here, the joint distribution (Pearl, 1988) of a model is represented as a set of variables i.e. X ∈ (X 1 ,X 2 , …. , X n ). In a typical network of ML, a set of pair (F i ,w i ) is used to represent a predicate and a predicate in first order logic is represented by F i and a real number depicts w i that is weight of the predicate/formula.
The weights of the formulas are dynamically updated by using diagnolized Newton Method (Pearl, 1988). Here, the weight update formula is:

EXPERIMENTS AND RESULTS
The used methodology is explained by the implementation of the ML based inference engine in the CDSS based Framework of telemedicine system proposed by [1]. Experiments are performed for the evaluation of the presented approach.

Experiment Details
To demonstrate the performance evaluation of the

NL Clinical Data Acquisition Phase
To perform the practical experiment, the first and foremost step is to obtain the clinical data about a certain patient's case study. A set of patient reports were collected from the BVH (Bahawalpur Victoria Hospital) outdoor section and selected reports were used to prepare patient's discretion in the English langauge. A sample example with the problem statement of the case study is given below. The output obtain from this phase of the experiment is the patient report, which is in the NL format i.e. English.

NL Data Processing Phase
As the patient report acquired in the data acquisition phase is obtained in the NL format. We have used four steps to process a NL text file.

Lexical Analysis:
The English written patient report obtained in the data acquisition phase is now available in the form of a paragraph which contains number of strings.
These strings are tokenized into tokens or lexicons. These tokens are further gone through POS (Part-Of-Speech) tagger to get different parts of speech called as morphemes. Afterwards morphemes are lexically analyzed by a parse tree is shown in Table 1.

Symptoms Extraction
The output of the semantic analyzer is used in this phase to extract the actual disease symptoms. It is shown in Table 3.

Markov Logic Weight Assignment
ML has ability to handle uncertainty and learn from the data. The designed system, on the basis of these symptoms formulates the standard language rules with certain weights. The weights of the rules were randomly selected and these weights were adjusted to get the optimal output. In our experiments, we assigned a weight of 0.0 to 0.1 to the rules. Here, we can see Table 4 in which all the symptoms are shown with the weights assigned by the proposed CDSS system.

Diagnosis Phase
In this phase, the CDSS system detects and diagnoses the disease. The proposed CDSS system identifies the disease according to the assigned weights. On the basis of the CDSS diagnosis about the patient's disease, the system prescribes medication (including dose details) with diet details.

RESULTS AND DISCUSSION
To find out the accuracy the used framework of three gatherings of twenty patients were characterized. For every gathering three reports i.e. simple, normal and troublesome were created for every gathering. The side effect reports were painstakingly arranged and prepared for every patient utilizing the composed social insurance framework. For right and wrong determination of an indication report different focuses were given. Along the patient reports (data) received from BVH, the diagnosis of the experts were also collected. Here, the diseases identified by the deigned system were matched with the diagnosis results of the human medical experts and the results were classified into correct, incorrect and missing categories. Fig. 4

CONCLUSION
CDSSs experts are concerned in diagnosis of diseases for their patients. But face some problems due to uncertainty in the patients' reports. Reasoning which is performed by inference engine. In this paper we have proposed ML based reasoning framework for the CDSS that can be successfully applied to solve a number of difficult and important patient reports containing uncertain and vague information.

FUTURE WORK
Humans are good at writing rules but not so good at assigning weights to the rules they write. In future work, we also are studying methods for allowing inference engine to learn its own rules and learn the weights automatically.