Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
A WEB-BASED HYBRID INTELLIGENT SYSTEM FRAMEWORK Rajendra M Sonar Shailesh J Mehta School of Management, Indian Institute of Technology Bombay Powai, Mumbai-400076 India [email protected] ABSTRACT With the advent of Web technology, the intelligent systems need to be web-based so that the decision makers and users can access and use them using machines supporting browsers. Web-based Internet and Internet environment facilitates development of centralized decision-making solutions. Instead of solving a problem using a single intelligent technique like expert system, neural network, case-based reasoning alone, these techniques are integrated to reduce their weaknesses, increase the strengths and solve complex tasks. In this paper we describe a framework, which has advantages of using latest web plat-form, open standard XML technology and power of hybrid intelligent system. system. The web server requires .NET installed on the server. Following sections describe various building blocks. Variable Objects Database Interface Data Entry Interface Generator Expert System (Rule Engine) Case-based Reasoning Engine Neural Network Module KEY WORDS Hybrid Intelligent Systems, Intelligent System Architectures, Expert System, Case-based Reasoning 1. Introduction The recent trend has been developing hybrid intelligent systems. Various architectures, frameworks and models have been suggested and used to develop hybrid intelligent systems in various application domains [1-6]. We have developed a framework that is web-based and integrates rule-based reasoning, case-based reasoning and neural network. The framework has been implemented using Microsoft’s C# (C-Sharp) programming language under ASP.NET environment [7]. It supports thin clients. This is a complete redesigned web version of Hybrid Expert System Shell (HESS) environment [8]. HESS was built to develop modular hybrid intelligent systems in client/server environment and database was used as coupling mechanism. 2. Components of the framework The framework has various components as shown in figure 1. These components are implemented using object-oriented approach. Only one instance of each of these components runs on web server (Internet Information Server) except session object that holds the data and process status specific to the user logged in the Figure 1: The block diagram of the framework 2.1 Variable Objects Variable objects is the set of common global variables that various intelligent systems use (the web-based interface for manipulating variables objects is shown in figure 2). Expert systems use them in rules, CBR engine as set of features, neural-network as input-output variables etc. Each variable object has properties like name, data type (logical, string, number, real, trend, matrix, composite, lists), range of values, default value, menu name, question to ask, input field name, when needed scripts. Some variables are goal variables. These goal variables are used: (a) as agenda/goal for rule-based reasoning, (b) to enter the facts using data entry interfaces, (c) to define similarity schema to find matching cases, (d) to solve a problem by neural network, (e) input/output SQL (structured query language) query interfaces, and (f) output interfaces. Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 1 2.2 Database Interface We have used common notation Case (as used commonly in CBR [9]) to describe facts for rule-based system as well as to describe an example (vector) in neural network processing. We call data that is manipulated as user session data. It holds number of cases for a particular user logged in the system. data source/across data sources. These query interfaces are defined for each goal, user and role. Variable objects are mapped and linked to various data source schemas (field name, table name, data source ID, etc.). The mapping and linking can be set to various and heterogeneous data sources and this information is used to access, manipulate and exchange the data among user session data and data sources 2.3 Data Entry Interface Generator This component generates web data entry interfaces (forms). These forms are used to manage cases at the client machine in off-line mode (means connectivity to web server is not required except at the time of submission of cases to the server). The cases in user session data can even be downloaded and stored on client machine. Forms are generated based on properties of variable objects. Whenever, a form is accessed, all relevant cases in user session data are sent to the client for updations as shown in figure 3(b). Figure 2. Web interface for managing variable objects The database interface (DBI) maintains the list of connections to various data sources using ODBC (Open Database Connectivity) and OLE-DB (Object Linking and Embedding Database). SQL responses are converted into XML (eXtensible Markup Language) formats after fetching data from data sources. Records fetched by calling SQL queries, correspond to cases in user session data. Similarly XML data is converted into set of SQL queries to update/insert data as shown in figure 3(a). Data can be merged from multiple data sources as well as can be updated and added to multiple data sources. These forms contain JavaScript code for adding new cases, modifying cases, on-line validation of data, navigation, searching, storing and retrieving cases on/from client’s machine (sample: figure 4). Explicit Visual Basic/Java scripts can be embedded inside the web pages that use variable objects defined in the framework instead of/along with script variables to add rich set of functionality to forms. The object variable names are mapped to temporary VB/JavaScript variables while generating the forms/web pages. Figure 3. Database interface and data entry interface generator Access to the applications, data and data sources is based on user and role of the user. User profiles that describe roles and data access rights are stored in one of the database. Data access rights are defined for particular application (goal/agenda) for that user. While defining data access rights, various query interfaces are used. Input Query Interface: set of SQL queries to retrieve input data from data source/s. Output Query Interface: set of SQL queries to add or update data to data source/s. Case Query Interface: set of SQL queries to search similar cases in the Figure 4. A sample form generated for goal Applicant.Credit Status 2.4 Expert System Supports rule-based reasoning (forward and backward reasoning). The rules are stored in IF-THEN-ELSE format. The system has in-built mechanism which automatically converts qualitative data into quantitative and quantitative into qualitative. This is useful to Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 2 implement applications that require multi-valued logic and to quantify qualitative features. It helps to reduce number of rules required to put explicitly in the rule-base to transform the data. One of the powerful features of the expert system engine: it allows use of DHTML (Dynamic Hyper Text Markup Language) scripts to write business logic for When Needed/When Changed methods at the client side. The screen capture in figure 5 shows the fact Search.Maturity Value is calculated by when needed script and the value is displayed in text box. In figure 6 (partial text of XML file that stores variable object information), the corresponding VB script for calculating Search.Maturity Value is shown. In this example, the function GetMaturityValue is already included in web page as a part of VB script library. The input facts like Search.Deposit Type, Search.Installment Amount, Search.Deposit Period that are needed to calculate Search.Maturity Value would be automatically mapped to corresponding script variables when dynamic web page is generated. This mapping helps to move values from variable objects to script variables when page is generated and sent. Similarly script variable values are moved to variable objects after page is submitted. Figure 6. Example: When Needed script Figure 7. Partial result of expert system for goal Applicant.Credit Status: XML converted into HTML 2.5 Case-Based Reasoning Engine Figure 5. Execution of When Needed script and sample output The entire Question & Answer (Q&A) session is managed at the server, dynamically creating interactive web pages and sending them to clients. Q&A session management includes managing data as well as process status. Applications that use forward-reasoning method need all available facts to be provided before starting the reasoning process. Dynamic data entry interfaces are used to enter the available facts from the client machine (as shown in figure 4). Rules are represented and stored in XML format at the central server in an application object, multiple rule-sets can be included to host multiple rulebased systems. Various functions are implemented for: trend analysis, comparing various trends, regression analysis, to draw various charts, compare trends, matrix functions etc. to address financial applications. Cases are represented in XML format (flat structure: <Feature><Value> pair). Cases are stored in database or across databases. They are accessed using database interface. The combination of rule-based and nearest neighbour methods is used for retrieval [9] [10]. A goal variable can have corresponding CBR schema describing set of features, type of similarity measures (numeric, symbolic, exact), similarities, weights, etc. The case management interface is shown in figure 8. Schema is defined for a particular goal variable. A feature can have different weights in the context of goal variable. For example, a feature like Age may have different weight in Insurance application than a Credit Evaluation application. Problem case is converted into revised case. Revised case consists of the facts that are inferred (deduced) from the base facts provided in problem case by applying set of rules (expert system). For example, suppose the problem case consists of features like Applicant.Gross Income, Applicant.Dependents, Applicant.Total Debt, Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 3 Applicant.Property Value, Applicant.Education, etc. The revised case would have features like Applicant.Financial Position, Applicant.Job Status, Applicant.Education Status, etc. This reduces number of features required to match and retrieve cases. SQL statements are generated from revised query to retrieve matching cases from the data sources as shown in figure 9(a). In this example: select * from Applicant where Fin_Position=’Good’ and Job_Status=’Good’ and Edu_Status=’Acceptable’. The variable names are mapped to database fields: like in this example Applicant.JobStatus is mapped to database field Job_Status. The SQL statements to retrieve the matching cases from the data sources are generated based on various levels defined, starting with level 0 (strict criteria) to maximum level defined (most relaxed criteria) in CBR schema. The retrieved cases are further filtered using nearest neighbour method to get most matching case/s. 2.6 Neural Network Module Supports simple and quick error back-propagation algorithm [11]. The algorithm is implemented using matrix library and uses XML format for storing network topology, parameters etc. Only trained neural networks are included in the framework for running hybrid applications. The data is represented in XML format and input vector as well as output vector corresponds to a case. So the input data to be processed and results produced are treated as set of cases. 3. Integrating Systems 3.1 Use of XML All components of the framework: expert system, neural network, case-based reasoning engine, database interface and even clients (through files) use data represented in XML format for input, output, storing parameters. These components can exchange data amongst each other through common XML interface (figure 10). Figure 8.Web interface for managing case schema Figure 10. Integration framework Figure 9.Case retrieval and adaptation The rule-based interface on top of CBR facilitates development of CBR applications based on Q&A (somewhat similar to conversational CBRs). Instead of entering entire query, user can be guided by set of intelligent questions and answers. Upon finishing Q&A, the CBR engine does the job of searching most similar cases. Rules are used for adaptation [10] of matching case/s as shown in figure 9(b). User can retain the adapted case by adding to the data source/s through database interface or revise the case by updating to the data source/s. A problem to be solved is treated as an input case while result (along with inputs) is treated as output case uniformly across all the components. The retrieved database records (using SQL views) are converted into input cases by database interface. Similarly output cases are treated as records to be updated or added to the data sources. The user session data contains these two types of cases. The input cases are transformed into output cases by applying an intelligent technique or hybrid of these techniques. Since the cases are represented in XML format, they can be viewed in customized HTML formats by transforming them using extensible style sheet (xsl) files (sample screen captures shown in figure 7 and 12). Extensible style sheets are used to convert XML data into HTML formats. This transformation is done at web server before sending response to clients so that the browsers that do not support XML can also view the data. Using XML file interface, users can download cases in file (XML format) on local machine as well can upload XML file from local machine to the server. Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 4 3.2 Sharing Mechanism User session data act as a coupling mechanism where all components share and access the data, facts, hypotheses, etc. as shown in figure 10. This facilitates to integrate various components (even external systems) to each other in various modes and approaches in modular way. Each component shares/accesses required data leaving other data untouched. There are many sources from which data is assembled in user session data (explicitly managed by user, retrieved from data sources, results of intelligent system execution, etc.). 3.3 Building hybrid intelligent systems The framework can be configured to build hybrid systems by integrating intelligent systems in various modes. A hybrid interface is used to define the set of intelligent systems to be executed for a particular goal. As discussed earlier some of the variables are goal variables and hybrid interface or intelligent techniques are linked to them. For example goal variable Applicant.Credit Status may be linked to a CBR schema. So whenever user selects goal as Applicant.Credit Status and clicks on Find Matching Case, the CBR engine starts finding the matching cases for that goal. Execution of intelligent systems can either be controlled explicitly by the user (by using various command buttons/links) or by using hybrid interface and expert system. The modes in which intelligent systems can be integrated are described below. In sequential mode, intelligent systems work in sequence [1], [4]. The output of one system is input to the other system. For example, expert system can be used to acquire the input facts using Q&A mode and apply the rules and produce results (output case). The output case can be used by CBR engine as a problem case to find most matching cases. Again expert system (rules) can be used to adapt the case/s (ES->CBR->ES). Similarly, expert system can be used to preprocess the data retrieved from data sources before applying to neural networks and vice a versa. component is implemented using C# (which is object oriented programming language like Java), the public methods (operations) of one component can be accessed in other component. 3.4 Integrating databases, intelligent systems and other business systems The database schemas are mapped and linked to variable objects. It is possible to integrate databases to intelligent systems, and, integrate data from various data sources. This makes the framework as an information integration tool [12]. For example, data can be extracted from a database (say MS-Access); can be cleaned and transformed using set of rules and updated to another database (say Oracle). Data entry interface generator can generate data entry web pages for entering the data remotely into the databases. Figure 11 shows a web interface generated for entering/managing data (only few fields are selected) of loan and deposit products. These products are treated as input cases and can be viewed as shown in figure 12 by transforming product details into HTML format using extensible style sheet. Figure 11. A sample web form used for remote data entry. In parallel mode, the same task is solved by more than one intelligent system to gain better insight. The results can be compared. For example, credit status of an applicant can be determined by comparing results by 1) using rule-based system 2) using CBR engine to find the most matching customers and, 3) using trained neural network to classify the customer. A problem can be divided into sub-problems (sub-tasks) and each task can be well solved by particular technique depending upon type of task and suitability of technique. For example expert system can perform job of qualitative analysis while neural networks can perform the job of pattern recognition. In meta-processing [4], one system controls the other system. The best example is expert system controlling neural network training. Since each Figure 12. The XML input cases transformed using XSL. Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 5 External applications can be integrated either through the data sources or by passing parameters. Integrating through database is simple one, as the database itself acts as a sharing mechanism [8]. The required input data can be fetched from the database. Upon execution of intelligent system, the results can be saved to the database. Other application can access the results from the database. For example, salary database can be connected to rule-based Tax Calculation Expert System. The Tax Calculation ES can fetch various incomes of employees from the salary database, calculate the taxes and update the taxes to the salary database. This makes it easier to keep changing business rules in the rule-based systems and at the same time integrate expert systems with other business systems 5. Acknowledgements Because of simple XML interface, other system can upload (through client interface) input data to the user session data in XML. After solving the problem, the results can be downloaded by the system in XML format (again through client interface). [3] Suran Goonatilake & Phillip Treleaven, editors, Intelligent systems for finance and business (John Wiley and Sons, 1995). 4. Conclusion and further work The framework described in this paper represents a unique and novel way of integrating various intelligent systems and data sources in web environment. It is an easy to use and flexible framework to develop and deploy web-based generic general-purpose hybrid intelligent systems. The decision makers and users can use such type of frameworks with just a simple Internet browser. Representing the problem as well as result (output) as a case in a common XML format, makes it flexible to store, interchange and use the session data across various intelligent systems. There are other advantages of using this kind of framework apart from developing hybrid intelligent systems. For example, expert system can sit on top of various data sources and rules can be used to integrate and view the data in uniform way. Use of DHTML scripts for When Needed/When Changed methods makes expert system technology to extend its reach, bring richness and flexibility in problem solving. It helps to combine procedural business logic with rulebased systems. Use of style sheet languages help to transform XML data into HTML formats thereby saving a lot of time of designing output pages. We have a plan to add a genetic optimization module to the existing framework to address optimization problems especially similar to solving problems using linear programming models. We are in the phase of developing practical hybrid intelligent applications especially in banking and finance domain. These include developing dynamic and smart web sites to search products intelligently and intranet-based hybrid systems for financial analysis, loan underwriting, credit rating and scoring models for various banking and financial institutions in India. I thank to the Dean (Research & Development), Indian Institute of Technology Bombay (IITB), for sanctioning the seed grant for this project. References [1] Larry Medsker, Hybrid intelligent systems (Kluwer Academic Publishers, Boston, 1995). [2] Suran Goonatilake & Sukhdev Khebbal, editors, Intelligent hybrid systems (John Wiley and Sons, 1995). [4] Melanie Hilario, Christian Pellegrini & Frederic Alexandre, Modular integration of connectionist and symbolic processing in knowledge-based systems. International Symposium on Integrating Knowledge and Neural Hueristics, ensacola, Florida, 1994, 123-132. [5] Jim Prentzas & Ioannis Hatzilygeroudis, Integrating hybrid rule-based with case-based reasoning. Advances in case-based reasoning (Proc. 6th European Conference, ECCBR 2002), 336-349. [6] Kamalendu Pal & John Champbell, An application of rule-based and case-based reasoning within single legal knowledge-based system, The DATA BASE advances in Information Systems- 28(4), Fall 1997, 48-63. [7] G. Andrew Duthie, Microsoft® ASP.NET Programming with Microsoft Visual C#® .NET Version 2003 Step By Step (Microsoft Press, 2003) [8] R. M. Sonar & Asish Saha, An integration framework to develop modular hybrid intelligent systems. Frontiers in Artificial Intelligence and Applications: Vol 69, 14991506, IOS Press, Ohmsha, 2001. [9] J. L. Kolodner, Case-Based Reasoning (Morgan Kaufmann, San Mateo, CA, 1993). [10] David Leak, Combining rules and cases to learn case adaptation. http://www.cs.indiana.edu/~leake /papers/ p95-09.html. [11] D.E. Rumelhart, G.E. Hinton & R.H. Williams, Learning representations by back-propagation errors, Nature, 323, 1986, 33-536. [12] Oliver Duschka & Michael Genesereth, InfomasterAn Information Integration Tool. Proc. The International workshop on Intelligent Information Integration, Freiburg Germany, Sep. 1997. Intelligent Systems and Control, Ed. M.H.Hamza, ACTA Press, 2004, pp 254-259. 6