147 20 19MB
English Pages 1224 [1223] Year 2005
Lecture Notes in Artificial Intelligence Edited by J. G. Carbonell and J. Siekmann
Subseries of Lecture Notes in Computer Science
3789
Alexander Gelbukh Álvaro de Albornoz Hugo Terashima-Marín (Eds.)
MICAI 2005: Advances in Artificial Intelligence 4th Mexican International Conference on Artificial Intelligence Monterrey, Mexico, November 14-18, 2005 Proceedings
13
Series Editors Jaime G. Carbonell, Carnegie Mellon University, Pittsburgh, PA, USA Jörg Siekmann, University of Saarland, Saarbrücken, Germany Volume Editors Alexander Gelbukh National Polytechnic Institute (IPN) Center for Computing Research (CIC) Av. Juan Dios Bátiz, Col. Zacatenco 07738 DF, Mexico E-mail: [email protected] Álvaro de Albornoz Technológico de Monterrey (ITESM) Campus Ciudad de México (CCM) Calle del Puente 222, Col. Ejudos de Huipulco Tlalpan, 14360 DF, Mexico E-mail: [email protected] Hugo Terashima-Marín Technológico de Monterrey (ITESM) Campus Monterrey (MTY) Eugenio Garza Sada 2501, Col. Technológico 64849, Monterrey, NL, Mexico E-mail: [email protected]
Library of Congress Control Number: 2005935947
CR Subject Classification (1998): I.2, F.1, I.4, F.4.1 ISSN ISBN-10 ISBN-13
0302-9743 3-540-29896-7 Springer Berlin Heidelberg New York 978-3-540-29896-0 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. Springer is a part of Springer Science+Business Media springeronline.com © Springer-Verlag Berlin Heidelberg 2005 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper SPIN: 11579427 06/3142 543210
Preface
The Mexican International Conference on Artificial Intelligence (MICAI) is aimed at promoting research in artificial intelligence (AI) and cooperation among Mexican researchers and their peers worldwide. MICAI is organized by the Mexican Society for Artificial Intelligence (SMIA) in collaboration with the American Association for Artificial Intelligence (AAAI). After the success of the three previous biannual conferences, we are pleased to announce that MICAI conferences are now annual, and we present the proceedings of the 4th Mexican International Conference on Artificial Intelligence, MICAI 2005, held on November 14–18, 2005, in Monterrey, Mexico. This volume contains the papers included in the main conference program, which was complemented by tutorials, workshops, and poster sessions, published in supplementary proceedings. The proceedings of past MICAI conferences were also published in Springer’s Lecture Notes in Artificial Intelligence (LNAI) series, vols. 1793, 2313, and 2972. Table 1. Statistics of submissions and accepted papers by country/region Authors Papers1 Country/Region Subm Accp Subm Accp Algeria 2 – 0.66 – Argentina 27 4 8.66 1.5 Australia 7 – 2.66 – Brazil 48 14 15.16 3.66 Bulgaria 1 1 0.5 0.5 Canada 13 4 4.75 2 Chile 14 10 6 4 China 288 65 107.33 23.66 Colombia 1 – 1 – Cuba 6 – 1.66 – Czech Republic 1 – 1 – Denmark 3 3 0.75 0.75 France 24 10 10.33 4.66 Germany 2 1 2 1 Hong Kong 3 1 1.16 0.33 India 6 – 4 – Iran 6 – 4 – Ireland 3 3 1 1 Italy 8 – 3.5 – Japan 13 2 5 1 Korea, South 71 7 33 2 Lebanon 2 – 1 – 1
Authors Papers1 Country/Region Subm Accp Subm Accp Lithuania 3 1 1.5 0.50 Malaysia 2 – 1 – Mexico 383 139 131.91 47.44 Netherlands 3 2 1.2 1 New Zealand 4 4 1 1 Norway 4 1 2.33 1 Poland 8 2 3 1 Portugal 2 – 0.5 – Romania 2 2 0.5 0.5 Russia 10 3 7 1.5 Singapore 3 – 2 – Slovakia 1 – 1 – Spain 71 25 20.81 7.6 Sweden 4 – 1 – Taiwan 8 – 3 – Thailand 1 – 0.25 – Tunisia 5 – 2 – Turkey 11 8 3.5 2.5 UK 23 17 9.50 7.16 USA 29 8 11.33 3.37 Uruguay 4 – 1.00 – Total: 1130 341 423 120
Counted by authors: e.g., for a paper by 3 authors: 2 from Mexico and 1 from USA, we added 23 to Mexico and 13 to USA.
VI
Preface
The number of submissions to MICAI 2005 was significantly higher than that of the previous conferences: 423 full papers by 1130 authors from 43 different countries were submitted for evaluation, see Tables 1 and 2. Each submission was reviewed by three independent Program Committee members. This book contains revised versions of 120 papers by 341 authors Table 2. Statistics of submissions and accepted papers by topic2 Topic Assembly Automated Theorem Proving Belief Revision Bioinformatics Case-Based Reasoning Common Sense Reasoning Computer Vision Constraint Programming Data Mining Expert Systems/Knowledge-Based Systems Fuzzy Logic Genetic Algorithms Hybrid Intelligent Systems Intelligent Interfaces: Multimedia; Virtual Reality Intelligent Organizations Intelligent Tutoring Systems Knowledge Acquisition Knowledge Management Knowledge Representation Knowledge Verification; Sharing and Reuse Logic Programming Machine Learning Model-Based Reasoning Multiagent Systems and Distributed AI Natural Language Processing/Understanding Navigation Neural Networks Nonmonotonic Reasoning Ontologies Philosophical and Methodological Issues of AI Planning and Scheduling Qualitative Reasoning Robotics Sharing and Reuse Spatial and Temporal Reasoning Uncertainty/Probabilistic Reasoning Other 2
Submitted Accepted 7 3 7 17 10 6 37 12 50 25 33 50 46 15 13 18 24 24 44 7 6 91 9 54 33 11 64 6 22 19 24 4 45 7 7 29 62
2 1 4 2 3 3 12 2 10 6 11 14 12 1 3 3 5 7 13 3 2 28 2 11 13 4 21 2 4 4 8 1 21 3 2 12 20
According to the topics indicated by the authors. A paper may be assigned to more than one topic.
Preface
VII
selected after thorough evaluation for inclusion in the conference program. Thus the acceptance rate was 28.3%. The book is structured into 14 thematic fields representative of the main current areas of interest within the AI community: – – – – – – – – – – – – – –
Knowledge Representation and Management, Logic and Constraint Programming, Uncertainty Reasoning, Multiagent Systems and Distributed AI, Computer Vision and Pattern Recognition, Machine Learning and Data Mining, Evolutionary Computation and Genetic Algorithms, Neural Networks, Natural Language Processing, Intelligent Interfaces and Speech Processing, Bioinformatics and Medical Applications, Robotics, Modeling and Intelligent Control, Intelligent Tutoring Systems.
The conference featured excellent keynote lectures presented by Erick Cant´ uPaz of CASC, John McCarthy of Stanford University, Katsushi Ikeuchi of the University of Tokyo, Tom Mitchell of Carnegie Mellon University, Jaime Sim˜ ao Sichman of Universidade de S˜ ao Paulo, and Piero P. Bonissone of General Electric. The following papers received the Best Paper Award and the Best Student Paper Award, correspondingly (the Best Student Paper was selected from papers for which the first author was a full-time student): 1st Place: A Framework for Reactive Motion and Sensing Planning: a Critical EventsBased Approach, by Rafael Murrieta Cid, Alejandro Sarmiento, Teja Muppirala, Seth Hutchinson, Raul Monroy, Moises Alencastre Miranda, Lourdes Mu˜ noz G´ omez, Ricardo Swain; 2nd Place: A Noise-Driven Paradigm for Solving the Stereo Correspondence Problem, by Patrice Delmas, Georgy Gimel’farb, Jiang Liu, John Morris; 3rd Place: Proximity Searching in High Dimensional Spaces with a Proximity Preserving Order, by Edgar Chavez, Karina Figueroa, Gonzalo Navarro; Student: A Similarity-Based Approach to Data Sparseness Problem of the Chinese Language Modeling, by Jinghui Xiao, Bingquan Liu, Xiaolong Wang, Bing Li.
We want to thank all people involved in the organization of this conference. In the first place these are the authors of the papers constituting this book: it is the excellence of their research work that gives value to the book and sense to the work of all other people involved. ´ Our very special thanks goes to Angel Kuri and Ra´ ul Monroy, who carried out a huge part of the effort of preparation of the conference in general and reviewing process in particular with professionalism and enthusiasm without which this conference would not have been possible and this book would not have appeared. We thank the members of the Program Committee and the conference staff. We are deeply grateful to the Tecnol´ogico de Monterrey at Monterrey for their
VIII
Preface
warm hospitality to MICAI 2005. We would like to express our gratitude to Francisco J. Cant´ u-Ortiz, Dean of Research and Graduate Studies of Tecnol´ogico de Monterrey at Monterrey, and to all members of this office, with special thanks to Leticia Rodr´ıguez for coordinating activities on the local arrangements. We are also deeply grateful to Fernando J. Jaimes, Dean of the Division of Information Technology and Electronics, and Rogelio Soto-Rodr´ıguez, Director of the Center for Intelligent Systems, and all members of this center. We thank Hiram Calvo of CIC-IPN and Manuel Vilares of University of Vigo for their significant contribution to the reviewing process. The entire submission, reviewing, and selection process, as well as putting together the proceedings, was supported for free by the EasyChair system (www.EasyChair.org); we express our gratitude to its author Andrei Voronkov for his constant support and help. Last but not least, we deeply appreciate the Springer staff’s patience and help in editing this volume—it is always a great pleasure to work with them. September 2005
Alexander Gelbukh ´ Alvaro de Albornoz Hugo Terashima
Organization
MICAI 2005 was organized by the Mexican Society for Artificial Intelligence (SMIA), in collaboration with the Tecnol´ ogico de Monterrey at Monterrey and at Mexico City, the Centro de Investigaci´on en Computaci´ on del Instituto Polit´ecnico Nacional, the Instituto Tecnol´ogico Aut´ onomo de M´exico, and the ´ Instituto Nacional de Astrof´ısica, Optica y Electr´ onica. The contribution of the following sponsors is acknowledged and greatly appreciated: Company PHAR, S. A. de C. V., TCA Group, and the Government of the State of Nuevo Leon, Mexico.
Conference Committee Conference Chairs: Program Chairs: Tutorial Chairs: Workshop Chairs: Keynote Speaker Chair: Award Committee:
Local Chairs:
Local Arrangements Chair: Finance Chair: Publicity Chair:
´ Alvaro de Albornoz (ITESM-CCM) Angel Kuri Morales (ITAM) Alexander Gelbukh (CIC-IPN) Ra´ ul Monroy (ITESM-CEM) Manuel Valenzuela (ITESM-MTY) Horacio Mart´ınez (ITESM-MTY) Ram´ on Brena (ITESM-MTY) Jos´e Luis Aguirre (ITESM-MTY) Carlos Alberto Reyes (INAOE) Alvaro de Albornoz (ITESM-CCM) Angel Kuri Morales (ITAM) Alexander Gelbukh (CIC-IPN) Hugo Terashima (ITESM-MTY) Rogelio Soto (ITESM-MTY) Ricardo Swain (ITESM-MTY) Leticia Rodr´ıguez (ITESM-MTY) Carlos Cant´ u (ITESM-MTY) Patricia Mora (ITESM-MTY)
Program Committee Ajith Abraham Jos´e Luis Aguirre Juan Manuel Ahuactzin In´es Arana Gustavo Arroyo Figueroa V´ıctor Ayala Ram´ırez Ruth Aylett
Antonio Bahamonde Soumya Banerjee Olivia Barr´ on Cano Ildar Batyrshin Ricardo Beausoleil Delgado Bedrich Benes Ram´on F. Brena
X
Organization
Carlos A. Brizuela Paul Brna Wolfram Burgard Osvaldo Cair´ o Nicoletta Calzolari Francisco Cant´ u Ort´ız Maria Carolina Monard Oscar Castillo L´opez Edgar Ch´ avez Yuehui Chen Carlos A. Coello Coello Simon Colton Santiago E. Conant Pablos Ulises Cort´es Carlos Cotta-Porras Nareli Cruz Cort´es Nicandro Cruz Ram´ırez Victor de la Cueva Antonio D’Angelo Louise Dennis Alexandre Dikovsky Juergen Dix Marco Dorigo Armin Fiedler Bob Fisher Juan J. Flores Olac Fuentes Alexander Gelbukh (Co-chair) Eduardo G´ omez Ram´ırez Andr´es G´omez de Silva Jose A. Gamez Martin Matjaz Gams Leonardo Garrido Luna Luis Eduardo Garza Casta˜ no´n Jos´e Luis Gordillo Crina Grosan Neil Hern´ andez Gress Arturo Hern´ andez Brahim Hnich Jesse Hoey Johan van Horebeek Dieter Hutter Pablo H. Ibarguengoytia G. Bruno Jammes Leo Joskowicz
Mario K¨ oppen Ingrid Kirschning Zeynep Kiziltan Ryszard Klempous Angel Kuri Morales Ram´on L´ opez de Mantaras Pedro Larra˜ naga Christian Lemaˆıtre Le´on Eugene Levner Jim Little Vladim´ır Maˇr´ık Jacek Malec Toni Mancini Pierre Marquis Carlos Mart´ın Vide Jos´e Francisco Mart´ınez Trinidad Horacio Martinez Alfaro Oscar Mayora Ren´e Mayorga Efr´en Mezura Montes Chilukuri K. Mohan Ra´ ul Monroy (Co-chair) Guillermo Morales Luna Eduardo Morales Manzanares Rafael Morales Rafael Murrieta Cid Juan Arturo Nolazco Flores Gabriela Ochoa Meier Mauricio Osorio Galindo Andr´es P´erez Uribe Manuel Palomar Luis Alberto Pineda Andre Ponce de Leon F. de Carvalho David Poole Bhanu Prasad Jorge Adolfo Ram´ırez Uresti Fernando Ramos Carlos Alberto Reyes Garc´ıa Abdennour El Rhalibi Maria Cristina Riff Roger Z. Rios Dave Robertson Horacio Rodr´ıguez Riccardo Rosati Isaac Rudom´ın
Organization
Alessandro Saffiotti Gildardo S´ anchez Alberto Sanfeli´ u Cort´es Andrea Schaerf Thomas Schiex Leonid Sheremetov Grigori Sidorov Carles Sierra Alexander V. Smirnov Maarten van Someren Juan Humberto Sossa Azuela Rogelio Soto Thomas Stuetzle Luis Enrique Sucar Succar
Ricardo Swain Oropeza Hugo Terashima Demetri Terzopoulos Manuel Valenzuela Juan Vargas Felisa Verdejo Manuel Vilares Ferro Toby Walsh Alfredo Weitzenfeld Nirmalie Wiratunga Franz Wotawa Kaori Yoshida Claus Zinn Berend Jan van der Zwaag
Additional Referees Juan C. Acosta Guadarrama H´ector Gabriel Acosta Mesa Teddy Alfaro Miguel A. Alonso Jos´e Ram´on Arrazola Stella Asiimwe S´everine B´erard Fco. Mario Barcala Rodr´ıguez Axel Arturo Barcelo Aspeitia Adam D. Barker Alejandra Barrera Gustavo E. A. P. A. Batista Abderrahim Benslimane Arturo Berrones Bastian Blankenburg Pascal Brisset Andreas Bruening Mark Buckley Olivier Buffet Diego Calvanese Hiram Calvo Niccolo Capanni Carlos Castillo Sutanu Chakraborti Carlos Ches˜ nevar Federico Chesani Wu Feng Chung
Murilo Coelho Naldi Mark Collins Jean-Fran¸cois Condotta Miguel Contreras Sylvie Coste-Marquis Anne Cregan Ronaldo Cristiano Prati Juan A. D´ıaz V´ıctor Manuel Darriba Bilbao Michael Dekhtyar Deepak Devicharan Luca Di Gaspero Marissa Diaz Luigi Dragone Edgar Du´en ˜ ez ¨ Mehmet Onder Efe Arturo Espinosa Romero Katti Faceli Antonio Fernandez Caballero Antonio Ferr´ andez Armin Fiedler Alfredo Gabald´ on Arturo Galv´ an Rodr´ıguez Ariel Garc´ıa Cormac Gebruers Karina Gibert Andrea Giovannucci
XI
XII
Organization
Fernando God´ınez Giorgi Goguadze Miguel Gonz´ alez Jorge Gra˜ na Federico Guedea Alejandro Guerra-Hern´ andez Daniel Gunn Everardo Guti´errez Christian Hahn Emmanuel Hebrard Benjam´ın Hern´ andez Martin Homik Rodolfo Ibarra Boyko Iliev Bartosz Jablonski Jean-Yves Jaffray Sylvain Jasson Daniel Jolly Narendra Jussien Lars Karsson Ryszard Klempous Jerzy Kotowski A. Krizhanovsky Juan Carlos L´ opez Pimentel David Lambert Dar´ıo Landa Silva J´erme ˆ Lang Huei Diana Lee Domenico Lembo Paul Libberecht Ana Carolina Lorena Robert Lothian Henryk Maciejewski Fernando Magan Mu˜ noz Michael Maher Donato Malerba Salvador Mandujano Ana Isabel Martinez Garcia Patricio Martinez-Barco Jarred McGinnis Andreas Meier Manuel Mejia Lavalle Corrado Mencar Thomas Meyer Erik Millan
Monica Monachini Rebecca Montanari Andr´es Montoyo Jaime Mora V´argas Jos´e Andr´es Moreno P´erez Rafael Mu˜ noz Martin Muehlenbrock Rahman Mukras Amedeo Napoli Gonzalo Navarro Adeline Nazarenko Juan Carlos Nieves Peter Novak Slawomir Nowaczyk Oscar Olmedo Aguirre Magdalena Ortiz de la Fuente Mar´ıa Osorio Joaqu´ın Pacheco Marco Patella Jes´ us Peral Mats Petter Pettersson Steven Prestwich Bernard Prum Jos´e Miguel Puerta Callej´on Alonso Ram´ırez Manzan´ arez Fernando Ramos Ori´ on Fausto Reyes Galaviz Francisco Ribadas Pe˜ na Fabrizio Riguzzi Leandro Rodr´ıguez Li˜ nares Juan A. Rodr´ıguez-Aguilar Raquel Ros Maximiliano Saiz Noeda S. Sandeep P. Sanongoon Cipriano Santos Vitaly Schetinin Marvin Schiller Przemyslaw Sliwinski Jasper Snoek Thamar Solorio Claudia Soria Eduardo J. Spinosa Cyrill Stachniss Ewa Szlachcic
Organization
Armagan Tarim Choh Man Teng Paolo Torroni Elio Tuci Carsten Ullrich L. Alfonso Ure˜ na L´ opez Diego Uribe Mars Valiev Maria Vargas-Vera
Wamberto Vasconcelos Jos´e Luis Vega Jos´e Luis Vicedo Jes´ us Vilares Ferro Mario Villalobos-Arias Nic Wilson Sean Wilson Claudia Zepeda Juergen Zimmer
XIII
Table of Contents
Knowledge Representation and Management Modelling Human Intelligence: A Learning Mechanism Enrique Carlos Segura, Robin Whitty . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge Using Hybrid Systems Vianey Guadalupe Cruz S´ anchez, Gerardo Reyes Salgado, Osslan Osiris Vergara Villegas, Joaqu´ın Perez Ortega, Azucena Montes Rend´ on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
The Topological Effect of Improving Knowledge Acquisition Bernhard Heinemann . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
Belief Revision Revisited Ewa Madali´ nska-Bugaj, Witold L ukaszewicz . . . . . . . . . . . . . . . . . . . . . .
31
Knowledge and Reasoning Supported by Cognitive Maps Alejandro Pe˜ na, Humberto Sossa, Agustin Guti´errez . . . . . . . . . . . . . . .
41
Temporal Reasoning on Chronological Annotation Tiphaine Accary-Barbier, Sylvie Calabretto . . . . . . . . . . . . . . . . . . . . . . .
51
EventNet: Inferring Temporal Relations Between Commonsense Events Jose Espinosa, Henry Lieberman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
Multi Agent Ontology Mapping Framework in the AQUA Question Answering System Miklos Nagy, Maria Vargas-Vera, Enrico Motta . . . . . . . . . . . . . . . . . . .
70
A Three-Level Approach to Ontology Merging Agustina Buccella, Alejandra Cechich, Nieves Brisaboa . . . . . . . . . . . .
80
Domain and Competences Ontologies and Their Maintenance for an Intelligent Dissemination of Documents Yassine Gargouri, Bernard Lefebvre, Jean-Guy Meunier . . . . . . . . . . .
90
Modelling Power and Trust for Knowledge Distribution: An Argumentative Approach Carlos Iv´ an Ches˜ nevar, Ram´ on F. Brena, Jos´e Luis Aguirre . . . . . . . .
98
XVI
Table of Contents
Application of ASP for Agent Modelling in CSCL Environments Gerardo Ayala, Magdalena Ortiz, Mauricio Osorio . . . . . . . . . . . . . . . .
109
Logic and Constraint Programming Deductive Systems’ Representation and an Incompleteness Result in the Situation Calculus Pablo S´ aez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
Geometric Aspects Related to Solutions of #kSAT Guillermo Morales-Luna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
132
A Syntactical Approach to Belief Update Jerusa Marchi, Guilherme Bittencourt, Laurent Perrussel . . . . . . . . . .
142
A Fuzzy Extension of Description Logic ALCH Yanhui Li, Jianjiang Lu, Baowen Xu, Dazhou Kang, Jixiang Jiang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
152
An Approach for Dynamic Split Strategies in Constraint Solving Carlos Castro, Eric Monfroy, Christian Figueroa, Rafael Meneses . . .
162
Applying Constraint Logic Programming to Predicate Abstraction of RTL Verilog Descriptions Tun Li, Yang Guo, SiKun Li, Dan Zhu . . . . . . . . . . . . . . . . . . . . . . . . . .
175
Scheduling Transportation Events with Grouping Genetic Algorithms and the Heuristic DJD Hugo Terashima-Mar´ın, Juan Manuel Tavernier-Deloya, Manuel Valenzuela-Rend´ on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
185
Radial Search: A Simple Solution Approach to Hard Combinatorial Problems Jos´e Antonio V´ azquez Rodr´ıguez, Abdellah Salhi . . . . . . . . . . . . . . . . . .
195
Uncertainty Reasoning Rough Sets and Decision Rules in Fuzzy Set-Valued Information Systems Danjun Zhu, Boqin Feng, Tao Guan . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
204
Directed Cycles in Bayesian Belief Networks: Probabilistic Semantics and Consistency Checking Complexity Alexander L. Tulupyev, Sergey I. Nikolenko . . . . . . . . . . . . . . . . . . . . . .
214
Table of Contents
XVII
Fuzzeval: A Fuzzy Controller-Based Approach in Adaptive Learning for Backgammon Game Mikael Heinze, Daniel Ortiz-Arroyo, Henrik Legind Larsen, Francisco Rodriguez-Henriquez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
224
Analysis of Performance of Fuzzy Logic-Based Production Scheduling by Simulation Alejandra Duenas, Dobrila Petrovic, Sanja Petrovic . . . . . . . . . . . . . . .
234
Multiagent Systems and Distributed AI Agent-Based Simulation Replication: A Model Driven Architecture Approach Candelaria Sansores, Juan Pav´ on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
244
Effects of Inter-agent Communication in Ant-Based Clustering Algorithms: A Case Study on Communication Policies in Swarm Systems Marco Antonio Montes de Oca, Leonardo Garrido, Jos´e Luis Aguirre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
254
Coordination Through Plan Repair Roman van der Krogt, Mathijs de Weerdt . . . . . . . . . . . . . . . . . . . . . . . .
264
Enabling Intelligent Organizations: An Electronic Institutions Approach for Controlling and Executing Problem Solving Methods Armando Robles P., B.V. Pablo Noriega, Francisco Cant´ u, Rub´en Morales-Men´endez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
275
An Extended Behavior Network for a Game Agent: An Investigation of Action Selection Quality and Agent Performance in Unreal Tournament Hugo da Silva Corrˆea Pinto, Luis Ot´ avio Alvares . . . . . . . . . . . . . . . . .
287
Air Pollution Assessment Through a Multiagent-Based Traffic Simulation Jes´ us H´ector Dom´ınguez, Luis Marcelo Fern´ andez, Jos´e Luis Aguirre, Leonardo Garrido, Ram´ on Brena . . . . . . . . . . . . . . .
297
Computer Vision and Pattern Recognition A Noise-Driven Paradigm for Solving the Stereo Correspondence Problem Patrice Delmas, Georgy Gimel’farb, Jiang Liu, John Morris . . . . . . . .
307
XVIII
Table of Contents
Invariant Descriptions and Associative Processing Applied to Object Recognition Under Occlusions Roberto Antonio V´ azquez, Humberto Sossa, Ricardo Barr´ on . . . . . . . .
318
Real Time Facial Expression Recognition Using Local Binary Patterns and Linear Programming Xiaoyi Feng, Jie Cui, Matti Pietik¨ ainen, Abdenour Hadid . . . . . . . . . .
328
People Detection and Tracking Through Stereo Vision for Human-Robot Interaction Rafael Mu˜ noz-Salinas, Eugenio Aguirre, Miguel Garc´ıa-Silvente, Antonio Gonzalez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
337
Mapping Visual Behavior to Robotic Assembly Tasks Mario Pe˜ na-Cabrera, Ismael L´ opez-Ju´ arez, Reyes Rios-Cabrera, Jorge Corona-Castuera, Roman Osorio . . . . . . . . . . . . . . . . . . . . . . . . . .
347
Multilevel Seed Region Growth Segmentation ´ Raziel Alvarez, Erik Mill´ an, Ricardo Swain-Oropeza . . . . . . . . . . . . . . .
359
A CLS Hierarchy for the Classification of Images Antonio Sanchez, Raul Diaz, Peter Bock . . . . . . . . . . . . . . . . . . . . . . . . .
369
Performance Evaluation of a Segmentation Algorithm for Synthetic Texture Images Dora Luz Almanza-Ojeda, Victor Ayala-Ramirez, Raul E. Sanchez-Yanez, Gabriel Avina-Cervantes . . . . . . . . . . . . . . . . .
379
Image Retrieval Based on Salient Points from DCT Domain Wenyin Zhang, Zhenli Nie, Zhenbing Zeng . . . . . . . . . . . . . . . . . . . . . . .
386
Machine Learning and Data Mining Selection of the Optimal Parameter Value for the ISOMAP Algorithm Chao Shao, Houkuan Huang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
396
Proximity Searching in High Dimensional Spaces with a Proximity Preserving Order Edgar Ch´ avez, Karina Figueroa, Gonzalo Navarro . . . . . . . . . . . . . . . .
405
A Neurobiologically Motivated Model for Self-organized Learning Frank Emmert-Streib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
415
Table of Contents
XIX
Using Boolean Differences for Discovering Ill-Defined Attributes in Propositional Machine Learning Sylvain Hall´e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
425
Simplify Decision Function of Reduced Support Vector Machines Yuangui Li, Weidong Zhang, Guoli Wang, Yunze Cai . . . . . . . . . . . . .
435
On-Line Learning of Decision Trees in Problems with Unknown Dynamics Marlon N´ un ˜ez, Ra´ ul Fidalgo, Rafael Morales . . . . . . . . . . . . . . . . . . . . .
443
Improved Pairwise Coupling Support Vector Machines with Correcting Classifiers Huaqing Li, Feihu Qi, Shaoyu Wang . . . . . . . . . . . . . . . . . . . . . . . . . . . .
454
Least Squares Littlewood-Paley Wavelet Support Vector Machine Fangfang Wu, Yinliang Zhao . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
462
Minimizing State Transition Model for Multiclassification by Mixed-Integer Programming Nobuo Inui, Yuuji Shinano . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
473
Overview of Metaheuristics Methods in Compilation Fernanda Kri, Carlos G´ omez, Paz Caro . . . . . . . . . . . . . . . . . . . . . . . . .
483
Comparison of SVM-Fuzzy Modelling Techniques for System Identification Ariel Garc´ıa-Gamboa, Miguel Gonz´ alez-Mendoza, Rodolfo Ibarra-Orozco, Neil Hern´ andez-Gress, Jaime Mora-Vargas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
494
Time-Series Forecasting by Means of Linear and Nonlinear Models Janset Kuvulmaz, Serkan Usanmaz, Seref Naci Engin . . . . . . . . . . . . .
504
Perception Based Time Series Data Mining with MAP Transform Ildar Batyrshin, Leonid Sheremetov . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
514
A Graph Theoretic Approach to Key Equivalence J. Horacio Camacho, Abdellah Salhi, Qingfu Zhang . . . . . . . . . . . . . . .
524
Improvement of Data Visualization Based on ISOMAP Chao Shao, Houkuan Huang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
534
Supporting Generalized Cases in Conversational CBR Mingyang Gu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
544
XX
Table of Contents
Organizing Large Case Library by Linear Programming Caihong Sun, Simon Chi Keung Shiu, Xizhao Wang . . . . . . . . . . . . . . .
554
Classifying Faces with Discriminant Isometric Feature Mapping Ruifan Li, Cong Wang, Hongwei Hao, Xuyan Tu . . . . . . . . . . . . . . . . .
565
A Grey-Markov Forecasting Model for the Electric Power Requirement in China Yong He, Min Huang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
574
A Fault Detection Approach Based on Machine Learning Models Luis E. Garza Casta˜ non, Francisco J. Cant´ u Ortiz, Rub´en Morales-Men´endez, Ricardo Ram´ırez . . . . . . . . . . . . . . . . . . . . . .
583
Evolutionary Computation and Genetic Algorithms A Mixed Mutation Strategy Evolutionary Programming Combined with Species Conservation Technique Hongbin Dong, Jun He, Houkuan Huang, Wei Hou . . . . . . . . . . . . . . . .
593
Coevolutionary Multi-objective Optimization Using Clustering Techniques Margarita Reyes Sierra, Carlos A. Coello Coello . . . . . . . . . . . . . . . . . .
603
A Comparison of Memetic Recombination Operators for the MinLA Problem Eduardo Rodriguez-Tello, Jin-Kao Hao, Jose Torres-Jimenez . . . . . . .
613
Hybrid Particle Swarm – Evolutionary Algorithm for Search and Optimization Crina Grosan, Ajith Abraham, Sangyong Han, Alexander Gelbukh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
623
Particle Swarm Optimization with Opposite Particles Rujing Wang, Xiaoming Zhang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
633
Particle Evolutionary Swarm Optimization with Linearly Decreasing -Tolerance Angel E. Mu˜ noz Zavala, Arturo Hern´ andez Aguirre, Enrique R. Villa Diharce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
641
Useful Infeasible Solutions in Engineering Optimization with Evolutionary Algorithms Efr´en Mezura-Montes, Carlos A. Coello Coello . . . . . . . . . . . . . . . . . . .
652
Table of Contents
XXI
A Hybrid Self-adjusted Memetic Algorithm for Multi-objective Optimization Xiuping Guo, Genke Yang, Zhiming Wu . . . . . . . . . . . . . . . . . . . . . . . . .
663
Evolutionary Multiobjective Optimization Approach for Evolving Ensemble of Intelligent Paradigms for Stock Market Modeling Ajith Abraham, Crina Grosan, Sang Yong Han, Alexander Gelbukh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
673
Genetic Algorithms for Feature Weighting: Evolution vs. Coevolution and Darwin vs. Lamarck Alexandre Blansch´e, Pierre Gan¸carski, Jerzy J. Korczak . . . . . . . . . . .
682
A Deterministic Alternative to Competent Genetic Algorithms That Solves to Optimality Linearly Decomposable Non-overlapping Problems in Polynomial Time Manuel Valenzuela-Rend´ on, Horacio Mart´ınez-Alfaro, Hugo Terashima-Mar´ın . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
692
Neural Networks K-Dynamical Self Organizing Maps Carolina Saavedra, H´ector Allende, Sebasti´ an Moreno, Rodrigo Salas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
702
Study of Application Model on BP Neural Network Optimized by Fuzzy Clustering Yong He, Yun Zhang, Liguo Xiang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
712
Application of Modified Neural Network Weights’ Matrices Explaining Determinants of Foreign Investment Patterns in the Emerging Markets Darius Plikynas, Yusaf H. Akbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
721
Neural Network and Trend Prediction for Technological Processes Monitoring Luis Paster Sanchez Fernandez, Oleksiy Pogrebnyak, Cornelio Yanez Marquez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
731
Natural Language Processing Underspecified Semantics for Dependency Grammars Alexander Dikovsky . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
741
XXII
Table of Contents
Distributed English Text Chunking Using Multi-agent Based Architecture Ying-Hong Liang, Tie-Jun Zhao . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
752
A Similarity-Based Approach to Data Sparseness Problem of Chinese Language Modeling Jinghui Xiao, Bingquan Liu, Xiaolong Wang, Bing Li . . . . . . . . . . . . .
761
Self-training and Co-training Applied to Spanish Named Entity Recognition Zornitsa Kozareva, Boyan Bonev, Andres Montoyo . . . . . . . . . . . . . . . .
770
Towards the Automatic Learning of Idiomatic Prepositional Phrases Sof´ıa N. Galicia-Haro, Alexander Gelbukh . . . . . . . . . . . . . . . . . . . . . . .
780
Measurements of Lexico-Syntactic Cohesion by Means of Internet Igor A. Bolshakov, Elena I. Bolshakova . . . . . . . . . . . . . . . . . . . . . . . . . .
790
Inferring Rules for Finding Syllables in Spanish Ren´e MacKinney-Romero, John Goddard . . . . . . . . . . . . . . . . . . . . . . . .
800
A Multilingual SVM-Based Question Classification System Empar Bisbal, David Tom´ as, Lidia Moreno, Jos´e Vicedo, Armando Su´ arez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
806
Language Independent Passage Retrieval for Question Answering Jos´e Manuel G´ omez-Soriano, Manuel Montes-y-G´ omez, Emilio Sanchis-Arnal, Luis Villase˜ nor-Pineda, Paolo Rosso . . . . . . . .
816
A New PU Learning Algorithm for Text Classification Hailong Yu, Wanli Zuo, Tao Peng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
824
A Domain Independent Natural Language Interface to Databases Capable of Processing Complex Queries Rodolfo A. Pazos Rangel, Joaqu´ın P´erez O., Juan Javier Gonz´ alez B., Alexander Gelbukh, Grigori Sidorov, Myriam J. Rodr´ıguez M. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
833
Intelligent Interfaces and Speech Processing An Efficient Hybrid Approach for Online Recognition of Handwritten Symbols John A. Fitzgerald, Bing Quan Huang, Tahar Kechadi . . . . . . . . . . . . .
843
Table of Contents
XXIII
Environment Compensation Based on Maximum a Posteriori Estimation for Improved Speech Recognition Haifeng Shen, Jun Guo, Gang Liu, Pingmu Huang, Qunxia Li . . . . . .
854
ASR Based on the Analasys of the Short-MelFrequencyCepstra Time Transform Juan Arturo Nolazco-Flores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
863
Building and Training of a New Mexican Spanish Voice for Festival Humberto P´erez Espinosa, Carlos Alberto Reyes Garc´ıa . . . . . . . . . . . .
870
Bioinformatics and Medical Applications A New Approach to Sequence Representation of Proteins in Bioinformatics Angel F. Kuri-Morales, Martha R. Ortiz-Posadas . . . . . . . . . . . . . . . . .
880
Computing Confidence Measures in Stochastic Logic Programs Huma Lodhi, Stephen Muggleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
890
Using Inductive Rules in Medical Case-Based Reasoning System Wenqi Shi, John A. Barnden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
900
Prostate Segmentation Using Pixel Classification and Genetic Algorithms Fernando Ar´ ambula Cos´ıo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
910
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images Jun Kong, Jingdan Zhang, Yinghua Lu, Jianzhong Wang, Yanjun Zhou . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
918
Towards Formalising Agent Argumentation over the Viability of Human Organs for Transplantation Sanjay Modgil, Pancho Tolchinsky, Ulises Cort´es . . . . . . . . . . . . . . . . .
928
A Comparative Study on Machine Learning Techniques for Prediction of Success of Dental Implants Adriano Lorena In´ acio de Oliveira, Carolina Baldisserotto, Julio Baldisserotto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
939
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia Comparing an Evolutionary-Neural System with a Neural Network System Orion Fausto Reyes Galaviz, Carlos Alberto Reyes Garc´ıa . . . . . . . . . .
949
XXIV
Table of Contents
Robotics Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control of a Virtual Robot J´erˆ ome Leboeuf Pasquier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
959
Maximizing Future Options: An On-Line Real-Time Planning Method Ramon F. Brena, Emmanuel Martinez . . . . . . . . . . . . . . . . . . . . . . . . . .
970
On the Use of Randomized Low-Discrepancy Sequences in Sampling-Based Motion Planning Abraham S´ anchez, Maria A. Osorio . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
980
A Framework for Reactive Motion and Sensing Planning: A Critical Events-Based Approach Rafael Murrieta-Cid, Alejandro Sarmiento, Teja Muppirala, Seth Hutchinson, Raul Monroy, Moises Alencastre-Miranda, Lourdes Mu˜ noz-G´ omez, Ricardo Swain . . . . . . . . . . . . . . . . . . . . . . . . . .
990
Visual Planning for Autonomous Mobile Robot Navigation Antonio Marin-Hernandez, Michel Devy, Victor Ayala-Ramirez . . . . . 1001 Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot Pengfei Liu, Jiuqiang Han . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012 Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection Jorge Axel Dom´ınguez-L´ opez, Gilberto Marrufo . . . . . . . . . . . . . . . . . . . 1022 Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper Jorge Axel Dom´ınguez-L´ opez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032 A Semantically-Based Software Component Selection Mechanism for Intelligent Service Robots Hwayoun Lee, Ho-Jin Choi, In-Young Ko . . . . . . . . . . . . . . . . . . . . . . . . 1042 An Approach for Intelligent Fixtureless Assembly: Issues and Experiments Jorge Corona-Castuera, Reyes Rios-Cabrera, Ismael Lopez-Juarez, Mario Pe˜ na-Cabrera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052 On the Design of a Multimodal Cognitive Architecture for Perceptual Learning in Industrial Robots Ismael Lopez-Juarez, Keny Ordaz-Hern´ andez, Mario Pe˜ na-Cabrera, Jorge Corona-Castuera, Reyes Rios-Cabrera . . . . . . . . . . . . . . . . . . . . . . 1062
Table of Contents
XXV
CORBA Distributed Robotic System: A Case Study Using a Motoman 6-DOF Arm Manipulator Federico Guedea-Elizalde, Josafat M. Mata-Hern´ andez, Rub´en Morales-Men´endez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073
Modeling and Intelligent Control An Integration of FDI and DX Techniques for Determining the Minimal Diagnosis in an Automatic Way Rafael Ceballos, Sergio Pozo, Carmelo Del Valle, Rafael M. Gasca . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1082 Evolutionary Dynamic Optimization of a Continuously Variable Transmission for Mechanical Efficiency Maximization Jaime Alvarez-Gallegos, Carlos Alberto Cruz Villar, Edgar Alfredo Portilla Flores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093 Performance Improvement of Ad-Hoc Networks by Using a Behavior-Based Architecture Horacio Mart´ınez-Alfaro, Griselda P. Cervantes-Casillas . . . . . . . . . . . 1103 Analysis of the Performance of Different Fuzzy System Controllers Patrick B. Moratori, Adriano J.O. Cruz, Laci Mary B. Manh˜ aes, Em´ılia B. Ferreira, M´ arcia V. Pedro, Cabral Lima, Leila C.V. Andrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1113 Discrete-Time Quasi-Sliding Mode Feedback-Error-Learning Neurocontrol of a Class of Uncertain Systems Andon Venelinov Topalov, Okyay Kaynak . . . . . . . . . . . . . . . . . . . . . . . . 1124 Stable Task Space Neuro Controller for Robot Manipulators Without Velocity Measurements Gerardo Loreto, Rub´en Garrido . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134 Input-Output Data Modelling Using Fully Tuned RBF Networks for a Four Degree-of-Freedom Tilt Rotor Aircraft Platform Changjie Yu, Jihong Zhu, Jianguo Che, Zengqi Sun . . . . . . . . . . . . . . . 1145 A Frugal Fuzzy Logic Based Approach for Autonomous Flight Control of Unmanned Aerial Vehicles Sefer Kurnaz, Emre Eroglu, Okyay Kaynak, Umit Malkoc . . . . . . . . . . 1155 Sensor-Fusion System for Monitoring a CNC-Milling Center Rub´en Morales-Men´endez, Sheyla Aguilar M, Ciro A. Rodr´ıguez, Federico Guedea Elizalde, Luis E. Garza Casta˜ non . . . . . . . . . . . . . . . . 1164
XXVI
Table of Contents
Intelligent Tutoring Systems A Probabilistic Model of Affective Behavior for Intelligent Tutoring Systems Yasm´ın Hern´ andez, Julieta Noguez, Enrique Sucar, Gustavo Arroyo-Figueroa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175 A Semi-open Learning Environment for Virtual Laboratories Julieta Noguez, L. Enrique Sucar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185 Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195
Modelling Human Intelligence: A Learning Mechanism Enrique Carlos Segura1 and Robin Whitty2 1
Departamento de Computacion, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires, Ciudad Universitaria, Pabellon I, (1428) Buenos Aires, Argentina 2 School of Business, Computing and Information Management, London South Bank University, London SE1A 0AA, UK
Abstract. We propose a novel, high-level model of human learning and cognition, based on association forming. The model configures any input data stream featuring a high incidence of repetition into an association network whose node clusters represent data ‘concepts’. It relies on the hypothesis that, irrespective of the high parallelism of the neural structures involved in cognitive processes taking place in the brain cortex, the channel through which the information is conveyed from the real world environment to its final location (in whatever form of neural structure) can transmit only one data item per time unit. Several experiments are performed on the ability of the resulting system to reconstruct a given underlying ‘world graph’ of concepts and to form and eventually maintain a stable, long term core of memory that we call ‘semantic’ memory. The existence of discontinuous, first order phase transitions in the dynamics of the system is supported with experiments. Results on clustering and association are shown as well. Keywords: Association network, memory, learning, graph, stability.
1
Introduction
The problem of building a model of human intelligence requires the distinction between two aspects: 1) storing information (learning) and 2) thinking about this information (cognition). However, it is not plausible a separation between these two functions in the model itself, neither physically (implementation) nor temporally (a learning phase followed by a cognition phase). Associative or distributed memory models [5],[6] remove this separation but at a low level of individual ‘concepts’. We propose a model at a higher level: a collection of networks continuously stores incoming data from the outside world. Suppose we provide a tourist with a list of the London bus routes, but without information on the topology of the town (e.g. a map). He or she can only pick different buses and concatenate pieces of routes so as to make up a continuous tour. Although the process of constructing a mental representation of A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1–10, 2005. c Springer-Verlag Berlin Heidelberg 2005
2
E.C. Segura and R. Whitty
that topology is a complex, high-dimensional one, we can assume that he will ultimately be able to do it from the temporal sequence of inputs (bus stops, say). In this paper we present a system, the Association Network (AN) that is able to model this and other situations involving some learning process from a certain real environment, and confirms the ability to infer complex topological relations from a single input stream, as would be expected from an intelligent agent. The example above illustrates the philosophical basis for our model: learning = the reconstruction of some network on the basis of random walks on that network. The network is a hypothesised worldview or ‘world graph’; its reconstruction, incorporating approximations, abstractions and lacunae, may be thought of as long-term memory. How do we learn our way around a new neighbourhood? By making random walks in it. How do we learn natural language? By random walks on some hypothesised language network. How do we learn a game of chess or football? By random walks in the network of possible sequences of play. Of course, these walks are not Markovian (although our London bus routes were traversed in this way) but rather are generated by some stochastic process. The human brain is thereby presented with a sequence of random inputs and must configure these to reconstruct a worldview. This is done by making associations via repetitions in the random walk: it is striking how much structure can be imparted to AN’s, merely by local identifications based on such repetitions. We structure the paper as follows: in section 2 we present the basic mechanism for storing an incoming data stream into a network. In section 3 we present experiments upon randomly generated worldview graphs and upon a worldview graph of London bus routes. These experiments are used to confirm that interesting and stable structure may be stored in the network model. Finally, in section 4 we discuss our model in the context of AI and interactive computing.
2
Association Networks: The Learning Algorithm
Our network will be built according to four principles: 1. input data is stored in the nodes of the network; 2. at any point in time, in a non-empty network, there is a current node with which any new input will be associated; 3. there is a notion of distance in the net; and 4. there is a threshold distance, such that two nodes with the same data and being at most this distance apart, are to be identified with each other. We may take the distance between two nodes to be the smallest number of edges in some directed path from one to the other. In our example we will set the threshold distance to be two edges. Assume the network is initially empty and suppose that the following input stream is presented to the network: abcadceaceceaf cacbacda
Modelling Human Intelligence: A Learning Mechanism
3
The network starts off as a single node, which we draw with a square to indicate that it is the current node. When a new input arrives, it becomes the data for a new node which is then linked back by a new directed edge to the current node. The new node then becomes the current node. In this way, the first four inputs would generate the structure shown in fig. 1(a), the second ‘a’ being added when ‘c’ is the current node. However, with a threshold distance of 2, this second ‘a’ will be discovered to be a repetition, by searching up to the threshold distance from ‘c’. So rather than adding ‘a’ as a new node, instead a link is created forward from the first ‘a’, as shown in fig. 1(b), as though the second ‘a’ node in fig. 1(a) had been picked up and placed on the first. Now with the first ‘a’ as current node, we add ‘d’ as shown in fig. 1(c) and then input ‘c’ causes another identification to take place, resulting in fig. 1(d).
Fig. 1. Network built from input sequence a b c a d c , with threshold distance 2
By continuing the example we encounter some more idiosyncracies of net building. In fig. 2(a), ‘e’ and ‘a’ have been added. Once again there are two copies of ‘a’, but this time they are too far apart for identification to have taken place. After a further input of ‘c’, the second ‘a’ gets a link forward from ‘c’ (fig. 2(b)) and the effect is to bring the two copies of ‘a’ within distance 2 of each other. However, no identification takes place because searching and identification must involve the current node and is only triggered by the addition of data at the current node. In fig. 2(c), the next input, ‘e’, has been recognised as a repetition and the current node has accordingly moved to the ‘e’ node; but no extra edge is added since the identification merely duplicates an existing edge. However, when ‘c’ is now added, the identification, taking place in the opposite direction to this existing edge, does generate a new link (fig. 2(d)). Now consider sending e a to the network that we have built so far. The input ‘e’ will move the current node to node ‘e’ without adding a new edge. A search from this node for ‘a’ will locate only the bottommost copy since the top ‘a’ is beyond the threshold distance. Again, the current node moves but no edge is added. In fig. 3(a) the result is shown when a further two inputs, ‘f ’ and ‘c’, have arrived. The next two inputs are ‘a’ and ‘c’. On ‘a’, a link is formed from the bottommost existing ‘a’ (fig. 3(b)). There are now two copies of ‘c’ within the
4
E.C. Segura and R. Whitty
Fig. 2. Effect of presenting inputs e a c e c to the network in fig. 1(d)
Fig. 3. Effect of presenting inputs e a c e c to the network in fig. 2(d)
threshold distance of the current node. We will suppose that searching is carried out in a breadth-first manner, fanning out from the current node and terminating as soon as a repetition is found or the threshold distance is reached. According to this, input ‘c’ will produce the network in fig. 3(c): only an identification with the bottommost ‘c’ has occurred, since it is found earlier than the topmost ‘c’. Finally, inputs b a c d a produce the network in fig. 3(d). We note that, given an input stream which is sufficiently repetitive, the simple principles with which we started can lead to quite intricate structures, with multiple copies of data within the threshold distance, nodes of arbitrary degree, cycles of any length, and so on.
Modelling Human Intelligence: A Learning Mechanism
5
We would contend that, given an evolutionary pressure to store inputs selectively, the forming of associative links to eliminate repetition is a plausible response1 . There are two parameters: network capacity C (maximum number of nodes allowed in the network) and node capacity c (maximum number of edges which may be incident with a node). These constraints are crucial, since learning, to us, means reconstucting a worldview graph incompletely. What is left out of the reconstruction is as important as what goes in: including everything encountered during random walk would place an intolerable burden on the processes of cognition2 . We must decide what to do when C or c are exceeded — for the former we ignore inputs requiring new nodes to be added; for the latter we delete the oldest link. These policies could also be selected by evolution.
3
Experiments: Learning in Association Networks
3.1
First Experiment: The “World Graph”
With our main assumption stated and the basic model described, we can wonder what its learning ability might be. Learning is seen as reading a training set presented as a stream of elements in temporal sequence, drawn from the original graph by generating a random walk along it. The AN is expected to replicate the graph as faithfully as possible, and its learning capacity will be scored from the resemblance between the constructed graph and the original one. We are not bound to concede the actual existence of such a structure according to which a particular aspect of the “natural world” would be organised, except from a rather speculative viewpoint. Our definition assumes that every learning process may be seen as that of inferring a highly dimensional tissue of concepts from a onedimensional, temporal sample random walk of arbitrary, though finite length. The first experiment was to generate a random graph with 500 nodes and a maximum, Δ, of 40 edges per node, up to a total of 10000 edges (half the number of nodes times the number of edges per node). Random walks were produced with a total length of 30,000 steps (nodes) and the parameters of the AN were C, c (see section 2) and the semantic threshold, defined as the minimum number of consecutive time units that a node has to be accessible (i.e. connected to the graph) in order to be deemed as a semantic (i.e. stable) item of memory. Fig. 4 shows the performance of the AN as a function of time, for c at 5, 10, 20 and 30, with C=500 (same size as in the original graph) and semantic threshold at 3000. We can describe the dynamics as a cyclic, quite regular, alternation between periods of rapid growth of the accessible memory and simultaneous and slower growth of the semantic one, and sudden collapses leading to dramatic loss of memory. Two phenomena are easily observable: first, the evolution of semantic memory replicates that of accessible memory, but with a smaller amplitude; this 1 2
A similar algorithm has been independently proposed for data compression by Mojdeh [8]. We are reminded of the story “Funes, the Memorious” by Borges, in which Funes, who remembers everything, is completely unable to operate intelligently.
6
E.C. Segura and R. Whitty
Fig. 4. Reconstructed graph from random walk on near-regular graph. Upper (light): accessible memory, lower (dark): semantic memory. Number of Nodes in graph: 500. Node Capacities: (a) 5, (b) 10, (c) 20, (d) 30.
is particularly apparent for low values of c. Second, the frequency of collapse decreases with increasing c, as one would expect, until some critical value beyond which the system acquires a core of stable memory: no matter whether any collapses occurred in the past, the system can be deemed to have reached an equilibrium point and the probability of a new collapse becomes negligible. 3.2
Second Experiment: A Case of “Real Life”
Our second experiment aimed at testing the ability of the AN to infer complex topological relations from a single input stream, and the practical problem chosen was that of the tourist having to construct a mental representation of the topology of a town (see the Introduction) from a set of bus routes presented as a temporal sequence of relevant bus stops drawn from those routes. An input file was produced by concatenating all the public bus routes (red buses) serving London and Greater London. After appropriate filtering and standardising, the file was in condition to be processed so as to generate the “world graph”, whose nodes are the stops and that has an edge connecting a pair of nodes if both are consecutively included in at least one route. This graph contained 430 nodes with degrees ranging from 2 to 10. Again, a random walk was generated from this graph, with a total length of 30,000 steps, as in the previous experiment; the parameters were also the same. Fig. 5 shows the performance of the memory as a function of time, for c at 6, 7, 8, 9 and 10, with C=430 and semantic threshold at 3000. We can roughly observe the same general behaviour as in the previous case (randomly generated regular graph). However, whilst in the previous case a c of at most 50% of the maximum degree of the original graph (c/Δ = 20/40) was enough for the system to eventually overcome the cyclic phase of alternating “memory growth - collapse”, in this “real case” only by raising the node capacity to 80% of
Modelling Human Intelligence: A Learning Mechanism
7
Fig. 5. Reconstructed graph from random walk on Bus Routes. Upper (light): accessible memory, lower (dark): semantic memory. Number of nodes in graph: 430. Node capacities: (a) 6, (b) 7, (c) 8, (d) 9, (e) 10.
the maximum degree (8/10) does the system succeed in reaching a stable regime. We explain this difference: in the random graph the variance of node degrees was small, the graphs being close to regular. Conversely, the variance for the “world graph” of London is so large that, given a certain ratio c/Δ, the probability of becoming disconnected and collapsing in a few steps is, on average, much higher. We can conclude that no fixed dependence can be stated between the critical value for c (to ensure assymptotic stability) and the size and maximum degree of the original graph, but also the variance of degrees has to be considered. 3.3
Phase Transition Diagrams
On the basis of the previous results (and similar ones), we can distinguish qualitative phase states for the dynamics of the learning system, i.e. different landscapes for the temporal evolution of the process of memory formation. For c/Δ below some r (that basically depends on the structure of the original world graph), a state of rather regular alternation between memory growth and memory collapse takes place. For c/Δ > r, an equilibrium is suddenly reached and the system rapidly evolves to complete reconstruction of the node structure, within the limitations of connectivity imposed by the ratio c/Δ at which the AN is set. We can properly speak of phase transition, moreover a first order phase transition, since no smooth change takes place between the cyclic, unstable phase and the stable one in terms of frequency of collapses, but rather when a certain critical period is reached, the system enters the equilibrium phase. For the bus routes case, for example, this critical value is typically around 7000 steps. Fig. 6 shows the diagrams. In the regular graph, the border line is more definite since we had more values of c/Δ. As for the London graph, the line is straight: the dynamics changes abruptly from transition point at t ∼ 13000 for c/Δ = 0.8 to no transition (process stable from the beginning) for c/Δ = 0.9.
8
E.C. Segura and R. Whitty
Fig. 6. Transition diagrams for the dynamics of memory formation: (a) Randomly generated regular graph (500 nodes) (b)“World Graph” for Central London (430 nodes)
Fig. 7. Organisation of main places of London, according to neighbourhood relations, in five clusters, represented by: circles (top left), triangles (middle), vertical diamonds (top right), horizontal diamonds (bottom left), squares (bottom right)
3.4
Clustering and Classification
The AN can be used for clustering and classification. By virtue of the topological way in which it organises the information, the AN can extract relationships between concepts that are implicit in the temporal order of the input stream. Two types of experiments were carried out: clustering and association. The first consisted of presenting an input sequence to the system and causing it to construct the corresponding AN. Then, standard clustering was applied, using as distance between two nodes the length of the shortest path between them. Fig. 7 shows the organisation of the main places of London in clusters, according to their neighbourhood relations, as derived from the bus routes network. The second experiment, association or stimulus-response, was undertaken on the same network and consisted of entering a new input and searching for its immediate neighbours in the graph. A new parameter, called semantic relevance (SR), is used for rating the significance of an item of information: it is set initially to zero for every new item, and is decreased by 1 each time the same information appears in the input stream. If the SR has fallen below a fixed threshold, the replicated data is no longer added to the network. The
Modelling Human Intelligence: A Learning Mechanism
9
effect of SR can be understood by using the AN in the stimulus-response (association) mode. With a threshold of SR of -10, the answer to Westminster was the set {LambethPalace, CabinetWarRooms, DowningSt, Archway, HorseGuards, VauxhallBridge, Victoria, HydeParkCorner}, while for a threshold of -5, the response was {BuckinghamPal, HydeParkCorner, LambethPalace, CabinetWarRooms, DowningSt}. Finally, for a threshold of 0 (only the first occurrence of each word is considered for constructing the net), the response was just {BuckinhamPal, HydeParkCorner}. Hence the SR prevents node degrees from growing too large, much like c: if the threshold is set to a value giving little or no restriction, e.g. -10, roughly the same three groups of answers shown for the question Westminster can be obtained with c at 10, 5/6 and 2, respectively. Many fields are suitable for this model, e.g. in extracting relations between terms in a text. We took successive editions of the Times online to produce an input stream. After eliminating punctuation signs and changing capital to lower case, the input size was 7771 words. We used it to produce chains of associated concepts. For example, starting with the word “children” and ending in “judge”, the sequence { children - people - rights - laws - judge } was obtained.
4
Discussion
We have introduced a system, the Association Network, that is able to model situations of learning from real environments, and to infer complex relations from a single input stream, as expected from an intelligent (human) agent. Our hypothesis is that, irrespective of the high parallelism of the neural structures involved in cognitive processes at the brain cortex, the channels through which information is conveyed from the environment to its final location (in whatever form of neural structure) can transmit only one data item per time unit. Experiments showed the abilities of the AN: learning of complex topological structures; clustering and association; existence of a phase transition regime. This work is preliminary; behaviour in the limit could be analysed, given certain parameter settings. The WWW and other very-large-scale systems have given rise to new techniques in the field of random structures, ideal for this work [4][2]. Some comment is necessary on the somewhat metaphysical concept of “world graph”, i.e. the implicit hypothesis that any domain of the natural world is isomorphic to some “mental model” and this is, in its turn, representable as a graph or a network of concepts. Maybe this concept is justifiable case by case; e.g., in the process of learning a language, some semantic network might be deemed as implicitly present in a dictionary and could be constructed from it. We distinguish this model from that provided by associative or distributed memories, as being at a higher semantic level than these, or than reinforcement learning or evolutionary computation. Our approach is closer to schemata or frame models of memory, going back to Bartlett’s work [1] and our dependence on association forming owes more to James [3] than to the PDP group [6]. That said, we must respond to the standard GOFAI (Good Old-Fashioned Artificial Intelligence) criticism that our model relies on the pre-existence of data
10
E.C. Segura and R. Whitty
concepts (‘bus stop’, ‘football’, ‘chess piece’) which themselves represent the core challenge for AI. In some cases, it might be appropriate to declare that the nodes of a certain AN were individual associative memories; the job of the AN being to provide a higher level interconnecting structure for these memories. Ultimately, the co-evolution of many communicating networks, at many levels of abstraction, performing different tasks might implement something like Minsky’s Society of Mind [7], a (still) very persuasive view of how the human mind operates. As for the emergence of different levels in an intercommunicating structure of AN’s, we explored how semantic relevance (see subsection 3.4), rather than merely rejecting repeated items, might provide a filter, whereby such items are transferred as input to a higher level network (and from that network to one yet higher, etc). This might operate in processing language, where recurring words (e.g. articles or connectives) might be stored elsewhere both to avoid false associations between verbs and nouns and to capture their structural significance. Our model is interactive: learning and application (cognition) are simultaneous, unlike the classical machine learning approach in which these two processes are consecutive. From the computational perspective, we propose a general way of structuring repetition rich sequential data. More important, but more speculative, is the possibility that we have invented a credible model of learning, i.e. concept formation in humans or, at least, given a major step in that direction.
References [1] Bartlett, F.C.: Remembering: a Study in Experimental and Social Psychology. Cambridge University Press (1932) [2] Bollobas, B. and Riordan, O., Coupling scale-free and classical random graphs. Submitted to Internet Mathematics (2003) [3] James, W.: The Principles of Psychology, vol. 1. New York (1890), reprinted by Dover Publications (1950) [4] Kleinberg, J.M, Kumar, R., Raghavan, R., Rajagopalan, S. and Tomkins, A.S.: The web as a graph: measurements, models, and methods. In Proc. 5th Int. Conf. on Computing and Combinatorics, Tokyo, Japan, 1999, Springer Verlag (1999), 1-17 [5] McClelland, J. L. and Rumelhart, D. E.: Distributed memory and the representation of general and specific information. J. Exp. Psych.: General, 114(2) (1985) 159-188 [6] McClelland, J. L., Rumelhart, D. E. and the PDP Res. Group: Parallel Distributed Processing: Explorations in the Microstructure of Cognition (2 vols). MIT Press (1986) [7] Minsky, M.: The Society of Mind. Simon and Schuster, New York (1986) [8] Mojdeh, D.: Codes and Graphs. 2nd European Workshop on Algebraic Graph Theory, Univ. Edinburgh (July 2001), (preprint, Univ. Mazandaran, Iran)
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge Using Hybrid Systems Vianey Guadalupe Cruz Sánchez, Gerardo Reyes Salgado, Osslan Osiris Vergara Villegas, Joaquín Perez Ortega, and Azucena Montes Rendón Centro Nacional de Investigación y Desarrollo Tecnológico (cenidet), Computer Science Department, Av. Palmira S/n, Col. Palmira. C. P. 62490. Cuernavaca Morelos México {vianey, greyes, osslan, jperez, amr}@cenidet.edu.mx
Abstract. The development of Artificial Intelligence (AI) research has followed mainly two directions: the use of symbolic and connectionist (artificial neural networks) methods. These two approaches have been applied separately in the solution of problems that require tasks of knowledge acquisition and learning. We present the results of implementing a Neuro-Symbolic Hybrid System (NSHS) that allows unifying these two types of knowledge representation. For this, we have developed a compiler or translator of symbolic rules which takes as an input a group of rules of the type IF ... THEN..., converting them into a connectionist representation. Obtained the compiled artificial neural network this is used as an initial neural network in a learning process that will allow the “refinement” of the knowledge. To prove the refinement of the hybrid approach, we carried out a group of tests that show that it is possible to improve in a connectionist way the symbolic knowledge.
1 Introduction During the last years a series of works have been carried out which tend to diminish the distance between the symbolic paradigms and connectionist: the neuro–symbolic hybrid systems (NSHS). Wertmer [1] proposes a definition: “the NSHS are systems based mainly on artificial neural network that allows a symbolic interpretation or an interaction with symbolic components”. These systems make the transfer of the knowledge represented by a group of symbolic rules toward a module connectionist. This way, the obtained neural network allows a supervised learning starting from a group of examples. For their study, the symbolic knowledge (obtained from rules) has been treated as the “theory” that we have on a problem and the numeric knowledge (obtained from examples) as the “practice” around this problem. This way, the objective of implementing a neuro-symbolic hybrid system is to combine " theory " as well as the " practice " in the solution of a problem, because many of the times neither one source of knowledge nor the other are enough to solve it. From the works developed by Towell [2] and Osorio [3] we have implemented a symbolic compiler that allows transforming a set of symbolic rules into an ANN. This ANN would be “refined” later on thanks to a training process in a neural simulator A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 11 – 20, 2005. © Springer-Verlag Berlin Heidelberg 2005
12
V.G. Cruz Sánchez et al.
using a base of examples. To prove the NSHS we use the benchmark Monk's Problem [4], which has a base of examples as well as a base of rules.
2 Symbolic and Numeric Knowledge The symbolic knowledge is the set of theoretical knowledge that we have in a particular domain. For example, we can recognize an object among others by means of the set of characteristics of that object. This description can be considered a symbolic representation. A disadvantage of this kind of representation is that the theory in occasions cannot describe all the characteristics of the object. The above-mentioned is due to the fact that it cannot make an exhaustive description of the object in all its modalities or contexts. For example, the description of a Golden apple says that “the fruit is big and of golden colour, longer than wide, with white and yellowish meat, fixed, juicy, perfumed and very tasty. The peduncle is long or very long and the skin is thin” [5]. If a person uses only the theory to be able to recognize this fruit in a supermarket, it is possible that this person may have difficulty to recognize an apple that is blended or next to another kind of fruits (for example, pears) or another kind of apples. These fruits have a very similar symbolic description. Here, we realize that the symbolic knowledge can be insufficient for a recognition task. On the other hand, so that this knowledge can be used in a computer system, a formal representation should be used. For this, we have different knowledge representations: propositional logic, predicates logic, semantic networks, etc. The representation mostly used is the symbolic rules. Another source of knowledge, is that called "practical", integrated by a group of examples about an object or problem in different environments or contexts. For the case of the Golden apple, we need to describe it presenting an image base of the fruit in different environments, contexts, positions and with different degrees of external quality. We will use for it a numeric description (colour in RGB, high, wide, etc.). As it happened to the symbolic representation, it is impossible to create a base of images sufficiently big so as to cover all the situations previously mentioned. For the above-mentioned, a base of examples is also sometimes insufficient to describe all and each one of the situations of an object. We believe that a hybrid approach can be the solution to problems of objects recognition.
3 Characteristic of Neuro-symbolic Hybrid Systems A hybrid system is formed by the integration of several intelligent subsystems, where each one maintains its own representation language and a different mechanism of inferring solutions. The goal of the implementation of the hybrid systems is to improve the efficiency and the reasoning power as well as the expression power of the intelligent systems. The hybrid systems have potential to solve some problems that are very difficult to confront using only one reasoning method. Particularly, the neuro-symbolic hybrid systems can treat numeric and symbolic information with more effectiveness than
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge
13
systems that act separately. Some of the advantages of the hybrid systems are: they exploit the whole available knowledge of a problem; they mix different kinds of information (symbolic, numeric, inexact and imprecise); they improve the total execution and they eliminate the weaknesses of the methods applied individually creating robust reasoning systems.
4 Compilation of Symbolic Knowledge into an ANN The neuro-symbolic hybrid system that we proposed has a compiler in charge of mapping the symbolic rules into a neural network. This compiler generates the topology and the weights of an ANN (we will call this ANN "compiled"). The topology of the neural network represents the set of rules that describes the problem and the weights represent the dependences that exist between the antecedents and the consequents of these rules. The compilation is carried out by means of a process that maps the components of the rules towards the architecture of an ANN (see Table 1). Table 1. Correspondence between the symbolic knowledge and the ANN Symbolic knowledge
ANN
Final conclusions
Output units
Input data
Input units
Intermediate conclusions
Hide units
Dependences
Weights and connections
4.1 Compilation Algorithm For the compilation module we implemented the algorithm proposed by Towell [2] which consists of the following steps: 1. 2. 3. 4. 5.
Rewrite the rules. Map the rules into an ANN. Determine the level between the hidden and output units and the input units. Add links between the units. Map the attributes not used in the rules.
1. Rewrite the rules. The first step of the algorithm consists of translating the set of rules to a format that clarifies their hierarchical structure and that makes it possible to translate the rules directly to an artificial neural network. In this step, we verify if a consequent is the same for one or more antecedents. If it exists more than an antecedent to a consequent, then each consequent with more than one antecedent it will be rewritten. For example, in Figure 1 the rewriting of two rules, with the same consequent is observed.
14
V.G. Cruz Sánchez et al.
Fig. 1. Rewrite two rules with the same consequent
Where : :- it means “IF . . . THEN”; , it means the conjunction of antecedents. In Figure 1, the rule B: - C, D has as antecedent C and D and as consequent B. It is interpreted as: If C and D are true, Then B is true. The rule B: - E, F, G is read in the following way: If E and F and D are true, Then B is true. Because these two rules have the same consequent, these should be rewrite as to be able to be translated to the ANN. The rules at the end of this step can be observed in the Figure 1. 2. Mapping the rules to an ANN. The following step of the algorithm consists of mapping a transformed group of rules to an artificial neural network. If we map the rules of the Figure 1, these would be like it is shown in the Figure 2a. In the Figure 2.b the weight and the assigned bias are shown. The assigned weight will be –w or w if the antecedent is denied or not, respectively. Towell proposes a value of the weight of w = 4, [2]. On the other hand, it will be assigned to B' and B'' a bias of (-2P-1/2)*w, since they are conjunctive rules, while we will assign a bias of –w/2 to B because it is a disjunction.
Fig. 2. a) Mapping of rules to an ANN b) Weights and bias assigned
3. Determine the level between the hidden and output units and the input units. The level can be defined by means of some of the following ways: Minimum or maximum length that exists among a hidden or output unit to an input unit (see Figure 3). 4. Add links among the units. In this step the links are added between the units that represent the non existent attributes in the rules and the output units. 5. Mapping the attributes not used in the rules. In this stage an input is added to the neural network by each one of the attributes of the antecedents not present in the initial rules. These inputs will be necessary for the later learning stage.
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge
15
Fig. 3. a) Determination of the level using the minimum distance toward an input unit. b) Determination of the level using the maximum distance toward an input unit.
5 Implementation of the Symbolic Compiler In our research we implement a symbolic compiler (we call this SymbComp). This compiler uses the method proposed by Towell (see section 4.1). For the implementation of SymbComp we use the software AntLr Terence [6] that allows carrying out the lexical, syntactic and semantic analysis of a file type text. This file will be the input to SymbComp. The system is made of four sections (see program bellow): • Head. It contains the variables and constant definition, as well as the name of the file and comments. • Attributes. It contains the definition of each one of the attributes that appear in the antecedents and consequent of the rules. The attributes are made of Labels; Type; Value. CompSymb implements four types of attributes: a) Nominal: it has discrete values such as small, medium, big. b) Continuous: it has values in a continuous space. c) Range: it has continuous values with a maximum and minimum value. d) Binary: it has two possible values, true / false. • Rules. It contains the symbol • ic rules that will be compiled and which are written in language Prolog. • Attributes added by the user. It contains attributes that are not used in the antecedents of the previous rules but that are present in the base of examples. SymbComp carries out the lexical, syntactic and semantic analysis and the compilation (together with Builder C++ 5.0 Charte [7]) of the previously defined file. The result of this process is two files: one of topology and another one of weight of an artificial neural network that we will call "compiled network". //section one //Simbolic file example.symb #BEGIN //section two
16
V.G. Cruz Sánchez et al.
#ATTRIBUTES stalk: BINARY:T/F; size: CONTINUOS:small[3,5], medium[6,8], big[9,11]; shape: NOMINAL: heart, circle; #END_ ATTRIBUTES //section three #RULES Red_Delicius:-shape(heart), IN_RANGE(Colour_Red,108,184), IN_RANGE(Colour_Green,100,150), IN_RANGE(Colour_Blue,50,65); Quality:- stalk(T),size(big),Red_Delicius. #END_RULES //section four #ATTRIB_ADDED_USER Colour_Red: RANGE: [0,255]; Colour_Green: RANGE: [0,255]; Colour_Blue: RANGE: [0,255]; #END
6 Integration of Symbolic and Numeric Knowledge The integration of numeric and symbolic knowledge will be carried out once we have compiled the rules. For it, we will use the compiled neural network and the base of examples of the problem. For the integration the Neusim system Osorio[3] was used, which uses the CasCor Fahlman [8] paradigm. Neusim was selected because it allows loading a compiled neural network and from this to begin the learning. Also, with Neusim it is possible to carry out the learning directly from the base of examples or to use the neural network as classifier. On the other hand, the advantage of using CasCor as a learning paradigm is that we can see the number of hidden units added during the learning and thus, follow the process of incremental learning. We have also planned for a near future to carry out a detailed analysis of the added units with the purpose of explaining knowledge. By means of this integration stage we seek that the numeric and symbolic knowledge are integrated in a single system and at the end we have a much more complete knowledge set.
7 Test Using the NSHS for the Integration and the Refinement of Knowledge To prove the integration and refinement capacity of knowledge of the NSHS we made use of examples and rules base known as Monk's Problem Thrun [4]. This benchmark is madeof a numeric base of examples and of a set of symbolic rules. Monk's problem is presented with three variants: Monk's 1, Monk's 2 and Monk's 3. For our experimentation we use the first case. The characteristics of Monk's 1 are as follows:
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge
17
• Numeric base of examples. Input attributes: 6 (a1, a2, ... a6). Output: 1 (class). Total of examples of the base: 432. Description of attributes: a1: 1, 2, 3 a2: 1, 2, 3 a3: 1, 2 a4: 1, 2, 3 a5: 1, 2, 3, 4 a6: 1, 2. class: 0, 1 • Symbolic Rules. IF (a1 = a2) OR (a5 = 1), THEN class = 1. This rule can be translated into two disjunctive rules: R1 : IF (a1 = a2),THEN class = 1; R2 : IF (a5 = 1), THEN class = 1; As it can be observed in these two rules, the used attributes are a1, a2 and a5, while the attributes a3, a4 and a6 are not considered in these rules. This observation is important because in the base of examples the six attributes are present and they will be used during the learning step. To compile these rules it was necessary to create a text file that will serve as input to SymbComp. Once compiled the rules carry out three types of tests using NeuSim: Case a) Connectionist approach: Learning and generalization from the base of examples. Case b) Symbolic approach: Generalization from the compiled ANN. Case c) Hybrid approach: Learning and generalization using the compiled ANN and the base of examples. For the three cases we vary the number of used rules (two rules, one rule) and the percentage of the examples used during the learning (100%, 75%, 50%, 25%). The results are shown in the Table 2. In the Table the percentage of obtained learning and the time when it was reached, the generalization percentage on the total of the base of examples and the hidden units added are indicated. From the results obtained we can observe that in the some cases where the numeric and the symbolic knowledge are integrated, the percentage in the generalization is, in most of cases, higher than those tests where only the numeric knowledge is used. For example, for the connectionist approach (case a) using 50% of the base of examples we achieve a generalization of 59.95%, while if we use the hybrid approach (case c) with the rule 1 and 50% of the base of examples we obtain a generalization of 94.21%. Another interesting result is when we use the rule 2 and 50% of the base of examples, obtaining a generalization of 63.42% (also better than the connectionist approach). For the same hybrid approach, if we use the rule 1 and 25% of the base of
18
V.G. Cruz Sánchez et al.
examples we arrive at a generalization percentage of 77.03%, much better than 55.09% of the connectionist approach. For all these cases we reduce the number of learning periods and the number of hidden units added. Table 2. Results obtained for the study of Monk's problem Case (approach)
Compiled rules
Examples used %
Knowledge %
Generalization
Hidden units added
Learning epochs
a) Connectionist
-
100 75 50 25
100 100 100 55.09
99.07 87.03 59.95 55.09
2 7 5 2
484 1614 983 320
b) Symbolic
R1 ,R2 R1 R2
-
-
100 93.05 81.94
0 0 0
0 0 0
c) Hybrid
R1 ,R2 R1 ,R2 R1 ,R2 R1, R2 R1 R1 R1 R1 R2 R2 R2 R2
100 75 50 25 100 75 50 25 100 75 50 25
100 100 100 100 100 100 100 100 100 100 100 100
98.61 98.61 98.61 95.13 99.53 99.30 94.21 77.03 95.83 73.14 63.42 51.85
1 1 1 1 1 1 1 1 3 6 4 1
84 95 92 82 82 78 69 67 628 1226 872 58
On the other hand, if we compare the symbolic approach (case b) where we use only the rule 2 against the hybrid approach using the same rule and 100% of the base of examples, we realize that the generalization is better in the second case (81.94% against 95.83%, respectively). The same thing would happen if we use the rule 1 instead of the rule 2. A result at the side of the objectives of this work is the discovery that rule 1 is “more representative” that rule 2. This can be observed on table 2: with the compilation of the rule 1 a generalization of 93.05% is reached against 81.94% for the rule 2.
8 Conclusions In this paper we present a method of knowledge refinement using a neuro-symbolic hybrid system. For this, a compiler that converts a set of symbolic rules into an artificial neural network was implemented. Using this last one, we could “complete” the knowledge represented in the rules by means of a process of numeric incremental learning. Thanks to the tests carried out on Monk's Problem we could demonstrate that when we use the numeric or symbolic knowledge separately it is unfavourable with regards to the use of a hybrid system.
Compilation of Symbolic Knowledge and Integration with Numeric Knowledge
19
The results obtained from tests as: the increase in the generalization percentage, the reduction of the number of hidden neurons added and the reduction of the number of learning epochs, demonstrate that the hybrid systems theory is applicable when a lack of knowledge exists and this can be covered with the integration of two types of knowledge. At the moment, we are working to apply this principle to problems of visual classification of objects in which descriptive rules and numeric examples (visual characteristic) are known. Our objective in this case is to create tools that help the supervision and control processes of the visual quality. We are also intending to enlarge SymbComp to be able to compile other kind of rules (for example fuzzy rules), as well as to study the problem of the knowledge explicitation from the refined neural networks. We consider that this theory (compilation mechanism) it is applicable to simple rules of the type IF…THEN... and it cannot be generalized to all type of rules. For the group of rules that was proven, the accepted attributes were of type: nominal, binary and in range. For the compilation of another rule types, for example rules that accept diffuse values, the application of this theory would imply modifications to the algorithm. Some works that actually are developed addressed this problem.
Acknowledgement Authors would like to thank: Centro Nacional de Investigación y Desarrollo Tecnológico (cenidet) the facilities offered for the execution of this research.
References 1. Wermter, Stefan and Sun, Ron. (Eds.): Hybrid neural systems. Springer Heidelberg. (2000). 2. Towell, G.: Symbolic Knowledge and Neural Networks: Insertion, Refinement and Extraction. Ph.D. Thesis. Univ. of Wisconsin - Madison. USA. (1991). 3. Osório, F. S.: INSS - Un Système Hybride Neuro-Symbolique pour l'Apprentissage Automatique Constructif. PhD Thesis, LEIBNIZ-IMAG, Grenoble – France (February 1998). 4. Thrun Sebastian.: The Monk’s Problems. School of Computer Science, Carnegie Mellon University. Pittsburgh, PA 15213, USA. (1992). 5. The apple. Copyright infoagro.com (2003). 6. Terence Parr.: An Introduction To ANTLR. Another tool for language recognition. (2003). 7. Charte, Francisco: Programation in C++Builder 5. Anaya Multimedia Editions. (2000) 8. Fahlman, S.E., Lebiere, C.: The Cascade-Correlation Learning Architecture. Carnegie Mellon University. Technical Report. CMU-CS-90-100. (1990). 9. Arevian G., Wermter S., Panchev C.: Symbolic state transducers and recurrent neural preference machines for text mining. International Journal on Approximate Reasoning, Vol. 32, No. 2/3, pp. 237-258. (2003). 10. McGarry K., MacIntyre J.: Knowledge transfer between neural networks, proceedings of the sixteenth european meeting on cybernetics and systems research. Vienna, Austria, pp. 555-560. (April 2002).
20
V.G. Cruz Sánchez et al.
11. Osorio, F. S., AMY, Bernard.: Aprendizado de máquinas: métodos para inserção de regras simbólicas em redes neurais artificiais aplicados ao controle em robótiva autônoma. Revista SCIENTIA, Vol. 12, Nro. 1, p.1-20. Editora da Unisinos, Out. (2001). 12. Rashad U., Arullendran P., Hawthorne M., Kendal S.: A hybrid medical information system for the diagnosis of dizziness. Proceedings 4th International Conference Neural Networks and Expert Systems in Medicine and Healthcare. Greece. (June 2001). 13. Wermter S., Panchev C.: Hybrid preference machines based on inspiration from neuroscience. Cognitive Systems Research. Vol. 3, No. 2, pp. 255-270. (2002).
The Topological Effect of Improving Knowledge Acquisition Bernhard Heinemann Fachbereich Informatik, FernUniversit¨ at in Hagen, 58084 Hagen, Germany Phone: + 49 2331 987 2714, Fax: + 49 2331 987 319 [email protected]
Abstract. In this paper, we extend Moss and Parikh’s bi-modal language for knowledge and effort by an additional modality describing improvement. Like the source language, the new one too has a natural interpretaion in spatial contexts. The result of this is that concepts like the comparison of topologies can be captured within the framework of modal logic now. The main technical issue of the paper is a completeness theorem for the tri-modal system arising from the new language. Keywords: Reasoning about knowledge, modal logic and topology, spatial reasoning, completeness.
1
Introduction
The idea of knowledge has undoubtedly proven useful for several areas of computer science and AI, eg, designing and analysing multi-agent systems. Knowledge is then ascribed externally to the agents (by the designer or analyst), and the multi-modal system S5m provides the basic language for and logic of knowledge, respectively, in case m agents are involved (where m ∈ N); cf the standard textbooks [1] or [2]. For a more dynamic setting enabling one to reason about the change of knowledge in the course of time, the latter notion has to be added to the basic system. This is done for the usual logic of knowledge in an explicit way, i.e., by means of temporal operators ranging over certain mappings from the domain of time into the set of all states of the world, so-called runs; cf [1], Ch. 4. The fact that a spatial component too inheres in the temporal knowledge structures arising from that, has hardly received attention in the relevant literature. Actually, knowledge can be viewed as closeness and, respectively, knowledge acquisition as approximation to points in suitable spaces of sets (consisting of a domain of states, X, and a system O of subsets of X, the knowledge states of the agents). This view constitutes, essentially, the ‘generic’ example showing how concepts from topology enter the formal framework of evolving knowledge. The topological content of knowledge was discovered and basically investigated in the paper [3] first. The details concerning this were drawn up in [4]. The fundamental outcome of these papers is a general bi-modal system called, A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 21–30, 2005. c Springer-Verlag Berlin Heidelberg 2005
22
B. Heinemann
interestingly enough, topologic. In the single-agent case, one of the operators of topologic corresponds with knowledge and the other with computational effort. Thus the latter models some knowledge acquisition procedure, by means of which time is (implicitly) encoded. Focussing on these characteristics of knowledge leads one to a new area of application. As the title of the paper [3] (and [4], respectively) already suggests, one could take topologic as the starting point for a system supporting spatial reasoning to such an extent that those properties being part of topology can be captured. However, pursuing this idea causes new expressiveness requirements very soon. In order to meet some of these requirements, the ground language has to be extended. This can be done in various ways, depending on the applications one has in mind. A recent example featuring the language of hybrid logic is contained in the paper [5].1 Unlike that paper, we follow strictly the purely modal approach given by topologic here. In fact, the subject of this paper is an additional modal operator representing improvement. Suppose that two knowledge acquisition procedures, P1 and P2 , are available to an agent A. How to compare P1 with P2 ? Or, more specifically, under what circumstances would P2 be regarded no worse than P1 , thus possibly preferred to P1 ? Intuitively, this should be the case if A using P1 could achieve at least the same knowledge by appealing to P2 . That is to say, every knowledge state of A with respect to P1 should also be a knowledge state of A with respect to P2 . Or, in mathematical terms, the set O1 of all P1 –knowledge states is a subset of the set O2 of all P2 –knowledge states. This consideration shows that our modelling of improvement goes beyond topologic to the extent that systems of sets of knowledge states have to be taken into account now, instead of mere sets of knowledge states. Thus the semantics of the new language will be built on set system spaces, replacing the set spaces fundamental to the semantics of topologic. And, from a spatial point of view, the modality describing improvement turns out to be a refinement operator on such set system spaces, actually. This means to the context of topology that we are now able to get to grips with a modal treatment of, eg, the comparison of topologies (cf [8], I, 2, 2). The following technical part of the paper is organized as follows. In the next section, we define precisely the language for knowledge, effort and improvement. We also state a couple of properties that can be expressed with it. Afterwards, in Section 3, the logic arising from the new language is investigated. We prove the soundness and completeness of a corresponding axiomatization with respect to the class of all intended structures. This is the main result of the present paper. It turns out that a certain Church-Rosser property for effort and improvement, which is not quite easily seen at first glance, is crucial to its proof. The paper is then finished with some concluding remarks. Concluding this introduction, we would like to mention the papers [9], [10] and [11] on special systems of topologic. It would be interesting to revisit these systems regarding improvement. 1
As to the basics of hybrid logic cf [6], Sec. 7.3, or [7].
The Topological Effect of Improving Knowledge Acquisition
2
23
Extending the Language
In this section, we add to the language of topologic a unary operator modelling improvement. First, the new language, L, will be defined precisely, and second, some of its features will be discussed. Let PROP = {A, . . .} be a denumerable set of symbols called proposition letters. We define the set WFF of well-formed formulas of L over PROP by the rule α ::= A | ¬α | α ∧ β | Kα | α | α. The operators K and represent knowledge and effort, respectively, as it is common for topologic. is called the improvement operator. The missing boolean connectives , ⊥, ∨, →, ↔ are treated as abbreviations, as needed. The duals of K, and are denoted L, 3 and ⊕, respectively. We now give meaning to formulas. For a start, we define the domains where L–formulas will be interpreted in. We let P(S) designate the powerset of a given set S. Definition 1 (Set system frames and models). 1. Let X = ∅ be a set and S ⊆ P (P(X)) a system of subsets of P(X). Then F := (X, S) is called a set system frame. 2. Let F = (X, S) be a set system frame. The set of situations of F is defined by SF := {(x, U, Q) | x ∈ U, U ∈ Q and Q ∈ S}.2 3. Let F be as above. An F–valuation is a mapping V : PROP −→ P(X). 4. A set system space or model (or, in short, an SSM) is a triple M := (X, S, V ), where F := (X, S) is a set system frame and V an F–valuation; M is then called based on F. By generalizing the semantics of topologic, cf [4], the relation of satisfaction between situations and formulas, is now defined with regard to SSMs. Definition 2 (Satisfaction and validity). Let M = (X, S, V ) be an SSM and x, U, Q a situation of F = (X, S) . Then x, U, Q |=M x, U, Q |=M x, U, Q |=M x, U, Q |=M x, U, Q |=M x, U, Q |=M
A ¬α α∧β Kα α α
: ⇐⇒ : ⇐⇒ : ⇐⇒ : ⇐⇒ : ⇐⇒ : ⇐⇒
x ∈ V (A) x, U, Q |=M α x, U, Q |=M α and x, U, Q |=M β y, U, Q |=M α for all y ∈ U ∀ U ∈ Q : (x ∈ U ⊆ U ⇒ x, U , Q |=M α) ∀ Q ∈ S : (Q ⊆ Q ⇒ x, U, Q |=M α) ,
where A ∈ PROP and α, β ∈ WFF. In case x, U, Q |=M α is true we say that α holds in M at the situation x, U, Q. A formula α is called valid in M (written ‘ M |= α’), iff it holds in M at every situation of F. 2
Situations are often written without brackets later on.
24
B. Heinemann
Some remarks on this definition seem to be opportune here. Remark 1. 1. The meaning of proposition letters is independent of subsets and systems of subsets of the domain by definition, thus ‘stable’ with respect to and . This fact will be reflected in two special axioms later on (Axioms 6 and 11 from Sec. 3). 2. Note that each modal operator concerns one component of a ‘semantic atom’ of our language, i.e., a situation x, U, Q : K quantifies across points (the elements of U ), quantifies ‘downward’ across sets (within Q), and quantifies across certain systems of sets (the ‘refinements’ of Q contained in S). 3. The above semantics appears to make a three-dimensional language out of L; cf [12]. But, appearances are deceptive here since the components of situations are not independent of each other. 4. According to Definition 2, every set system frame F = (X, S) gives rise to a usual tri-modal Kripke frame F = (W, R1 , R2 , R3 ) in the following way: – W := SF , – (x, U, Q) R1 (x , U , Q ) : ⇐⇒ U = U and Q = Q , – (x, U, Q) R2 (x , U , Q ) : ⇐⇒ x = x , U ⊇ U and Q = Q , and – (x, U, Q) R3 (x , U , Q ) : ⇐⇒ x = x , U = U and Q ⊆ Q . The accessibility relation R1 of this frame corresponds to the operator K, R2 to , and R3 to . Furthermore, a Kripke model M = (F , σ) corresponding to an SSM M = (F, V ) can be defined by (x, U, Q) ∈ σ(A) : ⇐⇒ x ∈ V (A), for all proposition letters A. Then we have that both (x, U, Q) R2 (x , U , Q ) ⇒ ((x, U, Q) ∈ σ(p) ⇐⇒ (x , U , Q ) ∈ σ(p)) and (x, U, Q) R3 (x , U , Q ) ⇒ ((x, U, Q) ∈ σ(p) ⇐⇒ (x , U , Q ) ∈ σ(p)) are satisfied for M, due to the first clause of Definition 2; cf item 1 of this remark. Moreover, we have that x, U, Q |=M α ⇐⇒ M, (x, U, Q) |= α holds for all α ∈ WFF and (x, U, Q) ∈ SF . We now turn to valid formulas. The general validity of the formula schema Kα → Kα is typical of topologic. This schema was called the Cross Axiom in the paper [4]. It can easily be seen that the Cross Axiom remains valid in every SSM, too. The same is true for all the axioms of topologic (see Axioms 1 – 10 below). Now, the question comes up naturally whether this list can be supplied in such a way that an axiomatization of the set of all L–validities results. The following candidates suggest themselves: α → α and Kα ↔ K α, where α ∈ WFF. For a start, we get that these schemata are in fact valid in every SSM.
The Topological Effect of Improving Knowledge Acquisition
25
Proposition 1. Let M be any SSM and α ∈ WFF a formula. Then, M |= α → α and M |= Kα ↔ K α. Thus, we have that the operators K and are fully interchangeable, whereas K and as well as and can be interchanged ‘only in one direction’. Actually, the interaction between and turns out to be a bit more intricate than displayed by the first schema from Proposition 1, as we shall see below.
3
The New Logic
Our starting point to this section is the system of axioms for topologic from [4]. For convenience of the reader, some comments on the meaning of these axioms are given. We then add the schemata which the new modality is involved in. The resulting list proves to be sound with respect to the class of all SSMs. Later on in this section, we show that our proposal of axioms is even sufficent for completeness. – The just mentioned axiomatization of topologic reads as follows: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
All instances of propositional tautologies K(α → β) → (Kα → Kβ) Kα → α Kα → KKα Lα → KLα (A → A) ∧ (3A → A) (α → β) → (α → β) α → α α → α Kα → Kα,
where A ∈ PROP and α, β ∈ WFF. In this way, it is expressed that for every Kripke model validating these axioms K
– the accessibility relation −→ belonging to the knowledge operator is an equivalence, – the accessibility relation −→ belonging to the effort operator is reflexive and transitive, – proposition letters are stable with respect to −→ (see Remark 1.1 above), and – the relations for knowledge and effort commute as described by Axiom 10. One can see from items 11 – 14, and 17, of the following second group of axioms that the improvement operator shares, in particular, all the stability, S4, and commutativity properties, respectively, with the effort operator . 11. (A → A) ∧ (⊕A → A) 12. (α → β) → (α → β)
26
13. 14. 15. 16. 17.
B. Heinemann
α → α α → α α → α ⊕α → ⊕α Kα ↔ K α,
where A ∈ PROP and α, β ∈ WFF. – Note that we encountered Axioms 15 and 17 already in Proposition 1. Axiom 16, corresponding to a certain confluence property of the relations −→ and −→ , was implicitly announced at the end of Section 2. The way all these axioms work will become apparent in the course of the proof of completeness below. A logical system called T+ , indicating extended topologic, is obtainable from the above list by adding the standard proof rules from modal logic, viz modus ponens and necessitation with respect to each modality. Definition 3 (The logic). Let T+ be the smallest set of formulas containing the axiom schemata 1 – 17 and closed under application of the following rules: (modus ponens)
α → β, α β
(Δ–necessitation)
α , Δα
where α, β ∈ WFF and Δ ∈ {K, , }. The following result is one of the main issues of this paper. Theorem 1 (Soundness and completeness). A formula α ∈ WFF is valid in all SSMs, iff it is T+ –derivable. The soundness part of Theorem 1 is easy to prove. Thus we need not go into that in more detail. For the remainder of this section, we outline the proof of completeness. Let α ∈ WFF be not T+ –derivable. We can get to an SSM falsifying α by an infinite ‘three-dimensional’ step-by-step construction. In each step, an approximation to the final model is defined. In order to ensure that this ‘limit structure’ behaves as desired, several requirements on the intermediate models have to be kept under control. Let us now turn to some details of the construction. Let C be the set of all maximal T+ –consistent sets of formulas, and K
−→ , −→ , and −→ , the distinguished accessibility relations on C induced by the modalities K, and , respectively. Suppose that Γ0 ∈ C is to be realized (i.e., Γ0 contains ¬α). We choose a denumerably infinite set of points, Y , fix an element x0 ∈ Y , and construct inductively a sequence of quintuples (Xn , Σn , σn , δn , sn ) such that, for every n ∈ N,
The Topological Effect of Improving Knowledge Acquisition
27
– Xn ⊆ Y is a finite set containing x0 ; – Σn is a finite set of finite trees, which is itself a finite tree with respect to the ‘is isomorphically embeddable’-relation, denoted ; – σn is a function selecting exactly one element, designated Pn , from Σn ; – δn is a finite set of mappings, δn = {dP | P ∈ Σn }, such that, for all P, Q ∈ Σn : • dP : P −→ P(Xn ), • dP (pP ) = Xn , where pP denotes the root of P , • p ≤ q ⇐⇒ dP (p) ⊇ dP (q),3 for all p, q ∈ P , and • P Q ⇐⇒ Im (dP ) ⊆ Im (dQ ) ; – sn : Xn × Pn × Σn −→ C is a partial function such that, whenever x, y ∈ Xn , p, q ∈ Pn and P, Q ∈ Σn , then • sn (x, p, P ) is defined, iff x ∈ dPn (p) and Pn P ; in this case it holds that K ∗ if y ∈ dPn (p), then sn (x, p, P ) −→ sn (y, p, P ),
∗ if p ≤ q, then sn (x, p, P ) −→ sn (x, q, P ), and
∗ if P Q, then sn (x, p, P ) −→ sn (x, p, Q); • sn (x0 , pP0 , P0 ) = Γ0 . We explain next to what extent the intermediate structures (Xn , Σn , σn , δn , sn ) approximate the desired model. Actually, it can be guaranteed that, for all n ∈ N, – Xn ⊆ Xn+1 ; – Σn+1 differs from Σn in at most one element P , which is • either an end extension of (Pn , ≤) (i.e., a super-structure of (Pn , ≤) such that no element of P \ Pn is strictly smaller than some element of Pn ) • or an isomorphic copy of Pn that is disjoint from Pl for all l ≤ n; in the first case we have that Σn+1 = (Σn \ {Pn }) ∪ {P }, and in the second case Σn+1 = Σn ∪ {P }; – dP (p) ∩ Xn = dPn (p), for every p ∈ Pn (where we have identified p and its copy in the second case of the previous item); – sn+1 |Xn ×Pn ×Σn = sn , and sn+1 (x, p, P ) = sn (x, p, Pn ) in the first case of the last but one item (x ∈ Xn and p ∈ Pn ). Furthermore, the construction complies with the following ‘existential obligations’: – if Lβ ∈ sn (x, p, P ), then there are n < k ∈ N and y ∈ dP (p) (where dP ∈ δk ) such that β ∈ sk (y, p, P ), – if 3β ∈ sn (x, p, P ), then there are n < k ∈ N and q ∈ Pk such that p ≤ q and β ∈ sk (x, q, P ), and – if ⊕β ∈ sn (x, p, P ), then there are n < k ∈ N and Q ∈ Σk such that P Q and β ∈ sk (x, p, Q). Let us assume for the moment that the construction has been carried out successfully, meeting all these requirements. Let (X, Σ, σ, δ, s) be the limit of the structures (Xn , Σn , σn , δn , sn ), i.e., 3
To facilitate readability, we suppress some indices, eg, the index ‘P ’ to ≤ .
28
B. Heinemann
– X=
Xn ;
– Σ consists of all elements of the form I, where I is a maximal chain of elements of the intermediate sets Σn (with respect to the substructure relation); – σ is a function selecting exactly one element from Σ;4 – δ is a set of mappings, δ = {dP | P ∈ Σ}, such that, for all P ∈ Σ, • dP : P −→P(X) and, for all p ∈ P , dPm (p), where n is the smallest number l such that dl (p) is • dP (p) = n∈N
m≥n
defined and P is an end extension of Pl ; – s is given by s(x, p, P ) := sn (x, p, Pn ), where n is the smallest number l such that sl (x, p, Pl ) is defined and P an end extension of Pl (x ∈ X and p ∈ P ). Let S := {Im (dP ) | dP ∈ δ} and F := (X, S). We define an F–valuation V by V (A) := {x ∈ X | A ∈ s(x, pP0 , P0 )}, for all A ∈ PROP. Then, M := (X, S, V ) is an SSM. Moreover, as the mappings dP and s, respectively, satisfy ‘global’ counterparts of the above ‘local’ conditions, the following Truth Lemma can be proved just as Lemma 2.5 of the paper [4], i.e., by induction on the structure of formulas. Lemma 1 (Truth Lemma). For every formula β ∈ WFF and situation x, dP (p), Im (dP ) , where p ∈ P, of the frame F, we have that x, dP (p), Im (dP ) |=M β iff β ∈ s(x, p, P ). Letting x0 and Γ0 be as above, P0 := {pP0 }, s0 (x0 , pP0 , P0 ) := Γ0 , β := ¬α, x := x0 , and P ∈ Σ any extension of P0 , then Theorem 1 follows immediately from that. It remains to define (Xn , Σn , σn , δn , sn ), for all n ∈ N. The case n = 0 has, essentially, just been given. If n ≥ 1, then some existential formula contained in some maximal T+ –consistent set sm (x, p, P ), where m < n, is to be realized in a way meeting all the above requirements. In order to ensure that all possible cases are eventually exhausted, processing has to be suitably scheduled with regard to the modalities involved. This can be done by means of appropriate enumerations. Apart from the difficulties in book-keeping arising from that, the concrete implementation of the separate steps is rather lengthy and not carried out here thus. However, we discuss some of the principles being fundamental to this part of the proof in the following. Actually, we confine ourselves to those arising from Axioms 15 – 17. Let C be the set of all maximal T+ –consistent sets of formulas, as above. 4
This component is not really needed, but quoted here in order to have the limit structered like the approximations.
The Topological Effect of Improving Knowledge Acquisition
29
Proposition 2. Let Γ1 , Γ2 , Γ3 ∈ C satisfy Γ1 −→ Γ2 −→ Γ3 . Then, there exists
Γ ∈ C such that Γ1 −→ Γ −→ Γ3 . Proposition 2 is a consequence of Axiom 15.5 The statement from Proposition 2 can easily be visualized as a certain dia gram property. In fact, the proposition says that drawing −→ –arrows horizon
tally and −→ –arrows vertically, a ‘rectangle’ with correspondingly annotated vertices can be completed out of its ‘right upper triangle’
Γ1 −→ Γ2 ↓ Γ3 by ‘going round to the left’. A similar diagram property is associated with Axiom 16, but the starting point is now some ‘left upper triangle’ (i.e., we have a certain Church-Rosser property). This is the content of the next proposition.
Proposition 3. Let Γ1 , Γ2 , Γ3 ∈ C satisfy Γ1 −→ Γ2 and Γ1 −→ Γ3 . Then, there
exists Γ ∈ C such that Γ2 −→ Γ and Γ3 −→ Γ . Turning to Axiom 17, we find the same situation as in the last but one case. However, the double-arrow has to be taken into account now. Consequently, the assertion of the next proposition splits up into two parts. K
Proposition 4. 1. Let Γ1 , Γ2 , Γ3 ∈ C satisfy Γ1 −→ Γ2 −→ Γ3 . Then, there
K
exists Γ ∈ C such that Γ1 −→ Γ −→ Γ3 .
K
2. Let Γ1 , Γ2 , Γ3 ∈ C satisfy Γ1 −→ Γ2 −→ Γ3 . Then, there exists Γ ∈ C such K
that Γ1 −→ Γ −→ Γ3 . Propositions 2 – 4 are, in fact, applied at decisive points of the inductive definition of (Xn , Σn , σn , δn , sn ). These guarantee that every time the new objects can be inserted coherently in the model constructed so far. All in all, the completeness part of Theorem 1 is finally yielded in this way.
4
Concluding Remarks
It remains to summarize the outcome of this paper, point to some open problems, and finish off the discussion on the comparison of topologies started in the introduction. Just to sum up, we added an operator modelling improvement to the language of topologic. This operator was interpreted in spaces of set systems, 5
The detailed proof of Proposition 2 is omitted here, and the same is the case with the subsequent propositions.
30
B. Heinemann
representing sets of knowledge states of an agent. We determined the logic of such structures by providing a sound and complete axiomatization of the set of all validities. Actually, the present paper marks only the very beginning of the study of extended topologic, T+ . Though our results are quite promising, a lot of basic work has still to be done. The next question to tackle is the decidability problem for T+ . To round off the paper, we have to say a few words more about the comparison of topologies. As we pointed out in Sec. 1, the modality , viewed topologically, acts as a refinement operator. Now, for a real comparison we must also have a ‘coarsening operator’ at our disposal. And we would have to study the interplay between refinement and coarsening. Maybe the picture here turns out to look similar to that of topologic where the basic nature of shrinking and extending the knowledge state, respectively, proved to be different; cf [13].
References 1. Fagin, R., Halpern, J.Y., Moses, Y., Vardi, M.Y.: Reasoning about Knowledge. MIT Press, Cambridge, MA (1995) 2. Meyer, J.J.C., van der Hoek, W.: Epistemic Logic for AI and Computer Science. Volume 41 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (1995) 3. Moss, L.S., Parikh, R.: Topological reasoning and the logic of knowledge. In Moses, Y., ed.: Theoretical Aspects of Reasoning about Knowledge (TARK 1992), San Francisco, CA, Morgan Kaufmann (1992) 95–105 4. Dabrowski, A., Moss, L.S., Parikh, R.: Topological reasoning and the logic of knowledge. Annals of Pure and Applied Logic 78 (1996) 73–110 5. Heinemann, B.: A spatio-temporal view of knowledge. In Russell, I., Markov, Z., eds.: Proceedings 18th International Florida Artificial Intelligence Research Society Conference (FLAIRS 2005). Recent Advances in Artificial Intelligence, Menlo Park, CA, AAAI Press (2005) 703–708 6. Blackburn, P., de Rijke, M., Venema, Y.: Modal Logic. Volume 53 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (2001) 7. Blackburn, P.: Representation, reasoning, and relational structures: a hybrid logic manifesto. Logic Journal of the IGPL 8 (2000) 339–365 8. Bourbaki, N.: General Topology, Part 1. Hermann, Paris (1966) 9. Georgatos, K.: Knowledge theoretic properties of topological spaces. In Masuch, M., P´ olos, L., eds.: Knowledge Representation and Uncertainty, Logic at Work. Volume 808 of Lecture Notes in Artificial Intelligence., Springer (1994) 147–159 10. Georgatos, K.: Knowledge on treelike spaces. Studia Logica 59 (1997) 271–301 11. Weiss, M.A., Parikh, R.: Completeness of certain bimodal logics for subset spaces. Studia Logica 71 (2002) 1–30 12. Gabbay, D.M., Kurucz, A., Wolter, F., Zakharyaschev, M.: Many-dimensional Modal Logics: Theory and Applications. Volume 148 of Studies in Logic and the Foundation of Mathematics. Elsevier (2003) 13. Heinemann, B.: Linear tense logics of increasing sets. Journal of Logic and Computation 12 (2002) 583–606
Belief Revision Revisited Ewa Madali´nska-Bugaj1 and Witold Łukaszewicz2 1
Institute of Informatics, Warsaw University, Warsaw, Poland Dept. of Computer Science, Link¨oping University, Sweden and College of Economics and Computer Science TWP, Olsztyn, Poland 2
Abstract. In this paper, we propose a new belief revision operator, together with a method of its calculation. Our formalization differs from most of the traditional approaches in two respects. Firstly, we formally distinguish between defeasible observations and indefeasible knowledge about the considered world. In particular, our operator is differently specified depending on whether an input formula is an observation or a piece of knowledge. Secondly, we assume that a new observation, but not a new piece of knowledge, describes exactly what a reasoning agent knows at the moment about the aspect of the world the observation concerns.
1 Introduction Belief revision [1] is the task of modifying a reasoner’s knowledge base when new information becomes available. More formally, given a knowledge base KB, representing the reasoner’s belief set, and a piece of new information α, the task is to specify the new reasoner’s knowledge base KB ∗ α. There are three important assumptions underlying belief revision. Firstly, it is supposed that the reasoner’s knowledge base is incomplete and possibly incorrect. Secondly, the reasoner’s environment is assumed to be static.1 Thirdly, whenever a new piece of information is inconsistent with the current knowledge base, new information is considered more reliable than the knowledge base.2 The classical specification of belief revision has been proposed in [1] in the form of eight rationality postulates, known in the AI literature as AGM postulates. Two of them are of special interest in this paper. (R1) If KB |= ¬α, then KB + α ⊆ KB ∗ α, where KB + α is the deductive closure of KB ∪ {α}. (R2) If KB1 ≡ KB2 , then KB1 ∗ α ≡ KB2 ∗ α. The next example shows that the postulate (R1) is sometimes very problematic from the intuitive point of view. Example 1. Watching TV yesterday, I learned that on the next Sunday there would be rain in Paris. So my knowledge base KB is {r}. Watching TV today, I have learned that on the next Sunday there will be rain or snow in Paris, i.e. α = r ∨ s. According 1
2
There is another important form of belief change, called belief update [2]. In contrast to belief revision, it deals with dynamic settings, where a piece of new information is the result of a performed action. A comprehensive literature on the subject of belief revision can be found in [3].
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 31–40, 2005. c Springer-Verlag Berlin Heidelberg 2005
32
E. Madali´nska-Bugaj and W. Łukaszewicz
to (R1), the resulting knowledge base, KB ∗ α, should contain r. However, intuition dictates that KB ∗ α = Cn(r ∨ s).3 Note that when we say that the resulting knowledge base in Example 1 should be Cn(r∨ s), we make an implicit assumption that a new observation is exactly what an agent knows at the moment about the aspect of the world the observation is concerned with. Thus, if a new observation is weaker than KB, KB should be weakened.4 Consider now the postulate (R2). At the first glance, it seems to be indisputable. However, as the following example illustrates, the situation is more subtle. Example 2. Let KB1 = {p, p ⇒ s} and α = ¬p, where p and s stand for “Tweety is a penguin” and ”Tweety is a bird”, respectively. Since the truth of s directly depends on the truth of p, intuition dictates that the resulting knowledge base is KB∗α = Cn(¬p).5 Consider now the knowledge base KB2 = {p, s} and α = ¬p, where p and s stand for “Mr Smith is rich” and “Mr Jones is rich”, respectively. In this case, KB ∗ α should be Cn(¬p ∧ s). On the other hand, KB1 and KB2 are logically equivalent. Although KB1 and KB2 from Example 2 are logically equivalent, they differ significantly as regards the type of information they contain. Whereas facts like ”Tweety is a bird” or “Mr Jones is rich” represent an agent’s observations about the considered world, the sentence “If Tweety is a penguin, Tweety is a bird” represents rather the agent’s knowledge about the world that can be used to draw conclusions from observations.6 Example 2 shows that we should distinguish between observations and a general knowledge about the world under consideration. And we should treat this knowledge as more reliable than an ordinary observation. In this paper, we propose a new formalization of belief revision. It differs from the traditional approaches in two respects. Firstly, it is always assumed that new information describes exactly what a reasoning agent knows at the moment about the aspect of the world the observation concerns. Secondly, we formally distinguish between observations and knowledge about the considered world. More specifically, a knowledge base is not a set of formulae, but a pair of sets of formulae, OB, A, where OB and A represent observations of an agent and its knowledge (i.e. domain axioms) about the world, respectively. Whereas observations have status of beliefs, i.e. they can be invalidated by a piece of new information, formulae representing the agent’s knowledge about the world are assumed to be always true. Domain axioms correspond closely to integrity constraints considered in the theory of data (knowledge) bases. However, there is a subtle difference between these notions. 3 4
5
6
Here Cn stands for the consequence operator of classical propositional logic. In [4], we are presented with a new form of belief revision, called conservative belief change, where a similar assumption is made. The relationship between this approach and our proposal presented in the rest of this paper will be discussed in section 6. One can also argue that the resulting knowledge base should be represented in an equivalent form, namely Cn(¬p ∧ (p ⇒ s)). This will make it possible to retrieve s, if the next piece of new information is p again. The term “observation” here means either an observation made directly by an agent or communicated to the agent by other sources.
Belief Revision Revisited
33
Integrity constrains are usually assumed to be fixed and external with respect to a data base. Domain axioms, on the other hand, are considered as a part of a knowledge base and a new domain axiom can be learned by a reasoning agent. As we shall see later, KB ∗ α should be differently specified depending on whether α is an observation or a new domain axiom. The paper is structured as follows. In section 2, we provide preliminary definitions. In section 3, we formally describe our belief revision operator under the assumption that an input formula is a new observation. We also illustrate our proposal by considering a number of examples. In section 4, we specify our belief revision operator under the assumption that an input formula is a new domain axiom. In section 5, we shortly discuss our proposal in the context of AGM postulates. Section 6 is devoted to related work. Finally, section 7 contains concluding remarks and future work.
2 Preliminaries and Terminology We deal with a propositional language with a finite set of propositional symbols, called atoms. We assume that each language under consideration contains two special atoms and ⊥, standing for truth and falsity, respectively. Formulae are built in the usual way using standard connectives ∧, ∨, ⇒, ¬ and ⇔. A formula of the form of p or ¬p, where p is an atom, is called a literal. Interpretations are identified with maximal consistent sets of literals. For any formula α, we write | α | to denote the set of all models of α. We use the symbol Cn to denote the consequence relation of classical propositional logic. Let α be a formula. By AT M (α) we denote a set of all non-redundant atoms occurring in α. An atom p occurring in α is said to be redundant iff α[p ← ] ≡ α[p ← ⊥] ≡ α7 . Let p be an atom and suppose that α is a formula. We write ∃p.α to denote the formula α[p ← ] ∨ α[p ← ⊥]. If P = {p1 , . . . , pn } is a set of atoms and α is a formula, then ∃P.α stands for ∃p1 · · · ∃pn .α. A formula of the form ∃P.α, where P = {p1 , . . . , pn }, is called an eliminant of {p1 , . . . , pn } in α. Intuitively, such an eliminant can be viewed as a formula representing the same knowledge as α about all atoms from AT M (α) − P and providing no information about the atoms in P . Formally, this property is stated by the following theorem [5]. Theorem 1.
Let α and β be formulae such that AT M (β) ⊆ (AT M (α) − P ), where P = {p1 , . . . , pn }.
Then α |= β iff (∃P.α) |= β. A clause is a formula of the form l1 ∨ . . . ∨ ln , n ≥ 1, where li , 1 ≤ i ≤ n, is a literal. We say that a clause c absorbs a clause c if c is a subclause8 of c. For instance, the clause a absorbs the clause a ∨ l. Let α be a formula in conjunctive normal form (CNF). 7
8
α[p ← ] (resp. α[p ← ⊥]) is the formula obtained from α by replacing all occurrences of p by (resp. ⊥). A clause c is a subclause of c iff c entails c, but not vice versa.
34
E. Madali´nska-Bugaj and W. Łukaszewicz
We write ABS(α) to denote the formula obtained from α by deleting all absorbed clauses. Clearly, α and ABS(α) are equivalent. Two clauses are said to have an opposition if one of them contains a literal l and the other the literal ¬l. Suppose that two clauses, c1 and c2 , have exactly one opposition. Then the resolvent of c1 and c2 , written res(c1 , c2 ), is the clause obtained from the disjunction c1 ∨ c2 by deleting the opposed literals as well as any repeated literals. For example, res(¬a ∨ l, a ∨ d) is l ∨ d. Definition 1.
Let α be a formula. We say that a clause c is a prime implicate of α iff
(i) α ⇒ c is a tautology; (ii) there is no clause c which is a subclause of c and α ⇒ c is a tautology. Algorithm 2. Let α be a formula. The prime implicates form of α, written P IF (α), is the formula obtained from α by the following construction. 1. Let β be the conjunctive normal form of α. 2. Repeat as long as possible: if β contains a pair c and c of clauses whose resolvent exists and no clause of β is a subclause of res(c, c ), then β := β ∧ res(c, c ). 3. Take ABS(β). This is P IF (α). The following result holds ([6]). Theorem 2.
Let α be a formula.
(i) P IF (α) is a conjunction of all prime implicates of α. (ii) P IF (α) and α are equivalent. (iii) All atoms occurring in P IF (α) are non-redundant. Let α and β be formulae. A tail of α and β, written T L(α, β), is the conjunction of those prime implicates of α ∧ β that are neither prime implicates of α nor prime implicates of β. Intuitively, T L(α, β) can be viewed as those additional conclusions which can be derived by combining α and β. The formula T L(α, β) can be constructed using the following algorithm. Algorithm 3. 1. γ := P IF (α) ∧ P IF (β); T L(α, β):= . 2. Repeat as long as possible: if γ contains a pair c and c of clauses whose resolvent exists and no clause of γ is a subclause of res(c, c ), then γ := γ ∧ res(c, c ); T L(α, β):=T L(α, β)∧res(c, c ). 3. T L(α, β):= ABS(T L(α, β)).
Belief Revision Revisited
35
3 Defining Belief Revision Operator Definition 4. A knowledge base is a pair KB = OB, A , where OB is a finite set of formulae, called observations, and A is a finite set of formulae, called domain axioms. In the sequel, we will never distinguish between finite sets of formulae and their conjunctions. In particular, both OB and A will be often considered as single formulae. Any knowledge base KB uniquely determines a belief set. This set, denoted by Cn(KB), is the set Cn(OB ∧ A). KB is said to be consistent iff Cn(KB) is consistent. Now we define our revision operator ∗. There are two cases to consider. 1. New information is an ordinary observation. 2. New information is a new piece of knowledge. In this section we consider the former of the above cases. The latter will be discussed in section 4. We start with some intuitions underlying our approach. Suppose that KB = OB, A is a consistent knowledge base and α is a new observation. Recall that we make an implicit assumption that a new observation is exactly what is known at the moment about the aspect of the world it concerns. In particular, if a new observation is weaker than KB, KB should be suitably weakened. A natural way to achieve this goal is to delete all information concerning atoms occurring in α. This can be technically done using eliminants 9 . Denote the weakened observation formula by OB . The formula OB ∧ α is a natural candidate for the observation formula in the revised knowledge base KB∗α. It is easily seen that OB ∧ α and OB ∧A are both consistent. The problem, however, is that OB ∧ α∧A may be not. If this is the case, OB should be further weakened. Observe that the source of inconsistency can be new conclusions which can be derived from A∧α. Note that these new conclusions are represented by T L(A, α). Therefore, we must delete information concerning atoms occurring in those conjuncts of T L(A, α) which are inconsistent with OB . The resulting formula, strengthened by α, is the observation formula in the revised knowledge base KB ∗ α. The above intuitions are formalized below. Definition 5. Let KB = OB, A be a knowledge base and α be a new observation. The new knowledge base, KB ∗ α, is OB1 , A, where OB1 obtains from OB by the following construction. Let T L(A, α)=c1 ∧ . . . ∧ cn . P :=ATM(α); OB := ∃P.OB; R:={}; for i:=1 to n do if OB ∧ ci ≡ ⊥ then R:= R ∪ ATM(ci ); (5) OB1 :=α ∧ ∃R.OB .
(1) (2) (3) (4)
9
Note that we cannot weaken KB by weakening A, because domain axioms represent knowledge about the world and hence cannot be invalidated.
36
E. Madali´nska-Bugaj and W. Łukaszewicz
3.1 Examples The following examples illustrate an application of Definition 5 to compute KB ∗ α. Example 3. Let KB = OB, A be a knowledge base, where OB = p and A = (p ⇒ s). Suppose further that a new observation is α = ¬p. The new knowledge base is KB1 = OB1 , A, where OB1 is computed in the following steps:10 – – – – –
AT M (α) = {p}. OB = ∃p.p ≡ . P IF (A) = ¬p ∨ s; P IF (α) = ¬p. T L(A, α)=. Since, after performing step (4), R = {}, OB1 = α ∧ ≡ ¬p.
Thus Cn(KB ∗ α) = Cn(¬p ∧ (p ⇒ s). Note that Cn(KB ∗ α) does not contain s. Example 4. Let KB = OB, A be a knowledge base, where OB = p ∧ s and A = {}. A new observation is α = ¬p. The resulting knowledge base is KB1 = OB1 , A where OB1 is computed as follows. – – – – –
AT M (α) = {p}. OB = ∃p.p ∧ s ≡ s. P IF (A) = ; P IF (α) = ¬p. T L(A, α)= . OB1 = α ∧ OB = ¬p ∧ s.
Therefore Cn(KB ∗ α) = Cn(¬p ∧ s). Observe that according to our intuitions, s is a member of Cn(KB ∗ α). Example 5. Let KB = OB, A be a knowledge base, where OB = p and A = (p ⇒ s) and let a new information α be ¬s. We compute OB1 . – – – – – –
AT M (α) = {s}. OB = ∃s.p ≡ p. P IF (α) = ¬s; P IF (A) = ¬p ∨ s. T L(A, α)= ¬p. After performing step (4), we get R = {p}. OB1 = ¬s ∧ ∃p.p ≡ ¬s.
Thus, Cn(KB ∗ α) = Cn(¬s ∧ (p ⇒ s)). Note that according to our intuitions p does not belong to Cn(KB ∗ α). Example 6. Let KB = OB, A be a knowledge base, where OB = p ∧ s and A = (p ⇒ q) ∧ (q ⇒ r) and let a new observation α be ¬q. The computation of OB1 is the following. – AT M (α) = {q}. – OB = ∃q.p ∧ s ≡ p ∧ s. 10
We use the symbol ’≡’ as the meta symbol denoting that two formulae are equivalent.
Belief Revision Revisited
– – – –
37
P IF (α) = ¬q; P IF (A) = (¬p ∨ q) ∧ (¬q ∨ r) ∧ (¬p ∨ r). T L(A, α)= ¬p. After performing step (4), we get R = {p}. OB1 = ((∃p.OB ) ∧ α) ≡ s ∧ ¬q
Cn(KB ∗ α) = Cn(s ∧ ¬q ∧ (p ⇒ q) ∧ (q ⇒ r)). Observe that ¬p is a member of Cn(KB ∗ α).
4 Absorbing New Knowledge In this section we define revision operator under the assumption that an input formula α is a new piece of knowledge. To fix some intuitions, consider the following example. Example 7. Let KB = {b}, {}, where b stands for “Tweety is a black penguin”. Suppose that I learned that penguins are always black or grey. This allows me to conclude that Tweety is black or grey, so a new piece of knowledge is b ∨ g, where g stands for “Tweety is a grey penguin”. Clearly, the resulting knowledge base should be {b}, {b ∨ g} because learning that all penguins are black or grey I should not assume that my earlier observation that Tweety is black should be weakened. The above example illustrates that our definition of belief operator given in section 3 should be modified in the case when new information is a piece of knowledge. Even, as in this paper, if we assume that a new observation always gives us exact information about the aspect of the world it concerns, this assumption makes little sense in the context of a new domain axiom. The role of domain axioms is to put some constraints on the world under consideration, so the only observations that should be invalidated by domain axioms are those that are inconsistent with them. Suppose that KB = OB, A is a consistent knowledge base and α is a new domain axiom. Denote the resulting knowledge base KB1 by OB1 , A1 . Obviously, A1 should be A∧α. Now we would like to put OB1 := OB. The problem, however, is that OB∧A1 can be inconsistent. Since the original knowledge base KB is consistent, the source of inconsistency can be only α, i.e. conjuncts from P IF (α), and these new conclusions which can be derived from A and α, i.e. conjuncts from T L(A, α). Combining them together we receive ABS(T L(A, α)∧P IF (α)). Therefore, we must delete information concerning atoms occurring in those conjuncts of ABS(T L(A, α)∧P IF (α)) which are inconsistent with OB. A formalization of above idea is given below. Definition 6. Let KB = OB, A be a knowledge base and α be a new piece of knowledge. KB ∗ α = OB1 , A1 , where A1 = A∧α and OB1 is obtained from OB by the following construction. Let ABS(T L(A, α)∧P IF (α)) = c1 ∧ . . . ∧ cn . (1) P :={}; (2) for i:=1 to n do if OB ∧ ci ≡ ⊥ then P := P ∪ ATM(ci ); (3) OB1 := ∃P.OB.
38
E. Madali´nska-Bugaj and W. Łukaszewicz
Notice that the above algorithm is a slight modification of steps (3)-(5) of algorithm presented in Definition 5. Note also that the resulting knowledge base KB ∗ α is inconsistent if and only if the formula A∧α is inconsistent. 4.1 Examples We now present a number of examples illustrating the construction from Definition 6. Example 8. Let KB = OB, A , where OB = p ∧ q ∧ s and A = (p ⇒ r). Suppose that α = (q ⇒ ¬s). The new knowledge base KB ∗ α is OB1 , A1 , where A1 = (p ⇒ r) ∧ (q ⇒ ¬s) and OB1 is computed as follows. – ABS(T L(A, α)∧P IF (α)) = (¬q ∨ ¬s). – OB ∧ (¬q ∨ ¬s) ≡ ⊥, so OB1 := ∃q, s.OB ≡ p. Thus, Cn(KB ∗ α) = Cn(p ∧ (p ⇒ r) ∧ (q ⇒ ¬s)) . Example 9. Let KB = OB, A , where OB is (p ∨ q) ∧ (s ∨ r) and A is p ⇒ r. Assume that α = (q ⇒ ¬s). The new knowledge base KB ∗ α is OB1 , A1 , where A1 = (p ⇒ r) ∧ (q ⇒ ¬s) and OB1 is computed as follows. – ABS(T L(A, α)∧P IF (α)) = (¬q ∨ ¬s). – OB ∧ (¬q ∨ ¬s) ≡ ⊥, so OB1 := OB. Thus, Cn(KB1 ) = Cn((p ∨ q) ∧ (s ∨ r) ∧ (p ⇒ r) ∧ (q ⇒ ¬s) ≡ Cn((p ∨ q) ∧ r ∧ (¬q ∨ ¬s)). Example 10. Let KB = OB, A, where OB is p ∧ s ∧ (q ∨ r) and A is p ⇒ r. Let α = (r ⇒ ¬s). The new knowledge base KB ∗ α is OB1 , A1 , where A1 = (p ⇒ r) ∧ (r ⇒ ¬s) and OB1 is computed as follows. – ABS(T L(A, α)∧P IF (α)) = (¬r ∨ ¬s) ∧ (¬p ∨ ¬s). – OB ∧ (¬r ∨ ¬s) ≡ ⊥; OB ∧ (¬p ∨ ¬s) ≡ ⊥. So, OB1 = ∃p, s.OB ≡ (q ∨ r). Thus, Cn(KB1 ) = Cn((q ∨ r) ∧ (p ⇒ r) ∧ (r ⇒ ¬s)).
5 Postulates In this section, we specify postulates for our revision operator. We start with some terminology and notation. Definition 7. Let KB1 = OB1 , A1 and KB2 = OB2 , A2 be knowledge bases. We say that KB1 and KB2 are equivalent, denoted by KB1 ≡ KB2 , iff OB1 ≡ OB2 and A1 ≡ A2 . If X and α are formulae, then X + α stands for Cn(X ∧ α). If KB = OB, A is a knowledge base and α is a formula, then KB + α stands for Cn(OB ∧ A ∧ α). We write KB |= α iff (OB ∧ A) |= α. KBOB and KBA denote the sets OB and A, respectively. The following postulates, corresponding loosely to AGM postulates, hold for our revision operator.
Belief Revision Revisited
(R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8)
39
KB ∗ α is a belief set, i.e. Cn(KB ∗ α) = KB ∗ α. α ∈ KB ∗ α. KB ∗ α ⊆ KB + α. If KB |= ¬α and KB + α ⊆ Cn((∃AT M (α).KBOB ) ∧ α), then KB + α ⊆ KB ∗ α. KB ∗ α is inconsistent iff {α} ∪ KBA is inconsistent. If KB1 ≡ KB2 , then KB1 ∗ α ≡ KB2 ∗ α. If AT M (α) ⊆ AT M (α ∧ β) and KB |= ¬α ∨ ¬β then KB ∗ (α ∧ β) ⊆ (KB ∗ α) + β. If KB |= ¬α ∨ ¬β and (KB ∗ α) + β ⊆ (∃AT M (α ∧ β).KBOB ) + (α ∧ β), then (KB ∗ α) + β ⊆ KB ∗ (α ∧ β).
The postulates (R1)-(R3) and (R6) are exactly the AGM postulates, whereas the remaining postulates are weaker forms of the AGM postulates.
6 Related Work An important property of our formalization of belief revision is the assumption that a new observation is exactly what an agent knows at the moment about the aspect of the world the observation is concerned with. As we remarked earlier, this assumption is also made in [4], where an interesting formalization of belief revision, called conservative belief revision (CBR, for short), is presented. However there are two important differences between CBR and our formalization. (i) The semantics for CBR is based on Grove’s system of spheres ([7]), originally developed for AGM-revision. What typifies Grove’s semantics is that the revision operator it defines depends on an ordering over all interpretations (of the considered language) signifying their level of plausibility. In consequence, CBR is not a single belief revision operator, but rather a class of such operators. The problem, of course, is that it is not clear which of them should be chosen in practical applications. Our formalization, on the other hand, provides a unique belief revision operator. (ii) In contrast to our approach, CBR does not distinguishes between defeasible observations and knowledge about the considered world. As we argued earlier, such distinction is important, because observations are subject to invalidation, whereas knowledge is not. In [8], a belief update operator, called MPMA, has been defined. As the belief revision operator specified here, MPMA is heavily influenced by the notion of an eliminant. However, there is a crucial difference between these formalisms due to the general difference between belief revision and belief update. As we stated earlier, belief revision is based on the assumptions that a world being modelled is static and beliefs describing a reasoner’s environment may be incorrect. In belief update, on the other hand, we assume that a piece of new information represents an effect of a performed action and the current set of the reasoner’s beliefs is correct (see [2]). This distinction manifests clearly in the presence of domain axioms (called integrity constraints in MPMA). The next example illustrate this.
40
E. Madali´nska-Bugaj and W. Łukaszewicz
Example 11. Let KB = OB, A , where OB = w and A = (w ⇒ a) (here a and w stand for “a turkey is alive” and “ a turkey is walking”). Thus, Cn(KB) contains w ∧ a. Assume that a piece of new information α is ¬w. If KB is considered from the belief revision perspective, the resulting knowledge base should be ¬w, because there is no reason to believe a when w has turned out to be false. On the other hand, if KB is considered from the update perspective, the resulting knowledge base should be ¬w ∧ a, because there is no reason to conclude that an action that have made the turkey non-walking made it dead.
7 Conclusions and Future Work We have presented a new belief revision operator. Our approach assumes that a new observation provides exact information about the aspect of the considered world it concerns. Also, we formally distinguish between defeasible observations and indefeasible knowledge about the considered world. There are three topics that we left for further research. (1) Our belief revision operator has been specified syntactically. It would be interesting to provide its semantical characterization. (2) A dual notion to belief revision is belief contraction. This is a task of specifying a new knowledge base under the assumption that some beliefs are retracted but no new beliefs are added. It seems that the notion of an eliminant provides a very natural basis to solve this task. (3) AGM postulates do not address the issue of iterated belief revision [9]. On the other hand, in practical applications we are interested in a sequence of belief revisions rather, than in a single one. It would be interesting to investigate our belief operator in this context.
References 1. Alchourr´on, C.E., G¨ardenfors, P., Makinson, D.: On the logic theory change: Partial meet contraction and revision functions. Journal of Symbolic Logic 50 (1985) 510–530 2. Katsuno, H., Mendelzon, A.O.: On the difference between updating a knowledge base and revising it. In: Proceedings of the 2nd International Conference on Principles of Knowledge Representation and Reasoning. (1991) 387–394 3. Delgrande, J.P., Schaub, T.: A consistency-based approach for belief change. Artificial Intelligence Journal 151 (2003) 1–41 4. Delgrande, J.P., Nayak, A.C., Pagnucco, M.: Gricean belief change. Studia Logica (2004) To appear. Electronic version can be found at http://www.cs.sfu.ca/ jim/publications.html. 5. Brown, F.M.: Boolean Reasoning. Kluwer Academic Publishers (1990) 6. Quine, W.: A way to simplify truth functions. American Mathematical Monthly 62 (1955) 627–631 7. Grove, A.: Two modellings for theory change. Journal of Philosophical Logic 17 (1988) 157–170 8. Doherty, P., Łukaszewicz, W., Madalinska-Bugaj, E.: The PMA and relativizing minimal change for action update. Fundamenta Informaticae 44 (2000) 95–131 9. Darwiche, A., Pearl, J.: On the logic of iterated revision. Artificial Intelligence Journal 89 (1997) 1–29
Knowledge and Reasoning Supported by Cognitive Maps Alejandro Peña1,2,3, Humberto Sossa3, and Agustin Gutiérrez3 1
WOLNM, 2 UPIICSA & 3 CIC – 2,3 National Polytechnic Institute, 31 Julio 1859, # 1099-B, Leyes Reforma, DF, 09310, México [email protected], {hsossa, atornes}@cic.ipn.mx
Abstract. A powerful and useful approach for modeling knowledge and qualitative reasoning is the Cognitive Map. The background of Cognitive Maps is the research about learning environments carried out by Cognitive Psychology since the nineteenth century. Along the last thirty years, these underlying findings inspired the development of computational models to deal with causal phenomena. So, a Cognitive Map is a structure of concepts of a specific domain that are related through cause-effect relations with the aim to simulate behavior of dynamic systems. In spite of the short life of the causal Cognitive Maps, nowadays there are several branches of development that focus on qualitative, fuzzy and uncertain issues. With this platform wide spectra of applications have been developing in fields like game theory, information analysis and management sciences. Wherefore, with the purpose to promote the use of this kind of tool, in this work is surveyed three branches of Cognitive Maps; and it is outlined one application of the Cognitive Maps for the student modeling that shows a conceptual design of a project in progress.
1 Introduction Causal knowledge and reasoning involves many interacting concepts that make them difficult to face, and for which analytical techniques are inadequate [1]. In this case, techniques stemmed from qualitative reasoning, can be used to cope with this kind of knowledge. Thus, a Cognitive Map (CM) is a tool suitable for dealing with interacting concepts. Generally, the underlying elements of the CM are simple. The entities, factors and events of the domain model are outlined as concepts. The causal influences between these concepts are considered as cause-effects relations. So, a CM is graphically depicted as a digraph, where the nodes represent the concepts, the arcs correspond to the causal relations and the direction pictured by the arrow of the arc shows the causation of the target by the source. In general, there are three basic types of causal influences: positive, negative and neutral. The positive means that the source concept stimulates in a direct way the state of the target concept, so when the intensity of the cause concept grows a positive stimulus is trigged to enhance the state of the effect concept, but if the active level of the source concept diminishes then a negative influence is produced on the target concept to decrease its state. The negative causal influence operates in an inversely way to the positive. So a promotion in the values of the source concept leads to a decrease in the target concept state; and a decrease in the cause concept produces a raise in the effect concept. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 41 – 50, 2005. © Springer-Verlag Berlin Heidelberg 2005
42
A. Peña, H. Sossa, and A. Gutiérrez
Finally, the neutral causal influence means that no matter the changes of state that happen in the source concept, they are not going to influence in any way to the target concept; or that there is no a causal relation between this couple of concepts. As regards the kind of CM adopted, the causal influences are outlined by: a set of symbols, a set of crisp values, real values in a continuous range, linguistic variables, probabilistic estimations, or bipolar values. Thus, the basic form to depict the values is by means of the set of symbols {+, -, 0}, which corresponds to positive, negative and neutral causal influences respectively. This set of values is acknowledged by the acronym NPN (negative-positive-neutral). Wherefore, in order to storage and manipulate the causal influence values of a CM it is used an adjacency matrix (w), of size n (the number of concepts), whose entries show the value of the causal relation between the concepts. So, the entry wij contains the value of the causal influence depicted by the arc that comes from the source concept i to the target concept j. Regarding the arcs and its arrows of a CM, two nodes i and j can be linked by a path in three kinds of causal relations: null, direct and indirect. The null causal relation means that there is no a possible path to join the nodes i and j. The direct causal relation corresponds to paths of length equal to one arc. A path with more than one arc, which includes at least one intermediate node different to i and j, depicts an indirect causal relation. So, a propagation of the causal effect is done by the syllogism hypothetic principle. In resume, in a CM two nodes i and j are linked by a null causal relation; or by one direct causal relation and/or at least one indirect causal relation. With this baseline, three versions of a CM are depicted and two applications are outlined next. Thus, the organization of the paper is as follows: in the second section the causal, fuzzy and probabilistic models of a CM are sketched through the underlying formal model of the approach. In the third section it is described the use of two versions of a CM to depict the student modeling process stemmed by the learning experiences in a Web-based Education System. In these cases, the Student Model is the application responsible to fulfill an individual profile of the student in order to provide an adaptive student-centered service. In the conclusions section are presented some comments about the properties of a CM and the CM-based application, besides of identify further work regarding to the automatic generation of a CM.
2 Profile of Cognitive Maps The research on spatial learning begins in the nineteenth century focus on orientation task in animals and human beings. However, was Tolman [2] in 1948, who called CM to the mental structure that storages and recalls the spatial knowledge. Next in 1955, Kelly introduces the Personal Construct Theory to depict an individual’s multiple perspectives [3]. Afterwards, in 1976 Axelroad [3] states the computational version of a CM. Nowadays new work has been doing to face imprecise knowledge, uncertainty and fuzzy views of domain. So, along this section it is resumed the underlying concepts of three versions of a CM: causal, fuzzy and probabilistic. 2.1 Causal Cognitive Maps The baseline of the Causal Cognitive Map (CCM) rests in the relational theory outlined by Axelroad [4] and Nakamura et al. [5], who work out in the fields of the
Knowledge and Reasoning Supported by Cognitive Maps
43
international relations and the decisions support respectively. Thus, a CCM is a directed graph that represents an individual’s beliefs with respect to the model domain that is defined as: CM:= (C, A). Where C is the set of concepts pictured like vertices, and A is the set of causal relations, depicted like arcs, between the concepts. The arrows are labeled by elements of the set į:={+, -. 0, ⊕, Ԧ, ±, a, ?} that means respectively: positive, negative, neutral, positive or neutral, negative or neutral, positive or negative, conflict, and positive, negative or neutral causal effect. Four operators are defined on the set į of causal relations. They are union (U), intersection (ŀ), sum (|) and multiplication (*). The laws of union and intersection are derived from: +, -, 0, ⊕, Ԧ, ±, a, ?; when they are considered as shorthands for: {+}, {-}, {0}, {0, +}, {0, -}, {+, -}, {}, {+, 0, -} respectively. The guidelines of these operators are outlined in the Table 1, where C is the set of concepts. Table 1. Laws for the causal operators. Union (U), intersection (ŀ), sum (|) and multiplication (*), with do meaning distributes over.
U (union) and ŀ (intersection) (1a) (1b) (1c) (1d) (1e)
⊕ = 0 U+ Ԧ = 0 U± = + U? = 0 U+Ua=+ŀ0=+ŀ-=0ŀ-
| (sum) For any x, y ȯ C (2a) 0 | y = y (2b) a | y = a (2c) y | y = y (2d) + | - = ? (2e) | do U (2f) x | y = y | x
* (multiplication) For any x, y ȯ C (3a) + * y = y (3b) 0 * y = 0, if y a (3c) a * y = a (3d) - * - = + (3e) * do U (3f) x * y = y * x
The multiplication (*) operator estimates indirect causal effects, e.g., if a path from node i to node j has an intermediate node k, with the effects (i) -Æ (k)-Æ(j); so it produces a positive indirect effect according to (3d). Whereas the sum (|) operator computes direct causal effects from different paths that link two nodes i and j; e.g., there is one path from i to j with negative total indirect effect and other path with positive total indirect effect, then the total direct effect is ?, according to law (2d). The operators * and | can be lifted to matrices, as follows. Consider A and B as square valency matrices of size n. The addition and multiplication operators are defined by equations (1) and (2). The nth power of a square matrix A, for n > 0 is defined in (3). Thus, the total effect of one concept on another is estimated by the total effect matrix At whose entry Aij owns the total effect of i on j, according as (4). Due to the sum (|) operator is monotonic, there is a k such that represents the total causal effect from one concept on another, depicted by (5). This model for a CCM is based on an intuitive perspective with ad hoc rules, and lacks of a formal treatment of relations. Wherefore, it is advisable to review the proposal stated by Chaib-draa [6] to deal with this issues; his model has a precise semantics based on relation algebra and it has been used for qualitative decision-making and agent reasoning.
( A | B) ij = Aij | Bij .
(1)
( A * B ) ij = ( Ai1 * B1 j ) | ... | ( Ain * Bnj ) .
(2)
44
A. Peña, H. Sossa, and A. Gutiérrez
A1 := A; and An := A * An−1 .
(3)
At = A1 | A 2 | A3 | A 4 | .... .
(4)
At = A1 | A 2 | A3 | A 4 | .... | A k .
(5)
2.2 Fuzzy Cognitive Maps Kosko [7] in 1986 proposes the Fuzzy Cognitive Map (FCM) as a CM whose causal relations and concept values are defined by fuzzy knowledge. The arcs and nodes values are depicted by fuzzy membership functions that are associated to fuzzy sets. These functions translate real world values to qualitative measures of the concepts presence in a conceptual domain, by mean of crisp values of a set, as {0, 1} or {-1, 0, 1}, or a real values in a range, as [-1, 1]. Concepts with positive values indicate that the concept is strongly present. Values around zero mean the concept is practically inactive in the conceptual domain. Negative values outline negative states of presence of the concept. Whereas, positive, zero and negative arc values depict different gray levels of the causal influence from the source concept on the target concept. Thus, besides of the adjacency matrix for the fuzzy values of the causal relations, there is a vector concept used to describe along the time the values state of the concepts. Once the FCM is depicted, a simulation process is activated to predict causal behavior. This process is carried out along discrete steps, where the values of the concept vector change, according to the fuzzy causal influences; whereas the values of the valency matrix remain fixed, unless the FCM has an adaptive behavior. So, with the aims to produce the initial values of the concept vector, real world domain values are estimated for feeding the fuzzy membership functions. Once it is depicted the initial concept vector, an iterative process begins at step time t = 0. In each cycle a new state for the concepts is computed by taking the normalize result of the sum of the inputs. At step t, the inputs to the concept i are estimated by the state values, at step t= t-1, of the nodes j with edges coming into i, multiplied by the corresponding weights wij. Due to a FCM is a qualitative model; a threshold function is applied to the result of the sum of the product of the inputs by the weights to normalize the concept values according to the set or range associated to the concept. The formal representation of the state of a FCM is defined in formula (6), where C is the state concept vector, t is the iteration, u is the threshold function, s is the result of the sum of the inputs, and wij is the entry with the fuzzy value of the arc from concept j to concept i. Also, the equations (7) to (9) picture the threshold functions used to achieve respectively the sets {0, 1} and {-1, 0, 1}, and the range [-1, 1].
Ci (t ) = u ( s ); where : s = (¦ j =1 wij * C j (t − 1)) .
(6)
u ( s ) = 0, s ≤ 0; u ( s ) = 1, s > 0 .
(7)
n
Knowledge and Reasoning Supported by Cognitive Maps
45
u ( s ) = −1, s ≤ −0.5; u ( s ) = 0, s > −0.5 ∧ s < 0.5; u ( s ) = 1, s ≥ 0.5 .
(8)
u = 1 /(1 + e − cs ) .
(9)
where, according to Mohr [8], c is critical in determining the degree of fuzzification of the function, due to at large values, the logistic signal function approaches discrete threshold functions, so a c=5 value is advisable. Stability in dynamic systems, as a FCM, is typically analyzed through the use of Lyapunov functions. Thus, a FCM with discrete threshold functions, as (7) or (8), will either converge to a limit cycle or reach an equilibrium state, due to these functions force fuzzy state vectors to non-fuzzy values. Whereas, a FCM using the logistic signal threshold function, as (9), may become nonlinear under some conditions of feedback. Since the state vector of the map at time t is determined by its values at time t-1, the equilibrium state of a FCM may be easily detected by comparing two successive patterns of states concepts, composed by one or more state vectors. If they are identical, then the map has reached an equilibrium state and the execution ends. In despite of the single inference mechanism of a FCM, the outcomes achieved by the FCM can be non-linear, and the problem of finding whether a state is reachable in the FCM simulation is nondeterministic polynomial (NP) hard. Wherefore, it is advisable to review the study carried out by Miao and Liu [9], that focuses on the causal inference mechanism of a FCM with crisp binary concept states {0, 1}. They stated that given initial conditions, a FCM is able to reach only certain states in its state space. So, they show that splitting the whole FCM in several basic FCM modules, it is possible to study their inference patterns in a hierarchical fashion. 2.3 Probabilistic Cognitive Maps Wellman, in 1994 [10], carries out a Probabilistic version of a Cognitive Map (PCM) focuses on the assurance of the soundness of the inference for the sign relations of a CCM. This sign relation is depicted by (1) and (2), but now they are integrated by equation (10), where Pa,b is the set of paths in the PCM from a to b, and į is the causal sign of the arc between the nodes c, and c’. In this version, it is considered that: if the signs denote a causal correlation and the concepts random variables, then the path tracing is not sound. So, for instance, if i is negatively correlated with j, and j negatively correlated with k, it is still possible that i and k be negatively correlated, instead of positively supported by the law (3d). Thus, correlation is not a good interpretation for the sign of causal relations. Other issues that Wellman addressed were: the effect of blocking the path by instantiated evidence and the evidential reasoning produced by the effect concept on the cause concept. In any of those cases, it would be possible to conditionalize the conclusion on partial information about the concepts, assuming that the values of some of them may have been observed or revealed. With the aim to determine the validity of inference rules, such the depicted in (10), the definition of the rule should be local as far as possible. Thus, in assessing the validity of a signed edge (c, c’, į), where į is a causal sign, the attention is limited to the neighborhood of concepts c and c’. The rule should be unambiguously determined by the precise causal relation among the concepts, so that the sign relation, depicted
46
A. Peña, H. Sossa, and A. Gutiérrez
by (10), is an abstraction of the precise relation. Thus, if the precise relation were a functional dependency, the sign would be an abstraction of the function relating the concepts. So, if the causal relation were probabilistic, the sign would be an abstraction of the probabilistic dependence, defined in terms of conditional probability (Pr). With this baseline, the PCM is depicted as follows: The PCM is an acyclic digraph, with nodes (a, b) regarding to concepts and signed edges picturing abstract causal relations. The concepts are interpreted as random variables, although the variables domains need not be explicitly specified, what matters is: the relative ordering among values. The edges denote the sign of probabilistic dependence. So an edge (c, c’, +) means that for all values c1 > c2 of c, c’0 of c’, and all assignments x to other predecessors of c’ in the PCM, applies the correlation stated by equation (11).
§ · ¨ | δ ¸. * p∈Pa ,b © ( c ,c ',δ )∈ p ¹
(10)
Pr(c' ≥ c'0 | c1 x) ≥ Pr(c' ≥ c'0 | c2 x) .
(11)
where symbols *, | correspond to sum and multiplication operators, P depicts a path and Pr a conditional probability. An edge (c, c’, -) is defined analogously with to substitute the central inequality in (11). If there is no edge from c to c’ and no path from c’ to c, then the left and right hand sides of (11) are equal; so, c and c’ are conditionally independent given the predecessors of c’. If none of these cases hold, and there is no path from c’ to c, then there is an ambiguous edge (c, c’, ?). The path analysis formula (10) applies to direct paths from a to b that corresponds to pure causal inference, but in a CM there may be undirected pathways between two variables that not all of them are purely causal paths. Wherefore, sometimes appear situations where the values of the variables have been observed, so that these variables have the effect of blocking the path where they are. Thus, if e is observed evidence, and e is in some of the paths between the concepts a to b, then all the paths that includes e have to be removed from Pa,b. Other type of inference is the evidential reasoning produced by the effect concept on the cause concept. The sign of the probabilistic dependence from c’ to c is the same as that from c to c’, as a result of applying the Baye’s rule to (11). Other issues considered in the PCM are: the intuitive relations among target concepts of the same source concept, the causes of the same effect, and the relation between two causes given their common effect depend on how they interact in producing the effect.
3 A Case of Use of Cognitive Maps This section shows an example of the use of a CM to support the student modeling in Web-Based Education Systems (WBES) stemmed from the currently work done by the authors [11, 12]. Thus, among the trends of the WBES is the provision of studentcentered education with the support of the artificial intelligence. The aim is that the WBES carries out an adaptive behavior to depict the plans, the content and the learning experiences according to the dynamic student needs. So, the student model
Knowledge and Reasoning Supported by Cognitive Maps
47
depicts a belief-based student profile, with regard to his/her cognitive skills, learning preferences, behavior, outcomes and knowledge domain acquired. Due to the WBES works out a teaching-learning process, the CM was selected as the underlying approach to achieve the student model. Wherefore, the teaching task can be see as the cause concept, and the learning activity as the effect concept. So a logical analogy arises between the teaching-learning application domain and the CMbased student model. Thus in this section are introduced a couple of student models depicted by causal and fuzzy Cognitive Map versions. 3.1 Causal Cognitive Map-Based Student Model Before delivering a teaching-learning experience, it is necessary to consider the causal effects that the subjects of the knowledge domain, produce on the student’s cognitive performance. So, a small version of CCM is sketched in the Figure 1, is able to depict with them and to simulate the causal impact along the further iterations, as follows: The CCM pictures four concepts regarding to the development of reusable computer programs. These concepts are sketched as the nodes (a) to (d), whereas their causal relations are show as labeled arcs, with positive (+) or negative (-) values. As regards the arrows, it is possible to identify and to follow the causal flow among the concepts. Thus, several paths are appreciated; some of them are direct paths as (a) + Æ(b); others are indirect paths as (a)+ Æ(b)- Æ(d). The CCM is a cyclic map due there are two paths, (a)+ Æ(b)- Æ(d) and (a)+ Æ(c)+ Æ(d), that arrive to concept (d); and one link, (d) + Æ(a), that points to the concept (a) in order to trigger a new cycle.
(a) understanding OO philosophy + + (b) manage of the (c) design of classes structured paradigm + (d) reusable applications Fig. 1. Student Model depicted by a Causal Cognitive Map
The behavior of the CCM is computed through the use of the equations (1) to (5) along several iterations. As a consequence of the activation, the adjacency matrix of the CCM is transformed to depict the causal effects in the way showed in the Table 2. Table 2. Evolution of the Adjacency Matrix of the Causal Cognitive Map through 4 states
A1 Initial State, i=1 a b c d
a
+
b
c
-
+
D
A2 After 1 iteration, i=2
a
+
a b c d
+
B
c
d +
-
+
48
A. Peña, H. Sossa, and A. Gutiérrez
Table 2. (Continued)
A3 After 2 iterations, i=1 a b c d
a
b
c
+ -
+
D
A4 After 3 iteration, i=4
a
a b c d
+
+
+
b
c
d +
-
+
where A1 corresponds to the initial state, before begin the simulation process. For this reason, the values in the matrix are the direct causal relations among each couple of concepts linked by only one arc. A2 shows the indirect causal effects among couples of concepts linked by a path with two arcs. For instance, in the relation between a and d there are two paths, the first path is (a)- Æ(b)- Æ(d) with the indirect causal value of + (positive); and the second path is (a)+ Æ(c)+ Æ(d) with the indirect causal value of +, as a result of apply the laws of * (multiplication) and the laws of | (sum). Thus, in the entry A2a,d appears + as the indirect causal value between a and d. Matrix A3 corresponds to the values achieved by paths with lengths of 3 arcs (e.g., (a)- Æ(b)Æ(d) + Æ(a) the result produced is – (negative). Finally, in matrix A4 it is possible to identify that it has been reached a matrix with equilibrium states, due to the resulting values are the same that those in matrix A2, therefore the process ends. 3.2 Fuzzy Cognitive Map-Based Student Model In this section is introduced a FCM to analyze the cognitive skills of the student model. Through the activation of a simulation process, it is possible to predict the fuzzy evolution of the states of the concepts involved in the model. So, a brief example of this approach is sketched in the Figure 2 with four concepts. They represent cognitive skills elicited by the tutor of the student. According to the fuzzy causal relations, which are labeled by real values in the range [-1, 1], is appreciated that: the concentration enhances abstraction; abstraction promotes logic reasoning; logic contributes problems solution; problems solution stimulates concentration; but concentration feedbacks negatively to problems solution as a result of the work done. The fuzzy causal values for the concepts and their relations are represented in the Table 3, where the entries of the 2nd to the 6th rows correspond to the values of the relations between cause concepts, stated as rows, and effect concepts, identified in the column headers; whereas, in the last row appears initial concept vector. 2) abstraction facility + 0.703
3) likeness logic
+ 0.808 - 0.506
+ 0.603
1) concentration + 0.802
4) problems solution
Fig. 2. Fuzzy Cognitive Map. Depicts some cognitive skills for student modeling.
Knowledge and Reasoning Supported by Cognitive Maps
49
Table 3. Valency Matrix and State Vector of the Fuzzy Cognitive Map Adjacency Matrix 1) concentration 2) abstraction facility 3) likeness logic 4) problems solution
(1) concentration
(2) abstraction +0.808
(3) logic
(4) solution -0.506
+0.703 +0.603 +0.802
Initial State Vector
+0.5
+0.6
-0.2
0
The causal simulation of the FCM is sketched in the Table 4. So, in this table appear the results estimated for the four concepts along several iterations, according to the equations (6) and (9). In the entries of a specific column, it is possible to appreciate the behavior of a particular cognitive skill; e.g., the right column, shows the state evolution of the concept solution, which begins with 0, grows to 0.80, and drops to 0.63, where achieves an equilibrium state. In the same way, the behavior of the whole FCM is represented by the state vector depicted in each row. Thus, the simulation begins with the initial state, evolves through successively iterations until arrive to a stable situation produced in the eighteen cycle. So that, the interpretation is that the skills concentration, abstraction and logic reasoning achieve a high active state, but the solution skill develops a lightly positive increase in its state. This interpretation is stemmed from the sigmoid threshold function (9), where values close to 1.0 mean high positive activation, values around 0.5 represent lightly activation, and values close to 0.0, outline high negative activation of presence in the model. Table 4. Evolution of the State Vector. As a result of the activation of the fuzzy Cognitive Map. Iteration 1 2 3 4 10 16 18
(1) concentration 0.5 0.5 0.630904 0.962182 0.928551 0.92876 0.928759
(2) abstraction 0.6 0.883013 0.883013 0.927605 0.977212 0.977124 0.977125
(3) logic -0.2 0.891978 0.957176 0.957176 0.968884 0.968872 0.968872
(4) solution 0 0.133612 0.806615 0.784781 0.639364 0.639974 0.639971
4 Conclusions In this work it has been presented the baseline of Cognitive Maps and three versions oriented to deal with causality, fuzziness and non-deterministic situations. All of them are related to qualitative knowledge representation and causal reasoning. The CM is suitable to deal with dynamic systems modeling, where there are significant feedback and a nonlinear behavior along the simulation of the problem domain. Wherefore, the CM represents a qualitative approach for modeling a wide range of situations in fields as the political, social, economical, education, and engineering. As an instance of a CM application, in this paper were outlined two student models by causal and fuzzy versions of a CM. In these cases, the preferences and the mental skills of the student were depicted and two simulations of behavior were achieved.
50
A. Peña, H. Sossa, and A. Gutiérrez
As a further work is the development of an approach oriented to automatically generate CM through the use of evolutionary strategies and ontologies of the domain, with the aim to generate a student model in an adaptive fashion.
Acknowledgments The first author states that: this work was inspired in a special way for my Father, my brother Jesus and my Helper as part of the research projects of World Outreach Light to the Nations Ministries (WOLNM). Also this work was partially supported by the IPN, CONACYT under project 46805, and Microsoft México.
References 1. Park, K.S.: Fuzzy Cognitive Maps Considering Time Relationships. Int. J. of Man and Machine Studies. 42 (1995) 157-168 2. Tolman, E.C.: Cognitive Maps in Rats and Men. Psychological Review, July (1948) 198 3. Axelrod, R.: Structure of Decision the Cognitive Maps. Princeton University Press (1976) 4. Kelly, G.A.: The Psychology of Personal Constructs. Norton. (1955) 5. K. Nakumara, S. Iwai, & T. Sawaragi, Decision support using causation knowledge base. IEEE Tran. on Systems, Man and Cybernetics, 1982, 765. 6. Chaib-draa, B.: Causal Maps: Theory, Implementation and Practical Applications in MultiAgent Environments. IEEE Transactions on Knowledge and Data Engineering (2002) 6 7. Kosko, B.: Fuzzy Cognitive Maps. International Journal of Man-Machine Studies (1986) 8. Mohr, S.T.: The Use and Interpretation of Fuzzy Cognitive Maps, Rensselaer P.I. (2003) 9. Miao, Y., and Liu, Z.:. On Causal Inference in Fuzzy Cognitive Maps. IEEE Transactions on Fuzzy Systems, vol. 8, No. 1, January, (2000) 10. Wellman, M.: Inference in Cognitive Maps. Mathematics and Computers in Simulation, vol.36 (1994) 137-148 11. Peña, DFMA'2005, Collaborative Student Modeling by Cognitive Maps, Proceedings of the First International Conference on Distributed Frameworks for Multimedia Applications (IEEE), February 6-9, 2005, Besançon, France (2005) 12. Peña and H. Sossa, Negotiated Learning by Fuzzy Cognitive Maps, In: Proc. 4th IASTED Int. Conf. on Web-Based Education, February 21-23, Grindelwald, Switzerland (2005)
Temporal Reasoning on Chronological Annotation Tiphaine Accary-Barbier and Sylvie Calabretto LIRIS CNRS UMR 5205, INSA de Lyon, Bat. Blaise Pascal 7, avenue Jean Capelle, 69621 Villeurbanne cedex, France [email protected] http://liris.cnrs.fr/˜taccary
Abstract. Interval algebra of Allen [4] propose a set of relations which is particularly interesting on historical annotating tasks [1]. However, finding the feasible relations and consistent scenario has been shown to be NP-complete tasks for interval algebra networks [11, 10]. For point algebra networks and a restricted class of interval algebra networks, some works propose efficient algorithms to resolve it. Nevertheless, these sets of relations (made of basic relation disjunctions) are not intuitive for describing historical scenarios. In this paper we propose a set of concrete relations for the annotator, and we formalize it in terms of temporal algebras. We then describe how our model can be matched with other ones to merge calculation efficiency and information suitability.
1
Introduction
When a reader annotates temporal informations while reading documents, he builds his own implicit temporal model. This task is done thanks to the reader’s reasoning capacities and to the integration of several documents (which can have many forms). Moreover human commentators can be satisfied by expressing partially the relations between events. Thus, when they note that an event e1 takes place during another event e2 , and that e2 occurs before e3 , the fact that e1 also occurs before e3 is implicit. Temporal informations issued from historical annotations are such as "Lyon’s forum construction took place during the roman period". No quantitative information such as date or duration information is specified here. It only expresses the qualitative information that the interval of time associated with one event occurred during the interval of time of another event. Allen [4] first gives an Algebra for representing such temporal relations between pairs of intervals. This algebra is actually useful in many application areas as natural language processing [3], planning, knowledge representation and others [5, 6]. Meanwhile, besides some complexity problems, this type of representation involves some drawbacks when they are used to annotate historical events. First, the proposed relations are too simple and the expression of uncertainty require to practice relations disjunction which is not a natural process. Next, with this representation we can not express point-events. In order to join event network with temporal points, it would be useful to work with an intermediate model using point algebra [11]. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 51–60, 2005. c Springer-Verlag Berlin Heidelberg 2005
52
T. Accary-Barbier and S. Calabretto
The outline of this paper is the following. In section 2, we recall the main temporal algebras frameworks on incomplete qualitative informations (intervals and points). We then briefly show the principles of reasoning tasks which are feasible on these models. In section 3, we develop our new set of relations dedicated to temporal annotation. We show how our relations are translatable into end-point relations, and give exemples of use of such relations in different domains. Finally, in section 4, we will describe how our model can be matched with other ones to merge calculation efficiency and information suitability. We will conclude with a brief description of our actual research plans.
2
Representing Temporal Information
Representing and reasoning about incomplete and indefinite qualitative temporal information is an essential part of many artificial intelligence tasks [3, 5]. In this section, we first recall temporal algebra frameworks [4, 11] for representing such qualitative information. We then recall the reasoning tasks allowed on networks using these models. 2.1
Temporal Algebras
Allen’s Framework. The interval algebra IA [4] presents the thirteen basic relations that can hold between two intervals (Table 1). Table 1. Allen’s basic relations between intervals IA Relation before | after meets | met by equals during | contains start | started by finish | finished by overlaps | overlaped by
Notations Meaning A A{b}B | B{bi}A B A{m}B | B{mi}A A B A A{eq}B B A A{d}B | B{di}A B A A{s}B | B{si}A B A A{f }B | B{f i}A B A A{o}B | B{oi}A B
To represent indefinite information, a relation between two intervals may be a disjunction of basic relations. To list disjunctions, we use subsets of I = {b, bi, m, mi, o, oi, d, di, s, si, f, f i, eq} which is the one of all basic relations. Then, the relation {m, o, s} between events A and B represents the disjunction: (A m B) ∨ (A o B) ∨ (A s B). On the representation network, vertices represent events and directed edges are labelled with sets of relations. Any edge without explicit knowledge is labeled with I. Vilain and Kautz’s Framework. The point algebra PA formalized by Vilain and Kautz’s [11, 10] defines the three basic relations that can hold between two points {, =}. In order to represent indefinite information, the relation
Temporal Reasoning on Chronological Annotation
53
between two points can be a basic disjunction of relations which are list in subsets of P A relations. As the possible disjonctions are very few, we can directly use disjonctive relations taken into {∅, , ≥, =, ?} to express possible relations between two points. As an exemple, we can use ≤, instead of {,=
champdolian time +
roman period −
= >≥ > > ? ≤ ≥ ? ≥< >≤
W − W+ = ? ≤ > ?
− + C C ≤< > ≥ >≥ > > ? < ≥ ≤ =< >=
replace it. Else, an inconsistency will be point out to the user. Finally, we can then translate back the resulting end-points matrix in terms of fuzzy relations. Here, MC,W will be translated into Coffee f uzzy_bef ore Walk.
4
Knowledge Reconstruction
It is relevant to discern computational knowledge which is expressed in terms of end-points (and is too fuzzy to be understood humanly), and knowledge contained at annotation level. Our system is really more interesting if the results of propagation process can be returned to the user in a comprehensible language. A return expressed in terms of events end-points relations is incomprehensible. What is pertinent, is to return an interval network labeled whith relations taken into our fuzzy set. For the sake of clarity, this set will be denoted as F . We notice that F is a subset of the SAc relations ( see section 2.1). Endpoints matrix computed by the propagation use P Ac relations. All these matrix can then be translated in terms of SAc relations but not necessarily in terms of F relations. To return to the annotator a network solely labeled with F relations, we have to pass cross a "simplification" stage in which each relation of SAc − (SAc ∩ F ) must be akin to an F relation. These classifications can lead to a punctual loss of precision on the information returned. However, just the result at t time can suffer these loss and the under layer network is not modified. Thus, information contained in the network still remain complete and the ones returned to the user are nevertheless meaningfull2 . These "losses" can then be considered as an avdantage for user’s relation perception. Let us consider the matrix table issued from the description of Fred’s breakfast (Table 3). We have previously seen that the computed matrix MC,W can be translated in terms of F relation without any loss of information. Now, it is different when we will compute MP,W which is the product of MP,B and MB,W 2
They can be understanding by users.
Temporal Reasoning on Chronological Annotation
59
Breakfast fuzzy_before fuzzy_during
common_period
Paper
Walk fuzzy_before
end_in
fuzzy_before Coffee
Fig. 6. Fully informed network for Fred’s breakfast example after reconstruction stage
MP,B × MB,W ⇐⇒
? ≤ Result = 1.0 Customer Class, name Property VS. Driver Class, driver_license_number Property ==> Result = 0.26136363 Payment_record Class, payment_amount Property VS. Payment_Information Class, payment_amount Property ==> Result = 1.0 Payment_record Class, payment_amount Property VS. Payment_Information Class, payment_received Property ==> Result = 0.31130952 Payment_record Class, payment_received Property VS. Payment_Information Class, payment_amount Property ==> Result = 0.31130952 Payment_record Class, payment_received Property VS. Payment_Information Class, payment_received Property ==> Result = 1.0
Note that the datatype properties of the Payment_record and Payment_Information classes have been compared together with the datatype properties of the two first classes (Customer and Driver). This is because these two classes contain a special property, payment, which relates them to Payment_record and Payment_Information respectively. All these properties have been compared using the first three modules of our approach (Figure 1), that is, they were compared using the syntactic functions within the Syntactic Level and the thesaurus function within the Semantic Level. Now at the Interaction with the User module within the User Level, the user has to decide which of these mappings must be stored as definitive and which ones must be rejected. As we can see, there are three mappings with low results and three mappings with perfect results. Remember that only the mappings that exceed the threshold (0.45) are shown to the user, so in this case the user will only see the three perfect mappings. Here, we show all mappings (with low values too) to explain all the comparisons our method performs. Then, our tool shows the comparisons between classes without special properties which are related to the first two classes (Customer and Driver). In this case, only one comparison is shown: COMMON CLASSES Payment_record Class VS. Payment_Information Class ==> Result = 0.7312411
In spite of the results of comparing the Syntactic Level and the thesaurus function within the Semantic Level are not perfect between Payment_record and Payment_Information classes, the Semantic Comparison of the Common Classes module returns a perfect result because these classes are similar structurally. That is, they con-
A Three-Level Approach to Ontology Merging
87
tain two datatype properties that were selected as definitive mappings and they do not have special properties. Therefore, the result of all comparisons is 0.7312411. Now, our tool shows the result of comparing the special property by relating Customer and Driver to Payment_record and Payment_Information respectively. SPECIAL PROPERTIES Customer Class, payment Property VS. Driver Class, payment Property ==> Result = 1.0
This mapping generates a perfect value because the comparison was perfect in all the modules. The payment property is similar syntactic and semantically and it contains the same class range (Payment_record and Payment_Information) compared in previous steps. Finally, as the tool have compared all the special and datatype properties and classes without properties related to the two first classes, it only shows the last comparison, between Customer and Driver: COMMON CLASSES Customer Class VS. Driver Class ==> Result = 0.5650808
The mapping generates the value of 0.5650808 because both classes are different syntactic and semantically, but they contain the same special properties and some datatype properties. Then, the Semantic Comparison of the Common Classes module returns a high value. Now, our tool shows the definitive mappings generated by our method: COMPARING TWO ONTOLOGIES: AIR_RESERVATION - CAR_RENTAL Generated Mappings DATATYPE PROPERTIES Customer Class, name Property Driver Class, name Property --------------------o--------------------o------------------o-------------------o------------------Payment_record Class, payment_amount Property Payment_Information Class, payment_amount Property --------------------o--------------------o------------------o-------------------o------------------Payment_record Class, payment_received Property Payment_Information Class, payment_received Property --------------------o--------------------o------------------o-------------------o------------------Customer Class, payment Property Driver Class, payment Property --------------------o--------------------o------------------o-------------------o------------------ATTRIBUTE CLASSES COMMON CLASSES Payment_record Class Payment_Information Class --------------------o--------------------o------------------o-------------------o------------------Customer Class Driver Class --------------------o--------------------o------------------o-------------------o-------------------
Following, we will perform two modifications to the Car_Rental ontology in order to show how our method might find more mappings based on the user’s decisions. The first modification renames the Payment_Information class as Fee and the second modification deletes the two datatype properties contained in this class (payment_amount and payment_received). With these two changes in mind, we execute our method again. In this case, the comparison of the Payment_Record class (of the Air_Reservation ontology) to the Fee class (of the Car_Rental ontology) returns a very low value (0.34). Therefore this mapping is not showed to the user because it does not exceed the threshold. As in the
88
A. Buccella, A. Cechich, and N. Brisaboa
aforementioned example, our method continues comparing the properties of the classes. Payment is the only special property to compare because the Fee class has not datatype properties. This comparison generates a high value (0.8) because both are similar syntactic and semantically – only the comparison between the range classes (Payment_Record and Fee) failed. Following, this mapping is shown to the user and when they determine that this mapping is correct, our method shows the mapping between Payment_record and Fee classes. This happens because our method is based on the user’s choices. If the payment special property was selected as the same, we can assume that the range classes are also the same. If these classes are selected as the same, the method adds the same definitive mappings as in the previous example. Similarly, if the user rejects this last mapping, the method automatically deletes the mapping generated between the payment special properties. The same happens when we have similar classes but the properties relating them are represented by using very different names, so it is impossible to find a synonym relationship in the thesaurus. In spite of our method returns a very low value (less than 0.45), the tool will show these properties when the classes are selected as the same by the user.
5 Conclusion and Future Work Our method allows a user to find several correct mappings, taking into account the structure of the ontologies and their syntactic and semantic relationships. One problem with our approach is that mappings are dependent on the structure, that is, when two ontologies represent information in a very different fashion, the mappings are very difficult to find. As a future work, we are developing techniques to find mappings when the structure of the ontologies are different, for example when one property in one ontology is represented by two properties in the other. Additionally, another implementation of our method is being implemented in order to integrate it to Protégé [18].
References 1. Buccella A., Cechich A. and Brisaboa N.R. An Ontology Approach to Data Integration. JCS&T, Vol.3(2). Available at http://journal.info.unlp.edu.ar/default.html, pp. 62-68, 2003. 2. Buccella A., Cechich A., and Brisaboa N. A Federated Layer to Integrate Heterogeneous Knowledge, VODCA 2004: First International Workshop on Views on Designing Complex Architectures, Bertinoro, Italy, 11-12 Sept. 2004. Electronic Notes in Theoretical Computer Science, Elsevier Science B.V. 3. Buccella A., Cechich A. and Brisaboa N.R. An Ontology-based Environment to Data Integration. IDEAS 2004, pp. 79-90, 3-7 May, 2004. 4. Eclipse Home Page. http://www.eclipse.org. 5. Fridman Noy, N. and Musen, M. PROMPT: algorithm and tool for automated ontology merging and alignment. Proc. AAAI ’00, 450–455. 6. Gruber, T. A translation approach to portable ontology specifications. Knowledge Acquisition 1993 –Vol.5(2): pp. 199–220, 2003.
A Three-Level Approach to Ontology Merging
89
7. Hovy, E. Combining and standardizing large-scale, practical ontologies for machine translation and other uses. Proc. 1st Intl. Conf. on Language Resources and Evaluation, Granada, Spain, 1998. 8. Java SE Platform. http://java.sun.com. 9. Java Servlet. http://java.sun.com/products/servlet/. 10. Kalfoglou, Y. and Schorlemmer, M. Ontology mapping: the state of the art. The Knowledge Engineering Review, 18(1), pp. 1–31, 2003. 11. Klein, M. Combining and relating ontologies: an analysis of problems and solutions. IJCAI-2001 Workshop on Ontologies and Information Sharing, Seattle, WA, 2001. 12. Levenshtein, I. V., Binary codes capable of correcting deletions, insertions, and reversals. Cybernetics and Control Theory, Vol.10(8), pp. 707-710, 1996. 13. Lin, D. An Information-Theoretic Definition of Similarity. Proceedings of the Fifteenth International Conference on Machine Learning, pp.296-304, July 24-27, 1998 . 14. Maedche, A., Staab, S. Measuring Similarity between Ontologies. EKAW 2002: 251-263. 15. McGuinness, D., Fikes, R., Rice, J. and Wilder, S. An environment for merging and testing large Oontologies.Proc. KR ’00, 483–493. 16. Ontolingua Editor. http://ontolingua.stanford.edu/index.html. 17. PostgreSQL Home Page. http://www.postgresql.org/. 18. Protégé Editor. http://protege.stanford.edu/ 19. Rodriguez, A., Egenhofer, M. Determining Semantic Similarity among Entity Classes from Different Ontologies. IEEE Transactions on Knowledge and Data Engineering, Vol.15(2), pp. 442-456, March/April 2003.. 20. Stumme, G. and Madche, A. FCA-Merge: Bottom-up merging of ontologies. In 7th Intl. Conf. on Artificial Intelligence (IJCAI ’01), pages 225–230, Seattle, WA, 2001. 21. Visser, P., Jones, D., Bench-Capon, T., Shave, M. An Analysis of Ontology Mismatches; Heterogeneity versus Interoperability. AAAI Spring Symposium on Ontological Engineering, 1997.
Domain and Competences Ontologies and Their Maintenance for an Intelligent Dissemination of Documents Yassine Gargouri1, Bernard Lefebvre2, and Jean-Guy Meunier1 1 Laboratory of Cognitive Information Analysis Laboratory of Knowledge Management, Diffusion and Acquisition, University of Quebec at Montreal, Montreal (Quebec) H3C 3P8, Canada {gargouri.yassine, lefebvre.bernard, meunier.jean-guy}@uqam.ca 2
Abstract. One of the big challenges of the knowledge management is the active and intelligent dissemination of the know-how to users while executing their tasks, without bothering them with information that is too far from their competences or out of their interest fields. Delivering a new document to the concerned users consists basically on appreciating the semantic relevance of the content of this document (domain ontology) in relation with users’ competences (competences ontology). In this paper, we illustrate the importance, within a documentary dissemination service, of the integration of an ontologies system, essentially based on the domain and the competences, but also on the users, the documents, the processes and the enterprise. The maintenance of these ontologies and basically those related to documents, to domain and to competences is a crucial aspect for the system survival. So, we describe what role the texts analysis can play for the maintenance of these ontologies.
1 Introduction Inside an organisational environment, the information can only become knowledge if it is listed, structured and available to access to the concerned persons, and at the right moment. The implementation of computer solutions for knowledge management, as an answer to these objectives, is rather a recent phenomenon [16]. This implies in fact, the difficult integration of concepts and techniques coming from various domains such as the artificial intelligence, the information systems engineering, the processes reengineering or the behaviour of the organisations and their human resources [11]. The project MDKT (Management and Dissemination of Knowledge in Telecommunication) deals with this topic [10]. It aims basically to facilitate the competences development of human resources for the enterprise needs. It consists of a computer environment which aims to offer a concrete and precious help to users accomplishing their activities, and consequently, to increase their productivity. This should help them to enrich their professional knowledge and contribute as a result, to their permanent training. Within an environment, where knowledge related to professional activities grows up very quickly and where it is not correctly structured, the users (experts, technicians …) A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 90 – 97, 2005. © Springer-Verlag Berlin Heidelberg 2005
Domain and Competences Ontologies and Their Maintenance
91
are not always conscious about the existence of useful information for their activities. And even when they are, they don’t know necessarily how to access them. Having an active dissemination service in order to forward useful and relevant information to the concerned persons is consequently an obvious need. One of the big challenges of the active and intelligent dissemination of documents to users is to not bothering them with information that is too far from their competences or out of their interest fields. Beyond information management, we deal with knowledge management, and more specifically to the semantics that can be associated to information or its context. We propose in this paper a response to this challenge, fundamentally based on a dissemination service driven by domain and competences ontologies, but also by documents, processes, users and enterprise ontologies. After a brief review of the MDKT project structure, we describe the contents of the domain and the competences ontologies and show their importance to construct a documents dissemination service to the concerned users. Then, we present the maintenance process for updating the domain ontology and as a consequence, the one of competences. This process is essential for the long term survival of the system.
2 The MDKT Project Among works having similar objectives as the ones of the MDKT project, we can mention the works of Abecker et al. [1] based on the “KnowMore” platform which is developed on the basis of an architecture of the organisational memory to meet the querying requirements within a task context. While this project is principally based on the domain knowledge to describe the documents, the MDKT project integrates an additional dimension, the one of the competences for a better users characterisation. Like the « Ontologging » project [15], the MDKT is also based on agents contributing for a better personalization of the knowledge dissemination. In artificial intelligence, ontologies have been developed as a response to the problems of knowledge representation and manipulation inside data processing systems. The Web researchers have adopted the term “ontology” to refer to a document (or file) defining, in a formal way, the relations between terms [3]. Inside the semantic Web, ontologies are used as a system core to access structured information as well as inference rules supporting the automatic reasoning [3]. These ontologies also offer the capability for a program to find the various terms referring to a same concept. In this specific case, we are dealing with domain ontologies. The knowledge model structure of the MDKT project is thus principally based on ontologies [10], which are the ontologies of domain, competences, documents, business processes, users (or employees) and enterprise. - The domain ontology describes the general elements and properties of the domain knowledge organisation (which is, in this project, wireless telecommunication). - The document ontology (or the information ontology) describes the different documentary information resources related to the domain. Its links to the others ontologies (competences, enterprise and business processes) can also be useful
92
Y. Gargouri, B. Lefebvre, and J.-G. Meunier
-
for filtering the information within the dissemination service to avoid documents that don’t match the users selection criteria. The competences ontology represents the knowledge model core and is described further. This is a key element in the filtering process. The business process ontology describes components of the professional activity for an enterprise. The employee ontology is used to describe the profile of the system users (the enterprise employees). The enterprise ontology presents the concept of roles which can be played by the employees.
The knowledge creation, control and maintenance of the MDKT system is a complex and crucial task. In order to facilitate these tasks, various services were used or developed inside this project. Among them, we mention an ontologies editor (Protege-2000 [13]), a documents analysis system (SATIM [4]), a system for the domain ontology maintenance (ONTOLOGICO [7,8]), a system helping for the documents annotation (AnnoCitaTool) and various services allowing ontologies exploration (NORD), dissemination and querying of documents.
3 The Competences Ontology A competence is a know-how, a knowledge or a behaviour that appears inside a professional situation for a purpose or a result. It necessitates a certain level of expertise. It’s important, within the context of the MDKT project, to measure the employee’s competences level. However, the competence is hardly measurable, but can be represented by action fields and elements that can be treated on a hierarchical basis. The competence is defined in relation to other concepts describing the capacity, the ability and the expertise of the employee when executing a professional activity. Inside the MDKT project, these elements and their relations constitute the competences model, as detailed in [10]. In particular, the relation between the employees and the competences is, not only specified in a direct manner, but also, in an indirect way through the roles executed by these employees. This relation represents the requirements they have to respect when executing an activity for the enterprise. Other relations exist also between the competences themselves. They are relations of analogy, generalisation and aggregation [12]: - Analogy relation: the competences can be similar from the point of view of their functionality, their result or their definition. - Generalisation relation: describe the relation between two competences; one of them is more general than the other according to the classic meaning adopted within the context of the object oriented programming paradigm. - Aggregation relation: this relation is used when a competence is a component of an other one. In the context of the MDKT project, the competences are classified in two groups: the specific competences and the transversal ones. The first group refers to competences directly needed for the execution of work processes, whereas the second refers to competences useful for the achievement of many work processes and are
Domain and Competences Ontologies and Their Maintenance
93
generally related to the domain knowledge. A competence is characterized by an expertise level. The level 1 refers to a beginner and the level 5 to an expert. Moreover, the competences can be identified by capability verbs that are organized in different levels of complexity [14].
4 Documents Dissemination An active and efficient dissemination consists on semantically filtering the potential employees, for whom, a document can be useful. After a semantic content analysis of a new document, the filtering process considers the competences, the abilities, the expertise levels, the employees roles and tasks, in order to deliver this document to the persons able to understand it and interested to consult it. The documents dissemination to the appropriate employees is a big challenge. In fact, it aims to offer a precious and realistic help for the achievement of the professional activities of the employees, without bothering them by information that does not belong to their interest fields or that does not match their competences. The dissemination also aims to enrich their professional knowledge, ameliorate their productivity, produce a saving time and improve their efficiency by allowing accessing the relevant information, at the time of the tasks execution and according to a user-friendly form. Carrying out such objectives should, as a consequence, respect a set of rules, defined inside a knowledge base. For example, the documents must be filtered according to the key concepts of these documents, compared to the task the employee has to accomplish. The documents filtering must also consider the expertise level of the user which is related to a transversal competence associated to a concept that is present in the document. This judgment is based on the concept of proximal zone of development [17] which is “ the distance between the level of the current development determined by the way a person resolves a problem by himself and the level of the potential development, as the way it resolves problems when it is assisted by an external element”. This concept has practical consequences on learning. It helps characterizing the development direction and determining the objectives of the learner on the basis of the mediator intervention. This interaction must be situated inside the proximal zone of development of the learner in order to help him exceeding his current competences. The identification of this zone needs the definition of relations between the competences and their classification according to hierarchical levels. The dissemination service architecture, as described in (fig.1) consists basically of two parts, the filtering engine and the diffusion service. The first one is in charge of selecting users whether the corresponding document belongs or not to their proximal zone of development. The filtering engine provides an appropriate users list which is sent to the dissemination service for the proper delivering of the documents. The semantic reasoning associated to filtering is executed thanks to implicit or explicit relations between entities represented in the ontologies. It is based on inference processes such as subsumption as well as heuristics in order to give to this semantic reasoning, naturals and intelligent behaviours.
94
Y. Gargouri, B. Lefebvre, and J.-G. Meunier
For example : the set of persons having the expertise “InstallNetwork_3” consists, not only of persons having exactly this characteristic, but also of the ones having the expertises “InstallNetwork_4” and “InstallNetwork_5” which are of a higher level.
To users Documents to deliver
Users list
Filtering engine
Dissemination service
Jena (Java)
Ontologies Domain Business process
Competences
Documents
HTML
PDF
Users
…
Annotated documents
Fig. 1. Dissemination service architecture
Some other heuristic arguments, implemented inside the system, concern the aggregation relation (“isDecomposeIn”) and the analogy relation (“sameAs”) between the competences. The characteristics of the competences, relative to capability verbs are also considered within the reasoning depending on the nature, more or less general of these verbs [14]. A documentary querying service also uses the functionalities of the filtering engine to provide to users, documents they look for, not only according to specific criteria, like a task or a concept of the domain but also, with respect to the users expertises and those required by a candidate document.
5 Maintenance System of the Domain Ontology The technical terms specific to a particular domain change and evolve in a perpetual way. As a consequence, the domain ontologies have to be maintained to face incompleteness and errors, or to be adapted to the innovations in the domain. The
Domain and Competences Ontologies and Their Maintenance
95
completeness and accuracy of terms of a specific domain inside the ontology are considered as an important pre-processing, to assure the usefulness and the efficiency of the ontology, and as a consequence, the effectiveness of the dissemination service. Initially, the conception of the domain ontology has been achieved by the mean of a set of tools integrated inside a platform named SATIM. The role of these tools and principally the GRAMEXCO module is to assist for the detection of terms and concepts from documents. These tools are also used to facilitate the annotation of new documents and their association to the domain ontology. In addition, the maintenance of the domain ontology follows a structured process [7] implemented as a chain of processes of the platform SATIM, named ONTOLOGICO [8]. Since it is difficult and tedious to detect new relations between terms by reading textual data and to evaluate their pertinence compared to the current ontology, the use of a technique, at least semi-automatic, is considered to be essential. ONTOLOGICO aims as a consequence to assist the domain experts in their maintenance task of the domain ontology. This later is here viewed as the incremental upgrade of the ontology as new concepts are extracted from domain texts. The processing sequence ONTOLOGICO is made of the following modules: a simple terms extractor, a complex terms extractor, a classifier, a lemmatisation module, a segmentation module, a domain thesaurus, a semantic refinement module (based on the Latent Semantic Indexing) and an identifier of related terms (based on the computation of semantic similarity between couples of conceptual vectors). The process begins with the application of the documents classification technique (using GRAMEXCO) to identify, at the first step, groups of terms that appear together in a same class of documents and which are potentially semantically related. Then, from these groups of terms, we intend to extract couples of highly related concepts. This task is accomplished using the Latent semantic Indexing technique (LSI) [5], associated with the Singular Values Decomposition (SVD) [9]. The complementary aspects between the documents classification technique, which is in our case based on the neural networks (ART1), and the Latent semantic Indexing approach, constitutes an extremely powerful refinement process [8]. This process allows detecting, from the terms groups issued from the classification, the most representative of the information located in the documents of a same class. The next objective is to identify pairs of concepts represented by terms having a certain semantic similarity. For this purpose, we propose a method based on the representation of concepts by vectors. These vectors are built from lexical items associated to the corresponding concept, according to relations of synonymy, antonymy, hyponymy or meronymy. These relations can be extracted from a thesaurus or from the current ontology. Using a measure of semantic similarity between conceptual vectors, that is the thematic distance, we identify the couples presenting a high probability to be semantically related. This method is based on the semantic hypothesis of Firth [6], according to which, words having a same lexical surrounding are supposed having associated semantics and their conceptual vectors are therefore, similar. This hypothesis allows an interesting preliminary analysis of the domain, which is after that, refined by the manual identification of pertinent relations (synonymy …).
96
Y. Gargouri, B. Lefebvre, and J.-G. Meunier
These relations between terms have finally to be checked and analysed by an expert to confirm their pertinence, compared to the current ontology. A set of rules insuring the coherence of the entire model has to be respected. The expert has also to associate labels to these relations. Finally, terms and relations between terms (resulting from the previous process) are integrated into the current ontology. In this way, the maintenance of the domain ontology allows to have a better representation of the documentary base using up-to-date domain knowledge. Indeed, the semantic content of new documents (as well as the former ones) is better structured thanks to the practically total integration of key terms of the domain in the ontology.
6 The Maintenance of the Competence Ontology Since the competence acquisition is a continuous process, the competences ontology has also to be up-to-date. During their professional life, the employees maintain and improve their experiences by trainings or by practical experiences. So, new competences can appear, associated for example to new concepts integrated in the domain ontology. For a user for whom, a document introducing new concepts has been delivered, one can infer the existence of new competences that can be characterised at the beginning, by a very low expertise level and by a verb of capability, like “know”. Finally, we support the idea of an integration of the dissemination service with the querying system, so that the first one can consider the habits of use of the second one. The behaviours and reactions of a user, when he processes queries of documents can be considered, by a learning process, to adjust the depth of the proximal zone of development for each user and consequently, to improve the personalization of the dissemination.
7 Conclusion and Future Work Delivering a new document to the appropriate users means to basically judging the relevance of the semantic content of the document in relation to the users competences. We had shown in this paper the importance, in this documentary dissemination service, of the integration of an architecture of ontologies. However, the existence of new documents, having new key terms of the domain, implies the emergence of gaps inside the domain ontology, in the absence of a progressive evolution process of the ontology. In fact, this one has to integrate the new concepts to assure a robust annotation of documents, i.e a form of semantic representation that is sensibly complete. In regard to the complexity and the cost of this maintenance process of the domain ontology, the usefulness of such assistance tools for maintenance such as the ones described in this paper is more and more confirmed. For this purpose, our future works will go deeper in the process of maintenance by the support of ONTOLOGICO chain of processes and will present more contributions of this chain.
Domain and Competences Ontologies and Their Maintenance
97
References 1. Abecker, Andreas; Bernardi, Ansgar; Hinkelmann, Knut; Kuhn, Otto, and Sintek, Michael, 1998. Toward a Technology for Organizational Memories. IEEE Intelligent Systems. 1998; 1340-48. 2. Achaba, Hicham : Système de diffusion documentaire basé sur des ontologies. Mémoire de maîtrise en informatique, Université du Québec à Montréal, 2004. 3. Berners-Lee, Tim; Hendler, James, and Lassila, Ora. The semantic Web. Scientific American. 2001 May; 284(5):35; ISSN: 00368733. 4. Biskri, I. and Meunier, J.G. (2002) “SATIM : Système d’Analyse et de Traitement de l’Information Multidimensionnelle”, Proceedings of JADT 2002, St-Malo, France, 185-196. 5. Deerwester, S., Dumais, S. T., Furnas, G. W., Landauer, T. K., Harshman, R. (1990) “Indexing by latent semantic analysis”. JASIS, 41(6), 391-407. 6. Firth, J. R. 1957. A synopsis of linguistic theory 1930–1955. In Studies in Linguistic Analysis,Philological Society, Oxford, England, 1–32. (Reprinted in F. R. Palmer (ed.), Selected Papers of J. R. Firth 1952–1959, Longman, London, England, 1968). 7. Gargouri, Y., Lefebvre, B. et Meunier, J.G. « ONTOLOGICO : vers un outil d'assistance au développement itératif des ontologies ». Journées d’études sur Terminologie, Ontologie, et Représentation des connaissances (TERMINO’2004). Lyon, France, janvier 2004. 8. Gargouri, Y., Lefebvre, B. et Meunier, J.G. « Ontology Maintenance using Textual Analysis », SCI’2003 : The 7th World Multiconference Systems, Cybernetics and Informatics, p. 248 - 253, Orlando, Florida, July 2003 - Systems, Cybernetics and Informatics Journal. 9. Golub, G. H., Reinsch, C. (1969) “Singular value decomposition and least squares solutions”. Handbook for Automatic Computation, Springer-Verlag, New York, 134-151. 10. Lefebvre, B., Tadié, S. Gauthier, G. , Duc, T.H., Achaba, H. « Competence ontology for domain knowledge dissemination and retrieval », Workshop on Grid Learning Services, GLS’2004, Maceio, Brazil, August 30, 2004, pp. 94-104. 11. Liebowitz J. : Knowledge management handbook, Boca Raton, Fla, CRC Press, 1999. 12. Nkambou, R. : Modélisation des connaissances de la matière dans un système tutoriel intelligent : modèles, outils et applications. 1996. 13. Noy N. F., Sintek M., Decker S., Crubezy M. and others, "Creating semantic Web contents with protege-2000", IEEE Intelligent Systems, vol. 16, no 2, March 2001-April 2001, p. 60. 14. Paquette Gilbert 02. Modélisation des connaissances et des compétences : un langage graphique pour conevoir et apprendre. Sainte-Foy: Presses de l'Université du Québec; 2002; 15. Razmerita, L.; Angehrn, A., and Maedche, A. Ontology based user modeling for Knowledge Management Systems. Proceedings of the User Modeling Conference; Pittsburgh, USA. Springer-Verlag; 2003: 213-217. 16. Rubenstein-Montano B., Liebowitz J., Buchwalter J., Mccaw D., Newman B. and others, "A systems thinking framework for knowledge management", Decision Support Systems, vol. 31, no 1, May 2001, p. 5. 17. Vygotski, L. S., 1934, Traduction française : Pensée et langage, Paris, Messidor, 1985. Réédition: Editions La Dispute, 1997.
Modelling Power and Trust for Knowledge Distribution: An Argumentative Approach Carlos Iv´an Ches˜ nevar1 , Ram´on F. Brena2 , and Jos´e Luis Aguirre2 1
Artificial Intelligence Research Group, Department of Computer Science, Universitat de Lleida, Campus Cappont, C/Jaume II, 69, E-25001 Lleida, Spain [email protected] 2 Centro de Sistemas Inteligentes, Tecnol´ ogico de Monterrey, 64849 Monterrey, N.L., M´exico {ramon.brena, jlaguirre}@itesm.mx
Abstract. Knowledge and Information distribution, which is one of the main processes in Knowledge Management, is greatly affected by power explicit relations, as well as by implicit relations like trust. Making decisions about whether to deliver or not a specific piece of information to users on the basis of a rationally justified procedure under potentially conflicting policies for power and trust relations is indeed a challenging problem. In this paper we model power relations, as well as delegation and trust, in terms of an argumentation formalism, in such a way that a dialectical process works as a decision core, which is used in combination with the existing knowledge and an information distribution system. A detailed example is presented and an implementation reported. Keywords: Argumentation, reputation, knowledge distribution, multiagent systems, trust.
1
Introduction and Motivations
Power relations inside organizations have been the subject of many studies in Knowledge Management (KM) [1,2]. Even though modern organization theories emphasize flexibility and learning over rigid hierarchical structures [3,4], formal power relations have remained as a key component in any large organization. A counterpart of formal relations are informal relations in organizations, notably trust relations [5], which are normally not represented in the organization’s formal structure, but are nonetheless extremely important. Trust and reputation relations have been formalized for computational purposes [6,7] with the goal of defining what is believed to be reliable in the context of such informal relations. Disseminating pieces of information and knowledge (IK) among the members of large organizations is a well known problem in KM [8], involving several decision-making processes. Indeed, a central concern in KM is to facilitate knowledge flow within relevant actors within an organization. Organizations typically have different criteria establishing their information distribution policies, and in many real situations these policies conflict with each other. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 98–108, 2005. c Springer-Verlag Berlin Heidelberg 2005
Modelling Power and Trust for Knowledge Distribution
99
In previous research work [9,10] we have shown how a multiagent framework can been used for delivering highly customized notifications just-in-time to the adequate users in large distributed organizations. This paper extends that framework by incorporating the possibility of representing power and trust capabilities associated with the agents involved, thus encompassing both formal and informal relations in organizations. Conflicts emerging from potentially contradictory policies as well as from trust and empowerment issues are solved on the basis of a dialectical analysis whose outcome determines whether a particular information item should be delivered or not to a specific user.
2
Basic Concepts
We have developed [10,11] a multiagent-based system for disseminating pieces of IK among the members of a large or distributed organization. It is aimed to deliver the right IK to the adequate people just-in-time. IK is characterized by metadata (such as a content classification in terms of technical disciplines, intended audience, etc.) and users are characterized by profiles, which give the user function or position in the organization, rights and duties, interests, etc. Our agent model [10,11] includes a collections of Personal Agents (PA) which work on behalf of the members of the organization. They filter and deliver useful content according to user preferences. The Site Agent (SA) provides IK to the PAs, acting as a broker between them and Service agents, which collect and detect IK pieces that are supposed to be relevant for someone in the organization. Examples of service agents are the Web Service agents, which receive and process external requests, as well as monitor agents which are continuously monitoring sources of IK (web pages, databases, etc.). That knowledge is hierarchically described in the form of taxonomies, usually one for interest areas and one describing the organization structure. For example, in an academic institution, the interest areas could be the science domains in which the institution is specialized, and the organizational chart of the institution gives the organization structure. SAs are the heart of a “cluster” composed by one SA and several PAs served by the former. In an organization, clusters would be associated with departments, divisions, etc., depending on the size of them. Networks can be made up connecting several SAs. Distributed organizations like multinational companies would have a web of many connected SAs. Defeasible logic programming (DeLP) [12] is a general-purpose defeasible argumentation formalism based on logic programming, intended to model inconsistent and potentially contradictory knowledge. A defeasible logic program (in what follows just “program”) is a set P = (Π, Δ), where Π and Δ stand for sets of strict and defeasible knowledge, respectively. The set Π of strict knowledge involves strict rules of the form p ← q1 , . . . , qk and facts (strict rules with empty body), and it is assumed to be non-contradictory.1 The set Δ of defeasible knowledge involves defeasible rules of the form p −≺ − q1 , . . . , qk , which 1
Contradiction stands for entailing two complementary literals p and ∼ p (or p and not p) in extended logic programming [12].
100
C.I. Ches˜ nevar, R.F. Brena, and J.L. Aguirre
stands for “q1 , . . . qk provide a tentative reason to believe p.” The underlying logical language is that of extended logic programming, enriched with a special symbol “ −≺ − ” to denote defeasible rules. Both default and explicit negation are − ” is all that allowed (denoted not and ∼, resp.). Syntactically, the symbol “ −≺ distinguishes a defeasible rule p −≺ − q1 , . . . qk from a strict rule p ← q1 , . . . , qk . Deriving literals in DeLP results in the construction of arguments. Definition 1 (Argument). Given a program P, an argument A for a query q, denoted A, q , is a subset of ground instances of defeasible rules in P and a (possibly empty) set of default ground literals “not L”, such that: a) there exists a defeasible derivation for q from Π ∪ A; b) Π ∪ A is non-contradictory, and c) A is minimal wrt set inclusion. An argument A1 , Q1 is a sub-argument of another argument A2 , Q2 if A1 ⊆ A2 . The notion of defeasible derivation corresponds to the usual query-driven SLD derivation used in logic programming, performed by backward chaining on both strict and defeasible rules. Given a program P, an argument A, q can be attacked by counterarguments. Formally: Definition 2 (Counterargument–Defeat). An argument A1 , q1 is a counter-
argument for an argument A2 , q2 iff (a) There is an subargument A, q of A2 , q2 such that the set Π ∪ {q1 , q} is contradictory. (b) A literal not q1 is present in some rule in A1 .A partial order will be used as a preference criterion among conflicting arguments. An argument A1 , q1 is a defeater for an argument A2 , q2 if A1 , q1 counterargues A2 , q2 , and A1 , q1 is preferred over A2 , q2 wrt .
Specificity is used in DeLP as a syntax-based criterion among conflicting arguments, preferring those arguments which are more informed or more direct [13].2 An argumentation line starting in an argument A0 , Q0 (denoted λA0 ,q0 ) is a sequence [A0 , Q0 , A1 , Q1 , A2 , Q2 , . . . , An , Qn . . . ] that can be thought of as an exchange of arguments between two parties, a proponent (evenly-indexed arguments) and an opponent (oddly-indexed arguments). Each Ai , Qi is a defeater for the previous argument Ai−1 , Qi−1 in the sequence, i > 0. In order to avoid fallacious reasoning, dialectics imposes additional constraints (e.g. disallowing circular argumentation3) on such an argument exchange to be considered rationally valid. An argumentation line satisfying the above restrictions is called acceptable, and can be proven to be finite [12]. Given a program P and an initial argument A0 , Q0 , the set of all acceptable argumentation lines starting in A0 , Q0 accounts for a whole dialectical analysis for A0 , Q0 (ie., all possible dialogues rooted in A0 , Q0 ), formalized as a dialectical tree. Nodes in a dialectical tree TA0 ,Q0 can be marked as undefeated and defeated nodes (U-nodes and D-nodes, resp.). A tree TA0 ,Q0 will be marked as an and-or tree: all leaves in TA0 ,Q0 will be marked U-nodes (as they have no defeaters), and every inner node is to be marked as D-node iff it has at least one U-node as a child, and as U-node otherwise. An argument A0 , Q0 is ultimately accepted as valid (or warranted ) wrt a program P iff the root of its 2 3
It must be noted that other alternative partial orders could also be used. For an in-depth treatment of DeLP and its features the reader is referred to [12].
Modelling Power and Trust for Knowledge Distribution
101
associated dialectical tree TA0 ,Q0 is labeled as U-node. Solving a query q wrt a given program P accounts for determining whether q is supported by a warranted argument. Different answers for a query q are possible according to the associated status of warrant, in particular: (a) Believe q (resp. ∼q) when there is a warranted argument for q (resp. ∼ q) that follows from P; (b) Believe q is undecided whenever neither q nor ∼ q are supported by warranted arguments.4
3
Modelling Knowledge Distribution, Power and Trust
Consider a set I = {i1 , i2 , . . . , ik } of information items to be distributed among a set U = {u1 , . . . , us } of users. Every item i ∈ I could be delivered to some users in U . A distribution policy p can be formally defined as a mapping p : I → ℘(U ). Distributing an item i to a user u is compliant with a policy p when (i, {. . . , u, . . .}) ∈ p. Clearly policies are not usually formulated in this way, but instead they are specified by restrictions enforced by the organization (e.g. access rights). If P is a set of possible policies in the organization, given two policies p1 , p2 ∈ P , we say they are in conflict whenever (i, {. . . , u, . . .}) ∈ p1 but (i, {. . . , u, . . .}) ∈ p2 , or viceversa. A conflict means that an information item i cannot be compliant with two policies p1 and p2 at the same time. We can define a dominance partial order ≺ among possible policies in P , writing p1 ≺ p2 to indicate that a policy p2 is preferred over policy p1 in case they are in conflict. In this setting, the “information distribution problem” could then be recast as follows: Send every information item i ∈ I to a user u ∈ U following a distribution p iff p is compliant with every non-dominated policy p ∈ P .5 Our previous work on integrating defeasible argumentation with IK distribution was restricted to aspects like corporate hierarchies, domain classifications and individual preferences [10], leaving out some relevant aspects of modeling large organizations, namely the presence of different levels of trust and empowerment, which are the novel aspects considered in this paper. In our current proposal we consider some distinguished sets: a set U of users (user identifiers), a set I (implemented actually as a list) of specific information items to be delivered, a set S of information sources (usually other agents in the organization), a set P of permission levels (like “everybody”, “ceo”, etc.), and a set F of fields or areas. Every information item i ∈ I will have attributes, like a f ∈ F (which is related to i by the isAbout(i, f ) relation) and the source of that information item (related to i by the source(i, s) relation, with s ∈ S). A subset M ⊆ I corresponds to mandatory items; non-mandatory items are said to be optional. We assume that fields in the organization are organized in hierarchies by means of the subF ield(f1, f2 ) relation, with f1 , f2 ∈ F . In particular, the isAbout relation is based on computing the transitive closure of subF ield. 4 5
Computing warrant is non-contradictory [12]: if there is a warranted argument A, h based on a program P, then there is no warranted argument B, ∼ h based on P. Note that characterizing p depends on the specific sets U , I and P under consideration. Here we do not discuss the problem of finding out whether such a mapping actually exists, but rather focus on enforcing dominance on conflicting policies.
102
C.I. Ches˜ nevar, R.F. Brena, and J.L. Aguirre ALGORITHM DistributeItems {Executed by Site Agent AgS to decide distribution of items in I according to power & trust information available} INPUT: List I = [item1 , . . . , itemk ] of incoming items, DeLP programs PS , P1 , . . . , Pn OUTPUT: Item distribution to Personal Agents BEGIN := PS ∪ {inf o(item1 ), . . . , inf o(itemk )} PS {Encode incoming items as new facts for Site Agent} FOR every item item ∈ I FOR every Personal Agent Agi supervised by AgS Let P = PS ∪ PAgi Let s = source of item IF reputationAgi (S) > T hreshold THEN Using program P, solve query deliver(item, Agi ) IF deliver(Item, Agi ) is warranted THEN Send message item to agent Agi reputationAgi (S) ← reputationAgi (S) + EvalMsg(item, Agi ) END
Fig. 1. Algorithm for Knowledge Distribution using DeLP in a Site Agent
Users have attributes too, like permissions(u, p) with u ∈ U, p ∈ P . The organizational hierarchy is established through the subordinate(l1 , l2 ) relation, for permission levels li , and its transitive closure depends(l1 , l2 ). In order to be able to delegate power from an user u1 to another user u2 it is required that the user u2 depends on user u1 . This is captured by the can delegate relation. Trust is modeled using the relies(u, s, f ) relation, with u ∈ U , s ∈ S and f ∈ F , meaning that user u is confident about information items coming from source s when those items are about field f . We consider a low-level reputation management mechanism (see algorithm in Fig. 1) for numerically adjusting a reputation level; this is reflected in the knowledge represented at the logical level through the conf predicate. Finally, at the top level of our model we define the deliver(i, u) relation, which indicates that an item i is to be distributed to user u according to the knowledge available for the SA and the particular user profile associated with the user u. Other details can be found in the DeLP code given in Fig.3. As explained in Section 2, a Site Agent AgS is responsible for distributing IK among different PAs Ag1 , . . . Agn . We will use DeLP programs PAg1 , . . . , PAgn to represent user preferences associated with these agents, possibly based on trust relationships wrt other agents or parts of the organization. Knowledge in the Site Agent AgS will be represented by another program PS . In contrast with the knowledge available to PAs, PS will contain organizational corporate rules defining power and trust relationships (hierarchies, declarative power, etc.) as well as (possibly conflicting) policies for IK distribution among personal agents. Given a list I = [Item1 , . . . , Itemi ] of IK items to be distributed by the SA AgS among different PAs Ag1 , . . . , Agn , a distinguished predicate deliver(I, U ) will be used to determine which items in I are intended to be delivered to a specific user u ∈ U . This will be solved on the basis of a program P taking into account the SA’s knowledge, the metadata corresponding to the incoming items to be distributed and the personal preferences of the PAs involved. This is made explicit in the algorithm shown in Fig. 1. Note that every time a new item i is delivered to a PA Agi , the source s ∈ S where this item i comes from (probably
Modelling Power and Trust for Knowledge Distribution
103
another PA) is identified. Every PA has a built-in reputation function to assess the reliability of every possible source s. The reputation of s wrt Agi will be increased (resp. decreased) if the items delivered by s to Agi are satisfactory (resp. non-satisfactory) according to some acceptance criterion. Should the reputation of s be lower than a given threshold for Agi , then s is no longer considered to be a reliable source. 6 Solving queries based on the deliver predicate wrt the DeLP inference engine will automate the decision making process for SAs, providing a rationally justified decision even for very complex cases, as we will see in Section 4. The complexity of the algorithm in Fig. 1 is clearly polynomial, but of course there is a hidden cost in solving the query deliver(item, Agi ), which could depend on the number of items and agents involved.
4
A Worked Example
Next we present an illustrative example of the our approach. We assume a typical corporate environment where members (users) could have different rights within the organization (e.g. CEO, managers, supervisors, etc.), belonging to different organization areas (e.g. production, marketing, etc.). Case Study: Let us suppose that there are memos (items) which have to be delivered by a Site Agent to different users in the organization. The SA is required to take hierarchies into account, performing inheritance reasoning to make inferences: the manager can give orders to programmers, but programmers cannot give orders to the manager. Note that there could be exceptions to such hierarchies, e.g. if the CEO empowers a programmer to decide about software purchase. In our example, IK items made available from the organization to the SA will correspond to different memos, which will be encoded with a predicate inf o(Id, A, L, M, S), meaning that the memo with identifier Id is about area A and it can be accessed by users of at least level L. Other attributes associated with the memo are whether it is mandatory (M = 1) or optional (M = 0), and the source of origin S. Thus, the fact inf o(id3 , computers, manager, 0, peter) ← indicates that the memo id3 is about computers, it is intended at least for managers, it is not mandatory, and it has been produced by peter. Fig. 3 shows a sample DeLP code associated with a Site and a particular Personal agent. 7 Strict rules s1 to s10 characterize permissions and extract information from memos. Rule s1 defines that a user P is allowed access to item I if he/she has the required permissions, which are given as facts (f7 , f8 and f9 ). Permissions are also propagated using the strict rules s4 , s5 and s6 , where the binary predicate depends establishes the organization hierarchy, stating that the first argument person is (transitively) subordinated to the second one. This predicate is calculated as the transitive closure of a basic predicate subordinate (defined by facts f10 and f11 ), which establishes subordinate relationships pairwise. Thus, having e.g. granted permissions as CEO allows the CEO to have 6 7
For space reasons the computation of reputationAgi (S) is not analyzed in this paper. Note that we distinguish strict rules, defeasible rules, and facts by using si , di and fi as clause identifiers, respectively.
104
C.I. Ches˜ nevar, R.F. Brena, and J.L. Aguirre
access to every memo corresponding to lower level permissions. Rule s7 indicates when an organization member can delegate power on some other member. Delegation of power is also based on subordination relationships. Rule s2 and s3 define the predicate isAbout(I, A) as an information hierarchy among subfields. The basic case corresponds to a subfield for which specific information is available (rule s2 ), otherwise relationships in this hierarchy (facts f12 -f17 ) are used). Finally, rules s8 , s9 and s10 define auxiliary predicates source, mandatory and field (yes/no) which allow to extract these particular attributes from info facts, simplifying the subsequent analysis. Let us now consider the defeasible rules for our Site Agent. Rules d1 -d3 define when an item I should be delivered to a specific user U : either because it is interesting for U , or because it is mandatory for U , or because it comes from an authorized source. Rule d4 defines when something is interesting for a given user. Rule d5 -d7 define when a user relies on a source (another user) wrt some field F . Note that rule d7 establishes that unreliability is defined as “not ultimately provable as reliable” via default negation. Rules d8 -d11 define criteria for authorizing a source for delivering information on a field F : either because the source works on F (d9 ), or because the source got explicit power delegation from a superior (d11 ). Rule d10 establishes an exception to d9 (users who falsified reports are not authorized). Facts f1 -f3 characterize trust relationships (e.g. joe trusts mike about computers, but not about politics) stored by the SA.8 Similarly, facts f4 -f6 characterize explicit authorizations and delegations. Finally, let us consider the DeLP program associated with a particular PA (e.g. Joe). A number of facts represent Joe’s preferences (interest fields), and a defeasible rule d1 associated with his preferences indicates that he is not interested in memos from unreliable sources. Solving Power and Trust Conflicts Using Argumentation Let us assume that there is a list of information items [M emo1 , M emo2 , M emo3 ] corresponding to memos to be distributed by our Site Agent, which encodes organization policies as a DeLP program PS . By applying the algorithm given in Fig. 1, these items will be encoded temporarily as a set Pitems = {inf o(M emo1), inf o(M emo2 ), inf o(M emo3 )} (facts fa -fc in Fig. 3). For the sake of simplicity, we will assume that there is only one single Personal Agent involved, associated with a specific user joe, whose role is manager. Joe’s Personal Agent mirrors his preferences in terms of a DeLP program Pjoe = {d1 , f1 , f2 , f3 }, which together with PS and Pitems will provide the knowledge necessary to decide which IK items should be delivered to this specific user. Following the algorithm in Fig. 1, the Site Agent will have to solve the queries deliver(id1 , joe), deliver(id2 , joe) and deliver(id5 , joe) wrt the DeLP program PS ∪ Pitems ∪ Pjoe . We will show next how every one of these queries is solved in different examples that show how DeLP deals with conflicts among organization policies and user preferences. 8
Such trust relationships among Personal Agents can be established on the basis of the reputation function mentioned in Section 3, computed by the Site Agent.
Modelling Power and Trust for Knowledge Distribution
105
Example 1. Consider the query deliver(id3 , joe). In this case joe is allowed to receive this item (s1 ), but it is neither of interest for him (d1 ) nor coming from an authorized person (d3 ). However, id3 is mandatory (fc ), and hence the Site Agent can − allowed(id3 , joe), compute an argument A1 , deliver(id3 , joe) = { deliver(id3 , joe) −≺ mandatory(id3 ) }. This argument has no defeaters, and hence it is warranted. Thus id3 will be delivered to joe. The corresponding dialectical tree has one node (Fig 2(i)). Example 2. Consider the query deliver(id1 , joe). For this query the DeLP inference engine will find the argument B1 , deliver(id1 , joe) with B1 = { deliver(id1 , joe) −≺ − allowed(id1 , joe),interest(id1 , joe); interest(id1 , joe) −≺ − isAbout(id1 , politics), interestF ield(politics, joe)}. However, B1 , deliver(id1 , joe) has as defeater the argu− isAbout(id1 ,pol− ment B2 , ∼ interest(id1 , joe) , with B2 = {∼ interest(id1 , joe) −≺ itics), interestF ield(politics, joe),source(id1 , mike), ∼ relies(joe, mike, politics); − not relies(joe, mike, politics)9 } (according to joe’s con∼ relies(joe, mike, politics)−≺ fidence criteria, joe has no confidence on mike when he talks about politics, so the source is unreliable.) In this case, TB1 , distribute(id1 , joe) has two nodes in a single branch (see Fig. 2(ii)). There are no other arguments to consider. Therefore the answer to the query is No, and hence the Site Agent will not deliver id1 to joe. Example 3. Consider the query deliver(id2 , joe). Although joe is allowed to receive this item (s1 ), note that it is neither of interest for joe (d1 ) nor mandatory (d2 ). However, in this case there is an argument C1 , deliver(id2 , joe) with − allowed(id2 , joe),authorized deliver(id2 , joe); C1 = { deliver(id2 , joe) −≺ − source(id2 , peter), f ield(id2 , hardware), authorized deliver(id2 , joe) −≺ isauthorized(peter, hardware) ; − worksOn(peter, hardware) }. isauthorized(peter, hardware) −≺
But C1 , deliver(id2 , joe) has as a defeater C2 , ∼ isauthorized(peter, hardware) , with − worksOn(peter, hardware), C2 = {∼ isauthorized(peter, hardware) −≺ f alsif ied reports(peter) }. (peter falsified reports, hence he should not be authorized). However this is superseded by dana’s delegation, with an argument C3 , isauthorized(peter, hardware) , where − authorized(dana, hardware), C3 = {isauthorized(peter, hardware) −≺ delegates(dana, peter), can delegate(dana, peter) }.
In this case, the dialectical tree TC1 , distribute(id2 , joe) has three nodes (see Fig. 2(iii)). Therefore the answer to the query is Yes, and the Site Agent will deliver id2 to joe.
A1 , deliver(id3 , joe)U
(i)
B1 , deliver(id1 , joe)D C1 , deliver(id2 , joe)U | | B2 , ∼ interest(id1 , joe)U C2 , ∼ isauthorized(peter, hardware)D | C3 , isauthorized(peter, hardware)U (ii) (iii)
Fig. 2. Dialectical trees for queries deliver(id3 , joe) (examples 1,2 and 3) 9
deliver(id1 , joe),
deliver(id2 , joe)
and
The literal “not relies(joe, mike, politics)” holds as “relies(joe, mike, politics)” is not supported by a (warranted) argument.
106
C.I. Ches˜ nevar, R.F. Brena, and J.L. Aguirre
Site Agent Knowledge s1 ) allowed(I, U ) ← info(I, A, L, M, S), permissions(U, L). isAbout(I, A) ← info(I, A, L, M, T, S) s2 ) s3 ) isAbout(I, A) ← subF ield(SuperA, A), isAbout(I, SuperA). permissions(U, X) ← depends(X, Y ), permissions(U, Y ). s4 ) depends(X, Y ) ← subordinate(X, Y ). s5 ) depends(X, Z) ← subordinate(Y, Z), depends(X, Y ). s6 ) s7 ) can delegate(U1, U 2) ← depends(U2, U 1). source(I, S) ← info(I, , , , S). s8 ) mandatory(I) ← info(I, , , 1, ). s9 ) f ield(I, F ) ← info(I, F, , , ). s10 ) − allowed(I, U ), interest(I, U ). d1 ) deliver(I, U ) −≺ − allowed(I, U ), mandatory(I). deliver(I, U ) −≺ d2 ) − allowed(I, U ), authorized deliver(I, U ). d3 ) deliver(I, U ) −≺ − isAbout(I, A), interestF ield(A, U ). interest(I, U ) −≺ d4 ) − conf (U, S, F ). relies(U, S, F ) −≺ d5 ) − conf (U, S1, F ), relies(S1, S, F ). d6 ) relies(U, S, F ) −≺ − not relies(U, S, F ). ∼ relies(U, S, F ) −≺ d7 ) − source(I, S), f ield(I, F ), isauthorized(S, F ). d8 ) authorized deliver(I) −≺ − worksOn(S, F ). isauthorized(S, F ) −≺ d9 ) − worksOn(S, F ), f alsif ied reports(S). d10 ) ∼ isauthorized(S, F ) −≺ − authorized(S1, F ), delegates(S1, S),can delegate(S1, S). d11 ) isauthorized(S, F ) −≺ Facts about Confidence, Authorizations, and Power delegation f4 ) ∼ authorized(peter, sof tware). f1 ) conf (joe, mike, computers). authorized(dana, hardware). f2 ) ∼ conf (joe, mike, politics) f5 ) delegates(dana, peter). f3 ) conf (mike, bill, computers). f6 ) f alsif ied reports(peter). fx ) Facts about Permissions, Roles and Hierarchies f7 ) permissions(joe, manager) ← f13 ) subF ield(processors, hardware) ← permissions(peter, everybody) ← f8 ) f14 ) subF ield(sof tware, computers) ← permissions(dana, ceo) ← f9 ) f15 ) subF ield(programing, sof tware) ← f10 ) subordinate(everybody, manager) ← f16 ) subF ield(computers, inf otopics) ← subordinate(manager, ceo) ← subF ield(politics, inf otopics) ← f11 ) f17 ) worksOn(peter, sof tware) ← f12 ) subF ield(hardware, computers) ← f18 )
Information Items as facts
PA Knowledge – user preferences
fa ) inf o(id1 , politics, everybody, 0, mike) ← fb ) inf o(id2 , hardware, manager, 0, peter) ← fc ) inf o(id3 , processors, manager, 1, mary) ←
− isAbout(I, A), d1 ) ∼ interest(I, joe) −≺ interestF ield(A, joe), source(I, S), ∼ relies(joe, S, A). f1 ) interestF ield(computers, joe) ← f2 ) ∼ interestF ield(hardware, joe) ← interestF ield(politics, joe) ← f3 )
Fig. 3. DeLP code for a Site Agent and a Personal Agent in JITIK
5
Related Work and Conclusions
In this paper we have extended the previous proposal in [10] for knowledge distribution in large organizations by incorporating the representation of power and trust capabilities explicitly by means of defeasible logic programming. As we have shown, the main advantage obtained is an increased flexibility in modelling different normative situations in organizations and trust relationships. Potentially contradictory knowledge involved in such aspects is suitably handled by the DeLP inference engine. To the best of our knowledge there are no similar approaches as the one presented in this paper. In other approaches related to Virtual Organizations [14,15] a central concern is also to monitor information flow among members wishing to cooperate on a shared project.
Modelling Power and Trust for Knowledge Distribution
107
An implementation of the IK distribution system that contains the Site Agent, the Personal Agents, an Ontology Agent and various Service Agents (web monitoring and others) has been reported elsewhere [9], using the Jade agent platform [16]. Our experiments regarding this integration of IK distribution with defeasible argumentation for modelling power and trust relationships only account as a “proof of concept” prototype, as we have not been able yet to carry out thorough evaluations in the context of a real-world application. In particular, the sample problem presented in Section 4 was encoded and solved successfully using a Java-based DeLP environment.10 Part of our current work is focused on adapting the approach proposed in this paper into a truly distributed algorithm, which could improve both the multiagent nature of the procedure as well as its performance and scalability.
Acknowledgments The authors would like to thank anonymous reviewers for their suggestions. This work was supported by the Monterrey Tech CAT-011 research chair, by Projects TIC2003-00950, TIN 2004-07933-C03-03, by Ram´on y Cajal Program (MCyT, Spain) and by CONICET (Argentina).
References 1. 2. 3. 4.
5.
6.
7. 8. 9.
10.
10
Liebowitz, J., Wilcox, L.: Knowledge Management. CRC Press (1997) Horibe, F.: Managing Knowledge Workers. John Wiley and Sons (1999) Liebowitz, J., Beckman, T.: Knowledge Organizations. St. Lucie Press (1998) Atkinson, R., Court, R., Ward, J.: The knowledge economy: Knowledge producers and knowledge users. The New Economic Index (1998) http://www. neweconomyindex.org/ Gelati, J., Governatori, G., Rotolo, A., Sartor, G.: Declarative power, representation and mandate: A formal analysis. In: Proceedings of 15th Conf. on Legal Knowledge and Inf. Systems, IOS Press (2002) 41–52 Sabater, J., Sierra, C.: REGRET: reputation in gregarious societies. In M¨ uller, J.P., Andre, E., Sen, S., Frasson, C., eds.: Proceedings of the Fifth International Conference on Autonomous Agents, Montreal, Canada, ACM Press (2001) 194–195 Mui, L.: Computational Models of Trust and Reputation: Agents, Evolutionary Games, and Social Networks. PhD thesis, MIT (2003) Borghoff, U., Pareschi, R.: Information Technology for Knowledge Management. Springer (1998) Brena, R., Aguirre, J.L., Trevino, A.C.: Just-in-time information and knowledge: Agent technology for km bussiness process. In: Proc. of the 2001 IEEE Conference on Systems, Man and Cybernetics, Tucson, Arizona, IEEE Press (2001) Ches˜ nevar, C., Brena, R., Aguirre, J.: Knowledge distribution in large organizations using defeasible logic programming. In: Proc. 18th Canadian Conf. on AI (in LNCS 3501, Springer). (2005) 244–256
See http://cs.uns.edu.ar/∼ags/DLP/ for details.
108
C.I. Ches˜ nevar, R.F. Brena, and J.L. Aguirre
11. Aguirre, J., Brena, R., Cantu, F.: Multiagent-based knowledge networks. Expert Systems with Applications 20 (2001) 65–75 12. Garc´ıa, A., Simari, G.: Defeasible Logic Programming: An Argumentative Approach. Theory and Practice of Logic Programming 4 (2004) 95–138 13. Simari, G., Loui, R.: A Mathematical Treatment of Defeasible Reasoning and its Implementation. Art. Intelligence 53 (1992) 125–157 14. Wasson, G., Humphrey, M.: Toward explicit policy management for virtual organizations. In: IEEE Workshop on Policies for Distributed Systems and Network (POLICY ’03). (2003) 173– 182 15. Norman, T., Preece, A., Chalmers, S., Jennings, N., Luck, M., Dang, V., Nguyen, T., Deora, V., Shao, J., Gray, W., Fiddian, N.: Conoise: Agent-based formation of virtual organisations. In: Proc. of the 23rd Intl. Conf. on Innovative Techniques and Applications of AI. (2003) 353–366 16. Bellifemine, F., Poggi, A., Rimassa, G.: Jade - a fipa-compliant agent framework. In: Proceedings of PAAM99, London. (1999)
Application of ASP for Agent Modelling in CSCL Environments Gerardo Ayala, Magdalena Ortiz, and Mauricio Osorio Centro de Investigación en Tecnologías de Información, y Automatización, CENTIA, Universidad de las Américas, Puebla, México [email protected]
Abstract. This paper presents the pertinence of the use of the Answer Set Programming (ASP) formalism for developing a computational model of a software agent for Computer Supported Collaborative Learning (CSCL) environments. This analytic model is based on a representation of for agent’s beliefs about the learner and the domain, together with the corresponding inference system with the appropriate rules to derive new beliefs about the capabilities of the learner, and its use in order to support effective collaboration and maintain learning possibilities for the group members. The model provides a representation of the structural knowledge frontier and the social knowledge frontier of the learner, which are the components for the definition of the learner's zone of proximal development (zpd). Based on the zpd of its learner the agent can propose her a learning task and maintain the zpd for the learner in the group. The complete code of the model is presented in the declarative language of DLV, a logic programming language for implementing ASP models.
1 Analytic Models and CSCL Analytic models are considered a way to model group activities in Computer Supported Collaborative Learning (CSCL) environments. According to Hoppe & Ploetzner [1] an analytic model, in the context of collaborative learning environments, is a “…formally represented computational artifact that can be used to simulate, reconstruct, or analyze aspects of actions or inter-actions occurring in groups". Logical propositions have been useful to represent computational models, like the proposal for student modelling by Self [2] that integrates computational and theoretical aspects for modelling the domain, reasoning, monitoring and reflection levels of an agent. Self [3] also proposed some computational models to represent a viewpoint as a set of beliefs held by the agent. In this approach, the domain model is considered as a viewpoint, and the student model as an incremental viewpoint based on the domain. Logic programming was used in the GRACILE project [4] implementing intelligent agents for a CSCL environment in PROLOG. Declarative logic programming is widely accepted for the representation and manipulation of knowledge and belief systems. Beliefs systems for software agents deal naturally with incomplete information and non-monotonicity in the reasoning process. Nowadays, Answer Set Programming (ASP) is a well logic programming formalism known and accepted for non-monotonic reasoning and reasoning with A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 109 – 118, 2005. © Springer-Verlag Berlin Heidelberg 2005
110
G. Ayala, M. Ortiz, and M. Osorio
incomplete information [5]. However, there are few real applications based on ASP an none concerning learning environments. In the context of agent based Computer Supported Collaborative Learning (CSCL) environments, logic programming allow us a more human-like heuristic approach for learner modelling and reasoning on learning opportunities and intelligent task proposals for the learners in a group. From the logic and formalization approaches, we have been working on the application of the answer sets programming framework for supporting collaboration in agent-based CSCL environments [6, 7] because its convenience for the representation and manipulation of the beliefs of the agent about the capabilities of the learners. This paper presents the analytical model of an agent for CSCL environments, based on the ASP formalism. The model is presented in DLV, a system for implementing ASP models. We propose a representation schema for the agent’s beliefs about the learner and the domain, together with the corresponding inference system with the appropriate rules to derive new beliefs about the capabilities of the learner and its use in order to support effective collaboration and maintain learning possibilities for the group members.
2 Modelling with ASP Answer Set Programming (ASP) has been recognized as an important contribution in the areas of Logic Programming and Artificial Intelligence [5]. Nowadays, there is a significant amount of research work inspired on this formalism, well known and accepted for non-monotonic reasoning. ASP is more expressive than normal (disjunction free) logic programming and allow us to deal with uncertainty. ASP has two types of negation: weak negation (not x) and strong negation (~x). Using weak negation, not x in interpreted as "there is no evidence of x", while using strong negation, ~x means "there is evidence that x is false". Because beliefs can not be treated correctly in classical logic (PROLOG), ASP is useful as a logical framework for agent modelling. ASP allows us to have a direct and clear representation of the beliefs of an agent, especially in dynamic situations, incomplete information and uncertainty. 2.1 DLV DLV is a system for answer set programming [8]. The computational model of our agent is implemented in DLV, based on the ASP formalism. The result of a computation is a set of models, each one as a consistent explanation of the world, as far as the system can derive it. DLV tries to find all the models of the world which correctly and consistently explain the facts and rules of the program. A model assigns a truth value to each atom appearing in the program, and is represented as a set of atoms that are true in a certain model. If a program is inconsistent there will be no model. A model is considered an epistemic state of the agent, as a closed theory under the logic defined by a program [6]. Each model is interpreted as the implicit (derivable) and explicit beliefs of the agent.
Application of ASP for Agent Modelling in CSCL Environments
111
2.2 Agent Modelling Using DLV We are applying DLV as a logical framework for agent modelling in CSCL environments. DLV allows us to have a direct and clear representation of the structure of the domain, and the beliefs of the agent about the learner's capabilities and learning possibilities in a group. The advantages of using DLV as a methodology of agent modelling for CSCL environments are: a) have a specification of the model as a set of rules and testing them with facts, in order to obtain correct and consistent models that ensure the coherence of the agent model; b) use double negation for derivation of beliefs under uncertainty and incomplete information. This is useful for representing the beliefs of the agent about the capabilities of its learner; c) use integrity constraints to represent conditions that can make the model inconsistent; d) have a formalization of the model. In the following sections we present in DLV the formalization of our agent model for CSCL environments. The results of several simulations of the model show that it keeps the zones of proximal development of the learners by determining an appropriate task proposal to the members of a learning group.
3 Pedagogical Organization of the Domain Knowledge Our model is valid for structured knowledge domains, where we have knowledge elements (i.e. grammar rules for a second language collaborative learning environment) that can be defined and pedagogically or epistemologically organized. A knowledge element has an identification, which is represented by the predicate: knowledgeElement(knowledgeElementId).
For the pedagogical and epistemological organization of the knowledge elements, we adopt a genetic graph approach [9]. The genetic graph is a very powerful structure for determining the learner's a knowledge frontier and learning opportunities. We have the following predicates and rules for its definition: generalization(knowledgeElementId, generalKnowledgeElementId). specialization(KnowledgeElementId, SpecializedKnowledgeElementId):generalization(SpecializedKnowledgeElementId, KnowledgeElementId). refinement(knowledgeElementId, refinedKnowledgeElementId). simplification(KnowledgeElementId, SimpleKnowledgeElementId) :refinement(SimpleKnowledgeElementId, KnowledgeElementId). analogy(knowledgeElementId, analogKnowledgeElementId). analogy(KnowledgeElementId, analogKnowledgeElementId) :analogy(analogKnowledgeElementId, KnowledgeElementId).
112
G. Ayala, M. Ortiz, and M. Osorio
3.1 Knowledge Application: Situations and Tasks A knowledge element is applicable in a given situation. For example, a grammar rule, as a knowledge element, is applied in a situation like a speech act, like “ask somebody to do something” or “apologize”. We have the following predicates to represent it: situation(situationId). applicable(knowledgeElementId, situationId).
We use integrity constraints in DVL in order to represent that if there is no information of a knowledge element applicable in a given situation, then the model is inconsistent: :- applicable(KnowledgeElementId,_), not knowledgeElement(KnowledgeElementId).
In the same way, if there is no information of a situation where a given knowledge element is applied, then the model is also inconsistent: :- applicable(_,SituationId), not situation(SituationId).
A task is a collaborative learning activity and implies one or more situations. This is represented by the predicates: task(taskId) implies(taskId, situationId).
In a similar way, if there is no information of a situation which corresponds to a task, then the model is inconsistent. Also, it will be inconsistent if there is no information of a task for a situation: :-implies(_, SituationId), not situation(SituationId). :-implies(TaskId, _), not task(TaskId).
4 Modelling the Learner and Her Learning Opportunities The agent identifies a learner with the predicate learner(learnerId). The set of beliefs concerning the learner capabilities corresponds to the beliefs of the agent about its learner's actual development level [10]. The belief that the learner is capable of apply a knowledge element of the domain is represented by: capability(learnerId, knowledgeElementId).
With the model we can derive new beliefs using derivation rules. In these rules the use of double negation allows the derivation with incomplete information. The agent believes that the learner is capable of applying a knowledge element if it believes that she is able to apply a knowledge element considered its generalization, and there is no evidence that the learner is not able to apply it: capability(LearnerId, KnowledgeElementId) :capability(LearnerId, GeneralKnowledgeElementId), specialization(GeneralKnowledgeElementId, KnowledgeElementId), not ~capability(LearnerId, KnowledgeElementId).
Application of ASP for Agent Modelling in CSCL Environments
113
Also, the agent will believe that the learner is capable of applying a knowledge element if she is able to apply a knowledge element considered its simplification, and there is no evidence that the learner is not able to apply it: capability(LearnerId, SimpleKnowledgeElementId) :capability(LearnerId, KnowledgeElementId), simplification(KnowledgeElementId,SimpleKnowledgeElementId), not ~capability(LearnerId, SimpleKnowledgeElementId).
When considered appropriate, the predicate ~capability(learnerId, knowledgeElementId) can be included when there is evidence that the learner is not able to apply the corresponding knowledge element. 4.1 Structural Knowledge Frontier The structural knowledge frontier is based on the concept of "knowledge frontier" of the genetic graph [9] and was used successfully in the GRACILE project [11] We call it structural knowledge frontier since it depends only in the genetic graph structure, and also in order to make the difference with the social knowledge frontier. A knowledge element is part of the learner’s structural knowledge frontier when there is no evidence that the learner is able to apply it, and the agent believes that she is able to apply another knowledge element, which is genetically related to the one in question. In the case of the generalization relation the rule is: structuralKnowledgeFrontier(LearnerId, KnowledgeElementId) :capability(LearnerId, RelatedKnowledgeElementId) , generalization(RelatedKnowledgeElementId, KnowledgeElementId), not capability(LearnerId, KnowledgeElementId).
The rest of the rules are similar, making reference to the refinement, analogy, simplification and specialization genetic relations. Also, a knowledge element will be part of the learner’s structural knowledge frontier if there is no evidence that the learner is able to apply it, and is considered an element of the basic knowledge set. We consider members of the basic knowledge set those knowledge elements which are not generalizations or refinements: structuralKnowledgeFrontier(LearnerId, KnowledgeElementId):basicKnowledge(KnowledgeElementId), not capability(LearnerId, KnowledgeElementId), knowledgeElement(KnowledgeElementId), learner(LearnerId).
4.2 Social Knowledge Frontier The concept of social knowledge frontier is based on the assumption that there are social issues that make the learners of a group to learn some knowledge elements first and more easily than others. Those issues may be the situations of their application, the relevance of it (be capable to apply the knowledge element in order to be a productive member in the group) or the nature and characteristics of it. For the agent, a knowledge element is part of the social knowledge frontier of the learner if there is no evidence that the learner is able to apply it, but the agent believes that other learner in her group does. The rule is the following:
114
G. Ayala, M. Ortiz, and M. Osorio
socialKnowledgeFrontier(LearnerId, KnowledgeElementId):not capability(LearnerId, KnowledgeElementId), capability(OtherLearnerId, KnowledgeElementId), knowledgeElement(KnowledgeElementId), learner(LearnerId), learner(OtherLearnerId), LearnerId OtherLearnerId.
The social knowledge frontier implies the cooperation among agents, sharing their beliefs in their learner models. 4.3 Collaborative Learning Opportunities In our model, the learning plan, and therefore the tasks proposals to the learner by her agent, is based on the representation of her zone of proximal development [10] or zpd. The actual development level of the learner is the set of beliefs concerning her capabilities in the domain. The potential development level corresponds to the structural knowledge frontier. A knowledge element is part of the zpd of the learner if is member of both, her structural knowledge frontier and her social knowledge frontier. The rule is: zpd(LearnerId, KnowledgeElementId) :structuralKnowledgeFrontier(LearnerId, KnowledgeElementId), socialKnowledgeFrontier(LearnerId, KnowledgeElementId).
4.4 Planning Individual and Collaborative Learning Activities The learning plan of a learner is used in order to generate appropriate tasks proposals, and consists of the knowledge elements considered in her zpd: learningPlan(LearnerId, KnowledgeElementId):zpd(LearnerId, KnowledgeElementId).
However, in the case when the learner does not have a zpd, her learning plan will be her structural knowledge frontier (potential development level): learningPlan (LearnerId, KnowledgeElementId):not hasZpd(LearnerId), structuralKnowledgeFrontier(LearnerId, KnowledgeElementId).
The learning plan is individual. In order to keep a zpd for the members of the learning group, it is necessary to have an individual learning plan which also supports the maintenance of a zpd for the other learners in the group. This provides more learning possibilities to the group and therefore maintenance of the motivation to participate. We defined the group supportive learning plan as the set of knowledge elements considered part of the learning plan of the learner and part of the structural knowledge frontier of another learner, who has no zpd. groupSupportiveLearningPlan(LearnerId, KnowledgeElementId):not hasZpd(OtherLearnerId), learningPlan (LearnerId, KnowledgeElementId), structuralKnowledgeFrontier(OtherLearnerId, KnowledgeElementId), LearnerId OtherLearnerId.
Application of ASP for Agent Modelling in CSCL Environments
115
5 Learning Task Proposals from the Agent A learning task is defined as the cooperation of two learners, each one applying a knowledge element in a corresponding situation that occurs in the task. Once the agent has a representation of the learning plan of its learner, the next step is to propose her a task, based on that. First, the agent must determine if there is possible to assign a task based on the learner's group supportive learning plan. These tasks are called group supportive tasks. Working in a group supportive task, the learner cooperates with other learner trying to apply a knowledge element of her group supportive learning plan, in the corresponding situation, while the other learner cooperates by applying a knowledge element in his learning plan: groupSupportiveTask(LearnerId, KnowledgeElementId, SituationId, OtherLearnerId,OtherKnowledgeElementId, OtherSituationId, Task):groupSupportiveLearningProposal(LearnerId, KnowledgeElementId), learningPlan (OtherLearnerId, OtherKnowledgeElementId), KnowledgeElementId OtherKnowledgeElementId, LearnerId OtherLearnerId, applicable(KnowledgeElementId, SituationId), applicable(OtherKnowledgeElementId, OtherSituationId), implies(SituationId, Task), implies(OtherSituationId, Task). hasGroupSupportiveTask(LearnerId):groupSupportiveTask(LearnerId,_,_,_,_,_,_).
In order to present an intelligent task proposal to the learner, the agent generates a set of task candidates. First, the agent will consider a group supportive task as a task candidate for its learner: taskCandidate(LearnerId, KnowledgeElementId, SituationId, OtherLearnerId, OtherKnowledgeElementId,OtherSituationId, Task):groupSupportiveTask(LearnerId, KnowledgeElementId, SituationId, OtherLearnerId, OtherKnowledgeElementId, OtherSituationId, Task).
However, if there is not a group supportive task for the learner, the task candidate will consist of the cooperation of the learner trying to apply a knowledge element of her learning plan, in the corresponding situation, while the other learner cooperates by applying a knowledge element in his learning plan. taskCandidate(LearnerId, KnowledgeElementId, SituationId, OtherLearnerId, OtherKnowledgeElementId, OtherSituationId, Task):not hasGroupSupportiveTask(LearnerId), learningPlan (LearnerId, KnowledgeElementId), learningPlan (OtherLearnerId, OtherKnowledgeElementId), KnowledgeElementId OtherKnowledgeElementId, LearnerId OtherLearnerId, applicable(KnowledgeElementId, SituationId), applicable(OtherKnowledgeElementId, OtherSituationId), implies(SituationId, Task), implies(OtherSituationId, Task).
116
G. Ayala, M. Ortiz, and M. Osorio
4
3 learner 1 learner 2
2
learner 3 learner 4
1
0 1
2
3
4
5
6
7
8
9
10
11
12
Fig.1. The agents maintain the zpd in a homogeneous group. (The x axis represents the number of session (time) and the y axis the number of knowledge elements in the learner’s ZPD).
4
3 new low
2
middle high
1
0 1
2
3
4
5
6
7
8
Fig. 2. The agents maintain the zpd in a heterogeneous group. (The x axis represents the number of session (time) and the y axis the number of knowledge elements in the learner´s ZPD).
The agent must propose its learner a set of learning tasks, and then the learner decides which one to commit to perform. The agent must present to the learner a list of tasks candidates. Among the set of task candidates, the agent determines some tasks as an intelligent proposal. A task proposal for a learner is a task candidate which implies that the knowledge element to be applied in the situation of the task is believed to be a capability of the other learner participating in the task. TaskProposal(LearnerId, KnowledgeElementId, SituationId, OtherLearnerId, OtherKnowledgeElementId, OtherSituationId, Task):taskCandidate(LearnerId, KnowledgeElementId, SituationId,
Application of ASP for Agent Modelling in CSCL Environments
117
OtherLearnerId, OtherKnowledgeElementId, OtherSituationId, Task), capability(OtherLearnerId, KnowledgeElementId), KnowledgeElementId OtherKnowledgeElementId, LearnerId OtherLearnerId.
6 Simulations and Results The computational model presented here is implemented in DLV. We performed several simulations, running the system in order to obtain a set of consistent and complete models for zones of proximal development and task proposals. At every time, we selected some changes in the capabilities of the virtual learners performing a task from those proposed by the agent. We ran the simulations with a domain of knowledge elements representing the grammar rules of Japanese Language, and we consider a small group of 4 learners. We ran all the simulations for the case of an homogeneous group as well as the case of an heterogeneous group. 6.1 Homogeneous Group These simulations considered a group of four learners, all new in the domain (none was believed to be able to apply a knowledge element in the beginning). After running the model with its corresponding actualizations on the learners capabilities with respect to the tasks proposed, the average of zpd for a member of the group was of 1.31 knowledge elements. Due to the group supportive task, few times the zpd was an empty set, and there was always a recovery in the following task (see figure 1). Concerning the tasks proposed, the 68.57% of the task proposals implied the zpd of a learner. The 50% of them implied the zpd of both learners involved, while 33% only the zpd of one learner and 16.66% tasks did not imply the zpd of any of the learners. 6.2 Heterogeneous Group In this case we considered a heterogeneous group of four learners with the initial state as follows: one new learner (0 knowledge elements learned), one low level learner (2 elements learned), other middle level (4 elements learned) and a high level learner (6 elements learned). We ran the model with the corresponding actualizations on the learners capabilities with respect to the tasks proposed. The average of zpd for a member of the group was of 1.21 knowledge elements. For the new learner the average zpd was 2.125 knowledge elements; for the low level 1.25, for the middle level it was 0.625 and for the high level learner 0.875 (see figure 2). The 72.08% of the task proposals implied the zpd of a learner. The 62.5% implied the zpd of both learners, while 25% only the zpd of one learner and there was a 12.5% of tasks which do not imply the zpd of the learners.
7 Conclusions ASP is a pertinent application of Artificial Intelligence to CSCL environments. The analytic model presented allows a formalization of notions of knowledge synergies in a
118
G. Ayala, M. Ortiz, and M. Osorio
learning group, which is a foundational issue for CSCL, from a computational point of view. DLV resulted in an appropriate system to elaborate a logically correct and consistent computational model of an agent for structured domain CSCL environments. The model proposed provides a representation of the structural knowledge frontier and the social knowledge frontier of the learner, which are the components for the definition of the learner's zone of proximal development. Based on the zpd of its learner the agent can propose her an intelligent learning task. Thanks to the concept of group supportive task the agents are able to maintain the zpd for the learners in the group. The analytical model, as it is presented in the paper, runs using the DLV system that can be easily downloaded from the internet [12].
References 1. Hoppe, U. H. & Ploetzner, R. Can Analytic models Support Learning in Groups (1998) 2. http://www.collide.info/Lehre/GestaltungInteraktiverLehrLernsysteme/downloads/esf98f.pdf 3. Self, J. Dormobile: a Vehicle for Metacognition, in Invited Talks, International Conference on Computers in Education ICCE'93, Taipei, Taiwan (1993). 4. Self, J. Computational Viewpoints, in Knowledge Negotiation, Moyse, R. & Elsom-Cook, M. (Eds.), Academic Press, (1992) 21-40 5. Ayala, G. & Yano, Y. GRACILE: A Framework for Collaborative Intelligent Learning Environments, Journal of the Japanese Society of Artificial Intelligence, Vol.10. 6. (1995) 156-170 6. Baral, C. Knowledge Representation, Reasoning and Declarative Problem Solving, Cambridge University Press, (2003). 7. Ortiz, M., Ayala, G. & Osorio, M. Formalizing the Learner Model for CSCL Environments, proceedings of the Fourth Mexican International Conference on Computer Science ENC 03, IEEE Computer Society and Mexican Society for Computer Science, (2003) 151-158. 8. Ortiz, M. An Application of Answer Sets Programming for Supporting Collaboration in Agent-based CSCL Enviroments, European Summer School of Logic, Language and Information ESSLLI03, Student Session, ( Balder Cate, Ed.) Vienna, Austria, (2003) . 9. Bihlmeyer, R., Faber,W., Ielpa, G. & Pfeifer, G. DLV- User Manual, (2004) 10. http://www.dbai.tuwien.ac.at/proj/dlv/man/ 11. Goldstein, I. P. The Genetic Graph: a representation for the evolution of procedural knowledge, Intelligent Tutoring Systems, D. Sleeman and J. S. Brown (Eds.) Academic Press, (1982) 51-77 12. Vygotsky, L. S. Mind in Society; the development of higher psychological processes, Harvard University Press, London, (1978). 13. Ayala, G. & Yano, Y. Learner Models for Supporting Awareness and Collaboration in a CSCL Environment. Intelligent Tutoring Systems, Lecture Notes in Computer Science 1086, Claude Frasson, Gilles Gauthier and Alan Lesgold (Eds.), Springer Verlag, (1996) 158-167. 14. Koch, C. The DLV Tutorial, (2004) 15. http://chkoch.home.cern.ch/chkoch/dlv/dlv_tutorial.html
Deductive Systems’ Representation and an Incompleteness Result in the Situation Calculus Pablo S´ aez Departamento de Ingenier´ıa Inform´ atica y Ciencia de la Computaci´ on, Facultad de Ingenier´ıa, University of Concepci´ on, Chile [email protected]
Abstract. It is shown in this paper a way of representing deductive systems using the situation calculus. The situation calculus is a family of first order languages with induction that allows the specification of evolving worlds and reasoning about them and has found a number of applications in AI. A method for the representation of formulae and of proofs is presented in which the induction axiom on states is used to represent structural induction on formulae and proofs. This paper’s formalizations are relevant for the purpose of meta reasoning and of automated or manual deduction in the context of situation calculus specifications. An example proof is given for the fact that no deductive system is complete for arbitrary situation calculus specifications (an expectable result).
1
Introduction
The situation calculus, as conceived in 1969 by Mc Carthy and Hayes in [6], is a family of first order languages that allows the specification of evolving worlds and reasoning about them. An important obstacle for the popularization of the situation calculus since 1969 was the frame problem [6], that is, the problem of efficiently specifying not only what changes in a particular domain but also what does not change. Reiter solved in 1991 in [8] the frame problem, based on previous works by Pednault [7] and Schubert [12]. Since then a number of interesting applications of the situation calculus have been found in areas such as databases [9,11], robotics [1], planning [2] and others. The situation calculus has been used as a modeling tool for the representation of the behaviour of databases [11], logic programs [5], and robots [3] among others. We provide in this paper a sound representation of deductive systems in the situation calculus. We show a general framework for that purpose, and study the example of Hilbert’s deductive system. A representation of formulae and of proofs is given in which the situation calculus induction axiom on states [10] is used to represent structural induction on formulae and on proofs. The situation calculus, being a first order language, has a formal semantics, and the solution
This research was supported by project 201.093.0041-1.0 of the Direcci´ on de Investigaci´ on, University of Concepci´ on.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 119–131, 2005. c Springer-Verlag Berlin Heidelberg 2005
120
P. S´ aez
to the frame problem has made it possible to develop a number of reasoning formalisms and applications based on it, for example [13,14]. Therefore a formal representation of deductive systems such as the one proposed in this paper can be used for the purpose of meta–reasoning, that is, reasoning about proofs, taking advantage of the above mentioned features of the situation calculus as a modelling and reasoning tool. We give an example of such an application, namely a situation calculus version of G¨ odel’s incompleteness proof. The result is namely the fact that no deductive system is sound and complete for situation calculus specifications. This result is not surprising, given the presence of the induction axiom on states, and moreover can be derived from previous results [4,5] (for instance in [5], Lin and Reiter show that logic programs can be encoded in the situation calculus, and since transitive closure can be easily encoded by a logic program and cannot be captured by first order logic, we have that the situation calculus is incomplete). The interest of this example proof, besides being a new, alternative one, is that it is more understandable than the original proof by G¨ odel for natural numbers, due to the tree-like structure of situations in the situation calculus, which is closer to the structure of a deductive system than that of natural numbers. Therefore it can be of pedagogical interest as well. The ideas contained in this paper can be easily applied to other deductive systems, such as resolution, term rewriting and so on. With a (practical) formalization of those deductive systems, such as the one proposed here, one could imagine mechanically proving theorems about mechanical theorem proving itself. In section 2 an overview of the situation calculus is given. In section 3 a method for representing first-order formulae in the situation calculus is shown. In section 4 a way of representing deductive systems in the situation calculus is described. In section 5 a proof is given for the fact that no deductive system is complete for the situation calculus. Finally, in section 6 some conclusions are given.
2
The Situation Calculus
We will consider throughout this paper as “situation calculus” essentially what is presented in [11] in terms of language, formulae and specifications. We make in this section a brief review of the concepts involved. The situation calculus is a family of second order languages in which the only second order formula is (1) below (all other formulae are first order). Its purpose is to allow the specification of evolving worlds and reasoning about them. Its ontological assumptions are that the world has an initial state named S0 (S0 is a constant of the language), that the world goes discretely from state to state and that the world can change its state only as an effect of actions performed by some agent. Let us describe a generic language L of the situation calculus family. L is a sorted second order language with equality with three disjoint sorts: sort action, sort situation and sort item. It includes a finite set of functions symbols
Deductive Systems’ Representation and an Incompleteness Result
121
of sort action that take arguments of sort item. For example term drop(box) may represent the action of dropping item box. L also includes infinitely many function symbols of sort item for each arity, none of which take an argument of sort situation. States of the world are called situations. The situation that results from the performance of action a at situation s is called do(a, s). Symbol do is a function symbol of sort situation that takes two arguments: one of sort action and another of sort situation. For example, if drop(box) is the action of dropping item box then do(drop(box), s1 ) is the situation that results from situation s1 after dropping item box. Functions do and S0 are the only functions of sort situation in L. Therefore situations are first order terms that are either S0 or do(a, s), where a is an action and s is another situation. Axiom (1) below states precisely this fact, namely that the only situations are those obtained from situation S0 by a finite number of applications of the do function. Axiom (1) is a part of every situation calculus specification. Besides the above described functions and constants, L includes a finite set of predicates that take among their arguments exactly one of sort situation, which is normally the last one. Those predicates are called fluents. For example, fluent on(x, y, s) may mean that item x is on item y at situation s, that is, on(x, y, s) represents a predicate that varies with time, from situation to situation. Also, L includes two distinguished predicate symbols: P oss(., .) and is in
. Let f −1 be the inverse function of f (for
the monotony constraints, f is monotonous). f '( f −1 (λi )) ≥ λi +1 holds. 0 w.r.t a simple TBox The algorithm for satisfiability of an atomic cut concept A[1] 0 , ' starts with an initial ABox 0 = {x : A[1] } , and then extends 0 with completion
rules (Figure 1) until no completion rule is applicable. If none of completion rules can 0 applicable to current , we call is complete. The algorithm return A[1] is satisfiable w.r.t , ' iff in the algorithm processing, there is a complete and clash-free ABox . The completeness of the algorithm is guaranteed for any completion rule is based on constraint propagation. And the soundness is proved by the monotony constraint and tautology property of acyclic TBox. The algorithm could be executed in polynomial space as a similar consequence of the algorithm for $ -concept satisfiability w.r.t acyclic TBox. For Fuzzy $ concept satisfiability is PSPACEcan be equivalent converted into $ . complete[3], and Fuzzy $ Therefore $ -concept satisfiability w.r.t acyclic TBox is PSPACE-hard. We have the following theorem. Theorem 3. Satisfiability of cut concepts w.r.t. acyclic TBoxes is PSPACE-complete.
160
Y. Li et al.
For any ABox which is clash-free, , is a simple TBox -rule I Condition: contains x : A[ λ ] restricted by < A[ u ] A '[u ] A ''[ u ] , u ∈ V > in , , but not both x : A '[ c ] and x : A ''[ c ] such that c = min(λ ,sup(V )) . Action: ← * {x : A '[ c ] , x : A ''[ c ]} . -rule II Condition: contains x : ¬A[ λ ] restricted by < ¬A[ u ] ¬A '[ u ] ¬A ''[ u ] , u ∈ V > in
, , but not both x : ¬A '[ c ] and x : ¬A ''[ c ] such that c = max(λ ,inf(V )) . Action: ← * {x : ¬A '[ c ] , x : ¬A ''[ c ]} -rule I Condition: contains x : A[ λ ] restricted by < A[ u ] A '[u ] A ''[ u ] , u ∈ V > in , , but
either x : A '[ c ] or x : A ''[ c ] such that c = min(λ ,sup(V )) . Action: ' ← * {x : A '[ c ]} , '' ← * {x : A ''[ c ]} . -rule II Condition: contains x : ¬A[ λ ] restricted by < ¬A[ u ] ¬A '[ u ] ¬A ''[ u ] , u ∈ V > in
, , but either x : ¬A '[ c ] or x : ¬A ''[ c ] such that c = max(λ ,inf(V )) . Action: ' ← * {x : ¬A '[ c ]} , '' ← * {x : ¬A ''[ c ]} . ∃ -rule I Condition: contains x : A[ λ ] restricted by < A[ u ] ∃R[ f ( u )] . A '[ u ] , u ∈ V > in , , but
no R[ f ( c )] -successor z of x with z : A '[ c ] such that c = min(λ ,sup(V )) . Action: ← * { y : A '[ c ] ,( x, y ) : R[ f ( c )]} , where y is new generated. ∃ -rule II Condition: contains x : ¬A[ λ ] restricted by < ¬A[ u ] ∃R[ f ( u )] .¬A '[ u ] , u ∈ V > in , ,
but no R[ f ( c )] -successor z of x with z : ¬A '[ c ] such that c = max(λ ,inf(V )) . Action: ← * { y : ¬A '[ c ] ,( x, y ) : R[ f ( c )]} , where y is new generated.
∀ -rule I Condition: contains x : A[ λ ] restricted by < A[ u ] ∀R[ f ( u )] . A '[ u ] , u ∈ V > in , , and a R[ f ( c )] -successor y of x without y : A '[ c ] such that c = min(λ ,sup(V )) . Action: ← * { y : A '[ c ]}
∀ -rule II Condition: contains x : ¬A[ λ ] restricted by < ¬A[ u ] ∀R[ f ( u )] .¬A '[ u ] , u ∈ V > in , , and a R[ f ( c )] -successor y of x without y : ¬A '[ c ] such that c = max(λ ,sup(V )) . Action: ← * { y : ¬A '[ c ]}
¬ -rule Condition: contains x : A[ λ ] and x : ¬A[ λ ′ ] , where λ ≤ λ ′ .
Fig. 1. Completion rules for satisfiability w.r.t simple TBox
A Fuzzy Extension of Description Logic
$
161
4 Related Work Lots of endeavors have done for extension of DLs with fuzzy features. Meghini et al proposed a preliminary fuzzy DL[8]. Straccia[2] presented fuzzy $ , and gave a constraint propagation calculus for reasoning. The translation from fuzzy $ to $ has been discussed in section 2.4. In addition, $ can overcome the insufficiencies of fuzzy $ , which are discussed in section 2.3. Firstly, for an individual a satisfies ∃b I ∈ Δ I R I (a I , b I ) ≥ λ1 and C I (b I ) ≥ λ2 , where λ1 ≠ λ2 , such complex assertion can be described as a: ∃ R [ λ1 ] .C [ λ2 ] ; Secondly, for ∀d ∈ Δ I C ! (d ) ≥ λ1 → D ! (d ) ≥ λ2 , such inclusion can be described as: C[ λ1 ] D[ λ2 ] .
5 Conclusions This paper introduces cut sets of the fuzzy concepts and fuzzy roles as atomic concepts and atomic roles to build $ , presents sound and complete algorithms for reasoning tasks w.r.t acyclic TBox, and proves the complexity of them with is PSPACE-complete. Further works includes the extension of $ adding more concept and role constructors.
References [1] Straccia, U.: Reasoning within fuzzy description logics. Journal of Artificial Intelligence Research, no.14 (2001) 137-166 [2] Straccia, U.: Transforming fuzzy description logics into classical description logics. In: Proceedings of the 9th European Conference on Logics in Artificial Intelligence, Lisbon, (2004) 385-399 [3] Zadeh L A.: Fuzzy sets. Information and Control. vol.8 no.3 (1965) 338-353 [4] Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F.(Eds.): The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press (2003) [5] Baader, F., Sattler, U.: An Overview of Tableau Algorithms for Description Logics. Studia Logica, Vol. 69, no. 1 (2001) 5-40 [6] Nebel, B.: Computational complexity of terminological reasoning in BACK. Artificial Intelligence, no. 34 (1988) 371-383 [7] Calvanese D. Reasoning with inclusion axioms in description logics: Algorithms and complexity. In: Proceedings of the Twelfth European Conference on Artificial Intelligence (ECAI-96), Budapest, (1996) 303-307 [8] Meghini, C., Sebastiani, F., Straccia, U.: Reasoning about the form and content for multimedia objects. In: Proceedings of AAAI 1997 Spring Symposium on Intelligent Integration and Use of Text, Image, Video and Audio, California (1997) 89-94
An Approach for Dynamic Split Strategies in Constraint Solving Carlos Castro1, Eric Monfroy1,2 , Christian Figueroa1 , and Rafael Meneses1 1
Universidad T´ecnica Federico Santa Mar´ıa, Valpara´ıso, Chile 2 LINA, Universit´e de Nantes, France [email protected]
Abstract. In constraint programming, a priori choices statically determine strategies that are crucial for resolution performances. However, the effect of strategies is generally unpredictable. We propose to dynamically change strategies showing bad performances. When this is not enough to improve resolution, we introduce some meta-backtracks. Our goal is to get good performances without the know-how of experts. Some first experimental results show the effectiveness of our approach.
1
Introduction
A Constraint Satisfaction Problem (CSP) is defined by a set of variables, a set of values for each variable, and a set of constraints. The goal is to find one or all instantiations of variables that satisfy the set of constraints. One of the most common techniques for solving CSPs is a complete approach that interleaves splits (e.g., enumeration) and constraint propagations. Constraint propagation prunes the search tree by eliminating values that cannot participate in any solution of the CSP. Split consists in cutting a CSP into smaller CSPs by splitting the domain of a variable. Although all strategies of split that preserve solutions are valid, they have drastically different impacts on resolution efficiency. Moreover, no strategy is (one of) the best for all problems. The issue for efficiency w.r.t. split strategy is thus: which variable to select? how to split or enumerate its domain? Numerous studies defined some general criteria (e.g., minimum domain) for variable selection, and for value selection (e.g., lower bound, or bisection). For some applications, such as Job-Shop Scheduling problems, specific split strategies have been proposed [7]. On the one hand, determining the best strategy can be achieved on focusing on some static criteria. In this case, the selection criteria is determined just once before resolution (see e.g., [2] for variable ordering, [9] to pre-determine the “best” heuristic, [10] to determine the best solver). However, it is well-known that an a priori decision concerning a good variable and value selection is very hard (and almost impossible in the general case) since strategy effects are rather unpredictable. On the other hand, information coming from the solving process can be used to determine the strategy (see e.g., [6] for algorithm control with low-knowledge, [17] for dynamic change of propagators, [8] for variation of strength of propagation). A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 162–174, 2005. c Springer-Verlag Berlin Heidelberg 2005
An Approach for Dynamic Split Strategies in Constraint Solving
163
In [3,4], adaptive constraint satisfaction is presented based on a chain of algorithms: bad algorithm choices are detected and dynamically changed by other candidates. In [11,12] the split strategy is fixed. However, randomisation is applied for tie-breaking when several choices are ranked equally by the strategy. Moreover, a restart policy based on a specified number of backtracks (cutoff) is also introduced: when the cutoff is reached, the algorithm is restarted at the root of the search tree to try another branch. In this paper, we are interested in a combination of these two last types of work: we present a framework for adaptive strategies together with metabacktracks (an adaptation of restart to save and capitalise work already achieved) to find solutions more quickly and with less variance in solution time: we try to avoid very long runs when another strategy (or sequence of strategies) can lead quickly to a solution. We are interested in dynamically detecting bad decisions concerning split strategies during resolution: instead of trying to predict the effect of a strategy, we evaluate the efficiency of running strategies, and replace the ones showing bad results. When this is not sufficient and we guess that the search is in a bad context, we also perform meta-backtracks (several levels of backtracks) to quickly undo several enumerations and restore a “better” context. To this end, we define some measures of the solving process that are observed according to some time-based or computation-based policies. Then, this information is analysed to draw some indicators that are used to make decisions: updates of the priority of application of strategies or meta-backtracks. For priorities, we penalise strategies that have done a bad work, and we give more credits to those that we judge efficient. We select the split strategy to apply next according to these changing priorities. Meta-backtracks happen when the change of strategy cannot improve resolution: in this case, several levels of backtracks are performed at once to “erase” previous bad choices of split. This process is repeated until the CSP is solved. Some preliminary results for CSP over finite domains show the effectiveness of our framework in terms of solving efficiency. This framework is open and flexible, thus we can consider domain specific as well as generic strategies, observations, indicators, and decisions. It could also be adapted to take into account strategies for constraint propagation, incomplete solvers, or even hybrid solvers [15]. Since our approach is orthogonal to techniques for predicting good strategies, it can be combined with such methods. This paper is organised as follows: Section 2 gives the motivations for doing this work. Section 3 presents our framework whereas Section 4 presents an instantiation for finite domain constraints and Section 5 reports experimental results obtained with our implementation. Finally, we conclude in Section 6.
2
Motivations
Solvers based on constraint propagation alternate phases of pruning and phases of split of the search space. Although all strategies of split preserving solutions are valid, they have drastically different impacts on efficiency. But, their effect is very difficult to predict and in most cases, impossible. Moreover, no strategy
164
C. Castro et al. Table 1. N-queens: CPU time, number of enumerations, and backtracks
N S↓↓ S↓ S↓↑ S↓ S S↑ S↑↓ S↑ S↑↑
t 3 2 2 5 105 6 30387 12221 30455
20 e 76 41 76 75 1847 75 650752 252979 650717
b 60 27 60 59 1827 59 650717 252952 650752
t 32 4 31 176 − 167 − − −
50 e 1065 56 1065 2165 − 2165 − − −
b 1021 11 1021 2120 − 2120 − − −
t 14 13 13 − − − − − −
100 e 137 110 137 − − − − − −
150 200 b t e b t e b 41 31801 638714 638564 13955 293851 293662 13 49 152 7 69 207 9 41 28719 638714 638564 12196 293851 293662 − − − − − − − − 622 4952 4815 − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − −
is (one of) the best for all problems. The issue is thus to select a variable, and then to decide how to split its domain. To illustrate the importance of split strategies, we solved some instances of the N-Queens problem with 9 strategies1 using the system Oz2 . In Table 1 each cell contains 3 numbers: t, e, b. t is the CPU time in ms. Solvers that do not find a solution before the timeout of 200 s. are stopped (“-”). e is the total number of enumerations, from which many were not worth, i.e., backtracks (b). The first 3 strategies appear to be better suited for this class of problems. For a given N , and a timeout of 200 s. the ratio of time between the best and the worst solvers finding a solution can be 104 . Considering the 20-queen problem, whereas the fastest solver achieved 41 enumerations and 27 backtracks, the worst one finding a solution required more than 6.105 enumerations and 6.105 backtracks. Again we have a ratio of more than 104 . The time and operations ratios are even bigger when pushing up or removing the timeout. Figure 1 shows 3 search trees for the resolution of the 10-queen problem with 3 different strategies. The first strategy (S↓ ) directly goes to a solution (6 enumerations, no backtrack). The second one (S↓↑ ), after a bad choice for the second enumeration (generating 17 backtracks), finally goes directly to a solution. The last strategy (S↑↑ ) performs numerous wrong choices (807 backtracks) before reaching a solution. Obviously strategies have drastically different efficiencies, and thus it is crucial to select a good one that unfortunately cannot be predicted in the general case. We are interested in observing strategies during resolution in order to detect bad strategies and replace them by better ones. We are thus concerned with dynamic and adaptive meta-strategies: our solver uses a single strategy at a time; but when a strategy is judged to have a poor behaviour, it is replaced by another one in order to explore differently the search tree. When this is not 1
2
The 9 enumeration strategies are the combination of 3 variable selection strategies – the variable with minimum domain (denoted ↓), with the largest domain (↑), and with an average domain ()– and three value selection strategies – the smallest value of the domain (denoted ↓), the largest one (↑), the middle one (denoted )–. For example, the solver which always uses the strategy that selects the variable with the largest domain and the smallest value of its domain is thus denoted S↑↓ . http://www.mozart-oz.org
An Approach for Dynamic Split Strategies in Constraint Solving
165
Fig. 1. 10-Queens solved with 3 strategies: S↓ , S↓↑ , and S↑↑
sufficient anymore because of some previous bad choices, we operate some metabacktracks (backtrack of several levels) in the search tree. Although observing resolution and storing states for meta-backtracks is an overhead, this is negligible compared to the significant differences between strategies.
3
The Dynamic Strategy Framework
Our framework for dynamic strategies is based on 4 components that communicate and exchange information. The first component runs resolution, the second one observes resolution and takes snapshots, the third one analysis snapshots and draws some indicators about strategy quality, and the fourth one makes decisions and updates strategy priorities or requests some meta-backtrack. Each component is exchangeable, and thus, for example, we can think of several components that make different decisions with the same analysis. This approach is based on two key features: change of split strategy when a strategy behaves badly and when we guess another one could do better continuing deeper in the search tree, and meta-backtracks when a change of strategies is not enough because wrong choices were made and we guess no strategy will be able to repair this. 3.1
The SOLVE Component
This component solves CSPs by running a generic solving algorithm which alternates constraint propagation with split phases. The sketch of our SOLVE algorithm (Figure 2) is simple and close to the one of [1]). SOLVE applies a meta-strategy of splitting which consists of a sequence of several basic split strategies: only one strategy is used at a time, but it can be replaced during resolution. To this end, SOLVE has a set of split strategies, each one characterised by a priority that evolves during computation: the other components evaluate strategies and update their priorities. SOLVE is also able to perform meta-backtracks (jump back of a sequence of several splits and propagation phases) in order to repair a “desperate” state of resolution, i.e., when changing strategies is not sufficient because of several very bad prior choices. The constraint propagation function carries out domain reduction applying local consistency verification (such as arc or path consistency [14]) following a given strategy (e.g., forward checking, or look ahead [13]). A basic splitting strategy aims at splitting a CSP P into two or more CSPs Pi , such that the union of solutions of the Pi is equal to the solutions of P
166
C. Castro et al. WHILE not finished constraint propagation IF not finished THEN select a split w.r.t. the priorities split proceed by case END END Fig. 2. The SOLVE algorithm
(preserve solutions). Each Pi differs from P in that the split domain is replaced by a smaller domain. The two main classes of split strategies are segmentation (split a domain into two or more subdomains), and enumeration (split a domain into one value and the rest of the domain). For example, considering a CSP P with the variable x ∈ D, an enumeration step on variable x will produce 2 sub-CSPs: P1 in which x ∈ D is replaced by x = v, v being a value of D; and P2 in which x ∈ D is replaced by x ∈ D \ {v}. The SOLVE component has a set Σ of basic split strategies such as bisection, enumeration, or shaving. Each strategy σi ∈ Σ is given a priority pi that evolves during computation. These priorities can be fair, but can also favour some split strategies (e.g., a higher priority can be given to a strategy known as well suited for the given problem). The select split function creates our meta-strategy: at each enumeration it selects the currently best split strategy of Σ with respect to the priorities pi attached to the σi ; our meta-strategy is thus a sequence of basic strategies. The split function is the application of the selected strategy. SOLVE also manages exploration of the search space, stored as a search tree: nodes are CSPs reduced by propagation; the root node is the initial CSP; a node is split in some child nodes by split; leaves represent either a solution of the CSP or a failure. Proceed by case is a function that manages the choice points created by split: it may define searches such as depth first, or breadth first. Proceed by case also manages meta-backtracks. A meta-backtrack jumps back to a snapshot. Each time a snapshot is taken by the OBSERVE component, the SOLVE component records the search tree and the priorities in a heap of contexts. When the UPDATE component requests one meta-backtrack (metabk(1)), the SOLVE component restores the state of the last snapshot: it removes the top of the heap of contexts; it replaces the search tree by the one that was recorded, and restores the priorities; finally it updates the priorities by giving to the strategy that was working at the time of the snapshot a priority smaller than the smallest current priorities (to be sure to use another strategy). A metabacktrack of several levels (meta-bk(n)) consists in removing n − 1 snapshots from the heap of context, and then to perform a meta-backtrack (meta-bk(1)). In order to obtain a complete solver, the meta-backtrack feature is deactivated when the last strategy is tried at the root node of the search tree: meta-bk requests won’t be executed anymore. The Boolean finished indicates that resolution is completed (e.g., one, all, or optimal solution or inconsistency).
An Approach for Dynamic Split Strategies in Constraint Solving
3.2
167
The OBSERVATION Component
This component aims at observing and recording some information of the current search tree, i.e., it spies the resolution process of the SOLVE component. These observations (called snapshots) are not performed continuously, and they can be seen as an abstraction of the resolution state at a time t. Taking a snapshot consists in extracting (since search trees are too large) and recording some information from a resolution state. Thus, two main issues are important: when to take snapshots, and which information to record. Snapshots can be taken regularly, such as every n ms, or every m loops of the SOLVE algorithm. But snapshots can also be taken when some events happen, such as a variable was fixed, the search space was reduced of x %. The recorded information aims at reflecting resolution: it will be analysed, and used to update priorities of strategies. It will thus depend on the computation domain, the split strategies, and the analysis capacities. Snapshots can mainly contain 3 types of information: characteristics of the CSP (e.g., hard variables of the problem, linear constraints, or occurrences of variables), measures of the search tree (e.g., current depth, maximal depth, fixed variables, or size of the current search space), properties of the computation (e.g., CPU time of a propagation phase or which operators were used). 3.3
The ANALYSE Component
This component analyses the snapshots taken by the OBSERVATION: it evaluates the different strategies, and provides indicators to the UPDATE component. Indicators can be Boolean or numeric values (δb and δn respectively). They can be extracted, computed, or deduced from one or several snapshots. Numeric indicators are results of quantitative computations of measures recorded in snapshots. Simple indicators are the depth of the search (δndepth ), the number of fixed variables (δnf ix ), or fixed by enumeration (δnf ixen ), or the average size of domains (δndavg ). More complex indicators can be the difference of depth between 2 snapshots: this gives information on the evolution of the search tree (if large, a good progress was done, if small the search can be stuck at a level). The difference between the depth (δndepth ) of the search and the variables fixed by enumeration (δnf ixen ) gives an indicator (δngap ) of how many unsuccessful enumerations were performed on the last variable. Boolean indicators reflect properties. Simple ones can be related to CSPs (e.g., there is a univariate constraint or a hard variable was fixed). More complex properties can be related to a quantitative analysis of the snapshots. For example, consider n consecutive snapshots such that the number of instantiated variables oscillate with a small amplitude. We can deduce that the SOLVE component alternates enumerations and backtracks on several variables, without succeeding in having a strong orientation (e.g., going deeper in the search tree or performing a significant backtracking phase): this is a thrashing type behaviour. We call this indicator δbosc and set it to true in this case. We show in the next section how to interpret this information.
168
3.4
C. Castro et al.
The UPDATE Component
The UPDATE component makes decisions using the indicators computed by ANALYSE: it makes interpretations of the indicators, and then updates the split priorities and requests some meta-backtracks in the SOLVE component. The knowledge of the UPDATE component is contained in a set of rules. The head of such a rule is a conjunction of conditions on the indicators (disjunctions can be handled by several rules). There are two types of rules: for priority update rules (⇒rules), the body is a conjunction of updates of strategies priorities: l ( ωj × δnj ) op cj ∧
k
i=1 j∈Ji
i=1
δbi
⇒
l
pi = pi + fi (δn1 , . . . , δni )
i=1
where: – the ωj are the weights of each numeric indicator δnj in the condition, the cj are constants, the Ji are subsets of all the indicators, and op ∈ {≤, ≥, =}; – the δbi are some Boolean indicators; – the fi are functions over the indicators that returns real numbers to increase or decrease
l the priority pi of the strategy i; – and the i=1 in the body of the rule is an abuse of language that means the the l priorities can be updated. whereas for meta-backtrack rules (→rules) the body requests n meta-backtracks: l ( ωj × δnj ) op cj ∧
k
i=1 j∈Ji
i=1
δbi
→
meta − bk(g(δn1 , . . . , δni ))
where g is a function over the indicators that returns an integer, i.e., the number of meta-backtrack that should be performed. When the head of a rule is fulfilled (i.e., conditions are verified), its body is executed: for ⇒rules, the priorities of the strategies are updated in the SOLVE component. Whereas for →rules, n meta-backtracks as requested in the SOLVE component. Note that conditions of →rules must be stronger than the ones of ⇒rules to first try changing strategies before making a meta-backtrack. We now continue with the oscillating case showed before. Consider that we have the indicators δbosc , δnf ix , and δntot (the total number of variables). We can imagine two ⇒rules for updating the priority p of the running strategy: R1 : R2 :
δnf ixed ∗ 100/δntot ≤ 5 ∧ δbosc ⇒ p = p + 0.2 30 ≤ δnf ixed ∗ 100/δntot ≤ 70 ∧ δbosc ⇒ p = p − 0.5
For R1 , the condition means that the oscillation happens close to the root of the search tree (less than 5% of variables are fixed). This is interpreted as a phase of efficient pruning of the tree, and thus, the priority of the current strategy is increased to let it carry in the pruning. In R2 , the oscillation is close to the
An Approach for Dynamic Split Strategies in Constraint Solving
169
middle of the tree. This is judged as a bad case (i.e., a thrashing type) and the priority of the running strategy is lowered in order to replace it. R3 considers that performing more than m (m being 15% of the average size of domains) successive enumerations on the same variable is a problem that was caused by an earlier wrong choice. Thus, 2 meta backtracks are requested: R3 : δngap ≥ 15 ∗ δndavg /100 → meta − bk(2) These 3 rules are based on some interpretations of the indicators. Other interpretations (maybe opposite) and rules could have been designed.
4
A Practical Approach
We now use a simplification and adaptation of our generic approach for finite domain CSP. Our prototype implementation in Oz uses processes for components and a mechanism of query/answer between the processes. For future extensions and modifications, we did not try to optimise performances of our system: we copy and store numerous contexts to track and trace resolution. We fix the constraint propagation process: arc consistency [14] computation (with dedicated algorithms for global constraints) with a look ahead strategy [13]. The proceed by case is a depth first left first exploration of the search tree: this procedure selects the left hand side child node, i.e., the one that assigns a value to the enumerated variable. For our first attempts, we consider only 9 basic enumeration strategies that are the combination of 3 variable selection strategies –the variable with minimum domain (denoted ↓), with the largest domain (↑), and with an average domain (()– and three value selections –the smallest value of the domain (↓), the largest one (↑), the middle one (()–. The strategy that selects the variable with the largest domain and the smallest value of its domain is thus denoted ↑↓. The solver which always uses this strategy is denoted by S↑↓ . These strategies are rather common (and more especially the ones based on minimum domain selection) and are not problem specific. Strategies based on largest domain selection are usually inefficient. As expected, the experiments show that our metastrategy quickly change these enumeration strategies. Our dynamic solvers that can change strategies and perform meta-backtracks is denoted by SDyn . The snapshots are taken each n ms, n being a parameter. The snapshots focus on the search tree, and several snapshots will allow to draw some indicators on the resolution progress. Here are some of the data contained in a snapshot: M axd: the maximum depth reached in the search tree, d: the depth of the current node, s: the size of the current search space, f , f : the percentage of variables fixed by enumeration (respectively by enumeration or propagation), – v, vf , vf e: the number of variables, the number of fixed variables, the number of variables fixed by enumeration.
– – – –
170
C. Castro et al.
The indicators we consider reflect the resolution progress. Here are some of the indicators of our set I of indicators computed in the ANALYSE component. F is the last taken snapshot, and F − the previous one: – δn1 = M axdF − M axdF − represents a variation of the maximum depth, – δn2 = dF − dF − : if positive, the current node is deeper than the one explored at the previous snapshot, – δn3 = 100 ∗ (sF − − sF )/sF − : a percentage of reduction since F − ; if positive, the current search space is smaller than at snapshot F − , – δn4 = fF −fF − (respectively δn5 = fF −fF − ): if positive, reflects an improvement in the degree of resolution (resp. resolution made by enumeration), – δn6 = dF − − vf eF − : the δngap indicator described in Section 3.3. The schema of ⇒rules and →rules we use for updating priorities and requesting meta-backtracks is rather simple: wi ∗ δni ≥ c1 ⇒ p = p + f1 (I) wi ∗ δni ≤ c2 ⇒ p = p − f2 (I) i∈I wi ∗ δni ≤ g3 (I) → meta − bk(f3 (I))
r1 : r2 : r3 :
i∈I i∈I
where – p is the priority of the currently used strategy, – wi , wi and wi are weights used to (dis)favour some indicators, – f1 , f2 , and f3 are functions of the indicators that return a positive number. f1 is the reward and f2 is the penalty for priorities, whereas f3 is the number of meta-backtracks, – c1 and c2 are constants that present thresholds (c2 < c1 ). Rule r1 “rewards” the current strategy when it obtained a score over a given threshold, i.e., it performed well w.r.t. to our criteria. The reward is to give it a higher priority to run for more time. Rule r2 penalises the running strategy when it is judged inefficient: the priority is decreased. A strategy obtaining a penalty may remain the one with the best priority if it worked efficiently (during several snapshots) before. Rule r3 requests f3 (I) meta-backtracks when the state of search is judged inadequate for quickly finding a solution: some (not all) of the previous choices will be undone.
5
Experimental Results
Here, we are interested in quickly finding the first solution. Solvers and strategies are named as above. The timeout is set to 200s. Snapshots are taken every 80 ms. We do not use all the data contained in the snapshots, but only the data described in the previous section. This also holds for the indicators. Each strategy has a priority of 1 at the beginning. The instantiations of the rules used to draw the tables are: r1 : r2 : r3 :
5 i=1 δni 5 i=1 δni δn6 > 4
≥ 10 ⇒ p = p + 1 ≤0 ⇒ p=p−3 → meta − bk(10 ∗ δnv /100)
An Approach for Dynamic Split Strategies in Constraint Solving
171
Table 2. N-Queens: CPU time in ms, enumerations, backtracks, meta-backtracks queens S↓↓ S↓ S↓↑ S↓ S S↑ S↑↓ S↑ S↑↑ S∗∗ Av S∗∗out SDynAv∼ SDynB∼ SDynW ∼ SDyn∼ out
20 e 76 41 76 75 1847 75 650752 252979 650717 172960 0% 120 862 5 41 381 2631 0%
t 3 2 2 5 105 6 30387 12221 30455 8131
50 b B t e b 60 32 1065 1021 27 4 56 11 60 31 1065 1021 59 176 2165 2120 1827 − − − 59 167 2165 2120 650717 − − − 252952 − − − 650752 − − − 172946 82 1303 1259 44% 819 1 534 1753 1498 27 0 21 56 11 2529 4 1203 4137 3637 0%
100 e b 137 41 110 13 137 41 − − − − − − − − − − − − 128 32 66% 4 1285 1466 1009 0 126 110 13 9 5502 6828 5322 0%
B
t 14 13 13 − − − − − − 13
200 t e b 13955 293851 293662 69 207 9 12196 293851 293662 − − − − − − − − − − − − − − − − − − 8740 195969 195777 66% 4 5291 1594 819 0 859 207 9 16 16351 5410 3579 6% B
B
4 0 12
r1 and r2 only use the first 5 indicators, with weights of 1. The reward is less than the penalty to quickly replace a bad strategy. r3 requests n meta-backtracks, n being 10% of the number of variables. These parameters were experimentally fixed using a set of problems and they were not fine tuned especially for the n-queen problem that we treat below. However, some more studies (and/or learning) should be made to obtain a more representative set of problems. Our solver SDyn∼ uses the following dynamic meta-strategy: if the running strategy still has the best priority, do not replace it; else, choose the strategy with the best priority; if several strategies have the same priority, randomly choose one. Each time, we perform 50 runs since randomisation is used for selecting the first strategy and also for tie breaking. Tests were run on an Athlon XP 2200+ with RAM 224 MB of memory. Table 2 illustrates resolution of some N-Queen problem instances using the 9 solvers with fixed strategy, and our solver SDyn∼ . Each cell is composed of the CPU time in ms (t), the number of enumerations (e), the number of backtracks (b), and the number of meta-backtracks (B) (only for SDyn∼ runs). The line SDyn∼ out (resp. S∗∗ out ) represents the percentage of timeouts (200 s.) of our dynamic solver (resp. of the fixed strategy solvers). SDynAv∼ represents the average of the runs of SDyn∼ , SDynW ∼ the worst run that do not reach the timeout, and SDynB∼ the best run. The line S∗∗ A v is the average run of the 9 solvers with fixed strategies. Only runs that do not reached the timeout are used for S∗∗ A v and SDynAv∼ . The first remark is that our meta-strategy significantly improves the percentage of resolution: we obtain about 0% of timeouts for 50 to 200 queens whereas about 50% of the solvers with fixed strategy could not find a solution before the timeout. Note that pushing the timeout to 600s does not change the percentage of timeouts of the solver with fixed strategy. Comparing the average solving times. For 20 queens SDyn∼ is 80 times faster, but for 100-queens we cannot say anything since we do not have any timeout whereas the fixed strategies generated 66% of timeouts, and the timeouts are not considered for the average. The best runs of SDyn∼ are exactly the same as the best fixed strategies (except that the CPU time is greater): this means that our dynamic framework
172
C. Castro et al. Table 3. 200-Queens: sequences of strategies in various runs of SDyn strategy SDynAv∼ SDynB∼ SDynW ∼
↓↓ 212 0 504
↓ ↓↑ ↓ 199 291 79 201 0 0 627 1221 367
83 0 351
↑ 67 0 128
↑↓ 94 0 162
↑ 57 0 56
↑↑ 75 0 134
do not penalise a good strategy. We can also see the overhead of our technique on the best runs: we are a bit less than 10 times slower. However, we can significantly reduce the overhead by only recording and analysing information that we effectively use in the update. Moreover, we store a lot of contexts that are not necessary to our technique, but that we use for some further observations. The number of meta-backtracks is very small compared to the number of backtracks: they are really used when no strategy behave well to restore a better search tree. However, the meta-backtracks are efficient: without them, we do not improve the number of timeouts in all cases. Table 3 shows how many sequences a basic strategy was used in the metastrategy of SDyn∼ to solve the 200-Queens problem. A sequence is defined between two snapshots: thus, 1 means that the strategy was used during 80 ms, and was certainly applied several times. For the best run, only the strategy ↓( was applied. As seen before, this strategy is the best for 200 queens with a static strategy. Our analyse always judged it well, and thus, when starting computation with it, it is not replaced in the dynamic strategy. For the worst case, many changes of strategies happened. The computation started badly, and SDyn∼ encountered problems to get a strategy that could perform well on the remaining problem. In this case, we had a slow repair of the strategy and meta-backtracks. Although the efficiency was not very good, SDyn∼ could compute a solution before the timeout, whereas the solver continuing with the same “bad” fixed strategy reached the timeout without a solution. Using the same parameters and rules, similar results were obtained for the magic square problem and the Latin square problem instances. The improvement in term of timeouts is similar (e.g., for magic squares of size 5 from 44% to 0% using SDyn∼ , and for Latin squares of size 25 from 66% to 28%). An interesting point is that for computing a first solution to the magic square of size 4, SDyn∼ was able to find a shorter branch than the best strategy: 29 enumerations and no meta-backtrack compared to 39 enumerations for S↓ . However, due to the overhead, this run was not faster. It is also worth noting that for magic and Latin squares, there is not a strategy which is the best for all instances: this varies among 5 strategies (S↓↓ , S↓ , S↓↑ , S↓ , and surprisingly S↑↑ ).
6
Conclusion, Discussion, and Future Work
We have presented a framework for automated selection of split strategy for constraint solving. Based on strategy performances, our dynamic approach is able to detect bad cases to replace strategies. When the context is judged very bad,
An Approach for Dynamic Split Strategies in Constraint Solving
173
meta-backtracks erase prior bad choices. The first experimental results obtained with our prototype implementation are more than encouraging and promising: they show we can get good performances without a priori choices. Compared to [11,12] our randomisation concerns the selection of a strategy (to break tie when several strategies have the same priority) and not the choice made by a strategy. Moreover, we consider several strategies and not only one. In [3,4] the meta-strategy is a sequence (chain) of solvers: when one solver behaves badly, the next one is used. Our strategy selection is finer thanks to priorities. Moreover, a strategy that was judged badly at a given stage can be re-used later. In both [11] and [3], when the resolution process is performing badly a complete restart (jump to the root of the search tree) is done: the same algorithm is restarted with a new random seed in [11], and the next algorithm of the chain is applied on the initial problem in [3]. With our framework we try to save and capitalise the work already done: we first try to change strategies to carry on from the node that was reached; when this is not sufficient we perform a meta-backtrack to a higher node in the tree, but not necessarily to the root of the tree. In [11] the problems on which their method should work is characterised by the notion of “heavy tail” phenomena. We do not have yet such a characterisation. The “parameters” of our framework (observations, indicators, ⇒ and →rules, snapshot frequency, . . .) are crucial, thus we plan to integrate some learning in order to detect relevant “parameters” and how to tune them. Concerning solver selection some work could be done in order, for example, to fix priorities for some well-known cases where the solver sequence can be established a priori. We plan to extend our work to constraint propagation, i.e., dynamically changing the local consistency, and the reduction strategy such as in [8,17]. We have limited our analysis to past events, but, it could be interesting to observe what remains to be solved as well. It should be interesting to integrate the notion of intelligent backtracking for our meta-backtrack [5]. Finally, we are also interested in using this framework for developing hybrid solvers based on constraint programming, local search, and genetic algorithms. Our framework seems to be well suited for hybrid solvers based on Chaotic Iterations [16].
References 1. K. R. Apt. Principles of Constraint Programming. Cambridge Univ. Press, 2003. 2. J. C. Beck, P. Prosser, and R. Wallace. Variable Ordering Heuristics Show Promise. In Proceedings of the International Conference on Principles and Practice of Constraint Programming, CP’2004, volume 3258 of Lecture Notes in Computer Science, pages 711–715, 2004. 3. J. Borrett, E. Tsang, and N. Walsh. Adaptive constraint satisfaction. In 15th UK Planning and Scheduling Special Interest Group Workshop, Liverpool, 1996. 4. J. E. Borrett, E. P. K. Tsang, and N. R. Walsh. Adaptive constraint satisfaction: The quickest first principle. In Proceedings of 12th European Conference on Artificial Intelligence, ECAI’1996, pages 160–164. John Wiley and Sons, 1996. 5. M. Bruynooghe. Intelligent Backtracking Revisited. In J.-L. Lassez and G. Plotkin, editors, Computational Logic, Essays in Honor of Alan Robinson. MIT Press, 1991.
174
C. Castro et al.
6. T. Carchrae and J. C. Beck. Low-Knowledge Algorithm Control. In Proceedings of the National Conference on Artificial Intelligence, AAAI 2004, pages 49–54, 2004. 7. Y. Caseau and F. Laburthe. Improved clp scheduling with task intervals. In Proceedings of the International Conference on Logic Programming, ICLP’1994, pages 369–383. MIT Press, 1994. 8. H. El Sakkout, M. Wallace, and B. Richards. An instance of adaptive constraint propagation. In Proceedings of the Int. Conference on Principles and Practice of Constraint Programming, CP’96, volume 1118 of Lecture Notes in Computer Science, pages 164–178. Springer, 1996. 9. P. Flener, B. Hnich, and Z. Kiziltan. A meta-heuristic for subset problems. In Proceedings of Practical Aspects of Declarative Languages, PADL’2001, volume 1990 of Lecture Notes in Computer Science, pages 274–287. Springer, 2001. 10. C. Gebruers, A. Guerri, B. Hnich, and M. Milano. Making choices using structure at the instance level within a case based reasoning framework. In Proceedings of CPAIOR’2004, volume 3011 of Lecture Notes in Computer Science, pages 380–386. Springer, 2004. 11. C. Gomes, B. Selman, and H. Kautz. Boosting combinatorial search through randomization. In Proceedings of AAAI’98, pages 431–437, Madison, Wisconsin, 1998. 12. H. Kautz, E. Horvitz, Y. Ruan, C. Gomes, and B. Selman. Boosting combinatorial search through randomization. In Proceedings of AAAI’2002, pages 674–682, 2002. 13. V. Kumar. Algorithms for Constraint-Satisfaction Problems: A Survey. Artificial Intelligence Magazine, 13(1):32–44, Spring 1992. 14. A. K. Mackworth. Consistency in Networks of Relations. AI, 8:99–118, 1977. 15. E. Monfroy and C. Castro. A Component Language for Hybrid Solver Cooperations. In Proceedings of ADVIS, volume 3261 of Lecture Notes in Computer Science, pages 192–202, 2004. 16. E. Monfroy, F. Saubion, and T. Lambert. On hybridization of local search and constraint propagation. In Proceedings of the Int. Conference on Logic Programming, ICLP 2004, volume 3132 of Lecture Notes in Computer Science, pages 299–313, 2004. 17. C. Schulte and P. J. Stuckey. Speeding up constraint propagation. In Proceedings of International Conference on Principles and Practice of Constraint Programming, CP’2004, volume 3258 of Lecture Notes in Computer Science, pages 619–633, 2004.
Applying Constraint Logic Programming to Predicate Abstraction of RTL Verilog Descriptions* Tun Li, Yang Guo, SiKun Li, and Dan Zhu National University of Defense Technology, 410073 ChangSha, HuNan, China [email protected]
Abstract. A major technique to address state explosion problem in model checking is abstraction. Predicate abstraction has been applied successfully to large software and now to hardware descriptions, such as Verilog. This paper evaluates the state-of-the-art AI techniques—constraint logic programming (CLP)—to improve the performance of predication abstraction of hardware designs, and compared it with the SAT-based predicate abstraction techniques. With CLP based techniques, we can model various constraints, such as bit, bitvector and integer, in a uniform framework; we can also model the word-level constraints without flatting them into bit-level constraints as SAT-based method does. With these advantages, the computation of abstraction system can be more efficient than SAT-based techniques. We have implemented this method, and the experimental results have shown the promising improvements on the performance of predicate abstraction of hardware designs.
1 Introduction Formal verification techniques are widely applied in the hardware design industry. Among the techniques, model checking [1] is the widely used one. However, model checking suffers from state explosion problem. Therefore, abstraction techniques, which can reduce the state space, have become one of the most important techniques for successfully applying formal methods in software and hardware verification. Abstraction techniques reduce the state space by mapping the set of states of the actual, concrete system to an abstract, and smaller, set of states in a way that preserves the relevant behaviors of the system. In the software domain, the most successful abstraction technique for large systems is predicate abstraction [2]. In the hardware domain, the mostly used localization reduction is a special case of predicate abstraction. Traditionally, predicate abstraction is computed using a theorem prover such as Simplify [3] or Zapato [4]. The typical techniques and applications can be found in [2, 5, 6, 7], and there are some typical tools such as SLAM [8], BLAST [9] and Magic [10]. In hardware domain, the SAT based abstraction method is first proposed in [11]. Then, [12] proposed SAT-based predicate abstraction techniques, and applied it to the verification of ANSI-C programs. The main idea is to form a SAT equation containing all the predicates, a basic block, and two symbolic variables for each predicate, *
This work is supported by the National Science Foundation of China (NSFC) under grant No. 60403048 and 60573173.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 175 – 184, 2005. © Springer-Verlag Berlin Heidelberg 2005
176
T. Li et al.
one variable for the state before the execution of the basic block, and one variable for the state after its execution. The SAT solver is then used to obtain all satisfiable assignments in terms of the symbolic variables. In [13], the method has been applied for word-level predicate abstraction and verifying RTL Verilog.The technique has also been applied to SpecC [14], which is a concurrent version of ANSI-C used for hardware design. However, there are some limitations when using theorem prover and SAT for predicate abstraction. Firstly, theorem prover based method has to call the theorem prover many times during abstraction, which will make the abstraction process inefficient. Secondly, theorem provers model the variables using unbounded integer numbers. Overflow or bit-wise operators are not modeled. However, hardware description languages like Verilog provide an extensive set of bit-wise operators. Thirdly, although SAT based method can only call the SAT solver one time during abstraction, it has to flatten the word-level constraints into bit-level constraints to model wordlevel variables and operations, which will lose most word-level information and the runtime of this process typically grows exponentially in the number of predicates. In this paper, following the work of [13], we focus on applying constraint logic programming (CLP) [15] to predication abstraction of RTL Verilog descriptions, especially using CLP to solving the abstraction computation constraints obtained from circuit model and predicates. First, we build the formal model of the circuit using decision diagrams (DD) models [16] extracted from Verilog descriptions. Then following the method proposed in [13], we convert the abstraction computation formula into CLP constrains and apply CLP solver to solve them. The advantage of CLP-based method is: Firstly, it can model bit, bit-vector and bounded integer in a uniform framework, and can support various arithmetic and logic operations. Secondly, the word-level constraints are solved with word-level information and without flattening them into bit-level constraints. With these advantages, we can compute the abstraction model of concrete RTL Verilog designs very quickly. Experimental results have shown that the runtime of abstraction process grows linearly in the number of predicates. Finally, CLP combines the expressiveness of logic programming and the constraints solving techniques. Our method bridges the gap between EDA researches and the research progress in constraint satisfaction problem and artificial intelligence area. The rest of the paper is organized as follows. In section 2, we formalize the semantics of the subset of Verilog that we handle and introduce how to model Verilog descriptions using DD models. Techniques for building formal models from DD model for Verilog descriptions are described in Section 3. In Section 4, we briefly introduce predicate abstraction method with the help of an example. Techniques for translating word-level abstraction constraints into CLP constraints are given in Section 5. We report experimental results in section 6. Finally, we conclude the paper in section 7.
2 Verilog Modeling The Verilog subset supported in this paper is the same as that used in [13]: synthesizable Verilog with one single clock clk. We assume the clock is only used within either posedge or negedge event guards, but not both. We also assume that every variable is assigned values only at one place in the description.
Applying CLP to Predicate Abstraction of RTL Verilog Descriptions
177
Module main(clk); input clk; reg [7:0] x, y; initial x = 1; initial y = 0; always @ (posedge clk) begin y γ
}
} containing
mostly points belonging to B . That is we wish to satisfy
Aω > eγ , Bω < γ
(5)
Here e is a vector of all 1s with appropriate dimension. To the extent possible, or upon normalization
Aω ≥ eγ , Bω ≤ eγ − e
(6)
Conditions (5) or (6) can be satisfied if and only if, A and B do not intersect, which in general is not the case. We thus attempt to satisfy (6) by minimizing some norm of the average violations of (6) such as
min 1 (− Aω + eγ + e) + ω ,γ m Here
1
+
1 ( Bω − eγ + e) + k
1
(7)
x + denotes the vector in R n satisfying ( x + ) i := max{xi ,0}, i = 1,2,...n .
The norm
. p denotes the p norm, 1 ≤ p ≤ ∞ .
Formulation (7) is equivalent to the following robust linear programming formulation T T min e y + e z ω , γ , y, z m k − Aω + eγ + e ≤ y
(8)
Bω − eγ + e ≤ z y ≥ 0, z ≥ 0 Recently, the LP framework has been extended to cope with the feature selection problem [15]. In our research, we adopt formulation (8) as a classifier to minimize wrong classification.
334
X. Feng et al.
Since formulation (8) is only used for separating two sets points, a sevenexpression classification problem is decomposed to 21 2-class classification problems. In the training stage, 21 classifiers according to 21 expression pairs are formed with 21 pairs of {ω , γ }. In the testing stage, feature vector of a testing sample is imported into these classifiers for comparisons. Fig.7 shows the classification result for original image in Fig.1 (a).
Fig. 7. Classification result
5 Evaluations In our research, a commercial digital camcorder is connected to a computer for images acquisition and the system operates at about 20 frames/second in 320 240 images on a 3GHz Pentium V. Fig.8 shows the output of the system for a test video in which the subject poses a series of facial expressions.
Fig. 8. Examples of correct recognition
The recognition performance of our system is tested as follows: 1) Person-dependent recognition: In the training stage, every one of ten individuals is required to pose seven basic expressions in from of a camcorder. Then some frames are selected from the video stream to produce expression template for this person. In the recognition stage, these individuals pose expressions again and the system recognizes them and displays the result in time. To evaluate the recognition performance, the system also save the original video stream and recognition results. When the system ends its work, each individual are asked to label his expressions in the original image sequences. Results of the system are compared to the labels and then we have the recognition rate. The average recognition accuracy is 91% (See table 1).
Real Time Facial Expression Recognition Using LBP and LP
335
Table 1. Person-dependent Recognition result Expressions Anger Disgust Fear Happiness Neural Sadness Surprise Average
Recognizing rate 91% 86% 82% 99% 93% 91% 97% 91%
2) Person-independent recognition: The procedure is similar to that in 1). The difference is that expressions of seven individuals are used for training and those of other three persons are used for testing. One expert who is familiar with the seven basic expressions is asked to labels the testing video streams. Results of our system are compared to the labels and then we have an average recognition rate of 78% (See table 2). Table 2. Person-independent Recognition result Expressions Anger Disgust Fear Happiness Neural Sadness Surprise Average
Recognizing rate 75% 68% 65% 89% 78% 81% 87% 78%
6 Conclusions Real-time and fully automatic facial expressions recognition is one of the challenging tasks in face analysis. This paper presents a novel real time system for expression recognition. The face pre-processing is implemented based on the skin detection and face geometrical structure, which can assure correct eyes detection under large illumination changes and some degree of head movement. The Local Binary Patterns operator is used here to describe face efficiently for expression recognition. The features detection procedure is insensitive to grey level changes. The holistic features also make the proposed system insensitive to some range of head movement. At last, 21 classifiers are produced based on linear programming technique and classification is implemented with a binary tree tournament scheme, which can minimize wrong classification. The system requires no special working conditions. Besides this, experimental results demonstrate that the system performs well less constraint conditions, even in some degree of illumination changes and head movement.
336
X. Feng et al.
Acknowledgement The authors thank CIMO of Finland and the China Scholarship Council for their financial support for this research work. The “Talent Training Plan” of the Northwestern Polytechnic University also provides financial support to this work and should also be greatly acknowledged.
References 1. P. Michel and R. E. Kaliouby: Real time facial expression recognition in video using support vector machines, Proceedings of the 5th International Conference on Multimodal Interfaces, (2003) 258-264 2. I. Kotsia and I. Pitas: Real time facial expression recognition from image sequences using support vector machines, Proceedings of Visual Communication and Image Processing, (2005), in press 3. K. Anderson and P. w. Mcowan: Real-time emotion recognition using biologically inspired models, Proceedings of 4th International Conference on Audio- and Video-Based Biometric Person Authentication (2003) 119-127 4. H. Park and J. Park: Analysis and recognition of facial expression based on point-wise motion energy, Proceedings of Image Analysis and Recognition (2004) 700-708 5. X. Zhou, X. Huang, B. Xu and Y. Wang: Real time facial expression recognition based on boosted embedded hidden Markov model, Proceedings of the Third International Conference on Image and Graphics (2004), 290-293 6. M. Pantic, Leon J.M. Rothkrantz: Automatic analysis of facial expressions: the state of the art, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22 (2000) 1424-1445 7. B. Fasel and J. Luettin: Automatic facial expression analysis: A survey, Pattern Recognition, Vol. 36 (2003) 259-275 8. Li.Stan Z & K.Anil, Handbook of face recognition, Springer-Verlag, 2004.9 9. B. Martinkauppi, Face color under varying illumination-analysis and applications, Dr.tech Dissertation, University of Oulu, Finland, 2002 10. J.Hannuksela: Facial feature based head tracking and pose estimation, Department of Electrical and Information Engineering, University of Oulu, Finland, 2003 11. T. Ojala, M. Pietikäinen, T. Mäenpää: Multiresolution grey-scale and rotation invariant texture classification with Local Binary Patterns, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 24(2002) 971-987 12. T. Ahonen, A. Hadid and M. Pietikäinen, Face recognition with local binary patterns. The 8th European Conference on Computer Vision (2004), 469-481 13. T. Ojala, M. Pietikäinen and T. Mäenpää. Multiresolution grey-scale and rotation invariant texture classification with Local Binary Patterns. IEEE Transactions on Pattern Analysis and Machine Intelligence Vol.24 (2002): 971-987 14. K. P. Bennett and O. L. Mangasarian, Robust linear programming discrimination of two linearly inseparable sets, Optimization Methods and software, vol.1 (1992), 23-34 15. P. S. Bradley and O. L. Mangasarian, Feature selection via concave minimization and support vector machines, Proceedings OF THE 5th International Conference on Machine Learning (1998) 82-90
People Detection and Tracking Through Stereo Vision for Human-Robot Interaction Rafael Mu˜ noz-Salinas, Eugenio Aguirre, Miguel Garc´ıa-Silvente, and Antonio Gonzalez Depto. de Ciencias de la Computacion e Inteligencia Artificial, E.T.S. Ingeniera Inform´ atica, University of Granada, Granada, Spain {salinas, eaguirre, M.Garcia-Silvente, A.Gonzalez}@decsai.ugr.es
Abstract. In this document we present an agent for people detection and tracking through stereo vision. The agent makes use of the active vision to perform the people tracking with a robotic head on which the vision system is installed. Initially, a map of the surrounding environment is created including its motionless characteristics. This map will later on be used to detect objects in motion, and to search people among them by using a face detector. Once a person has been spotted, the agent is capable of tracking them through the robotic head that allows the stereo system to rotate. In order to achieve a robust tracking we have used the Kalman filter. The agent focuses on the person at all times by framing their head and arms on the image. This task could be used by other agents that might need to analyze gestures and expressions of potential application users in order to facilitate the human-robot interaction.
1
Introduction
One critical aspect of the creation of certain intelligent systems is to detect the human presence and facilitate the interaction. The topic human-robot interaction has drawn a lot of attention in the last decade. The objective is to be able to create more intelligent interfaces capable of extracting information about the context or about the actions to be performed through the natural interaction with the user, for example through their gestures or voice. One fundamental aspect in this sense is the people detection and tracking, with plenty existing literature about this topic [3, 8, 9]. The techniques to perform the detection are frequently based on the integration of different information sources such as: skin color, face detectors, motion analysis, etc. Although the people detection and tracking with a single camera is a well explored topic, the use of the stereo technology for this purpose concentrates now an important interest. The availability of commercial hardware to resolve lowlevel processing problems with stereoscopic cameras, as well as lower prices for these types of systems, turns them into an appealing sensor with which intelligent
This work has been supported by the the Spanish Ministerio de Ciencia y Tecnolog´ıa under project TIC2003-04900.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 337–346, 2005. c Springer-Verlag Berlin Heidelberg 2005
338
R. Mu˜ noz-Salinas et al.
systems could be developed. The use of stereo vision provides a higher grade of information that provides several advantages when developing human-robot applications. On one hand, the information regarding disparities becomes less sensitive to illumination changes than the images provided by a single camera, being a very advantageous factor for the environment(background) estimation. Furthermore, the possibility to know the distance to the person could be of great assistance for the tracking as well as for a better analysis of their gestures. On this research we present an agent able to detect and track people through stereo vision. An agent is a process that is capable of autonomous action, interacting and cooperating in a system with another agents. The agent uses active vision to perform the tracking through a robotic head on which the vision system is installed. This agent will serve as a base for the work of other agents in charge of tasks such as gesture analysis and expressions of potential users. The detection method is based on the initial creation of a height map of the environment. This map contains information about the structure of the environment and could even be created while people are moving around. Using this structural map, it will possible to detect the objects in motion. These are potential candidates to people that would be detected through a face detector. Unlike other works that only map the environment for a static camera, our map covers the entire visible region by the stereo system. Once a person has been detected, the robotic heads allows the stereo system to rotate in order to follow them through the environment. In order to have a robust tracking we have used the Kalman filter. The tracking method is designed to maintain visible, as long as feasible, the head and arms of the person and therefore facilitate the gesture analysis. 1.1
Related Works
Among the most prestigious projects related to people detection and tracking using stereo vision we find the one by Darrel et al [1]. This paper presents an interactive display system capable of identifying and tracking several people. The detection of people is based on the integration of the information provided by a skin detector, face detector and the map of disparity of the environment. On one hand, independent objects (blobs) are detected on the disparity image that will be candidates to people. On the other hand, the color of the image is analyzed to identify those areas that could be related to skin. These three items are merged in order to detect the visible people. To perform the tracking, information on hair color, clothes and past history of the located people is used. In this way, the people can be identified even though they disappear from the image for a while. In [4] it is shown a system for people detection and tracking for the interaction in virtual environments. The system allows the user to navigate in a virtual environment by just walking through the room using virtual reality glasses. In this work the face detection is a crucial aspect that has been resolved by using the face detector proposed by Viola and Jones [11]. Once the person is located, a histogram of the colors of the face and chest is used and a particle filter estimates the position of the person based on the information. The stereo information
People Detection and Tracking Through Stereo Vision
339
assists on knowing the position of the person in the room and therefore identifies their position on a virtual environment. On this work, the stereo process is performed by using the information gathered by different cameras located at different points of the room. In [6] a method to locate and track people in stereo images is presented by using occupancy maps. Before the people detection process takes place, an image of the environment is created through a sophisticated image analysis method. Once the background image is created, the objects that do not belong to it are easily isolated, a map of occupancy is created, as well as a height map. The information from both maps is merged to detect people through the use of simple heuristics. The people tracking is performed by using a Kalman filter combined with deformable templates. In this work, a stereoscopic system is used and it is located three meters above the ground, on a fixed position. On the majority of the works, elevated positions of the cameras are used [5, 6, 7]. However, on some other papers that seek the interaction with the user, the position of the camera is usually lower than the height of the person [1, 4, 10]. Besides improving the visibility of the face and arms of the person, these methods are more adequate for their implementation in robotic systems that require human-robot interaction. Studies performed show that in order to improve the acceptance of the robots by the humans it is important that they are of less height than the latter [2]. Otherwise the person could feel intimidated. In this work we propose a method for people detection and tracking by using a movable stereoscopic system located at inferior levels from the people’s height. Unlike most of the documents reviewed, that only model the environment for unmovable cameras [1, 4, 5, 6, 7], we propose a method to create a map that models all visible environment by the stereoscopic system when rotating the robotic head. A distinguished characteristic of this method is that even with movable objects present, the map can still be created. The use of this map will allows us to easily detect the objects that do not belong to the environment and narrow the people detection process to only those objects. The reduction of the information to be analyzed will enable us, besides to reduce the computer costs, to eliminate false positives produced by the face detector used. The agent that has been created uses active vision to track the person movements through all the room. This situation allows us to track the person on a wider environment, than if we had used immovable cameras, and thus makes feasible a more natural and comfortable interaction.
2
Hardware System
The hardware system is formed by a laptop to process the information, a stereoscopic system with two pinhole cameras, and a robotic head. The robotic head (Pan-Tilt Unit or PTU) has two degrees of freedom, one on the X axis (pan) of φ = [−139, 139] degrees and the other one on the Y axis (tilt) of ψ = [−47, 31] degrees. The use of our stereoscopic system enables us to capture two 320x240 sized color images from slightly different positions (stereo pair) and to create a dispar-
340
R. Mu˜ noz-Salinas et al.
ity image Id . By knowing the internal parameters of the stereoscopic system it is feasible to estimate the three-dimensional position pcam of a point in Id . Due to the fact that the camera is subject to movements, these points are translated to a reference static system that has as a center the robotic head located at the ground level through the Eq. 1. pw = T pcam
(1)
The linear projection matrix T is created by using the intrinsic parameters of the system (provided by the manufacturer) and extrinsic ones that has been previously estimated.
3
People Detection and Tracking Process
The method for people detection and tracking proposed on this document, is an iterative process that has been outlined in Fig. 1.
Fig. 1. Flowchart of the process
Initially, a map of the environment is created (let us denote it by Hmax ) that registers the position of the motionless objects. This map divides the environment projected on the floor into cells of a fixed size and indicates on each one of them the maximum height of the detected objects. Once the environment has been registered, the system begins a continuous process to capture images in order to create an instantaneous occupancy map O. On this map we will be able to identify those objects that are in the scene
People Detection and Tracking Through Stereo Vision
341
but were not registered as motionless objects in Hmax , in other words, those objects that are in motion. The objects present in O are identified and analyzed to determine which of them are people. For this purpose we have applied a people detector [11] over the color image of the scene. The false positives generated by the face detector will be rejected thanks to the integration of the information of the disparity image and O. If finally, some of the objects detected in O turn out to be people, the agent will begin to track the closest one. The tracking is also an iterative process that creates on every moment a occupancy map O to track on it the target person. To perform the tracking the Kalman filter has been used. If the target person is located, it is determined if the PTU needs to be moved in order to center the image and in this manner have them always on sight. The objective of the centering process is to keep on the image, as long as feasible, the head and arms of the person. In the following sections the more relevant processes previously mentioned will be elaborated in more detail. 3.1
Creation of the Map of the Environment Hmax
Firstly on to the detection process, the environment is registered. This process aims to register the structure and motionless objects in it. This environment model will assist when separating the objects that are not part of it (in other words: the movable objects). Our approach is based on the creation of a geometrical height map of the environment Hmax , that divides the ground level into a group of cells with a fixed size. The points identified by the stereo system pw are projected over Hmax , that stores the maximum height of the projected points in each cell. In order to avoid adding the points of the ceiling (or objects hanging from it) on Hmax , those that overcome the height threshold hmax are excluded from the process. Due to efficiency reasons for the calculation, the points below the minimum height threshold hmin , are also excluded. The height range [hmin , hmax ] should be such that the majority the person’s body to be detected should fit in it. On those cells Hmax (x,y) on which there are no points located, we assume that there are no objects and therefore the height is hmin . Because of the stereoscopic system is subject to error, instead of only projecting the height of the point detected on a cell, it is also projected the whole uncertainty area of that point. For that purpose we have used the error model of the stereoscopic system with the parameters provided by the manufacturer. The creation of Hmax by only using a unique disparity image is subject to problems. On one hand, possible objects that do not belong to the environment (for example people passing by) could be incorrectly included as part of the environment. Also, the correlation algorithms for the stereo detection are subject to error that cause that not all the scene points are detected. Due to these reasons, instead of creating Hmax from a unique disparity image, it will be done by taking several images on different instants t. For each one of this images, an t t . Finally, the different Hmax created instantaneous height map is created Hmax are used to calculate Hmax through a robust estimator such as the median. For that purpose, each cell of Hmax will have as a maximum height value the median t for that particular cell using Eq. 2. of all values observed on the different Hmax t=n Hmax (x, y) = median(Ht=1 max (x, y), ..., Hmax (x, y))
(2)
342
R. Mu˜ noz-Salinas et al.
(a) t=0 ms
(b) t=1600 ms
y
(c) t=4000 ms
y
(d) t=5200 ms y
y
moving person
moving person moving person
moving person
t
(e) Hmax t=0 ms
x
y
t
(f) Hmax t=1600 ms
x
y
(i) Hmax t=0 ms
x
x
t (h) Hmax t=5200 ms y
y
(j) Hmax t=1600 ms x
x
t (g) Hmax t=4000 ms
(k) Hmax t=4000 ms x
(l) H
t=5200 ms x
Fig. 2. Creation of the height map. Images a,b,c and d show a motion object in the 1, 4, 10 and 13 moments. Central row (e,f,g,h) shows the instantaneous height maps Htmax for each one of the upper images. Lower row (i,j,k,l) shows the evolution of the height map Hmax created as the median of the height maps Htmax built until that moment.
On Fig. 2 we can observe the creation of the height map of an environment. The map has been created by using a sequence of 13 images. Figure 2 only shows the images of the instants t = {1, 4, 10, 13}. On the upper row (Figs. 2 (a-d)) the images of the moments previously mentioned are shown. On the middle row (Figs. 2(e-h)), we can see the instantaneous height maps H max of the upper row images. The dark areas represent the highest zones and the white areas represent the lowest ones hmin . On the lower row (Figs. 2(i-l)), it is shown the evolution of t=1 the height map Hmax until the instant t. We can observe that for t = 1, Hmax = Hmax . But as we continue using more images, the height map tends to truly represent the permanent environment. To create these maps we have used the size of cells δ = 1 cm and the range of height is hmin = 0.5 m and hmax = 2.5 m. In order to create a complete map of the environment the camera will need to turn so it can capture information from different directions. For that purpose, the process previously described will be repeated for different values of the φ angle until it covers all the visible environment by the visual system. Due to space reasons, image of a complete map is not included. 3.2
Creation of the Occupancy Map O
Once the height map Hmax has been created, the people detection can begin. The first step, is to create an occupancy map O, which will indicate on each cell the surface occupied by the objects that do not belong to the environment
People Detection and Tracking Through Stereo Vision y
343
y Possible person object
x
x
(a)
(b)
(c)
Fig. 3. (a) Right image of the pair in an instant, the environment with an object not in background. (b) Occupancy map O corresponding to the environment. (c) Framed information related to the object, detected using O.
(Hmax ). For this purpose, after capturing a stereo pair of the environment, the position of the points detected pw is calculated. For each point pw , it is evaluated if its height is within the limits [hmin , hmax ] and if it exceeds the value of the corresponding cell in Hmax . In that case, the equivalent cell in O is incremented by a value proportional to the surface that occupies the registered point. Points closer to the camera correspond to small surfaces and vice versa. Therefore, the farther points will increment the value of the equivalent cell by a higher quantity than closer ones[6]. If the same increment is employed for every cell, the same object would have a lower sum of the areas the farther it is located from the camera. This scale on the increment value will compensate the difference on size of the objects observed according to their distance from the camera. Once the dynamic map O is created for a determinated instant, we will analyze it to detect the objects that appear on it. On a first step, a closing process takes place with the purpose to link possible discontinuities on the objects. After this, the objects are detected by grouping cells that are connected and that their sum of areas overcomes the threshold θmin . On this way, we eliminate the potential noise that appears as a consequence of the stereoscopic process. We can observe on the Fig. 3(b) the occupancy map O of the environment on Fig. 3(a) using a height map Hmax from Fig. 2(l). The darker values represent the areas with higher occupancy density. The image has been manually retouched to make visible the occupied areas. As it can be observed, on the upper area of Fig. 3(b) there are small dark dots that represent the noise of the stereo process. On Fig. 3(c) we can see in a frame the only object detected after the closing, grouping and thresholding processes. 3.3
Face Detection
If after the creation and analysis of O, an object that has entered the environment has been detected, we proceed to use a face detector to determine which one could be a person’s face. As face detector method we have used the one initially proposed by Viola and Jones [11]. This method consists on a general object detector based on the utilization of multiple simple classificators arranged in cascade. The method takes as input the right image of the pair and selects the areas of the
344
R. Mu˜ noz-Salinas et al.
(a)
(b)
(c)
Fig. 4. Face detection. (a) Right image of the pair registered with the face framed as result of the face detector. (b) Frame translated to the disparity image. (c) Face extracted from the stereoscopic image that belongs to a person.
image where a face is detected (Fig. 4(a)). This method is only applied over the region of the right image where an object was detected in the early stage. Due that the face detector tends to identify false positives, it is important to verify that the detected object is indeed a person’s face. As a verification mechanism the points detected that could be part of a face should not be spread out among different objects in O. For that reason, we will analyze the area of the face on the disparity image to verify if the points are part of one only object in O. However, this area could have points that represent the background or other object even when the detector indeed identifies a face. On Fig. 4(a) we can see how a face is identified and how in the same area there are points that belong to a face and to the wall on the background. For this reason, it is very important to precisely clarify which points, on the area identified by the detector, are truly part of a face and which are not. For this mean we run a process that consists on calculating the median of the disparity values from the frame indicated by the face detector. The points with such disparity value are used as seed to perform a region growing. On 4(c) we can observe the selected region by this method for the disparity image 4(b). If after this analysis the system would identify more than one person on this environment, the system would start tracking the closest one. 3.4
Tracking
The tracking process is interactive and begins when we take a stereo pair and create its map of occupancy O. After identifying the people present in O (as it has been previously explained), we need to determine which one will be tracked. To merge the available information taken in previous moments as well as the information processed on the current moment the Kalman filter has been used. This tool will allow us to merge in a proper manner the position that predicts the model with the information gathered during our search process. If the person is detected, active vision is properly used directing the visual system so the target is always centered on the image. The centering process aims to keep the subject visible on the image placing it on the best possible image position to analyze their gestures. If the subject is standing up on normal position, the goal is to capture the head and torso. If the subject raises their arms to point to any object or if he bends to pick up something from the floor, it is desirable to be able to register
People Detection and Tracking Through Stereo Vision
345
the action. On this work, we have contemplated the possibility of the movement sideways as well as the movements that imply changes in height (bending or sitting down). We have experimentally proven that the best option to achieve this is to keep the highest visible zone of the subject in the upper area of the image. To determine the movement that the PTU needs to perform in order to center the subject, we have used a system based on fuzzy rules that have been designed with expert knowledge and that have been adjusted according the our experimentation.
4
Experimentation
During the explanation of the model we have shown examples of its performance. A broader experimentation has been done that we are unable to show with images due to space reasons, but we will briefly explain. This experimentation refers to the detection and tracking of different people under different illumination conditions and different distances from the vision system. To perform the stereo process we have used 320x240 sized images, by applying sub-pixel interpolation to enhance the precision. The use of the proposed height map enables us to model the whole environment rotating the stereoscopic system on all directions. The creation method proposed (to use the median of the heights) allows to create the map even when there are people moving around in the room just as shown on Sect. 3.1. Although the height map is a partial description of the environment with much less information than the one stored in a full 3D map, it can be efficiently created, updated and does not require as much memory as the latter. We have proven the accurate performance of the people detection method by satisfactorily eliminating the false positives produced by the face detector. The more adequate distances to detect people vary within 0, 5 and 2, 5 meters. However, once the person to be tracked is selected among the others, the tracking can take place in longer distances. The time to compute is different on the detection process than on the tracking one, although the stereo process consumes most of the time (120 ms). On the tracking process, the face detector is the toughest task (81 ms), reaching ratios of 2, 5 fps for the whole detection process (including the stereo processing). However, on the tracking process we reached ratios up to 5 fps and we have proven that it is enough in our case. These values could substantially increase if it were feasible to optimize the code of the stereo process or with the use of specific hardware, for depth computation.
5
Conclusions and Future Work
On this paper we have presented an agent capable of people detection and that uses active vision to track them. For that reason we have used a stereoscopic system installed on a robotic head. The agent initially creates a height map of the environment that registers the motionless characteristics of it. This map
346
R. Mu˜ noz-Salinas et al.
is later used to identify the movable objects in the environment and to search potential people among them, by using the face detector. Once a person has been detected, the agent is capable of tracking them by using a robotic head that enables the stereo system to rotate. In order to achieve a robust tracking process we have used the Kalman filter. The agent keeps the person located at all times by framing their arms and head in the image. This task could be used by other agents that might need to analyze gestures and expressions of potential users in human-robot applications. As future projects we visualize the update of the map of the environment. For that reason, the agent should be capable of adding to the environment map those objects that are not people and stay motionless for a long period of time, and were not there when the map was initially created. Other aspect to consider is the use of the particles filter for the tracking task.
References 1. T. Darrell, G. Gordon, M. Harville, and J. Woodfill. Integrated Person Tracking Using Stereo, Color, and Pattern Detection. Int. Journ. Computer Vision, 37:175– 185, 2000. 2. T. Fong, I. Nourbakhsh, and K. Dautenhahn. A survey of socially interactive robots. Robotics and Autonomous Systems, 42, 2003. 3. D. M. Gavrila. The visual analysis of human movement: A survey. Computer Vision and Image Understanding: CVIU, 73(1):82–98, 1999. 4. D. Grest and R. Koch. Realtime multi-camera person tracking for immersive environments. In IEEE 6th Workshop on Multimedia Signal Processing, pages 387–390, 2004. 5. I. Haritaoglu, D. Beymer, and M. Flickner. Ghost 3d: detecting body posture and parts using stereo. In Workshop on Motion and Video Computing, pages 175 – 180, 2002. 6. Michael Harville. Stereo person tracking with adaptive plan-view templates of height and occupancy statistics. Image and Vision Computing, 22:127–142, 2004. 7. K. Hayashi, M. Hashimoto, K. Sumi, and K. Sasakawa. Multiple-person tracker with a fixed slanting stereo camera. In 6th IEEE International Conference on Automatic Face and Gesture Recognition, pages 681–686, 2004. 8. W. Liang, H. Weiming, and L. Tieniu. Recent developments in human motion analysis. Pattern Recognition, 36:585–601, 2003. 9. L. Snidaro, C. Micheloni, and C. Chiavedale. Video security for ambient intelligence. IEEE Transactions on Systems, Man and Cybernetics, Part A, 35:133 – 144, 2005. 10. R. Tanawongsuwan. Robust Tracking of People by a Mobile Robotic Agent. Technical Report GIT-GVU-99-19, Georgia Tech University, 1999. 11. P. Viola and M. Jones. Rapid object detection using a boosted cascade of simple features. In IEEE Conf. on Computer Vision and Pattern Recognition, pages 511– 518, 2001.
Mapping Visual Behavior to Robotic Assembly Tasks Mario Peña-Cabrera1, Ismael López-Juárez2, Reyes Rios-Cabrera2, Jorge Corona-Castuera2, and Roman Osorio1 1
Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas (IIMAS), Ciudad Universitaria, Univesidad Nacional Autónoma de México, México D.F. CP 04510 {mario, roman}@leibniz.iimas.unam.mx http://www.iimas.unam.mx 2 CIATEQ A.C. Centro de Tecnología Avanzada, Av. Manantiales 23-A, CP 76246, El Marqués, Querétaro, México {ilopez, reyes.rios, jcorona}@ciateq.mx http://www.ciateq.mx
Abstract. This paper shows a methodology for on-line recognition and classification of pieces in robotic assembly tasks and its application into an intelligent manufacturing cell. The performance of industrial robots working in un-
structured environments can be improved using visual perception and learning techniques. The object recognition is accomplished using an Artificial Neural Network (ANN) architecture which receives a descriptive vector called CFD&POSE as the input. This vector represents an innovative methodology for classification and identification of pieces in robotic tasks, every stage of the methodology is described and the proposed algorithms explained. The
vector compresses 3D object data from assembly parts and it is invariant to scale, rotation and orientation, and it also supports a wide range of illumination levels. The approach in combination with the fast learning capability of ART networks indicates the suitability for industrial robot applications as it is demonstrated through experimental results.
1 Introduction Advent of complex robotics systems in different applications such as manufacturing, health science and space, require better vision systems. This vision systems should be able to see and perceive objects and images as possible as human being does. This has led to an increased appreciation of the neural morphology of biological vision specially for the human vision system. Neuroanatomy and neurophysiology scientists, have discovered really exciting facts about visual path way from the initial point at the retina to the visual cortex in the brain using different experiments with different biological species. Scientists from disciplines such as computer science and mathematics are formulating the theories of neural functions in the visual pathway from computational and mathematics points of view. This research gives us a better understanding of how computational neural structures and artificial vision systems must be designed, showing some interesting neural paradigms, mathematics models, computational architectures and hardware implementations. We call a system composed of all these aspects a “ Neuro-Vision System” and we can define it as an artificial machine that “can see” A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 347 – 358, 2005. © Springer-Verlag Berlin Heidelberg 2005
348
M. Peña-Cabrera et al.
our visual world to conform applications in our daily life. Based on this, we can define two areas for a better understanding of this fascinating research field: neural morphology of biological vision and artificial neural networks paradigms used for the development of neuro-vision systems. Both approaches are necessary to deal with the development of computational strategies attempting to model attributes of human visual perception considering all constraints of existing digital computing hardware [1]. The purpose of this paper is to show a novel and simple way to consider a visual system having a machine vision with robust, flexible and easy implementation attributes for real time applications on manufacturing tasks.
2 Background and Related Work Intelligent manufacturing cells using robots with sensorial capabilities is being investigated using Artificial Intelligence techniques such as ANN and Fuzzy Logic among others, since the mathematical and control models are simplified. Acquiring information from multiple sensors in manufacturing systems provides robustness and self-adaptation capabilities, hence improving the performance in industrial robot applications. A few researchers have applied neural networks to assembly operations with manipulators and force feedback. Vijaykumar Gullapalli [2] used BackPropagation (BP) and Reinforcement Learning(RL) to control a Zebra robot, its neural controller was based on the location error reduction beginning from a known location, Enric Cervera [3] employed Self-Organization Map (SOM) and RL to control a Zebra robot, the location of the destination piece was unknown, Martin Howarth [4] utilized BP and RL to control a SCARA robot, without knowing the location of assembly, Lopez-Juarez [5] implemented FuzzyARTMAP to control a PUMA robot also with an unknown location. All of the above authors considered only constraint motion control during assembly; however, to complete the autonomy of the assembly system a machine vision system has to be considered. Additionally, a new concept was introduced by Hoska in 1988 [6] called “robotic fixtureless assembly” (RFA) which prevents the use of complex and rigid fixtures involving new technical challenges, but allowing very potential solutions. Ngyyuen, Mills [7] have studied RFA of flexible parts with a dynamic model of two robots with a proposed algorithm, which does not require measurements of the part deflections. Plut [8] and Bone, [9], presented a grasp planning strategy for RFA. The goal of RFA is to replace these fixtures with sensor-guided robots which can work within RFA workcells. The development of such vision-guided robots equipped with programmable grippers might permit holding a wide range of part shapes without tool changing. Using Artificial Neural Networks, an integrated intelligent vision-guided system can be achieved as it is shown by Langley et al. [10]. This job can be achieved by using 2D computer vision in different manner so that 3D invariant object recognition and POSE calculation might be used for aligning parts in assembly tasks if an adequate descriptor vector is used and interfaced in real time to a robot. Many authors have come with descriptor vectors and image transformations used as general methods for computer vision applications in order to extract invariant features from shapes, as Bribiesca [11] which developed a new chain code for shapes composed of regular cells, which has recently evolved even to represent 3D paths and knots, techniques for invariant pattern classification, like classical methods as the universal axis and invariant moments of Hu
Mapping Visual Behavior to Robotic Assembly Tasks
349
[12], or artificial intelligence techniques, as used by Cem Yüceer and Kemal Oflazer [13] which describes an hybrid pattern classification system based on a pattern preprocessor and an ANN invariant to rotation, scaling and translation. Applications of guided vision used for assembly are well illustrated by Gary M. Bone and David Capson [14] which developed a vision-guide fixtureless assembly system using a 2D computer vision for robust grasping and a 3D computer vision to align parts prior to mating, and Stefan Jörg et al. [15] designing a flexible robotassembly system using a multi-sensory approach and force feedback in the assembly of moving components.
3 Original Work Moment invariants are the most popular descriptors for image regions and boundary segments, but computation of moments of a two dimensional (2D) image involves a significant amount of multiplications and additions in a direct method. Fast algorithms has been proposed for this calculations, for binary images Philips [16]. The computation of moments can be simplified since it contains only the information about the shape of the image as proposed by Chen [17]. In many real-time industry applications the speed of computation is very important, the 2D moment computation is intensive and involves parallel processing, which can become the bottleneck of the system when moments are used as major features. This paper introduces a novel method which uses collections of 2D images to obtain a very fast feature data “current frame descriptor vector” of an object by using image projections and canonical forms geometry grouping for invariant object recognition, producing 3D POSE information for different pre-defined assembly parts. A fast algorithm allows calculation of a boundary object function and centroid which defines and compress 3D object information, the algorithm uses a Weight Matrix Transformation introduced by Peña [18] to generate a CFD&POSE vector which gives object recognition and pose estimation information to the robot for grasping assembly components, which in conjunction with a FuzzyARTMAP ANN forms the system called SIRIO which recognizes, learns and performs pose estimation of assembly components in the order of milliseconds, which constitutes a practical tool for real-world applications.
4 Neuro-vision Systems The first approach that most people use for designing neuro-vision systems is called “signal to symbol paradigm”, in this approach, the aim is to have meaningful scene descriptions from raw sensory data . A large computational requirement is used in this approach. If a typical time-variant visual scene has to be analyzed, there are millions of instructions to be performed for each scene, advent of faster processor today can solve partially this problem but compared with our own visual experience to perceive and provide a meaning to a complex time-variant scene in approximately 70 to 200 milliseconds and considering that many aspects of early biological vision are achieved in only 18 to 46 transformations steps [19]. It is necessary to find another method using less computational power if we want to emulate better the human visual system, and mainly because it has been estimated that 60% of sensory information in humans is by visual pathway [20].
350
M. Peña-Cabrera et al.
It can be inferred that biological vision architecture is massively parallel and uses a basic hierarchical information processing [21]. Transformation and reorganization of visual data into abstract representations is similar to the “signal to symbol paradigm”, that performs computations in parallel involving spatial (X-Y plane) and temporal (time-dependant) aspects of visual information processing. From engineering perspective, it is not necessary and would be practically impossible to emulate the precise electrophysiological aspects of biological vision, but it is desirable to replicate some of the neural computational structures from this biological vision concerning with processing, storing and interpretation of the spatial-temporal visual information [22].
5 Computational Neural Networks From a computational perspective, the individual neuron layers, as the retina, can be conceptualized as one or more two-dimensional arrays of neurons that perform specific operations on the visual signals. The primary structural characteristics of a computational neural network (CNN) are: an organized morphology containing many parallel-distributed neurons, a method of encoding information within the synaptic connections of neurons and a method of recalling information when presented with a stimulus input pattern. From a signal-processing point of view, the biological neuron has two key elements, the synapse and the soma , they are responsible for performing computaitonal tasks such as: learning, knowledge acquistion (storage or memory of past experience) and recognizing patterns. In simple terms, a neuron can be depicted as an information processing element that receives an n-dimensional neural input vector:
X ( k ) = [ x1 ( k ), x 2 (k ),..., x i (k )] ∈ ℜ n
(1)
which represents the signal being transmited from the n-neighboring neuron from the sensory neurons. Mathematically, the information-processing ability of a neuron can be represented as a nonlinear mapping operation Μ ξ (figure 1), from the input vector
X (k ) ∈ ℜ n to the scalar output Y (k ) ∈ ℜ n that is:
Μ ξ : X (k ) ∈ ℜ n → Y (k ) ∈ ℜ n
Neural Processing Element
Neural Input Vector
X (k ) ∈ ℜ
Mapping
n
Μξ
(2)
Neural Output Vector
Y (k ) ∈ ℜ
n
Fig. 1. A simplified model of a biological neuron (information-processing perspective)
Mapping Visual Behavior to Robotic Assembly Tasks
351
5.1 Inspiring Ideas and ART Models Knowledge can be built either empirically or by hand as suggested by Towell and Shavlik [23]. Empirical knowledge can be thought, as giving examples on how to react to certain stimuli without any explanation, and hand-built knowledge, where the knowledge is acquired by only giving explanations, but without examples. It was determined that in robotic systems, a suitable strategy should include a combination of both methods. Furthermore, this idea is supported by psychological evidence that suggests that theory and examples interact closely during human learning, Feldman [24]. Learning in natural cognitive systems, including our own, follows a sequential process as it is demonstrated in our daily life. Events are learnt incrementally, for instance, during childhood when we start making new friends, we also learn more faces and this process continues through life. This learning is also stable because the learning of new faces does not disrupt our previous knowledge. These premises are the core for the development of Connectionist Models of the human brain and are supported by psychology, biology and computer sciences. Psychological studies suggest the sequential learning of events at different stages or “storage levels” termed as Sensory Memory (SM), Short Term Memory (STM) and Long Term Memory (LTM). There are different types of ANN, for this research a Fuzzy ARTMAP network is used. This network was chosen because of its incremental knowledge capabilities and stability, but mostly because of the fast recognition and geometrical classification responses. The Adaptive Resonance Theory (ART) is a well established associative brain and competitive model introduced as a theory of the human cognitive processing developed by Stephen Grossberg at Boston University. Grossberg resumed the situations mentioned above in what he called the Stability-Plasticity Dilemma suggesting that connectionist models should be able to adaptively switch between its plastic and stable modes. That is, a system should exhibit plasticity to accommodate new information regarding unfamiliar events. But also, it should remain in a stable condition if familiar or irrelevant information is being presented. He identified the problem as basic properties of associative learning and lateral inhibition. An analysis of this instability, together with data of categorization, conditioning, and attention led to the introduction of the ART model that stabilizes the memory of self-organizing feature maps in response to an arbitrary stream of input patterns S. Grossberg [25]. The theory has evolved in a series of real-time architectures for unsupervised learning, the ART-1 algorithm for binary input patterns G. Carpenter [26]. Supervised learning is also possible through ARTMAP G. Carpenter [27] that uses two ART-1 modules that can be trained to learn the correspondence between input patterns and desired output classes. Different model variations have been developed based on the original ART-1 algorithm, ART-2, ART-2a, ART-3, Gaussian ART, EMAP, ViewNET, Fusion ARTMAP, LaminART just to mention but a few.
6 Our Approach We think it is possible to get fast and reliable information from a simple but focused analysis of what an object might show as the very concerning, primitive and neces-
352
M. Peña-Cabrera et al.
sary information in order to have a substantial and robust cognition of what is seeing to memorize the very important aspects of the scene (we have called them “clues”), which later, can be used to retrieve memorized aspects of the object without having to recall detailed features and aspects. In someway humans do that process once an object has been seeing and learned for the very first time. We think that by learning canonic forms within the initial cognition process, it is possible to reconstruct the overall object cognition using primitives and perceptual grouping aspects (as the Gesttalt Laws), concerning with grouping, proximity, similarity and simplicity factors and Grossberg´s ideas about Boundary Contour System (BCS) and Feature Contour System (FCS), as shown in figure 2.
Grossberg´s BCS and FCS principles
ORS
BCS
Monocular Processing
FCS
MP
[][][][] [][][][] [][][][] [][][][] [][][][] [][][][] [][][][] [][][][]
Gesttalt principles
Fig. 2. Grossberg and Gesttalt principles representation
a).-
b).-
c).Fig. 3. a) Canonical forms for initial learning cognition. b) 2D circle, square, and radiusedsquare assembly pieces. c) Descriptor vector family for circle assembly part in different positions, angle, inclinations and rotations.
Mapping Visual Behavior to Robotic Assembly Tasks
353
In this section, we will show this novel idea with simple parts that we are using in assembly applications within a manufacturing intelligent cell, we consider a circle and a rectangle as two canonical forms for the initial cognition learning as shown in figure 3a. If our system can learn this canonical forms and include them in the initial cognition (a priori knowledge), with think it is possible to provide information of objects in real world (3D) representing the assembly parts (we have called circle, rectangle and radiused-square) with 2D representations as shown in figure 3b. The pieces, can be constructed with canonical forms grouped in different ways and following the a priori knowledge, considering “clues” this grouped forms, they can be represented by a Descriptor Vector containing all necessary information to achieve this idea. Having such a descriptor vector, an ANN can be trained and it is expected to have incremental knowledge to conform descriptor vector families which can be generated on-line with the same vision system as it is represented in figure 3c. With many learning processes and an incremental knowledge, the process will be speed up because of being just in recall process, once having an algorithm to create de descriptor vector, creating the descriptor vector-component bin, the process becomes an autonomous mechanism and the ARTMAP network sends each instance to its respective cluster. The Boundary Object Function (BOF), is the function that describes a specific piece and it will vary according to the shape (see figure 4), this functions are showed for the circle, square and radiused-square parts used in the experiments. 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
a
1
15 29 43 57
71 85 99 113 127 141 155 169 183
1
b
15 29
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 43 57 71
85 99 113 127 141 155 169 183
c
1
15 29 43 57 71 85 99 113 127 141 155 169 183
Fig. 4. BOF a).- circle b).- square c).- radiused-square
6.1 Descriptor Vector Generation and Normalization The algorithm to generate the descriptor vector that we have called [CFD&POSE] is shown for one of the canonical forms (rectangle), a binary image is generated with some pre-processing operators and acquisition routines, applying the CFD&POSE algorithm we get an image which provide us with contour and centroid information of objects in a very novel and fast way graphically showed in figure 5. The (HWf) Weight Transform Matrix is obtained to have a relation set of :
where :
Number NWf → [coordinate numerical bin ]
(3)
NWf min ≤ ¦ (1´s ) within (kxk) Kernel ≤ NWf max for k = 3.
(4)
it can be seen that Nwfmax provides the centroid of object and NWf min the boundary points of contour. For centroid calculations a summation of all Nwfmax is made for all X-Y´s as follows:
354
M. Peña-Cabrera et al.
[
Xc = 1 No . NWf max − X ¦ NWf max − X
[
Yc = 1 No . NWf max − Y ¦ NWf max − Y
]
(5)
]
and for boundary points we have: a).- Binary image 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
b).- WMT image 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 2 4 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 2 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 3 6 9 9 9 9 9 9 9 9 9 9 9 9 9 9 6 3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 2 4 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 2 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
c).- CFD & POSE image 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Fig. 5. Algorithm images: a).- Binary image, b).- WMT image, c).-CFD&POSE image
Mapping Visual Behavior to Robotic Assembly Tasks vectorX ( m ) = {x 0, x1, x 2,..... xn}NWf min :
355
(6)
vectorY ( m ) = {y 0, y1, y 2,... yn}NWf min
centroid and coordinate of boundary points are obtained as well as a vector for calculations to get form feature extraction. Distances to get the BOF (boundary object function) are: 2 2 Dn = ( X 2 − X 1) + (Y 2 − Y 1)
∀ 0 ≤ n ≤ size of angular grid
(7)
Once the information has been processed, a descriptive vector is generated. This vector is the input for the neural network, (the vector has 185 data): The descriptive vector is called CFD&POSE and it is conformed by:
[CDF & POSE ] = [ D1 , D2 , D3 ,..., Dn , X c , Yc , θ , Z , ID]T
(8)
Di are the distances from the centroid to the perimeter of the object. XC, YC, are the coordinates of the centroid. φ, is the orientation angle. Z is the height of the object. ID is a code number related to the geometry of the components.
7 Experimental Results In order to test the robustness of the ANN, the Fuzzy ARTMAP Neural Network was trained first with 2808 different patterns and its learning capability analyzed. The percentage of recognition and the number of generated neurons are shown in figure 6. The graph shows how the system learned all patterns in three epochs, creating only 32 neurons to classify 2808 patterns. The average time for training was 4.42 ms, and the average for testing was 1.0 ms. Results reported in this article employed 216 patterns corresponding to 72 square, 72 circle and 72 radiused-square components of the same size.
%Recongintion / #Neurons
Learning convergence 120 100 80 %Regcongnition # Neurons
60 40 20 0 1
2
3 Epochs
4
Fig. 6. Learning convergence of the neural network
5
356
M. Peña-Cabrera et al.
With these training patterns set, the system was able to classified correctly 100% of the pieces presented on- line even if they were not of the same size, orientation or locations and for different light conditions. The average time of the total assembly cycle is 1:50.6 minutes and the minimum time is 1:46 minutes, the longest time is: 1:58 minutes. The average of the error made in both zones (grasping and assembly zones) is: 0.8625 mm, the minimum is: 0 mm while the maximum is 3.4 mm. The average of the error angle is: 4.27 ° , the minimum is: 0° and the maximum is 9°. The figure 7, shows eighteen different X and Y points where the robot might reach the male component showed as error X(mm) and error Y(mm), for the area for success grasping and assembly. See [28] for more detail.
Tolerance Area for Success Grassping Zone 1
Tolerance Area for Success Assembly Zone 2
1 18 17
5
1 2
4
18 3
3
16
4
2
1
5
15
6
14
1
0
5
0
14 13
7 12
8 11
3
3
16
2 15
2
4
17 4
5
9
6
13
7 12
8 11
10 Error X (mm) Error Y (mm) Tolerance (mm)
Error X (mm) Error Y (mm) Tolerance (mm)
9 10
Fig. 7. Left positional error referenced to real centroid in male component. Right positional error referenced to real centroid in female component.
8 Conclusions and Future Work A methodology for object recognition and POSE estimation for assembly components in manufacturing cells has been described. Issues regarding image processing, centroid and perimeter calculation are illustrated. Results show the feasibility of the method to send grasping and morphologic information (coordinates and classification characteristics) to a robot in real-time. Accurate recognition of assembly components and workpieces identification was successfully carried out by using a FuzzyARTMAP neural network model which performance was satisfactory with 100% identification and fast recognition times for the used workpieces lower than 5 ms. Experimental measurements showed ±3 millimeter of precision error in the information sent to the robot. The intelligent manufacturing cell is being developed with multimodal sensor capabilities. Current work addresses the use of ANN’s for assembly and object recognition separately, future work is oriented to use the same neural controller for all different sensorial modes. The SIRIO vision system architecture is being improved for handling complex 3D objects in manufacturing applications.
Mapping Visual Behavior to Robotic Assembly Tasks
357
References 1. A. Rosenfeld,. Computer vision: a source of models for biological visual processes, Biomedical Engineering, 36,1, (1989) 93-96 2. Vijaykumar Gullapalli, Judy A. Franklin; Hamid Benbrahim: Acquiring robot skills via reinforcement learning. IEEE Control Systems, pages 13-24, February (1994) 3. Enric Cervera; Angel P. del Pobil: Programming and learning in real world manipulation tasks. IEEE/RSJ Int Conf on Inteligent Robot and Systems, 1:471-476, September (1997) 4. Martin Howarth: An investigation of task level programming for robotic assembly. PhD thesis, The Nottingham Trent University, January 1998 5. I Lopez-Juarez: On-line learning for robotic assembly using artificial neural networks and contact force sensing. PhD thesis, The Nottingham Trent University, (2000) 6. Hoska DR: Fixturless assembly manufacturing. Manuf. Eng., 100:49-54 , April (1988) 7. W. Ngyuen and J.K. Mills., Multirobot control for flexible fixturless assembly of flexible sheet metal autobody parts. IEEE Int. Conf. on Robotics and Aut., , pp. 2340-2345, (1996) 8. W.J. Plut and G.M. Bone: Limited mobility grasps for fixturless assembly, In proceedings of the IEEE Int. Conf. on Robotics and Aut. , Minneapolis, Minn., pp. 1465-1470, (1996) 9. W.J. Plut and G.M. Bone: 3-D flexible fixturing using multi-degree of freedom gripper for robotics fixturless assembly. IEEE Int. Conf. on Robotics and Aut., pp. 379-384, (1997) 10. Langley C.S., et al.: A memory efficient neural network for robotic pose estimation, IEEE Int. Symp. on Computational. Intelligence on Robotics and Aut., No 1, 418-423, (2003) 11. E. Bribiesca: A new Chain Code. Pattern Recognition 32 , Pergamon, 235-251 , (1999) 12. M.K. Hu: Visual pattern recognition by moment invariants, IRE Trans Inform Theory IT8, 179-187, (1962) 13. Cem Yüceer adn Kema Oflazer: A rotation, scaling and translation invariant pattern classification system. Pattern Recognition, vol 26, No. 5 pp. 687-710, (1993) 14. Gary M. Bone , David Capson: Vision-guided fixturless assembly of automotive components. Robotics and Computer Integrated Manufacturing 19, 79-87 , (2003) 15. Stefan Jörg et. al. : Flexible robot-assembly using a multi-sensory approach. IEEE, Int. Conf. on Robotics and Aut., San Fco. Calif, USA (2000), pp 3687-3694 16. W. Philips: A new fast algorithm for moment com., Pattern Recog. 26, 1619-1621, (1993). 17. K. Chen: Efficient parallel algorithms for computation of two-dimensional image moments, Pattern Recognition 23, 109-119, (1990) 18. M. Peña-Cabrera, I. Lopez Juarez and R. Rios-Cabrera: A learning approach for on-line object recognition in robotic tasks, Int. Conf. on Computer Science, IEEE Computer Society Press. (2004) 19. L. Uhr: Highly parallel, hierarchical, recognition cone perceptual structures. Parallel Computer Vision, L. Uhr Ed., 249-292 (1987) 20. R.E. Kronauer, Y. Zeevi: Reorganization and diversification of signals in vision. IEEE Trans. Syst. Man, Cybern., SMC-15,1,91-101 (1985) 21. L. Uhr: Psychological motivation and underlying concepts. Structured Computer Vision, S. Tanimoto ,A. Klinger Ed. , 1-30 (1980) 22. Douglas G. Granrath: The role of human vision models in image proccesing. Proc. IEEE 69,5,552-561 (1981) 23. Geoffrey G. Towell, Jude W. Shavlik: Knowledge-based artificial neural networks Artificial Intelligence. Vol. 70, Issue 1-2, pp. 119-166. (1994) 24. Robert S. Feldman: Understanding Psychology, 3rd edition. Mc Graw-Hill, Inc., (1993).
358
M. Peña-Cabrera et al.
25. Stephen Grossberg: Adaptive pattern classification and universal recoding II: Feedback, expectation, olfaction and illusions. Biological Cybernetics. Vol. 23, pp. 187-202, 1976. 26. Gail A. Carpenter et al.: A massively parallel architecture for a self-organizing neural pattern recognition. Machine, Academic Press, Inc. Pp. 54-115. (1987) 27. Gail A. Carpenter, et al: ARTMAP: supervised real-time learning and classification of nonstationary data by self-organizing neural network. Neural Networks 565-588 (1991) 28. M. Peña-Cabrera, I. López-Juárez, R. Ríos-Cabrera, J. Corona-Castuera: Machine vision learning process applied to robotic assembly in manufacturing cells. Journal of Assembly Automation Vol. 25 No. 3 (2005)
Multilevel Seed Region Growth Segmentation ´ Raziel Alvarez, Erik Mill´ an, and Ricardo Swain-Oropeza Mechatronics Research Center (CIMe), Tecnol´ ogico de Monterrey, Campus Estado de M´exico, Km 3.5 Carretera al Lago de Guadalupe, Atizap´ an de Zaragoza, Estado de M´exico, Mexico, 52926 Phone: +52 55 5864 5659 {raziel, emillan, rswain}@itesm.mx
Abstract. This paper presents a technique for color image segmentation, product of the combination and improvement of a number of traditional approaches: Seed region growth, Threshold classification and level on detail in the analysis of demand. First, a set of precise color classes with variable threshold is defined based on sample data. A scanline algorithn uses color clases with a small threshold to extract an initial group of pixels. These pixels are passed to a region growth method, which performs segmentation using higher-threshold classes as homogeneity criterion to stop growth. This hybrid technique solves disadvantages from individual methods and keeps their strengths. Its advantages include a higher robustness to external noise and variable illumination, efficiency on image processing, and quality on region segmentation, outperforming the results of standalone implementations of individual techniques. In addition, the proposed approach sets a starting point for further improvements.
1
Introduction
Color image segmentation provides with an efficient and relatively simple way to identify colored objects. In Robocup’s Four Legged League, it represents a typical approach for image analysis. In this league, all image processing and robot control is computed autonomously by the internal processor of an aibo mobile robot, hence, there are strong restrictions on computing resources. Several techniques related to this type of analysis have been proposed, each trying to cope with problems such as the high processing frame rate required, sensitiveness to variable lighting conditions and the noise produced by external objects. The techniques proposed so far belong to many categories from the classical image processing algorithms. Typical approaches analyse all pixels in the image, using predefined color classes and a simple classification method to detect regions of interest. Some techniques perform a growth of color regions based in local pixel information, such as the contrast between neighbours. Other techniques use edge detection filters and pattern matching to identify objects, achieving more tolerance to illumination changes. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 359–368, 2005. c Springer-Verlag Berlin Heidelberg 2005
360
´ R. Alvarez, E. Mill´ an, and R. Swain-Oropeza
From the application of these approaches to our problem, we identified two areas of improvement. The first one is concerned on how to identify accurately pixels in our environment and discard external noise. The second problem deals with efficiency, specially on the improvements obtained by processing only the regions of interest on the image, as usually objects of interest represent a small area on images. These problems are related, as focusing the algorithm on the correct areas of the image will reduce the probability on finding noise. The use of additional information about the environment may help to better identify the important regions of the image. For instance, in our domain, the information on the objects in the environment may be combined with information on the camera perspective to predict the position of objects. In this work, we propose a combination of image segmentation techniques already used in our domain, in order to of harness their combined advantages and minimize their disadvantages. The technique presented in this paper provides a high quality image segmentation, improving robustness to illumination changes and achieving a high processing frame rate. The document is organized as follows. In section 2 we present an overview of related work on color image segmentation. Section 3 describes our proposed solution, starting with a multilevel color classification to discard noise, followed by a scanline processing algorithmm to segment the image, the extraction of a set of seeds from possible objects of interest, and a region growth algorithm to obtain detailed information about these objects. The description and implementation details on these components are outlined in sections 4, 5, 6, and 7 respectively. Some results obtained with the technique are provided in section 8. Finally, section 9 contains a summary of conclussions and the future work.
2
Previous Work
In the Robocup’s domain, several techniques and algorithms have been proposed, corresponding to many categories of image processing theory. Common image segmentation algorithms consist on defining a set of color classes that describe the objects of interest in the environment, translating them into look-up tables [1]. This kind of methods usually perform a pixel by pixel processing, where each one is classified into one of the color classes. Many approaches have been proposed [2, 3, 4, 5, 6] to solve the color class definition issue and achieve robustness to illumination changes. While a natural solution for adaptation to different light conditions is an on-line color class update, the large computation times required by techniques that offer good results discourages this idea. On the other hand, simplistic and fast techniques lead to misclasification problems and to poor robustness to illumination changes. However, these techniques have some important drawbacks. First, they usually consume much processing time by reading all of the pixels in the image. Moreover, this increases the chances of classifying external noise as useful objects. Other algorithms avoid processing the whole image by extracting pixels with high probability of belonging to a color in order to start the processing
Multilevel Seed Region Growth Segmentation
361
from them [7, 8]. These techniques are known as Seed Region Growth (srg) algorithms, and use those seed pixels to initiate the growth of the regions of interest according to a homogeneity criterion. The criterion substitutes the color classes and is usually replaced by a contrast metric to avoid illumination problems. However, they are highly unpredictable and very difficult to control, leading to flooding problems. One of the most sucessfull family of algorithms consists on incorporating information about the camera perspective [9, 10, 11] to sample pixels that might contain objects of interest. Hence, it is not necessary to use the full resolution of images. Image is processed by using a set of scanlines in a layout perpendicular to the horizon. This techniques avoid areas where no objects can be found, increasing efficiency and discarding areas of noise. These algorithms may use edge detection techniques to increase their tolerance to illumination changes. However, since this method just processes the pixels along the scan lines, important information about solid objects might be lost.
3
Overview of Our Approach
The proposed segmentation algorithm implies the combination of three techniques, organized in two stages. First, scan lines are used to extract a set of color seeds. The extraction process relies in the definition of color classes. In this case, we are looking to identify pixels with a high probability of belonging to the class, so color classes are defined strictly with the implicit surfaces classification technique. From these seeds, the region growth algorithm will locate regions of interest by using a more relaxed color class as the homogeneity criterion. Thus, two classes of different probabilities are defined for each color. The following sections will describe each of the parts of this algorithm.
4
Color Classification
Color classification is a basic criteria to segment images. It consists in defining a set of color classes in the color space that characterize the known objects in the environment. In this work, color classes are used to determine which pixels in the image will be used as seeds. The usual way to create the color classes is collecting distinctive color samples and then defining each class in terms of these samples through clustering. There are several methods to accomplish this stage. One simple approach is the definition of six thresholds for the minimal and maximal intensities of the three color channels, as proposed in [1]. However, the poor fitting of the prismatic volume to the cloud of samples may produce misclassification problems. Several other approaches have been proposed, trying to preserve properties such as simplicity, efficiency and robustness to illumination changes. For this application we used the efficient and robust method depicted in [12]. The technique is based on implicit surfaces as the limiting contour for color classes. It starts from a collection of images from which a user selects a set of color
362
´ R. Alvarez, E. Mill´ an, and R. Swain-Oropeza
samples. Then, a number of spherical primitives are distributed uniformly along the cloud of samples using the k-means algorithm. Once located, the radius of the primitives is obtained from the standard deviation of the samples contained by each primitive. Finally, these primitives are blended to produce the final surface. The implicit function is defined by: (x)
fi (P ) =
(y)
(z)
(x − ci )2 + (y − ci )2 + (z − ci )2 ri2
(1)
with the following properties: f (P ) < Γ For all interior points P (x, y, z). f (P ) > Γ For all exterior points P (x, y, z). f (P ) = Γ For all surface points P (x, y, z). where Γ is a threshold that may be interpreted as a scale parameter.
Fig. 1. Results of configuration of primitives and final color class
From the defined color classes, a look-up table is created for efficient image processing. The produced configurations and the resulting implicit surfaces fit closely the point samples used in the process, producing an accurate representation, as illustrated in Figure 1. Additional details on this technique and its advantages can be found in [12]. Multilevel. The use of strict color classes for scanning and flexible classes for region growth is a natural choice. The strict classes includes pixels with high probabilities of being part of a given color class, reducing possible noise sources; while the flexible classes support a controlled region growth, reducing flooding problems, and increasing robustness to varying illumination. The difference between these two types of color classes is shown in Figure 2. It is important to consider that the equation of implicit surfaces can be seen as a distance metric, or a potential field. When large threshold values are selected to create the surface, there is a significantly higher risk of overlapping between different color classes. To solve this problem, pixel values will be classified into the closest class, according to the implicit function; in other words, into the class with higher probabilities. For greater efficiency, image pixels are classified using a precalculated lookup table, built by subdividing each color component; then, a color is assigned to each combination of their values, according to our color segmentation criteria. For points on color space located over the superposed area, the winner class is
Multilevel Seed Region Growth Segmentation
363
Fig. 2. Comparison in tolerance when creating color classes according to their purpose. a) Class used for scaning (Γ = 0.5). b) Class used for region growth (Γ = 1.0).
Fig. 3. Division criterion applied over two superposed classes
the one with the smallest distance to the point. Graphically, this rule is depicted in Figure 3.
5
Scanlines and Horizon Detection
The use of scanlines is a simple way to segment an image without processing every single pixel. This technique relies on a sampling pattern that selects a small set of pixels for analysis, reducing processing time. In particular, we use the approach from J¨ ungel et al. [9, 10], where a set of lines is used for processing. These lines are perpendicular to the horizon, and their density varies according to their distance to the camera, which is approximated based on the proximity of each pixel to the horizon line. As the pixel is closer to the horizon, it is more probable that it belongs to a distant object, so the sampling density should be higher than for pixels away from the horizon line. This density is exemplified in Figure 4.a. However, this approach requires the horizon of the camera for each picture. This horizon is obtained from the kinematic model of the camera, using the field plane as reference. A method to calculate the horizon was proposed by J¨ ungel et al. [13]. In this method, the horizon line is defined as the set of pixels which are located at the same height from the field plane as the optical center of the camera. Hence, the horizon is defined as the intersection between the camera
´ R. Alvarez, E. Mill´ an, and R. Swain-Oropeza
364
a)
b)
Fig. 4. a) Horizon-oriented scanlines for a sample image. Higher detail is selected for farther areas, while lower detail is chosen for closer areas. b) Planes used in the extraction of the horizon line.
projection plane P and a plane H, which is parallel to the field plane and crosses the center of projection of the camera c. This is illustrated in Figure 4.b.
6
Seed Extraction
The scanlines will be used to obtain the seeds for the region growth algorithm. In this way, just the pixels along the scanline are analyzed and coordinates stored for those with a high posibility to belong to a given color class. Scan pattern. The scan pattern consists of a set of lines, perpendicular to the horizon, that will start from a line parallel to the horizon and go down to the field. Here, a line 8 degrees above the horizon was enough to detect objects higher than the camera, such as goals or beacons within our environment, and helped to discard sources of noise outside the field. Scanlines of different length will be intertwined, as seen in Figure 4.a, in order to evaluate more samples at possibly distant areas of the image. Different lengths allow to control the density of the analysis. The proposed algorithm uses three different lengths, with a separation between lines of aproximately 1 degree, to guarantee that every object in the environment will be intersected by at least one scan line. Classification. Pixels lying within these scanlines will be classified using the strict color classification previously generated in order to reduce the possibilities of identifying noise as an object of interest. In the current approach, classes are precalculated and stored in the form of a look-up table for efficiency, and remain without change during the operation of the vision system. On theses classes, the probability threshold for classification is controlled via the surface scale parameter Γ . We call the natural scale of the surface when Γ is equal to 1. Values between 0 and 1 result in more tight and reduced classes, while values greater that 1 produce more flexible, tolerant classes. Thus, the classes used for this stage in our algorithm use thresholds between 0 and 1.
Multilevel Seed Region Growth Segmentation
365
This routine does not need to process the entire image, just pixels on scanlines. Besides, it works as a filter to discard regions above the horizon line, which combined with the strict definition of color classes reduce significatively false positive problems caused by external noise. During this stage it is also possible to detect field borders and lines, from transitions from green to white, which is simpler in this stage, as region growth is an unnecesary step for border detection. As no region growth is done, less strict color classes are used.
7
Seed Region Growth
Seed Region Growth is a region-based technique proposed by Wasik and Saffiotti [8] used to perform color image segmentation. This algorithm starts with a set of pixel seeds from each color class. The srg routine takes each color set and selects a seed to start the growth. A new region is assigned to this seed. We grow this region in a 4-pixel neighbourhood. If the neighbouring pixel already belongs to a pixel, it is ignored. If not, we use our homogeneity criterion to determine if the neighbour is similar enough to integrate it to the region. In such case, the pixel is added as a new seed for the region. Growth is interrupted when there are no more seeds for the current region. Then, a new seed is selected from the initial seed set, and the algorithm is repeated, creating new regions until there are no more initial seeds. The homogeneity criterion is central for the algorithm. In [8], a simple threshold evaluation regarding the maximum contrast on color component values is proposed. However, the contrast criterion is very difficult to fine tune, produces variable results and it is difficult to control, so it is prone to flooding problems. We use a different homogeneity criterion that relies on whether the pixel lies within a set of color classes with a higher tolerance than classes used for seed extraction. This classes are generated by modifying the value of the Γ parameter. Usually, the scale parameter Γ is set to 1 or greater, although the only restriction is that Γ value for classes in this stage must be bigger than the value used in past stage.
8
Results
The purpose of our technique is to achieve better segmentation results, robustness to light variations and at the same time improve the efficiency of other algorithms. For the algorithm tests, we used full resolution images from an aibo ers-2100, at a resolution of 176 × 144 pixels. Seed extraction. This is the first stage of our algorithm and extracts a set of color pixel seeds. Color classes are defined estrictly using the implicit surfaces technique with a scale parameter Γ = 0.5. At the same time, this routine detects field lines and field borders, storing coordinates of pixels in white-green transitions for its later interpretation. Some results of this stage are shown in Figure 5. The seed extraction and lines detection processing took an average of 16ms.
366
´ R. Alvarez, E. Mill´ an, and R. Swain-Oropeza
Fig. 5. Results from seed extraction and field lines and field borders (red points). Scale parameter Γ = 0.5.
Fig. 6. Imege segmentation produced from the region growth algorithm. Scale parameter Γ = 1.0.
Multilevel Seed Region Growth Segmentation
367
Region growth. Once the seeds are extracted, the second and final stage of our algorithm is run. It performs the seed region growth algorithm and it uses a set of color classes with a scale parameter Γ = 1.0. On average, it takes about 24ms to perform the segmentation of an image.
9
Conclusions and Future Work
A new technique for color image segmentation has been proposed as a result of the combination of different techniques. The technique combines the advantages of the composing methods and reduce their disadvantages. Some of the improvements from this hybrid technique are: – A greater control on the homogeneity criterion than using the method proposed by Wasik and Saffiotti [8]. – Scanlines alone cannot identify correctly small objects on the image. The region growth increases the detected pixels, achieving a detail similar of that obtained by processing every pixel, but using less processor resources. – The use of two levels of color classes helps to reduce the noise produced by external objects. – It is not required that scanlines pass through an entire object to identify it, just one pixel is neccessary. Hence, a quality segmentation can be achieved using less scanlines. – A simple variation on the scale parameter can improve tolerance to lighting conditions and control the size of the regions reached by the region growth algorithm. These results are promising, since the efficiency and quality on segmentation objectives were fulfilled. Our future work centers on changing the look-up table segmentation for a direct evaluation of the implicit function, in order to readjust on-line our color classes accordingly to the illumination conditions. The second part of our future work would be the design of such an algorithm that, using the region-growth algorithm, recollects the new color samples necessary to update color classes. Finally, it would be significant to speed up the reconfiguration step of the implicit surfaces that describe the color classes.
References 1. Bruce, J., Balch, T., Veloso, M.M.: Fast and inexpensive color image segmentation for interactive robots. In: IEEE/RSJ International Conference on Intelligent Robots and Systems. (2000) 2061–2066 2. Oda, K., Ohashi, T., Kato, T., Katsumi, Y., Ishimura, T.: The kyushu united team in the four legged robot league. In: 6th International Workshop on RoboCup 2002 (Robot World Cup Soccer Games and Conferences), Lecture Notes in Artificial Intelligence, Springer Verlag (2002)
368
´ R. Alvarez, E. Mill´ an, and R. Swain-Oropeza
3. Dahm, I., Deutsch, S., Hebbel, M., Osterhues, A.: Robust color classification for robot soccer. In: 7th International Workshop on RoboCup 2003 (Robot World Cup Soccer Games and Conferences), Lecture Notes in Artificial Intelligence, Springer Verlag (2003) 4. Nakamura, T., Ogasawara, T.: On-line visual learning method for color image segmentation and object tracking. In: IEEE/RSJ International Conference on Intelligent Robots and Systems. (1999) 222–228 5. Mayer, G., Utz, H., Kraetzschmar, G.K.: Towards autonomous vision selfcalibration for soccer robots. In: IEEE/RSJ International Conference on Intelligent Robots and Systems. (2002) 6. Li, B., Hu, H., Spacek, L.: An adaptive color segmentation algorithm for sony legged robots. In: 21st IASTED International Multi-Conference on Applied Informatics. (2003) 126–131 7. von Hundelshausen, F., Rojas, R.: Tracking regions. In: 7th International Workshop on RoboCup 2003 (Robot World Cup Soccer Games and Conferences), Lecture Notes in Artificial Intelligence, Springer Verlag (2003) 8. Wasik, Z., Saffiotti, A.: Robust color segmentation for the robocup domain. In: International Conference on Pattern Recognition. (2002) 9. Bach, J., J¨ ungel, M.: Using pattern matching on a flexible, horizon-aligned grid for robotic vision. In: Concurrency, Specification and Programming. (2002) 11–19 10. J¨ ungel, M., Hoffmann, J., L¨ otzsch, M.: A real-time auto-adjusting vision system for robotic soccer. In: 7th International Workshop on RoboCup 2003 (Robot World Cup Soccer Games and Conferences), Lecture Notes in Artificial Intelligence, Springer Verlag (2003) 11. J¨ ungel, M.: Using layered color precision for a self-calibrating vision system. In: 8th International Workshop on RoboCup 2004 (Robot World Cup Soccer Games and Conferences), Lecture Notes in Artificial Intelligence, Springer Verlag (2004) ´ 12. Alvarez, R., Mill´ an, E., Swain-Oropeza, R., Aceves-L´ opez, A.: Color image classification through fitting of implicit surfaces. In: 9th Ibero-American Conf. on Artificial Intelligence (IBERAMIA), Cholula, Mexico, Lecture Notes in Computer Science, Springer Verlag (2004) 13. J¨ ungel, M.: A vision system for robocup: Diploma thesis. Master’s thesis, Institut f¨ ur Informatik Humboldt-Universit¨ at zu Berlin (2004)
A CLS Hierarchy for the Classification of Images Antonio Sanchez1, Raul Diaz2, and Peter Bock3 1
LANIA, Xalapa,Veracruz, México 72820 & TCU, Fort Worth Texas 76129 [email protected] 2 LANIA , Xalapa,Veracruz, México 72820 3 GWU, Washington D.C. 20006
Abstract. The recognition of images beyond basic image processing often relies on training an adaptive system using a set of samples from a desired type of images. The adaptive algorithm used in this research is a learning automata model called CLS (collective learning systems). Using CLS, we propose a hierarchy of collective learning layers to learn color and texture feature patterns of images to perform three basic tasks: recognition, classification and segmentation. The higher levels in the hierarchy perform recognition, while the lower levels perform image segmentation. At the various levels the hierarchy is able to classify images according to learned patterns. In order to test the approach we use three examples of images: a) Satellite images of celestial planets, b) FFT spectral images of audio signals and c) family pictures for human skin recognition. By studying the multi-dimensional histogram of the selected images at each level we are able to determine the appropriate set of color and texture features to be used as input to a hierarchy of adaptive CLS to perform recognition and segmentation. Using the system in the proposed hierarchical manner, we obtained promising results that compare favorably with other AI approaches such as Neural Networks or Genetic Algorithms. “To understand is to perceive patterns” Sir Isaiah Berlin (1909-1997)
1 Introduction An adaptive systems such as a Neural Network and Genetic Algorithms relies on training the system using a set of samples or exemplar images, however in their case an extensive preprocess of the image is required in to order to scale the images. In this we use CLS models [13] as an alternative to other adaptive models that do not required such an extensive preprocess of the images. Instead CLS layers are used to learn color and texture features in a non-parametric fashion, mainly classifying the structure of the images. A hierarchical organization is proposed to solve various classification tasks. The higher levels in the hierarchy classify the images according to a previously learned set of classes, while the lower levels are designed to segment the images to obtain their basic components. Following this approach our application is able to accumulate a multi-dimensional histogram that estimates the probability density function of a feature space for each image and uses them as a the basis for its classification task. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 369 – 378, 2005. © Springer-Verlag Berlin Heidelberg 2005
370
A. Sanchez, R. Diaz, and P. Bock
In order to test the feasibility of this approach we use three examples using different sets of images. First we use satellite images to recognize different planets and then for the case of the Earth, a lower level in the hierarchy is used to segment the images in terms of land, water and cloud texture. Further down the hierarchy, the system is also able to segment type of land components such as mountains, valleys and so on. Using airplane images we are also able to segment various urban components. As a second example, we use FFT spectrograms of audio signals to distinguish various animal sounds. For this case the hierarchy is organized in four levels. One classifies images in terms of frequency range, a lower level in terms of sound duration, a third level in terms amplitude to finally have a CLS layer to determine the particular spectrogram of an animal sound. For the final example, we take regular images from ordinary pictures to train the system to recognize various types of skin texture. 1.1 Related Work Texture analysis as a scheme to recognize and segment images has been widely used. Yet to this day, one might say that is still is very much an art. Several approaches have been tried with various levels of success. We can divide the use of texture in three main approaches: statistical where a polynomial feature vector is computed for each texture, this is the case of the EMS approach used by the EM and SVM algorithms reported in the literature, relevant to this paper is the work of Carson, C. Belongie, S. Greenspan, H. & J. Malik J [5]. A second approach is called the nonparametric structural or contextual approach, where texture is characterized by set of tone and color point features, either as RGB or HSB intensity features. As well as structural or spatial relationships among the pixels, properly named texels (texture elements). Using this approach, relevant to this paper we mention the overall review presented by Greenspan [8]. Relevant to AI, the use of neural networks and rule-based systems are needed to obtain image segmentation by means of class recognition, in a way similar to the approach we use in this paper. A final approach reported in the literature is the work of Bhanu & Wu [2] using Genetic Algorithms to obtain image segmentation by means of pseudo optimization. 1.2 Collective Learning Systems Falling in the second approach, we present an alternative adaptive method of nonparametric texture learning. In our case we use CLS, initially proposed by Bock in 1976; conceptually is an extension of Learning Automata models [10]. The model can be defined in terms of the interaction between an Automata and its Environment {CLS, ENV} where the CLS and ENV are defined by [13]: CLS = {X, Y, STM, P, g, A} X = 0 .. nmax the input set nmax = state transitions Y a vector of nmax + 1 elements representing the outputs selected STM = 0 .. qmax is the state set P is a qmax*qmax transition matrix g is the output function A is an compensation scheme
ENV = {Y, X, T, eval} Y the input vector Y(t)=g [Q (t)] X the output set T the truth vector eval is the evaluation function X (t) = eval(Y, T) generates an overall X composite evaluation
A CLS Hierarchy for the Classification of Images
371
The number of incorrect outputs delivered by the CLS may determine the value of the eval function. In a CLS model, learning is achieved by means of an algedonic compensation policy to update the probabilities of the STM; a simple case is represented by [10]: Case of a Reward (with 0 < ß < 1) For the selected i -> k transition STM(t+1)i,k = STM(t)i,k+ ß*(1– STM(t))i,k
Case of a Punishment (with 0 < ß < 1) For the selected i -> k transition STM(t+1)i,k= STM(t)i,k - ß*STM(t)i,k
For the rest of the i -> j with j=/k STM(t+1)i,j = STM(t) - ß*(1– STM(t)i,k)/(n-1)
For the rest of the i -> j with j=/k STM(t+1)i,j = STM(t) + ß*STM(t)/(n-1)
1.3 CLS Implementation as an ALISA Engine For this research, we use ALISA [4] which is a multi-channel path algorithm for image classification that implements the CLS model previously described. The system is used to select an adequate set of color and texture features of an image to be used as the input of CLS. Once the feature values have been extracted from an analysis pattern, they are assembled into a feature vector that indexes the feature space of each image into a multi-dimensional histogram that functions as the State Transition
Feature Vector Input Domain
STM Output Range
Feature 1 Feature 2 Feature n
Training Class 1
Normalities
Training Class 2
Normalities
Training Class 3
Normalities
Normality Value and Class Label
Fig. 1. The STM is the array where each training class stores the feature for each image according to the analysis of each texel (texture element) input [1]
372
A. Sanchez, R. Diaz, and P. Bock
Matrix (STM) of the CLS. Each feature histogram in the set is a row in the STM, which represents a specific class of textures to be learned. During testing, a test image is presented to the system. A multinomial-variance-based classifier is used to select the class with the highest posterior probability for that feature vector value. The unique symbol for that class is placed in a class map at the same pixel location as the center of the analysis token from which the analysis pattern was extracted; thus the class map is spatially isomorphic with the input test image. Texel by texel, the complete class map is generated for that test image, with each pixel in the class map representing the best estimate of the texture class as learned by the Texture Module during training. Figure 1 provide a conceptualization of the process.
2 Research Objectives and Implementation 2.1 Objectives and Working Hypothesis With the previous background the objective of this paper is to validate the feasibility of classifying and segmenting diverse type of images, with as little image preprocessing as possible using only CLS layers. In order to obtain better results we propose the use of hierarchy of CLS layers to perform recognition and the classification of images before attempting image segmentation, therefore the working hypothesis of the paper is succinctly stated as follows: Hypothesis: Using CLS layers in a hierarchical organization, it is possible to classify and segment images of diverse nature by training using a reduced sample sets of images. The use of a hierarchy of collective layers has been widely suggested, as reported in the learning automata literature [13]. We deem necessary to work in a hierarchical fashion in order to carry out two different image recognition tasks. Thus, as proposed before, the higher levels perform class classification, while the lower levels do the segmentation. Since no semantic or contextual information is provided, the recognitions is solely performed by color and texture analysis. Following the hypothesis, sets of hierarchical levels are predefined to structure the knowledge base. As commented in the previous section, the required knowledge for class definition in a CLS models is stored in an STM array. By using color and texture features and examining the joint and marginal histograms obtained from their application, the classification process is highly enhanced, since it is possible to obtain pattern disambiguation. We have found that in most cases it is only necessary to use few features with little precision. 2.2 ALISA Configuration The structural texture features used in this project were Pixel Activity (X, Y and combined, average, Standard Deviation and gradient (magnitude and direction). The token size for these convolutions was a 3x3 matrix. For the case of color we use RGB filters. The Dynamic ranges of the histograms varied depending on the experiments and are reported in the results. We use a standard precision of 256 discrete values for the histograms computation. In all the cases we used two different sets of images, one for training and one for testing.
A CLS Hierarchy for the Classification of Images
373
2.3 Satellite and Airplane Image Segmentation The research hypothesis is to be tested in three different sets of images. A hierarchical organization is presented for each one of them. In the first case, we use images of celestial bodies; satellite images (from ESA [7] & NASA [11]). As stated before, for our research, image size and resolution bear no importance; the only preprocessing to the images is the reduction of the pixel size to values less than 500x500 pixels to speed up the processing time and storing them on RGB mode. As it may be obvious, texture varies considerably as a function of the distance from the source. Therefore in order to maintain texture consistency, all the images used for each celestial body must come from pictures taken within the same distance range. The following hierarchy of CLS layers is used in order to recognize different images classes according to previous training. Segmentation of the distinct elements is to be done by a texel and color analysis using a cumulative histogram of the various features of the image. The hierarchy is organized as follows: Level 1: Solar System -> Earth Level 2a: Earth -> Oceans -> Depth Levels Level 2b: Earth -> Clouds -> Cloud Shapes Level 2c: Earth -> Continent -> Land Segments Level 3a: Land Segments -> Urban Segment Level 4: Urban Segment -> Building Type The color and texture features used for this case are presented in table 2.1. There were 39 images were required for training at Level 1, 42 for Level 2, 39 for Level 3 and 20 for Level 4. 2.4 Audio Signal Testing Considering that audio signal can be converted into Fourier Spectrograms, we decided to test the feasibility of a hierarchical arrangement to recognize different audio signals using their spectrograms. For reasons of space, we do not discuss here the issues involved with generating the FFT to compute the spectrograms; suffice it to say that for this application we relied on the use of the RAVEN [6]. As a test bed case, the spectrograms to recognize are those corresponding to animal sounds. Detecting texture features in a spectrogram may prove difficult since the image structure of the spectrogram depends on the range definition for the frequency, the time and the amplitude of the signals. In a similar fashion as in the example previously presented, in order to maintain texture consistency, all the images used for each celestial body must come from spectrograms generated with the same ranges definition for the three independent variables. Here is where the use of a hierarchy of spectrograms may become the solution to the problem. The hierarchy of CLS layers to handle the case of audio signals was organized as follows: Level 1: Frequency Layer (kHz) -> [Distinctive signal frequency] Level 2: Time Layer (sec.) -> [Typical duration of sound] Level 3: Amplitude Layer (RMS) -> [Standard power] Level 4: Recognition of the Animal Sound -> [Blue Whale, .. Parrot]
374
A. Sanchez, R. Diaz, and P. Bock
Effectively it is possible to separate signals into different frequency range values and then create an added division in time duration. Furthermore determining the RMS value for the amplitude may also help in the disambiguation of the signals. The texture features used for this case are presented in table 2.2. There were 7 images used in the training at Level 1, 11 at Level 2, 12 at Level 3 and 77 at the various CLS layers for Level 4. 2.5 Skin Recognition Our third test deals with recognition and segmentation of specific color and texture components in an image. In this case we consider recognizing human skin from regular family pictures, with as little preprocessing as possible. We propose to train a set of CLS classes to recognize the specific colors and textures of skin. We use color and texture features independent of the context. The main problem here is to be able to reject texture patterns that closely resemble skin. Rather than using a hierarchy of classes, for this case we use a set of non-skin classes as the way to approach the problem. The texture features used for this case are presented in table 2.3. The CLS layer was trained with 24 images of texture and 65 images of non-skin textures.
3 Results 3.1 Recognition and Segmentation of Celestial Bodies We present the results of the various levels of the hierarchy. Figure 2 shows the classification at level 1 of an image of the Sun, with 71.4% of texel acceptance. In the case of Figure 3 Level 1 classified the image as planet Earth with 66.8% while Level 2 segmented the image in three basic components. Of the 49 images given to level 1, only in two cases the system provided wrong answers, for example an image of Planet Venus was erroneously classified as the Sun.
Fig. 2. Image of the Sun and the CLS recognition result at Level 1: Sun (yellow) with 71.4%
Figure 4 presents the segmentation results at Level 3 for the satellite image shown in figure 3. Figure 5 present another segmentation results. Figure 6 presents the results of an airplane image of the Earth; in this case since Level 3 classifies and segments the urban development, Level 4 segments such segment in its building type.
A CLS Hierarchy for the Classification of Images
375
Fig. 3. Image of the Earth and the CLS recognition results: Level 1 Earth (blue) recognition with 66.8%. Level 2 Three-component segmentation.
QuickTimeô and a Graphics decompressor are needed to see this picture.
QuickTimeô and a Graphics decompressor are needed to see this picture.
Fig. 4. Image of the Earth and the CLS recognition results: L3 subcomponents sementation
Fig. 5. Image of the Earth and the CLS recognition results: Level 3 land segmentation
Fig. 6. Airplane image and the CLS recognition: Level 3 land segment Land 4 urban segment
376
A. Sanchez, R. Diaz, and P. Bock
3.2 Recognition Animal Sound Spectrograms Figure 7 presents the result of a fourth level hierarchy for audio signals. The Level 1 layer classifies the signal in the 1-4 kHz range (color blue); Level 2 classifies the duration of the signal in the more than 4 sec class. Finally Level 4 recognizes the spectrogram as that one of a Bearded Seal, which is the right selection.
0-2 KHz 1-4 KHz 3-9 KHz Rej. / Tied
Original Sound Spectogram
Frequency Layer Bearded Seal
+4 Sec 0-2 Sec Rej . / Tied
Bowhead Whale Horse
Owl Owl Rej . / Tied
Time Layer
Fig. 7. Audio Signal recognition at three levels: bearded seal sound spectrogram
Figure 8 depicts the case of the spectrogram of that is classified by Level 2 in the duration of 0 to 2 seconds sending it to a different CLS layer at Level 4; in this case the spectrogram is recognized by this level as belonging to the sound of a Sheep, it is the right selection. Of the 24 tests run, only one was incorrectly recognized. Due to the few number of animal sounds tested, Level 3 for RMS amplitude values was only needed in three cases.
Fig. 8. Audio Signal recognition at three levels: Sheep sound spectrogram
A CLS Hierarchy for the Classification of Images
377
3.3 Skin Recognition Fig. 9 and 10 present the image segmentation of human skin texture. The case of Fig. 10 is quite interesting since, as shown in the picture, the texture of the wall, the leather vest and the wooden frame are non-skin textures that were not selected by the CLS class since those texture were trained as belonging to one of the non-skin class discussed previously.
Fig. 9. Skin segmentation of human skin
Fig. 10. Skin segmentation in contrast to non-skin textures
4 Conclusions As stated in the results, the hierarchical organization of CLS layers proposed in the research was tested with a large set of example. Although the results suggests this approach to be a reliable and robust one for image recognition and image segmentation, it still requires to be examined under the scrutiny of a complete set of statistical tests, among them the use of confusion tables. However, the results obtained so far are similar than those reported in the literature [2], [5] using different algorithms with the added benefit of the flexibility and swift modification of the STM of the CLS architecture. Finally, through the use of accumulated histograms in learning models, image processing is greatly enhanced. Along with that, it is important to note the speed at training and testing and the small amount of space required to store an ALISA layer file.
378
A. Sanchez, R. Diaz, and P. Bock
References 1. Becker, G., Bock, P.: The ALISA Shape Module, In Proceedings of the Second International Conference on Cognitive and Neural Systems. Boston (1998) 2. Bhanu, B & Wu, X, Genetic Algorithms for Adaptive Image Segmentation In Nayar, S. K. & Poggio, T. (eds). Early Visual Learning, Oxford University Press, Oxford (1996) 3. Bock, P., Klinnert, R., Kober, R., Rovner, R., Schmidt, H.: Gray-Scale ALIAS. IEEE Transactions on Knowledge and Data Engineering, (1992) Vol. 4, No. 2 4. Bock, P.: “ALISA: Adaptive Learning Image and Signal Analysis. Proceedings of the SPIE Applied Imagery Pattern Recognition Conference, Washington D.C. (1998) 5. Carson, C. Belongie, S. Greenspan, H. & J. Malik J. Blobworld: Image segmentation using expectation-maximization and its application to image querying. IEEE Transactions on Pattern Analysis and Machine Intelligence (2002) 24(8):1026-1038 6. Cornell Lab of Ornithology: Raven Version 1.2 Ithaca, NY (2003) 7. European Space Agency: ESA Programs, National News. Available at ESA site (2004) 8. Greenspan, H.: Non Parametric Texture Learning. In Nayar, S. K. & Poggio, T. (eds) Early Visual Learning, Oxford University Press, Oxford (1996) 9. Hubshman, J., Bock, P., Achikian, M.: Detection of Targets in Terrain Images with ALIAS. Proceedings of the Twenty-Third Annual Pittsburgh Conference on Modeling and Simulation (1992) pp 927-942 10. Narendra, K.S. Thatachar, L. (eds.): Special Issue on Learning Automata. Journal of Cybernetics and Info Science (1977) Vol 1 # 2-4 11. National Auronatics and Space Administration, NASA: News and Events, Missions Exploring the Universe. Available at NASA Site (2004) 12. Pratt, W. K.: Digital Image Processing. PIKS Inside, 3rd Ed. J.Wiley , New York (2001) 13. Sanchez, A: Learning Automata: An Alternative to Neural Networks. In Rudomin, P., Arbib, M.A., Cervantes Pérez, F., and Romo, P. (Eds.). Neuroscience: From Neural Net works to Artificial Intelligence. Research Notes in Neural Computing Springer- Verlag, Heidelberg, Berlin (1993) Vol. 4.
Performance Evaluation of a Segmentation Algorithm for Synthetic Texture Images Dora Luz Almanza-Ojeda, Victor Ayala-Ramirez, Raul E. Sanchez-Yanez, and Gabriel Avina-Cervantes Universidad de Guanajuato, F.I.M.E.E. Salamanca, Mexico {luzdora, ayalav, sanchezy, avina}@salamanca.ugto.mx
Abstract. In this paper we present the performance evaluation of a texture segmentation approach for synthetic textured images. Our segmentation approach uses a Bayesian inference procedure using co-ocurrence properties over a set of randomly sampled points in the image. We developed an exhaustive performance test for this approach that compares segmentation results to the “ground truth” images under a varying number of sampled points, in the neighborhood of each pixel used to classify it in the test images. We show our preliminary results that let us to choose the optimal number of points to analyze in the neighborhood of each pixel to assign a texture label. This method can be easily applied to segment outdoor real textured images.
1
Introduction
Image segmentation refers to the decomposition of a scene into its principal components or regions. This process makes easier the object recognition tasks and some other computer vision applications. The image segmentation process is mainly based on texture and color features taken from the scene. In this work, we are focusing in texture features because a natural or artificial object can be represented and discriminated with them. Texture features can be characterized and modeled by using filter theory or by statistical models. Besides, both approaches have proved to be efficient and useful for texture segmentation methods [1, 2]. Zhu, Wu and Mumford [3] have working on an analysis of both approaches towards a unified theory for texture modeling. Most of works have been tested with artificial texture images taken from Brodatz album [4]. Currently, a large number of works have applied these images which are considered as a benchmark to evaluate performance of texture algorithms [5]. Thus, we have also used it in order to give a comparative point of view to our algorithm. Our work uses a texture classification method, based on a Bayesian inference and the co-ocurrence matrices [6]. We classify each pixel P taken from the test image by analyzing a square neighborhood around it. The classification process consists of random selection of a set of points (usually 10% of the neighborhood size). Each one of these points are analyzed by its co-ocurrence properties and A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 379–385, 2005. c Springer-Verlag Berlin Heidelberg 2005
380
D.L. Almanza-Ojeda et al.
Fig. 1. Some Brodatz textures used in our data base
by using Bayes inference; the texture class that maximizes the a posteriori probability receives a vote. The class with the largest number of votes is assigned to pixel P . In the case that classification information is not good enough, an “unknown” class label is assigned for pixels where no decision about the class can be made. The rest of this paper is organized as follows: next section explains how we used the Gray Level Co-ocurrence Matrices (GLMCs) in combination with the Bayes’ Rule to classify a pixel according to a square neighborhood. Section 3, explains the segmentation process and its implementation details. In section 4, we present the performance evaluation procedures, our results with the segmented images and some evaluation graphics. Finally, in section 5 we discuss our results, the conclusions are given as well as the perspectives for this work.
2
Bayesian Texture Classification
Our segmentation approach is based on the classification of an image window composed of a square neighborhood of a pixel P . Texture classification is done by using a Bayesian inference method coupled with a voting scheme over a set of random points in texture image under test. We describe details of these procedures below. We consider classification of a texture test image into a set of m texture classes {T1 , T2 , ..., Tm }. We compute GLMCs for a set of distances d and orientations θ ! π π 3π (1) (d, θ) = {1, 2} × 0, , , 4 2 4 to characterize each texture class. That is, we use 8 GLMCs to represent each texture class. We denote these matrices as C1 , C2 , ..., C8 .
Performance Evaluation of a Segmentation Algorithm
381
As a basis for classification, we use a set R of n random points (xi , yi ) taken from the image under test consisting of (N, M ) pixels in the horizontal and vertical direction respectively. Each point in R cast a vote for a texture class based in local co-ocurrence properties for every GLMC used. Bayes’ theorem is a tool for assessing how probable evidence makes some hypothesis. It makes possible to determine the probability of the cause by knowing the effect. In our case, evidence is the observation of gray level intensities for two pixels, one chosen randomly and the other at a distance following an orientation from the set of parameters (d, θ) specified above. Firstly, a given GLMC Ck computed using parameters (dk , θk ) and used to computed texture classes prototypes casts a vote for the texture class that maximizes a posteriori probability from observed spatial arrangement. We use Bayes rule to compute this probability. If we define Tj as the event of unknown texture T belonging to class Tj , and A the event of the co-ocurrence of observing I(Ri ) = I1 and I(Ri + [dk , θk]) = I2 in the test image, we have p(Tj |A) =
p(A|Tj )· (Tj ) p(A)
(2)
In last equation, p(A|Tj ) can be computed from the normalized Cd,θ (I1 , I2 ) for the parameter set under consideration and the observed gray levels I1 and I2 . The term p(Tj ) is the a priori probability of observing texture Tj and p(A) is the total probability of A. A vote vk is given to the texture Tl that best explains observed intensities in direction (dk , θk ). vk = Tl ⇐⇒ Tl = max p(Tj |A) j
(3)
This procedure is repeated for each Ck and is selected the most voted texture label as a the vote Vi is used for choosing a winning label for the texture under test.
3
Segmentation Algorithm
A class assignment procedure is used for each pixel in the image under segmentation. We consider a square neighborhood Vp of a pixel P with coordinates (i, j), where Vp = {(k, l)|(k, l) ∈ {i − r, ..., i + r} × {j − r, ..., j + r}}, with r being the half side of the neighborhood. The neighborhood patch is classified as an entire image by using the procedure described in section 2. That is, a set of nP random points are chosen from the neighborhood set and a voting procedure is carried out. Texture label with the largest number of votes is assigned to pixel P . Nevertheless, if there is no significative differences between locally voted classes, we can assign an additional unknown class label. Subsequent step applies a statistical modal filter to the resulting image, which consists in analyzing just the pixels with unknown class and its nearest neighborhood. Thus, we find the class with the largest frequency and assign it to the pixel under test (if this class is the “unknown” class again then the class for the pixel would not change). This results in a smoother region outlining for texture classes.
382
D.L. Almanza-Ojeda et al. Test image
4 points
40 points
60 points
90 points
(a)
(b)
(c)
(d)
(e)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
(p)
(q)
(r)
(f)
Fig. 2. Segmentation algorithm results. (a) and (f) shown test input images. In (b)-(e) and (k)-(n) shown typical segmented images. (g)-(j) and (o)-(r) shown the segmented images after applying filtered image results.
4
Experimental Results
We have tested our segmentation algorithm by using synthetic images where patches are taken from the predefined texture images shown in Fig. 1. They have been arranged to compose a set of test images (column one in Fig. 2). The size of these images is 256 × 256 pixels. The result of applying our segmentation algorithm for 4, 40, 60 and 90 points is shown in row one and three in Fig. 2 for two test images. In these images a same gray level implies that pixels are detected as being part of the same texture class. White pixels are associated with an unknown texture class. As we can see, segmented images present noisy borders for some of the regions and also some kind of “salt and pepper” noise inside them. To reduce this effects, we have applied a statistical modal filter. The results after application of this filter are shown in row two and four Fig. 2.
Performance Evaluation of a Segmentation Algorithm
Performance results(Segmented image 1) Performance results(Filtered image 1) incorr incorr unk unkn 100 corr corr % cumulative of pxs.
% cumulative of pxs.
100
90 80 70 60 50 40 0
90 80 70 60 50 40 0
20 40 60 80 100 Number of points per window
(a)
20 40 60 80 100 Number of points per window
(b)
Performance results(Segmented image 2) Performance results(Filtered image 2) incorr incorr unkn unkn 100 corr corr % cumulative of pxs.
100
% cumulative of pxs.
383
90 80 70 60 50 40 0
20 40 60 80 100 Number of points per window
(c)
90 80 70 60 50 40 0
20 40 60 80 100 Number of points per window
(d)
Fig. 3. Performance evaluation results. Plots a) and c) show the percentage of evaluation results to the first and third row of segmented images from Fig.2. Plots b) and d) show the results for the filtered images showed in the same Figure. By comparing a) with b) and c) with d), we observe that the space between correct and unknown pixel graphs is clearly reduced after applied the mode filter.
We made the performance evaluation test for the segmented and filtered output images. They are compared versus a “ground truth” image computed from the original image. Our algorithm depends on a half side parameter (r) for the neighborhood, and in all tests we have chosen r=10. This results in a 20 × 20 pixels neighborhood. The other parameter is the number nP of points to be sampled from the neighborhood. This parameter is the principal variable in our algorithm and we have chosen 23 different values for it during the test. The comparison process were made 100 times for each quantity of selected points. From each image compared, we obtain 3 numerical results: the correctly, incorrectly and unknown classified pixels. We compute the accumulated average percentage for each set of points. Finally, we made a plot with these percentage results versus the number of points taken in for the test. All of these plot results are shown in Fig. 3. As we can see, the number of correctly classified
384
D.L. Almanza-Ojeda et al.
pixels increase significatively after to apply the modal filter. It is expected that computed time depends directly of the number of points and size of the window that we use. The entire segmentation process takes about 1.5 seconds when we use 4 points in the window to 25 seconds for 90 points, on a Linux Station with a Pentium IV processor, running at 3.2 GHz and using 1 GB of RAM.
5
Conclusions and Perspectives
We have experimented to evaluate the performance of a Bayesian image segmentation method that uses co-ocurrence properties of a set of textures. Our method has shown to be very efficient because a random sampling scheme provides a set of random points and uses them to vote for the texture class that best explains the co-ocurrence properties of each of these points. We have found that as little as 25 points can be used to classify each pixel with a 80% of accuracy. A statistical modal filter is used to post-process the segmented image and this improves results by about 5% accuracy by reducing the number of pixels that have been assigned an “unknown” label after application of this filter. In future work we intend to use this approach to track textures because of its fast response time (approx. 1.5 seconds). We also will explore how to use multi-resolution techniques to assign a correct label when the co-ocurrence information around a pixel cannot support a decision about its class.
Acknowledgments This work has been partially funded by the French-Mexican LAFMI Project “Concepci´on de funciones de percepci´ on y planificaci´ on para la navegaci´ on topol´ ogica de un robot m´ ovil en ambiente semi-estructurado interior o natural”, the Mexico PROMEP project “Navegaci´ on topol´ ogica de robots usando an´ alisis difuso de textura” and the University of Guanajuato project “Funcionalidades visuales para la navegaci´on topol´ ogica de robots m´oviles”.
References 1. Jain, A.K., Farrokhnia, F.: Unsupervised texture segmentation using Gabor filters. In: Proc. IEEE Int. Conf. on Systems, Man and Cybernetics, Los Angeles, CA (1990) 14–19 2. Andrey, P., Tarroux, P.: Unsupervised segmentation of Markov random field modeled textured images using selectionist relaxation. IEEE Transactions Pattern Analysis and Machine Intelligence 20 (1998) 252–262 3. Zhu, S., Wu, Y., Mumford, D.: Filters, random fields and maximum entropy (FRAME): Towards a unified theory for texture modeling. International Journal of Computer Vision (IJCV) 27 (1998) 107–126 4. Brodatz, P.: Textures: a photographic album for artist and designers. Dover Publications, New York, NY (1966)
Performance Evaluation of a Segmentation Algorithm
385
5. Picard, R.W., Kabir, T., Liu, F.: Real-time recognition with the entire Brodatz texture database. In: Proc. of the IEEE Conf. on Computer Vision and Pattern recognition, New York, NY (1993) 638–639 6. Ayala-Ram´ırez, V., Obara-Kepowicz, M., S´ anchez-Y´ an ˜ez, R., Jaime-Rivas, R.: Bayesian texture classification method using a random sampling scheme. In: Proc. IEEE Int. Conf. on Systems, Man and Cybernetics, Washington, DC (2003) 2065– 2069
Image Retrieval Based on Salient Points from DCT Domain Wenyin Zhang1,2 , Zhenli Nie2 , and Zhenbing Zeng1 1
The software engineering institute, East China Normal University, Shanghai, P.R. China 2 The Department of Computer Science, Shandong Linyi Normal University, Linyi, 276005, P.R. China
Abstract. A new image retrieval method based on salient points extracted from DCT compressed domain is proposed in this paper. Using significant DCT coefficients, we provide a robust self-adaptive salient point extraction algorithm which is very robust to most of common image processing. Based on salient points, two local image features, color histogram and LBP histogram are computed to represent local properties of the image for retrieval. Our system reduces the amount of data to be processed and only needs to do partial decompression, so it can accelerate the work of image retrieval. The experimental results also demonstrate it improves performance both in retrieval efficiency and effectiveness. Keywords: Salient Point, Image Retrieval, Discrete Cosine Transformation.
1
Introduction
Digital image databases have grown enormously in both size and number over the years [1]. In order to reduce bandwidth and storage space, most image and video data are stored and transmitted by some kind of compressed format. However, the compressed images cannot be conveniently processed for image retrieval because they need to be decompressed beforehand, and that means an increase in both complexity and search time. Therefore, it is important to develop an efficient image retrieval technique to retrieve wanted images from the compressed domain. Nowadays, more and more attention has been paid on the compressed-domain based image retrieval techniques [2] which extract image features from the compressed data of the image. The JPEG is the image compression standard [3] and is widely used in large image databases and on the World Wide Web because of its good compression rate and image quality. However, the conventional image retrieval approaches used for JPEG compressed images need full decompression which consumes too much time and require large amount of computation. Some new researches [4, 5, 6, 7, 8, 9, 10] have recently resulted in improvements in that image features can be directly extracted in the compressed domain without full decompression. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 386–395, 2005. c Springer-Verlag Berlin Heidelberg 2005
Image Retrieval Based on Salient Points from DCT Domain
387
The purpose of this paper is to propose a novel JPEG compressed image retrieval method based on salient points [11] computed from JPEG compressed domain. In [12], salient points are named key points. The salient points, where the image features are computed, are interesting for image retrieval because they are located in visual focus points and thus they can capture the local image information and reduce the amount of data to be processed. The salient points are related to the visually most important parts of the images and lead to a more discriminant image feature than interesting points such as corners [15], which are in general designed for robotics and shape recognition, and therefore they have drawbacks when they are applied to natural image retrieval. Visual focus points need not be corners, and a visual meaningful feature is not necessarily located in a corner. At the same time, corners may be clustered in few regions. In various natural images, regions may well contain textures, where a lot of corners are detected. Therefore, corners may not represent the most interesting subset of pixels for image indexing. The salient points may be from some kinds of interesting points, but they are related to any visual ‘interesting’ parts of the image. Moreover, it is interesting to have those points spread out in the whole image, and then the image features will be computed based on these salient points. It is quite easy to understand that using a small amount of such salient points instead of all images reduces the amount of data to be processed, and obtains a more discriminating image index [11]. In this paper, based on a small part of important DCT coefficients, we provide a new salient point extraction algorithm which is of robustness. Then, we adaptively choose some important salient points to stand for the whole image, and based on these points, we extract two image features, color histogram, and LBP histogram from JPEG compressed images for retrieval. The remainder of this paper is organized as follows. In Section 2, we introduce the works related to JPEG compression image retrieval. In Section 3, we discuss in details our new scheme, followed by the experimental results and analysis. Finally, Section 5 concludes the paper.
2
Related Works
Direct manipulation of the compressed images and videos offers low-cost processing of real time multimedia applications. It is more efficient to directly extract features in the JPEG compressed domain. As a matter of fact, many JPEG compressed image retrieval methods based on DCT coefficients have been developed in recent years. Climer and Bhatia proposed a quadtree-structure-based method [4] that organizes the DCT coefficients of an image into a quadtree structure. This way, the system can use these coefficients on the nodes of the quadtree as image features. However, although such a retrieval system can effectively extract features from DCT coefficients, its main drawback is that the computation of the distances between images will grow undesirably fast when the number of relevant images is big or the threshold value is large. Feng and Jiang proposed a statisti-
388
W. Zhang, Z. Nie, and Z. Zeng
cal parameter-based method [5] that uses the mean and variance of the pixels in each block as image features. The mean and variance can be directly computed via DCT coefficients. However, this system has to calculate the mean and variance of each block in each image, including the query image and the images in the database, and the calculation of the mean value and variance value of each block is a computationally heavy load. Chang, Chuang and Hu provided a direct JPEG compressed image retrieval technique [6] based on DC difference and the AC correlation. Instead of fully decompressing the images, it only needs to do partial entropy decoding and extracts the DC difference and the AC correlation as two image features. However, although the retrieval system is faster than the method [4, 5], it doesn’t do well in anti-rotation. The related techniques are not limited to the above three typical methods. Shneier [7] described a method of generating keys of JPEG images for retrieval, where a key is the average value of DCT coefficients computed over a window. Huang [8] rearranged the DCT coefficients and then got the image contour for image retrieval. B.Furht [9] and Jose A.Lay [10] made use of the energy histograms of DCT coefficients for image or video retrieval. Most image retrieval methods based on DCT compressed domain strengthened the affectivity and efficiency of image retrieval [2]. But most of these research focused on global statistical feature distributions which have limited discriminating power because they are unable to capture the local image information. In our proposed approach, we extract the image feature for retrieval by surrounding the image salient points computed from a small part of significant DCT coefficients. The salient points give local outstanding information, so the image features based on them have more powerful ability of characterizing the image contents.
3
The Proposed Method
In this section, we introduce in details our retrieval methods based on salient points. The content of the section is arranged with the sequence: edge point detection→ salient point extraction→image feature extraction→similarity measurement. 3.1
Fast Edge Detection Based on DCT Coefficients
Edges are significant local changes in the image and are important feature for analyzing image because they are relevant to estimating the structure and properties of objects in the scene. So edge detection is frequently the first step in recovering information from images. Now most of edge detectors make use of gradients to get edge information in pixel domain. If we extract edges by these detectors from compressed image, we have to decompress the image first, so it will take much more time. Here we provide a fast edge detection algorithm in DCT domain which directly compute the pixel gradients from DCT coefficients to get edge information. Based on it, we give the salient points extraction algorithm.
Image Retrieval Based on Salient Points from DCT Domain
389
The 8 × 8 Inverse DCT formula is as follows: 7 7 1 C(x, u)C(y, v)F (u, v) 4 u=0 v=0
f (x, y) =
W here : C(x, u) = c(u) cos
(1)
1 (2x + 1)uπ ; c(0) = √ , c(x) = 1, x = 0. 16 2
Compute derivative to formula (1) , we get:
f (x, y) =
7 7 1 ∂f (x, y) ∂f (x, y) + = C (x, u)C(y, v)F (u, v) ∂x ∂y 4 u=0 v=0
+
7 7 1 C(x, u)C (y, v)F (u, v) 4 u=0 v=0
W here : C (x, u) = −
(2)
(2x + 1)uπ uπ c(u) sin 8 16
From the equation (2), we can compute the pixel gradient in (x, y), its magnitude can be given by: G(x, y) = |
∂f (x, y) ∂f (x, y) |+| | ∂x ∂y
(3)
In order to simplify computation, we change the angle (2x+1)uπ to acute angle 16 [14]. Let (2x + 1)u = 8(4k + l) + qx,u , k, l and qx,u are integers, in which: qx,u = (2x + 1)u mod 8, k = (2x + 1)u/32, l = (2x + 1)u/8 mod 4, 0 ≤ qx,u < 8, 0 ≤ l < 4. Then, we can do as follows: ⎧ qx,u π ⎪ ⎪ sin( ) ⎪ 16 ⎪ ⎪ ⎪ qx,u π ⎨ (8(4k + l) + qx,u (2x + 1)uπ sin( 16 ) ) = sin( )= sin( q π ⎪ 16 16 ⎪ − sin( x,u ) ⎪ ⎪ 16 ⎪ ⎪ qx,u π ⎩ − sin( 16 )
: qx,u = qx,u , l = 0
: qx,u = 8 − qx,u , l = 1
: qx,u = qx,u , l = 2
: qx,u = 8 − qx,u , l = 3
⎫ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎬ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎭
= (−1)
l−1 2
sin(
qx,u ) 16
(4)
Similarly, we can get:
cos(
qx,u l+1 (2x + 1)uπ ) = (−1) 2 cos( ) 16 16
(5)
To the formulae (4) and (5), the sign and the qx,u can be decided aforehand according to x, u. Let ssx,u and csx,u be the signs of formulae (4) and (5). The ssx,u and qx,u can be described as follows:
390
W. Zhang, Z. Nie, and Z. Zeng
ssx,u
⎫ ⎫ ⎧ ⎧ + + + + + + + +⎪ 0 1 2 3 4 5 6 7⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ + + + + + + − −⎪ 0 3 6 7 4 1 2 5⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ + + − − − + + + 0 5 6 1 4 7 2 3 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎬ ⎬ ⎨ ⎨ +++−−++− 07254361 qx,u = = + + − − + + − −⎪ 0 7 2 5 4 3 6 1⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ + + − + + − + + 0 5 6 1 4 7 2 3⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ + + − + − + + − 0 3 6 7 4 1 2 5 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎭ ⎭ ⎩ ⎩ ++−+−+−+ 01234567
The csx,u can be given the same as ssx,u . For more time-saving, according
to Taylor formula, we extend sin(
qx,u 16 )
and cos(
n qx,u π ( sin( )= sin(k) ( ) 16 4
qx,u 16
k=0
n qx,u π ( cos( )= cos(k) ( ) 16 4
at π/4:
qx,u − π4 )k + Rn ( ) k! 16
qx,u 16
k=0
q
qx,u 16 )
(6)
qx,u − π4 )k + Rn ( ) k! 16
(7)
−4
( 3π )n+1 ( π )n+1 | x,u4 |n+1 ≤ 16 where : |Rn | < 4 (n + 1)! (n + 1)! When consider to extend up to second order, the equation (6) and (7) can be approximated as follows: √ qx,u π 2 π2 sin( )≈ [1 − (4 − qx,u ) + (4 − qx,u )2 ] (8) 16 2 16 512 √ qx,u π 2 π2 )≈ [1 + (4 − qx,u ) − (4 − qx,u )2 ] (9) cos( 16 2 16 512 The residue error R2 is more less than 0.034. This suggests that the equation (8) and (9) can be approximately decided by qx,u and can be calculated off-line. As such, the C (x, u) and C(x, u) in the equation (2) also can be calculated approx imately by the qx,u , ssx,u and csx,u off-line, which means that the coefficients of the extension of equation (2) can be computed in advance and the equation (3) is only related to the DCT coefficients F (u, v). So, the computation of the equation (3) is much simplified. Further more, because most of the DCT coefficients with high frequency are zero and do nothing to the values of edge points, so they can be omitted and then much computation is saved, which means that it is enough to use the DCT coefficients with low frequency to compute the edge points. The following Fig.1 gives an example for edge detection using different DCT coefficients. From the fig.1, we can see that the more the DCT coefficients used, the smoother the edge. With the decreasing of the number of DCT coefficients used, the ‘block effect’ becomes more and more obvious and many edge minutiae are lost. In a block, the more local changes in gray, the larger the value of the edge points in this block.
Image Retrieval Based on Salient Points from DCT Domain
391
Fig. 1. an example of edge detection: (a) Lena.jpg, (b)-(h) are the edge images of Lena, which are computed respectively by first n*n DCT coefficients, 2 ≤ n ≤ 8
3.2
Salient Points Computation
According to analysis in Sec.3.1 that the edge points in a block reflect the gray changes in this block, the more changes, the larger edge points value, we sum up all the edge points values in one block to stand for one salient point value, which means that one 8 ∗ 8 block corresponds to one salient point. If M ∗ N stands for the size of an image, the maximum of its salient points number is +M/8 ∗ N/8,. Let Sp(x , y ) be the salient point value in (x , y ), 0 ≤ x < M/8, 0 ≤ y < N/8, it can be computed as follows: (γ is a parameter, 2 ≤ γ ≤ 7)
Sp(x , y ) =
x ×8+γ y ×8+γ
|G(x, y)|
(10)
x=x ×8 y=y ×8
3.3
Adaptive Selection of Salient Points
Not all salient points are important for us to image retrieval. The number of the salient points extracted will clearly influence the retrieval results. Less salient points will not mark the image; more salient point will increase the computation cost. Through experiments we have found that the gray changes in a block can be relatively reflected by the variance (denoted by σ) of AC coefficients in this block. The more changes, the larger the variance [5]. So we adaptively select more important salient points according to the variance σ. Let Msp be the mean value of Sp(x , y ), We adaptively select the salient points SP (x , y ) which satisfies the following condition:
λ × Sp(x , y ) > μ × Msp
2 3x r we know that d(q, u) > r, hence u will be filtered out without need of computing that distance. The most basic scheme chooses k pivots p1 . . . pk and computes all the distances d(pi , u), u ∈ U, into a table of kn entries. Then, at query time, all the k distances d(pi , q) are computed and every element u such that D(q, u) = maxi=1...k |d(pi , q) − d(pi , u)| > r is discarded. Finally, q is compared against the elements not discarded. As k grows, we have to pay more comparisons against pivots, but D(q, u) becomes closer to d(q, u) and more elements may be discarded. It can be shown that there is an optimum number of pivots k ∗ , which grows fast with the dimension and becomes quickly unreachable because of memory limitations. In all but the easiest metric spaces, one simply uses as many pivots as memory permits. There exist many variations over the basic idea, including different ways to sort the table of kn entries to reduce extra CPU time, e.g. [5, 4]. Although they look completely different, several tree data structures are built on the same pivoting concept, e.g. [17]. In most of them, a pivot p is chosen as the root of a tree, and its subtrees correspond to ranges of d(p, u) values, being recursively built on the elements they have. In some cases the exact distances d(p, u) are not stored, just the range can be inferred from the subtree the element u is in. Albeit this reduces the accuracy of the index, the tree usually takes O(n) space instead of the O(kn) needed with k pivots. Moreover, every internal node is a partial pivot (which knows distances to its subtree elements only), so we actually have much more pivots (albeit local and with coarse data). Finally, the trees can be traversed with sublinear extra CPU time. Different tree variants arise according to the tree arities, the way the ranges of distances are chosen (trying to balance the tree or not), how local are the
Proximity Searching in High Dimensional Spaces
409
pivots (different nodes can share pivots, which do not belong anymore to the subtree), the number of pivots per node, and so on. Very little is known about which is best. For example, the golden rule of preferring balanced trees, which works well for exact searching, becomes a poorer choice against unbalancing as the dimension increases. For very high dimensional data the best data structure is just a linked list (a degenerate tree) [7]. Also, little is known about how to choose the pivots. Local Partitioning Schemes. Another scheme builds on the idea of dividing the database into spatially compact groups, meaning that the elements in each group are close to each other. A representative is chosen from each group, so that comparing q against the representative has good chances of discarding the whole group without further comparisons. Usually these schemes are hierarchical, so that groups are recursively divided into subgroups. Two main ways exist to define the groups. One can define “centers” with a covering radius, so that all elements in its group are within the covering radius distance to the center, e.g. [10]. If a group has center c and covering radius rc then, if d(q, c) > r + rc , it can be wholly discarded. The geometric shape of the above scheme corresponds to a ball around c. In high dimensions, all the balls tend to overlap and even a query with radius zero has to enter many balls. This overlap problem can be largely alleviated with the second approach, e.g. [2, 14]. The set of centers is chosen and every database element is assigned to its closest center. At query time, if q is closest to center ci , and d(q, cj ) − r > d(q, ci ) + r, then we can discard the group of cj .
3
A New Probabilistic Search Algorithm
In this section we describe our contribution in the form of a new probabilistic algorithm based on a new indexing technique, which cannot be classified as pivot based nor compact partitioning. We select a subset P = {p1 , . . . , pk } ⊆ U, in principle at random. Our index consists of a permutation of P for each element u ∈ U. That is, each database element u reorders P according to the distances of the elements pi to u. Intuitively, if two elements u and v are close to each other, their two permutations should be similar. In particular, if d(u, v) = 0, the two permutations must coincide. At query time we compute the same permutation of P with respect to the query q. Then we order the database according to how similar are the permutations of the elements u ∈ U to the permutation of q. We expect that elements with orders more similar to that of q will also be spatially closer to q. We now precise and formalize the ideas. 3.1
Index Process
Each element u ∈ X defines a preorder ≤u in P. For every pair y, z ∈ P we define: y ≤u z ⇔ d(u, y) ≤ d(u, z).
410
E. Ch´ avez, K. Figueroa, and G. Navarro
The relation ≤u is a preorder and not an order because two elements can be at the same distance to u, and thus ∃y = z such that y ≤u z ∧ z ≤u y. This preorder is not sufficient to derive a permutation in P. Fortunately, preorder ≤u induces a total order in the quotient set. Let us call =u the equivalence related to preorder ≤u , that is, y =u z iff d(u, y) = d(z, u), and let us also define y (˜ pj =
2
s:s=j
rjs
k(k − 1)
) .
(3)
˜ is sufficient if one only requires a classification rule such as Therefore P arg max p˜i .
(4)
1≤i≤k
˜ can be derived as an approximation to the identity Furthermore, P pi + pj pi pi + pj = pi = μij , k−1 pi + pj k−1 j:j=i
(5)
j:j=i
by replacing pi + pj with k2 and μij with rij in (3). Thereby the differences between pi are underestimated, which causes the method to be instable when dealing with unbalanced probabilities. 2.2
Method by Wu, Lin, and Weng
In [7], Wu et al. proposed another PWC method. They found the optimal P through solving the following optimization problem: k
min
(rji pi − rij pj )2 ,
(6)
i=1 j:j=i k
s.t.
pi ≥ 0 ∀i .
pi = 1 ,
i=1
Note that (6) can be reformulated as min 2PT QP where
Qij =
≡
min
2 s:s=i rsi
−rji rij
1 T P QP , 2
if i = j , if i =
j .
(7)
(8)
Then P can be obtained by solving the following linear system:
Q e eT 0
P 0 = , b 1
(9)
where b is the Lagrangian multiplier of the equality constraint ki=1 pi = 1, e is the k × 1 vector of all ones, and 0 is the k × 1 vector of all zeros. This method is easy to implement and has a more stable performance.
Improved PWC Support Vector Machines with Correcting Classifiers
3
457
Improved Pairwise Classification with Correcting Classifiers
If a test example x is classified by classifier Cij , while x belongs to neither class wi nor class wj , the output of Cij , i.e. rij , is meaningless. Consequently considering ˜ will bring in nonsense and rij in constructing the posterior probabilities P (P) ˜ can damage the quality of P (P). 3.1
Algorithm by Moreira and Mayoraz
To tackle this problem, Moreira and Mayoraz proposed an algorithm called additional binary classifiers CCij , PWC-CC [4]. This algorithm trains k(k−1) 2 called correcting classifier s, to distinguish classes wi and wj from the remaining ones. For a given example x, the probabilistic output of CCij is qij = Prob(x ∈ ˜ is computed using the following wi or wj |x). Obviously qij = qji holds. Then P formula instead of (3): 2 s:s=i ris · qis . (10) p˜i = k(k − 1) If an example x does not belong to either class wi or class wj , the output of classifier CCij , i.e. qij , is expected to be small (close to 0). Otherwise, qij is expected to be large (close to 1). Thus by using formula (10), the impact of those meaningless rij are largely weakened and the accuracy of the global prediction is improved. 3.2
A Closer Look at the PWC-CC Algorithm
Let us analyze Moreira and Mayoraz’s algorithm in a more detailed way. First, we divide formula (10) into two formulas. , = rij · qij , rij
p˜i =
, s:s=i ris
2
k(k − 1)
(11)
.
(12)
Note that (12) has exactly the same form as (3). Then we immediately get , , , rji = qij − rij
= 1 − rij .
and
k
p˜i = 1 .
(13)
(14)
i=1 , obtained by (11) are not real pairwise probabilFormula (13) indicates that rij ities. Thereby sophisticated PWC method, e.g. the one described by (6), can not be applied to them. Formula (14) indicates that p˜i obtained by (12) are ˜ becomes ambiguous. We not posterior probabilities and the interpretation of P consider these the disadvantages of the original PWC-CC algorithm.
458
H. Li, F. Qi, and S. Wang ⎡
qij
⎤ − 0.90 0.70 : ⎣ 0.90 − 0.40 ⎦ 0.70 0.40 −
⎡
⎤ 0.58 pi : ⎣ 0.30 ⎦ 0.12
⎡
PWC :
rij
⎤ ⎡ ⎤ − 0.60 0.60 0.40 : ⎣ 0.40 − 0.90 ⎦ =⇒ p˜i : ⎣ 0.43 ⎦ 0.40 0.10 − 0.17 ⎡
PWC − CC :
, rij
⎡ ⎤ ⎤ − 0.54 0.42 0.32 ⎣ 0.24 ⎦ : ⎣ 0.36 − 0.36 ⎦ =⇒ p˜O i : 0.28 0.04 − 0.11 ⎡
NPWC − CC :
tij
⎡ ⎤ ⎤ − 0.83 0.83 0.55 ⎣ 0.28 ⎦ : ⎣ 0.17 − 0.66 ⎦ =⇒ p˜N i : 0.17 0.34 − 0.17
Fig. 1. Comparion of NPWC-CC, PWC-CC and PWC on a 3-class problem. pi are ˜N the real probabilities of a test example x. p˜i , p˜O i , and p i are estimated by formula (3). Both PWC-CC and NPWC-CC classifies x correctly, while plain PWC behaves wrong. Note that p˜N i is closest to pi .
3.3
Our Algorithm
The purpose of using correcting classifier s is to reduce the impact those mean˜ The original PWC-CC algorithm achieves ingless rij have on the global P (P). this purpose by weighting rij with corresponding qij . Thus the values of the meaningless rij are likely to be decreased, while those meaningful ones are kept nearly unchanged. However there are other ways to achieve the same purpose. One approach is to reduce the confidence of meaningless rij and enhance the confidence of meaningful rij . We believe that in global-decision-making, the binary classifiers which have more confidence in their opinions dominate those which have less confidence in their opinions. A classifier Cij is considered to have much confidence in its output if the corresponding rij is very large (close to 1) or very small (close to 0). On the contrary, a rij around 0.5 indicates that Cij is not that confident in determining which class wins. Based on these analysis, a novel PWC-CC (NPWC-CC) algorithm is proposed. NPWC-CC works in two steps: 1. rij are converted into a new set of pairwise probabilities tij . " 1−Δ rij ≤ 0.5 2 tij = . 1+Δ rij > 0.5 2 where
Δ =
tanh(4Δ) qij Δ
qij ≥ 0.5 . qij < 0.5
(15)
(16)
Improved PWC Support Vector Machines with Correcting Classifiers
Δ = |rij − rji | = |2rij − 1| .
459
(17)
˜ 2. Then a PWC method is employed to couple tij into a global P (P). In the first step, those meaningless rij , with expected small qij , are likely to be made more unconfident (corresponding tij are closer to 0.5). On the other hand, the confidences of the meaningful rij are likely to be strengthened (corresponding tij are farther from 0.5). A comparison of NPWC-CC, PWC-CC and PWC is illustrated in Figure 1. From (15) (16) and (17), we immediately get tij = 1 − tji . This means that tij are real pairwise probabilities. Therefore any PWC method can be employed in NPWC-CC and the obtained pi (˜ pi ) are meaningful posterior probabilities. Thus the disadvantages of the original PWC-CC algorithm are overcame.
4
Experimental Results
Experiments are performed on several benchmark datasets from the Statlog collection [8]: dna, satimage, letter, and shuttle. Note that except dna, all data of the problems are scaled to [-1, 1]. Since dna has binary attributes, we leave it unchanged. Dataset statistics are listed in Table 1. Table 1. Dataset statistics dataset #training data #testing data #class #attributes dna 2000 1186 3 180 satimage 4435 2000 6 36 letter 15000 5000 26 16 shuttle 43500 14500 7 9
Support vector machines (SVMs) are employed as binary classifiers to learn each binary subproblem. However standard SVMs do not produce probabilistic outputs. In [9], Platt suggested to map original SVM outputs to probabilities by fitting a sigmoid after the SVM: P (y = 1|x) =
1 . 1 + exp(Af (x) + B)
(18)
Parameters A and B are found by minimizing the negative log likelihood of the training data: min
−
l i=1
where
ti log(pi ) + (1 − ti ) log(1 − pi ) ,
(19)
460
H. Li, F. Qi, and S. Wang
pi =
1 , 1 + exp(Af (xi ) + B)
ti =
yi + 1 . 2
(20)
yi is the target label of example xi , f (·) is an SVM. LIBSVM [10] is employed for SVMs training and testing. Experimental results are listed in Table 2. Where PWC1 is the PWC method described by formula (3), PWC2 is the method described in Section 2.2, NPWC-CC1 employs PWC1 in its second step, NPWC-CC2 employs PWC2 as its coupling method. Note that, NPWC-CC1 and PWC-CC differ only in the way they change the original pairwise probabilities. Table 2. Classification performance of various algorithms dataset dna satimage letter shuttle
PWC1 95.36% 90.43% 97.84% 99.89%
PWC2 95.53% 91.51% 97.91% 99.90%
PWC-CC NPWC-CC1 NPWC-CC2 95.62% 95.62% 95.62% 91.92% 91.92% 92.17% 97.98% 97.98% 98.34% 99.94% 99.94% 99.93%
From Table 2, we can see that the use of correcting classifier s improves the classification performance of PWC on all datasets. However due to the large test datasets used, the improvements expressed in percentage are not that impressive as illustrated in [4]. As expected, PWC-CC and NPWC-CC1 perform exactly the same. This verifies the analysis in Section 3.3 that the impact of meaningless rij can be reduced by making them more unconfident. NPWC-CC2 performs best on all problems except shuttle. This highlights the virtue of NPWC-CC that more sophisticated coupling method can be employed, which is impossible for PWC-CC. In [7], it was concluded that PWC2 has a more stable performance that PWC1. Our experimental results give the same result.
5
Conclusion
Pairwise coupling (PWC) is a widely-used method in multi-class classification tasks. But it has an important drawback, due to the nonsense caused by those meaningless pairwise probabilities. PWC-CC tackles this problem by weighting the pairwise probabilities with the outputs of additional correcting classifiers. Though PWC-CC performs much better than PWC, it has its own disadvantages. In this paper, a novel PWC-CC (NPWC-CC) method is proposed. NPWC-CC works in two steps: First the original pairwise probabilities are converted into a new set of pairwise probabilities, wherein those meaningless probabilities are made more unconfident, while the confidences of the meaningful ones are strengthened. Then a PWC method is employed to couple the new pairwise probabilities into global posterior probabilities. NPWCCC overcomes the disadvantages of PWC-CC and can achieve even better performance.
Improved PWC Support Vector Machines with Correcting Classifiers
461
References 1. Weston, J., Watkins, C.: Support Vector Machines for Multi-Class Pattern Recognition. In: Proc. of 7th European Sympo. on Artificial Neural Networks (1999) 2. Platt, J., Cristianini, N., Shawe-Taylor, J.: Large Margin DAGs for Multiclass Classification. Advance in Neural Information Processing Systems. 12 (2000) 547553 3. Hsu, C.-W., Lin, C.-J.: A comparison of methods for multi-class support vector machines. IEEE Trans. on Neural Networks. 13 (2002) 415-425 4. Moreira, M., Mayoraz, E.: Improved Pairwise Coupling Classification with Correcting Classifiers. In: Proc. of the 10th Europen Conf. on Machine Learning. (1998) 160-171 5. Friedman, J.: Another Approach to Polychotomous Classification. Technical report, Stanford University. (1996) 6. Hastie, T., Tibshirani, R.: Classification by Pairwise Coupling. The Annals of Statistics. 26 (1998) 451-471 7. Wu, T.-F., Lin, C.-J., Weng, R.C.: Probability Estimates for Multi-Class Classification by Pairwise Coupling. Journal of Machine Learning Research. 5 (2004) 975-1005 8. Michie, D., Spiegelhalter, D.J., Taylor, C.C.: Machine Learning, Neural and Statistical Classification. Ellis Horwood, London. (1994) Data available at ftp://ftp.ncc.up.pt/pub/statlog 9. Platt, J.: Probabilistic Outputs for Support Vector Machines and Comparison to Regularized Likelihood Methods. In: Smola, A.J., Bartlett, P.L., Sch¨olkopf, B., Schuurmans, D. (eds.): Advances in Large Margin Classifiers. MIT Press (2000) 61-74 10. Chang, C.-C., Lin, C.-J.: LIBSVM: A Library for Support Vector Machines. (2002) Online at http://www.csie.ntu.edu.tw/∼ cjlin/papers/libsvm.pdf
Least Squares Littlewood-Paley Wavelet Support Vector Machine Fangfang Wu and Yinliang Zhao Institute of Neocomputer, Xi’an Jiaotong University, Xi’an 710049, People’s Republic of China [email protected], [email protected]
Abstract. The kernel function of support vector machine (SVM) is an important factor for the learning result of SVM. Based on the wavelet decomposition and conditions of the support vector kernel function, LittlewoodPaley wavelet kernel function for SVM is proposed. This function is a kind of orthonormal function, and it can simulate almost any curve in quadratic continuous integral space, thus it enhances the generalization ability of the SVM. According to the wavelet kernel function and the regularization theory, Least squares Littlewood-Paley wavelet support vector machine (LS-LPWSVM) is proposed to simplify the process of LPWSVM. The LSLPWSVM is then applied to the regression analysis and classifying. Experiment results show that the precision is improved by LS-LPWSVM, compared with LS-SVM whose kernel function is Gauss function.
1 Introduction Support vector machine (SVM) is a kind of classifier’s studying method on statistic study theory [1,2]. This algorithm derives from linear classifier, and can solve the problem of two kind classifier, later this algorithm applies in non-linear fields, that is to say, we can find the optimal hyperplane (large margin) to classify the samples set. SVM can use the theory of minimizing the structure risk to avoid the problems of excessive study, calamity data, local minimal value and so on. For the small samples set, this algorithm can be generalized well [3]. Support vector machine (SVM) has been successfully used for machine learning with large and high dimensional data sets. This is due to the fact that the generalization property of an SVM does not depend on the complete training data but only a subset thereof, the so-called support vectors. Now, SVM has been applied in many fields as follows: handwriting recognition [4], three-dimension objects recognition, faces recognition [5], text images recognition, voice recognition, regression analysis and so on. For pattern recognition and regression analysis, the non-linear ability of SVM can use kernel mapping to achieve. For the kernel mapping, the kernel function must satisfy the condition of Mercer [6]. The Gauss function is a kind of kernel function which is general used. It shows the good generalization ability. However, for our used A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 462 – 472, 2005. © Springer-Verlag Berlin Heidelberg 2005
Least Squares Littlewood-Paley Wavelet Support Vector Machine
463
kernel functions so far, the SVM can not approach any curve in L2(R) space (quadratic continuous integral space), because the kernel function which is used now is not the complete orthonormal base. This character lead the SVM can not approach every curve in the L2(R) space, similarly, the regression SVM can not approach every function. According to the above describing, we need find a new kernel function, and this function can build a set of complete base through horizontal floating and flexing. As we know, this kind of function has already existed, and it is the wavelet functions. Based on wavelet decomposition, this paper propose a kind of allowable support vector’s kernel function which is named Littlewood-Paley wavelet [7] kernel function, and we can prove that this kind of kernel function is existent. The Littlewood-Paley wavelet kernel functions are the orthonormal base of L2(R) space. At the same time, combining this kernel function with least squares support vector machine[8], we can build a new SVM learning algorithm that is Least squares Littlewood-Paley wavelet support vector machine (LS-LPWSVM). In section 2, we introduce support vector machine algorithm; in section 3, we propose a new support vector’s kernel function that is Littlewood-Paley wavelet kernel function; in section 4, we propose the Least squares Littlewood-Paley wavelet support vector machine (LS-LPWSVM); in section 5, we do the experiment to compare with other algorithms of SVM; finally, in section 6, we draw the conclusion.
2 Support Vector Machine For the given samples set {(x1, y1) … ,(xl, yl)}, xi∈Rd, yi∈R, l is the samples number, d is the number of input dimension. In order to approach the function f(x) with respect to this data set precisely, for regression analysis, SVM use the regression function as follows: l
f ( x ) = ¦ wi k ( x i , x ) + b
(1)
i =1
wi is the weight vector, and b is the threshold, k(xi, x) is the kernel function. Training a SVM can be regarded as to minimize the value of J(w, b):
1 J ( w, b) = min w 2
2
l
l § · + γ ¦ ¨¨ y k − ¦ wi k ( x i , x) − b ¸¸ i =1 © i =1 ¹
2
(2)
The kernel function k(xi, x) must be satisfied with the condition of Mercer[6]. When we define the kernel function k(xi, x), we also define the mapping from input to character’s space. The general used kernel function of SVM is Gauss function, defined as follows: 2
k ( x, x' ) = exp(− x − x' / 2σ 2 ) For this equation, σ is a parameter which can be adjusted by users.
(3)
464
F. Wu and Y. Zhao
3 Support Vector’s Kernel Function 3. 1 The Conditions of Support Vector’s Kernel Function
The support vector’s kernel function can be described as not only the product of point, such as k ( x, x' ) = k (< x ⋅ x' >) , but also the horizontal floating function , such as k(x,x’)=k(x-x’)[5]. In fact, if a function satisfied the condition of Mercer, it is the allowable support vector’s kernel function. Theorem 1[6]: The symmetry function k(x, x’) is the kernel function of SVM if and
only if: for all function g≠0 which satisfied the condition of
³
Rd
g 2 (ξ )dξ < ∞ , we
need satisfy the condition as follows:
³³R ⊗R d
d
k ( x, x' ) g ( x) g ( x' )dxdx' ≥ 0
(4)
This theorem proposed a simple method to build the kernel function. For the horizontal floating function, because hardly dividing this function into two same functions, we can give the condition of horizontal floating kernel function. Theorem 2[9,10]: The horizontal floating function is a allowable support vector’s kernel function if and only if the Fourier transform of k(x) need satisfy the condition as follows:
F [k ( w)] = (2π )
−
d 2
³R
d
exp(− jwx )k ( x)dx ≥ 0
(5)
3.2 Littlewood-Paley Wavelet Kernel Function
If the wavelet function ψ (x) satisfied the conditions: ψ ( x) ∈ L 2 ( R ) I L1 ( R ) , and ψˆ (0) = 0 , ψˆ is the Fourier transform of function ψ (x) . The wavelet function group can be defined as: 1
§ x−m· ¸ © a ¹
ψ a ,m ( x) = (a )− 2 ψ ¨
(6)
m ∈ R; a ≥ 0 . For this equation, a is the flexible coefficient, m is the horizontal floating coefficient, and ψ (x) is the base wavelet. For the function f(x), f(x)∈L2(R), the wavelet transform of f(x) defined as:
(Wψ f )(a, m) = (a )− 2 ³−+∞∞ f ( x)ψ §¨ x −a m ·¸dx 1
©
¹
(7)
the wavelet inverse transform for f(x) is: f ( x) = Cψ−1 ³
da ³ [(Wψ f )(a, m )]ψ a,m ( x) a 2 dm
+∞ +∞
−∞ −∞
(8)
Least Squares Littlewood-Paley Wavelet Support Vector Machine
465
For the above equation (8), Cψ is a constant with respect to ψ (x) . The theory of wavelet decomposition is to approach the function f(x) by the linear combination of wavelet function group. If the wavelet function of one dimension is ψ (x) , using tensor theory[11], the multidimension wavelet function can be defined as: d
ψ d ( x ) = ∏ψ ( x i )
(9)
i =1
We can build the horizontal floating kernel function as follows: d
k ( x, x ' ) = ∏ ψ ( i =1
x i − x i' ) ai
(10)
ai is the flexible coefficient of wavelet, ai>0. So far, because the wavelet kernel function must satisfy the conditions of theorem 2, the number of wavelet kernel function which can be showed by existent functions is few. Now, we give an existent wavelet kernel function: Littlewood-Paley wavelet kernel function, and we can prove that this function can satisfy the condition of allowable support vector’s kernel function. Littlewood-Paley wavelet function is defined as follows:
ψ ( x) =
sin 2πx − sin πx πx
(11)
the above equation (11) is Littlewood-Paley wavelet function. We can prove the Fourier transform of this function is not negative, and the value of the transform is showed as follows:
1, π ≤ ω ≤ 2π
ψˆ (ω ) = ®
¯ 0,
(12)
other
ψˆ (ω ) ≥ 0 , and we use this wavelet to build the wavelet kernel function. Theorem 3: Littlewood-Paley wavelet kernel function is defined as: d
k ( x, x ' ) = k ( x − x ' ) = ∏
sin 2π (
x i − x i' x − x i' ) − sin π ( i ) ai ai x − x i' π( i ) ai
i =1
and this kernel function is a allowable support vector kernel function. Proof. According to the theorem 2, we only need to prove
F [k ( w)] = (2π )
−
d 2
F [k ( w)] = (2π )
−
³R d 2
d
exp(− jwx )k ( x)dx ≥ 0
³R
d
exp(− jwx )k ( x)dx
(13)
466
F. Wu and Y. Zhao
= (2π )
=
−
d 2
d
³R
d
d d − (2π ) 2
exp(− jwx )∏
sin 2π (
i =1
+∞
∏ ³−∞ exp(− jwi xi )
xi x ) − sin π ( i ) ai ai dx xi π( ) ai
sin 2π (
i =1
= (2π )
−
d d 2
+∞
§
xi x ) − sin π ( i ) ai ai dx i x π( i ) ai
x ·
∏ ³−∞ exp¨¨ − j (ai wi ) ⋅ ( ai ) ¸¸ ©
i =1
+∞
Qψˆ ( w) = ³ exp(− jwx ) −∞
∴ F [k ( w)] ≥ 0
i
¹
sin 2π (
xi x ) − sin π ( i ) ai ai dx i xi π( ) ai
sin 2πx − sin πx dx ≥ 0 πx
Ŷ
If we use the support vector’ kernel function as Littlewood-Paley wavelet kernel function, the classifier function of SVM is defined as: § § x − xi · § x − xi ¨ j ¸ j ¨ j ¨ j − sin 2 sin π π ¨ ¨ ¸ ¨ i i ¨ a ¸ ¨ a d ¨ l j j © ¹ © f ( x) = sgn ¨ ¦ wi ∏ § x − xi · j =1 ¨ i =1 j j ¸ 𠨨 ¨ ¸¸ i ¨ a ¨ j © ¹ ©
· ¸ ¸¸ ¹
· ¸ ¸ ¸ + b¸ ¸ ¸ ¸ ¹
(14)
For regression analysis, the output function is defined as: § x − xi · § x − xi j j ¸ j ¨ j sin 2𠨨 sin π − ¸ ¨ i i ¨ ¸ ¨ aj aj d l © ¹ © f ( x ) = ¦ wi ∏ § x − xi · i =1 j =1 j j ¸ 𠨨 ¨ a i ¸¸ j © ¹
· ¸ ¸¸ ¹
+b
(15)
x ij is the value of ith training sample’s jth attribute. Using the Littlewood-Paley wavelet kernel function, we can give the regression function a new concept: using the linear combination of wavelet function group, we can approach any function f(x), that is to say, we can find the wavelet coefficients to decomposition the function f(x).
Least Squares Littlewood-Paley Wavelet Support Vector Machine
467
4 Least Squares Littlwood-Paley Support Vector Machine Least squares support vector machine is a new kind of SVM [8]. It derived from transforming the condition of inequation into the condition of equation. Firstly, we give the linear regression algorithm as follows. For the given samples set {(x1, y1) … ,(xl , yl)}, xi∈Rd, yi∈R, l is the samples number, d is the number of input dimension. The linear regression function is defined as:
f ( x ) = wT x + b
(16)
Importing the structure risk function, we can transform regression problem into protruding quadratic programming: min
1 w 2
2
+γ
1 l 2 ¦ξ i 2 i =1
(17)
The limited condition is: y i = wT x i + b + ξ i
(18)
we define the Lagrange function as: L=
1 w 2
2
+γ
1 l 2 l ¦ ξ i − ¦ α i ( wT x i + b + ξ i − y i ) 2 i =1 i =1
(19)
According the KKT condition, we can get: l ∂L = 0 → w = ¦ α i xi ∂w i =1
(20)
l ∂L = 0 → ¦α i = 0 ∂b i =1
(21)
∂L = 0 → α i = γξ i ; i = 1,..., l ∂ξ i
(22)
∂L = 0 → wT xi + b + ξ i − yi = 0; i = 1,..., l ∂α i
(23)
From equation (20) to (23), we can get the following linear equation: ªI «0 « «0 « T ¬x x=[x1, ..., xl]
0
0
0
0
0 γI r 1 I
y=[y1, ..., yl]
− x º ª wº ª 0 º r 1T »» «« b »» «« 0 »» = − I » «ξ » « 0 » »« » « » 0 ¼ ¬α ¼ ¬ y ¼
r 1 =[1, …, 1] ξ=[ξ1, ..., ξl] α=[α1, ..., αl].
(24)
468
F. Wu and Y. Zhao
The equation result is:
r ª0 º ª b º ª0 º 1T =« » «r T −1 » «α » ¬«1 x x + γ I ¼» ¬ ¼ ¬ y ¼ l
w = ¦ α i xi
(25)
ξi = α i / γ .
i =1
For non-linear problem, The non-linear regression function is defined as: l
f ( x) = ¦ α i k ( x i , x) + b
(26)
i =1
The above equation result can be altered as: r ª0 1T ºª b º ª0 º =« » «r −1 » « » ¬«1 K + γ I ¼» ¬α ¼ ¬ y ¼ K = {k ij = k ( x i , x j )}li , j =1
(27)
the function k( ⋅ ) is the Littlewood-Paley wavelet
kernel function. Based on Littlewood-Paley wavelet kernel function, we can get a new learning method: Least squares Littlewood-Paley wavelet support vector machine (LS-LPWSVM). In fact, this algorithm is also Least squares support vector machine. We only use the Littlewood-Paley wavelet kernel function to represent the kernel function of SVM. There is only one parameter γ need to be made certain for this algorithm, and the number of parameters of this kind of SVM is smaller than other kind of SVM, at the same time, the uncertain factors are decreased. Additionally, because using least squares method, the computation speed of this algorithm is more rapid than other SVM. Because LS-SVM can not optimize the parameters of kernel function, it is hard to select l × d parameters. For convenience, we fix a ij = a , and the number of kernel function’s parameters is 1. We can use the Cross-Validation method to select the value of parameter a.
5 Experiments and Results For proving the performance of the algorithm of LS-LPWSVM, we make 3 experiments, (1) unitary function’s regression, (2) binary function’s regression, (3) the classifier for 5 UCI datasets. These 3 experiments will be introduced as follows. For these 3 experiments, they were all done on an Intel P4 PC (with a 2.0GHZ CPU and 512MB memory) running Microsoft Windows 2000 Professional, Matlab6.5. For regression experiments, we use the approaching error as follows [11]: E=
l
¦ ( yi − f i ) 2 i =1
l
¦ ( yi − yi ) 2 , i =1
y=
1 l ¦ yi l i =1
(28)
Least Squares Littlewood-Paley Wavelet Support Vector Machine
469
Experiment (1) We use LS-LPWSVM to regress the following function:
y = x sin( 4πx)e1− x + 2 x 2 tanh(10 x) cos(2πx) 2
(29)
The result of this experiment can be described as table 1, figure 1 and figure 2. In these two figures, the real line is the original function. Figure 1 is the regression result of LS-SVM which uses the Gauss kernel function. Figure 2 is the regression result of LS-LPWSVM which uses the Littlewood-Paley wavelet kernel function. From these result, we can find that the Littlewood-Paley wavelet kernel function not only has the capacity of non-linear mapping, but also inherit the characters of Littlewood-Paley wavelet’s orthonormal capacity. The result of regression is more precisely. Table 1. The regression result for unitary function y
LS-SVM(γ=50) (Gauss kernel function) LS-LPWSVM(γ=50)
The parameter of kernel function σ=1
Training samples 500
Regression error
a=2
500
0.0514
Fig. 1. The unitary regression curve based on Gauss kernel(LS-SVM)
0.0637
Fig. 2. the unitary regression curve based on LS-LPWSVM
Experiment (2) We use LS-LPWSVM to regress the following function:
z = ( x 2 − y 2 ) ⋅ (cos( x) + sin( y ))
(30)
The result of this experiment can be described as table 2, figure 4 and figure 5. Figure (3) is the original curve of binary function (30). Figure 4 is the regression result of LS-SVM which uses the Gauss kernel function. Figure 5 is the regression result of LS-LPWSVM which uses the Littlewood-Paley wavelet kernel function. From these result, we can find that the Littlewood-Paley wavelet kernel function not
470
F. Wu and Y. Zhao Table 2. The regression result for binary function z
LS-SVM(γ=50) (Gauss kernel function) LS-LPWSVM(γ=50)
Fig. 3. The original binary function’s curve
The parameter of kernel function σ=1
Training samples 2000
Regression error
a=2
2000
0.0187
Fig. 4. The binary regression curve based on Gauss kernel
0.0313
Fig. 5. The binary regression curve based on LSLPWSVM
only has the capacity of non-linear mapping, but also inherit the characters of Littlewood-Paley wavelet’s orthonormal capacity. The result of regression is more precisely. Experiment (3) For this experiment, we use 5 datasets to train the classifier of SVM, and these 5 datasets are all from UCI data [12]. We introduce these 5 datasets as follows. For dataset (1), it derives from Smith, J.W., Everhart, J.E., Dickson, W.C., Knowler, W.C., and Johannes, R.S., which is named Diabetes. The diagnostic, binaryvalued variable investigated is whether the patient shows signs of diabetes according to World Health Organization criteria. For this set, the kernel function of LS-SVM is Gauss function and the value of σ2=4. The kernel function of LS-LPWSVM is Littlewood-Paley wavelet kernel function and the value of a=1. For dataset (2), this radar data was collected by a system in Goose Bay, Labrador, which is named Ionosphere. This system consists of a phased array of 16 highfrequency antennas with a total transmitted power on the order of 6.4 kilowatts. The targets were free electrons in the ionosphere. "Good" radar returns are those showing evidence of some type of structure in the ionosphere. "Bad" returns are those that do not; their signals pass through the ionosphere. For this set, the kernel function of LSSVM is Gauss function and the value of σ2=5. The kernel function of LS-LPWSVM is Littlewood-Paley wavelet kernel function and the value of a=1. For dataset (3), it derives from Dr. William H. Wolberg, and the set is nosocomial data, which is named Breast. From this data, we can tell whether the patient’s breast tumour is malignant. For this set, the kernel function of LS-SVM is Gauss function
Least Squares Littlewood-Paley Wavelet Support Vector Machine
471
and the value of σ 2 = 4. The kernel function of LS-LPWSVM is Littlewood-Paley wavelet kernel function and the value of a=1. For dataset (4), it derives from spam e-mail database, which is named Spambase. From this data, we can tell whether the e-mail is a spam e-mail. For this set, the kernel function of LS-SVM is Gauss function and the value of σ2=6. The kernel function of LS-LPWSVM is Littlewood-Paley wavelet kernel function and the value of a=2. For dataset (5), it is the report of census, which is named Adult. Every data has 14 attributes. After transforming the value of each attribute between 0 and 1, we have the data set which has six numerical value attributes. The number of this data set is 32561. The set can be trained for forecasting whether man’s income is over 50,000$. In this set, there are two kinds of family’s income. One kind is over 50,000$, the number of this kind of data is 7841. The other kind is below 50,000$, the number of this kind of data is 24720. For this set, the kernel function of LS-SVM is Gauss function and the value of σ2=10. The kernel function of LS-LPWSVM is LittlewoodPaley wavelet kernel function and the value of a=2. Table 3. The comparison precision among SVM algorithms
Diabetes(γ=50) Ionosphere(γ=50) Breast(γ=50) Spambase(γ=100) Adult(γ=100)
N (The scale of sample set) 768 351 699 4601 32561
Accuracy (LS-SVM) 99.1% 96.6% 98.3% 88.65% 91.79%
Accuracy (LS-LPWSVM) 99.5% 97.7% 98.3% 91.38% 93.64%
Table 3 is the comparison precision among SVM algorithms. There are 2 kind algorithms as follows: LS-SVM and LS-LPWSVM. From the analysis of the data in table 3, the result of this experiment shows that the accuracy of LS-LPWSVM is better than the accuracy of LS-SVM.
6 Conclusion For the SVM’s learning method, this paper proposes a new kernel function of SVM which is the Littlewood-Paley wavelet kernel function. We can use this kind of kernel function to map the low dimension input space to the high dimension space. For the Littlewood-Paley wavelet function, because of its horizontal floating and flexible orthonormal character, it can build the orthonormal base of L2(R) space, and using this kernel function, we can approach almost any complicated functions in L2(R) space, thus this kernel function enhances the generalization ability of the SVM. At the same time, combining LS-SVM, a new regression analysis method named Least squares Littlewood-Paley wavelet support vector machine is proposed, we can compare this kind of SVM with other SVM. Experiment shows: the Littlewood-Paley wavelet kernel function is better than Gauss kernel function.
472
F. Wu and Y. Zhao
References 1. Vapnik, V. The Nature of Statistical Learning Theory. 1995. New York: Springer-Verlag 1~175. 2. Zhang, X.G. Introduction to Statistical Learning Therory and Support Vector Machines. Acta Automatica Snica. 2000, 26(1): 32~42. 3. Burges, C.J.C. A tutorial on support vector machines for pattern recognition. Data Mining and Knowledge Discovery. 1998, 2(2): 955~974. 4. Bernhard S., Sung K.K. Comparing Support Vector Machines with Gaussian Kernels to Radical Basis Fuction Classifiers. IEEE Transaction on Signal Processing. 1997, 45(11): 2758~2765. 5. Edgar O., Robert F., Federico G. Training Support Vector Machines: An Application to Face Detection. IEEE Conference on Computer Vision and Pattern Recognition. 1997. 130~136. 6. Mercer J. Function of positive and negative type and their connection with the theory of integral equations [J]. Philosophical Transactions of the Royal Society of London: A, 1909, (209):415-446. 7. Stein, E.M Topics in Harmonic Analysis Related to the Littlewood-Paley Theory, Princeton University Press and the University of Tokio Press, Princeton, New Jersey, 1970. 8. Suykens J A K, Vandewalle J. Least squares support vector machine classifiers [J]. Neural Processing Letter, 1999, 9(3): 293-300. 9. Burges C J C. Geometry and invariance in kernel based methods [A]. in Advance in Kernel Methods-Support Vector Learning[C]. Cambridge, MA: MIT Press, 1999. 89-116. 10. Smola A., Schölkopf B., Müller K R. The connection between regularization operators and support vector kernels [J]. Neural Networks, 1998, 11(4):637-649. 11. Zhang Q, Benveniste A. Wavelet networks [J]. IEEE Trans on Neural Networks, 1992, 3(6): 889-898. 12. ftp://ftp.ics.uci.edu.cn/pub/machine-learning-database/adult.
Minimizing State Transition Model for Multiclassification by Mixed-Integer Programming Nobuo Inui and Yuuji Shinano Tokyo University of Agriculture and Technology, Koganei Tokyo 184-8588, Japan
Abstract. This paper proposes a state transition (ST) model as a classifier and its generalization by the minimization. Different from previous works using statistical methods, tree-based classifiers and neural networks, we use a ST model which determines classes of strings. Though an initial ST model only accepts given strings, the minimum ST model can accepts various strings by the generalization. We use a minimization algorithm by Mixed-Integer Linear Programming (MILP) approach. The MILP approach guarantees a minimum solution. Experiment was done for the classification of pseudo-strings. Experimental results showed that the reduction ratio from an initial ST model to the minimal ST model becomes small, as the number of examples increases. However, a current MILP solver was not feasible for large scale ST models in our formalization.
1
Introduction
Classification of examples is a general task which is important in many fields. For example, sentence classification is useful for a dialog system where the role of a sentence is the key for generating the next sentence and for analyzing the dialog structure[7]. The previous research often uses N-gram information and linguistic knowledge to determine sentence classes. Linguistic knowledge is effective for this purpose, since roles can be judged by the sentence structure. For example, when the sentence is a question with the first word“Do”, we can classify it as a “yes-no question” on the basis of linguistic knowledge alone. However, when a system has to cope with a variety of roles and many different sentences with complicated structures, we need to collect linguistic knowledge from various examples. N-gram information and decision trees are often useful to determine sentence roles in this task. By using such statistical approaches, it is possible to automatically construct a system using corpus that can judge sentence roles with a high reliability. However, a sentence is not just a set of words but a structured sequence of words. Though cooccurrence information is effective, it is only an approximation of the sentence structure. State transition-based methods like DFA (Deterministic Finite State Automaton), NFA (Non-deterministic Finite State Automaton) and PDFA (Probabilistic DFA) provide useful information for determining the class of a sentence. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 473–482, 2005. c Springer-Verlag Berlin Heidelberg 2005
474
N. Inui and Y. Shinano
For example, a classification automaton has been proposed for the classification of strings.[8]. In this method, the final state transition of a strings indicates its class. Let s be the final state after tracing a route on the state transition model. If the state s has state transitions with classification symbols, the string can be classified into these classes. This approach is a natural extension of the automaton that only determines whether a string is accepted or rejected. As an analogy, we use the class state which shows the string class as the final state. We also attempt to minimize such automaton using MILP (Mixed-Integer Linear Programming) technique. This paper is organized as follows. We describe our natural language problem domain in Section 2. We present the problem definition in Section 3, and propose a solution to the minimization problem in Section 4. In Section 5, we present the experimental results for pseudo-strings and their discussion. In Section 6 we present our conclusions.
2
Problem Domain
In this paper, we focus on the problem of classifying sentences. The classification of sentences is deeply related to their meanings. The assignment of dialog acts to sentences, mentioned in Section 1, is an example where such classification is helpful. Another useful application of sentence classification is to find word meanings. It is well known that a cooccurrence relation from a word to other words often reflects the word meaning. This information can be used to build a thesaurus from the corpus. Though the cooccurrence works well in acquiring knowledge, it constitutes only a part of the information obtained from the corpus. Dependency relations (such as modifier-modified relations) between words or clauses constitute another piece of information. But almost all existing works treat dependency relations as relations between words. State transition models, especially automaton, make it possible to express the meaning of words or sentences. For example, consider the classification of adverbs using a state transition model. Grammatically, adverbs modify various verb phrases. In a sentence such as “I have already read the book”, the adverb “already” is considered to modify “have read the book”. In this case, the perfect tense is used. Another sentence “I still read the book”1 , means that “I” sometimes read the book and “I” am not bored to read the book. Both “already” and “still” modify the same phrase. However “I have already finished my work” is natural, but “I have still finished my work” is not. This is because of the tense structure of the verb “finish”. From this example, we can conclude that the meaning of an adverb can be classified based on the phrases modified by that adverb. In the above example, shared and non-shared parts of the strings containing “already” and “still” help to distinguish their meanings. In our previous work[4] we used word-cooccurrence information to estimate the meaning of adverbs. In contrast, here we try to find the meaning of adverbs from the resemblance of word strings. 1
This sentence is present tense.
Minimizing ST Model for Multiclassification by Mixed-Integer Programming
475
Fig. 1. Example of Merging State Transition Models
It is possible to construct an automaton that accepts an string if it can be modified by an adverb. We extend this approach to allow automata for several adverbs to be merged. In doing so, we can expect that the merged automaton expresses the meanings of several adverbs. This concept is shown in Figure 1, where two state transition models, expressing phrases modified by “still” and “already”, respectively, are merged. The merged model contains a part of the state transitions shared by both models. We call this part “shared concept” to mean common phrases or word sequences between the two adverbs. If the size of the shared concepts between two adverbs is large, we generally assume that their meanings resemble based on the analogy with respect to word-cooccurrences. Thus, the merged state transition model provides a tool for analyzing adverb meanings. In addition, we posit that the minimization of a merged state transition model is important to find shared concepts. Since the set of examples from which a state transition model is derived is not complete, each state transition model is sparse. Therefore, we need to generalize the state transition models. The minimization, which is aimed at finding the least number of states to describe the given set of examples, is the key to generalization. In a previous work [2], recurrent neural networks are used to generalize the set of examples. In this work, the acceptance or rejection of a string not included in the set of examples is estimated by a neural network. In contrast to this neural network-based approach, our minimization-based approach guarantees the exact answers for all examples given. This is a benefit of our approach because there are not examples that can be ignored. Much work has been done on the minimization of automaton. The goal of minimization is to reduce the number of states efficiently. One approach[1] uses the minimal cover automaton to reduce the size of minimum DFA. From the view of the search space reduction, an effective pruning method was proposed[5]. In this method, an initial automaton, called loop-free automaton, which is directly generated from examples, is transformed to the minimum automaton by a statemerging method. The equivalence between states is calculated using state transitions from these states, which is also used for pruning. In another approach,
476
N. Inui and Y. Shinano
NFA (Non-deterministic Finite State Automaton) are used to reduce the size of minimum DFA[6]. In a third approach[3], k-layer DFA is used to find minimum DFA efficiently. In all these approaches, the state-merging algorithm is a popular method to find the minimum automaton. This algorithm is usually applied to a complete DFA where all the next states for all inputs are known. If there exist an undefined state transition from a state for a input symbol, all possible combinations of state-merge must be tried[5]. Since our problem mentioned in Section 3 does not satisfy this condition, we propose to use the MILP approach for the minimization of an automaton in Section 4. Different with the previous approach[5] which introduced the problem-specific heuristics, useful techniques developed for solving MILP are available for the effectiveness of finding the minimum automaton by using a MILP solver. In addition, the formalization on MILP is quite simple because the problem description is obtained only giving all possible candidates of solutions. From this, we can try various variations of the minimum automaton problem by only changing the formalization.
3
Preliminary Definitions
In this section, we formally define our problem. A definition used in this paper is similar to the previous research[5]. A state transition model is denoted by {Σ, {} ∪ Q, q, F, δ}, where Σ is a finite set of words, Q is a set of states, q ∈ Q is an initial state, F ⊂ Q is a set of final states and δ : Q × Σ → {} ∪ Q is a transition function. in the definition means an arbitrary state. The arbitrary state is assigned for undefined words. If the action of a word is not defined on a state, an state
ε
Fig. 2. Examples of state transition model
Minimizing ST Model for Multiclassification by Mixed-Integer Programming
477
is used. In this case, the state transition to the state can be replaced to a state in Q in the minimization process. In this paper, is omitted unless necessary. In this model, final states classify phrases into modifiable adverbs. To do so, each final state is labeled such that F = F 1 ∪ . . . ∪ F ML where ML is the number of labels and F i ∩ F j = φ. For example of the classification of sentences by adverbs, the final state of a string which is modified by “already” would have the label “already”. A final state can be labeled with several adverbs. If, for example, a string can be modified by “already” and “still”, its final state is labeled with “already” and “still”, which is not same as “already” nor “still” . Positive examples are used to learn the minimum state transition model. This is because the final states are classified into labels (adverbs). Some examples of state transition models are shown in Figure 2.
4
Classification and Mixed-Integer Programming
In this section, we describe our approach to the minimization of state transition models mentioned in Section 3. 4.1
Prefix Tree Acceptor
First, we make a PTA (Prefix Tree Acceptor) from the set of examples describing the phrases modified by adverbs. Generally PTA is a tree-shaped DFA. In our method, which we will describe later, PTA provides a temporal state number for a string and a substring of words. In PTA, a state is uniquely determined for a given string. We use the PTA shown in Figure 3. Since the number of each state is given by a natural number, we can define a set of states in PTA as Qp = {1, 2, . . . , MQp }, where MQp is the number of states required for the expression of PTA.
Fig. 3. Example of PTSa
478
4.2
N. Inui and Y. Shinano
Model State Transition
To use the MILP approach for the minimization of PTA given in Section 4.1, we use MSTs (Model State Transitions) for expressing the state transition models. The number of states in an MST is determined appropriately. The formulation of the MILP minimization, to be described later, tries to map a state in PTA to a state in MST so as to minimize the number of states used in MST, as shown in Figure 4. We define a set of states in MST as Qm = {1, 2, . . . , MQm }. If MQp = MQm , then the existence of MST describing a given PTA is guaranteed, otherwise not. As a practical problem, MQm controls the calculation time of MILP, since the number of expressions in it is proportional to MQm . So we appropriately set MQm in our experiment.
Fig. 4. Mapping a state in PTA to a state in MST for a state transition
In the next section, we formulate a mapping from a state in PTA to a state in MST. To mention the equivalence of states between PTA and MST, we use a state t in P T A = {Σ, {} ∪ Qp , qp , Fp , δp }, a state s in M ST = {Σ, {} ∪ Qm , qm , , Fm , δm } and a mapping function st from t to a state in MST. MST is said to be equivalent to PTA, if and only if: t ∈ Qp → ∃s ∈ Qm such that s = st t ∈ Qp , s ∈ Qm , s = st , w ∈ Σ → δm (s, w) = sδp (t,w) i t ∈ Qp , t ∈ Fpi → st ∈ Fm
4.3
Describing the Minimum State Transition Model in MILP
The process of minimizing an MILP is shown in Figure 5. 4 parts compose this formalization: 1. 2. 3. 4.
Minimizing the maximum state number used in MST: (2) Making mappings from states in PTA to states in MST:(3)-(7) Making state transitions in MST:(8),(9) Corresponding labels of states in PTA and MST:(10),(11)
Minimizing ST Model for Multiclassification by Mixed-Integer Programming
479
In this process, the maximum number assigned to a state in MST e is minimized. The scope of e is defined in (2), where st shows a state in MST, which corresponds to the state t in PTA. All states are defined as positive integers in (20) and (21). L defined in (23) is used as a set of classes; each element in L represents an adverb or a set of adverbs in our problem-setting. Expressions from (3) to (7) express mappings from the states in PTA to the states in MST. From these expressions, zts becomes 1 if s = st and 0 if s = st . Mst ,MQm and ML are constants used in expressions (20),(21) and (23). Since a variable zts means whether a mapping from t to s is done or not, we can use a expression below, instead of (3),(4) and (7):
zts = 1 t ∈ Qp
s∈Qm
But the formalization shown in Figure 5 is better in the effectiveness from our experience. minimize e subject to st ≤ e (Mst + 1) − (Mst + 1)xts + s − st ≥ 1 (MQm + 1) − (MQm + 1)yts − s + st ≥ 1 Mst − Mst zts + s − st ≥ 0 MQm − MQm zts − s + st ≥ 0 xts + yts + zts = 1 Mst − Mst zts + nsw − st ≥ 0 MQm − MQm zts − nsw + st ≥ 0 ML − ML zts + ps − qt ≥ 0 ML − ML zts − ps + qt ≥ 0 1 ≤ nsw ≤ MQm 1 ≤ st ≤ min(t, MQm ) xts ∈ {0, 1} yts ∈ {0, 1} zts ∈ {0, 1} ps ∈ L qt = l qt ∈ L Qp = {1, 2, . . . , MQp } Qm = {1, 2, . . . , MQm } Σ = {1, 2, . . .} L = {1, 2, . . . , ML }
(1) t ∈ Qp s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t, t = δp(t, w) ∈ Qp , w ∈ Σ s ∈ Qm , t ∈ Qp , s ≤ t, t = δp(t, w) ∈ Qp , w ∈ Σ s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , w ∈ Σ t ∈ Qp s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm , t ∈ Qp , s ≤ t s ∈ Qm t ∈ Qp , l ∈ L, a state t is labeled to l in PTA t ∈ Qp A set of states in PTA A set of states in MST A set of words A set of labels
Fig. 5. Classification on Minimum State Transition Model
(2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23)
480
N. Inui and Y. Shinano
In expressions (8) and (9), nsw means the next state of s when a word w is given in MST. With this variable, a state transition model become deterministic. δp(t, w) means the next state of t when a word w is given in PTA. Expression (10) and (11) determine the label of each state in MST. Adverbs and their combinations classify final states by using labels. If s = st , then the label of a state s in MST equals to that of the state t in MST. By solving the problem shown in Figure 5 using the MILP solver, we obtain a set of mappings from the states in PTA to the states in MST. From this set, we can construct the minimum state transition model.
5
Experiment
We performed an experiment for the minimization of state transition models. The purpose of this experiment was to observe the feasibility of our method. We used a PC with the following specification: – PC: Pentium 4 3.4GHz and 1GB memory – MILP solver: CPLEX 9.1.0 (ILOG) on Windows XP (default setting of parameters) We used pseudo-strings to evaluate our method. Pseudo-strings were randomly generated by the following parameters: – – – – –
The length of string: 5 to 10 Words (Σ): 10 kinds Adverbs: 5 kinds or 10 kinds The number of examples: 5,10,15,20,25,30 The size of MST: 20 states
As described in Section 4.3, the number of variables in the MILP formulation is 2MQp +MQm +(MQp +MQm )ML +3MQp MQm . Usually, the difficulty of problems on the MILP is evaluated using the number of variables and constraints (of course, usually the MILP solver solves NP-hard problems). Generally, a problem with thousands of variables is hard to solve by the MILP solver in the current state of art implementation. So a time limit of 3600 second was set for the MILP solver. The number of states in MST was set to 20, which is enough for MST to describe the given examples. The experimental results are shown in Table 1. In this table,”Num. Exa.” is the number of examples to be learned, “Num. Class” is the number of adverbs and their combinations, “Num. Sta. (PTA)” is the number of states in PTA for expressing examples. Because of our modeling constraints described in Section 4.1, the number of states is a constant, even if the number of adverbs is changed. “Calc. Time” is the calculation time for solving problems on the MILP solver. “Num. Sta. (Min. MST)” is the number of states used in MST. “*” means that the optimal solution is not found within the time limit. But, in this case, the MILP solver can sometimes find a feasible solution. We describe the number of
Minimizing ST Model for Multiclassification by Mixed-Integer Programming
481
Table 1. Results Num. Exa. 5 10 15 20 25 30
Num.Class Num.Sta. (PTA) 5 41 10 5 77 10 5 112 10 5 145 10 5 175 10 5 207 10
Num.Con. Num.Var Calc. (sec) 5539 2192 4.3 4.1 11985 4424 14.4 3600 18244 6595 282.2 3600 24217 8640 3600 3600 29575 10500 3600 3600 35367 12484 3600 3600
Time Num.Sta. (Min. MST) 3 3 5 *7 5 *8 *8 *10 *11 *15 * *
states of the feasible solution with “*”. Figure 6 shows an instance where the number of examples is 5, the number of adverbs is 5, the number of words is 10. ) becomes smaller as the From Table 1, the reduction rate N um.Sta.(Min.MST N um.Sta.(P T A) number of states in PTA grows. This shows that our state transition model is effective with respect to reducing the number of states. Moreover, the calculation time increases as the class size increases. The class size only affects the constant in (10) and (11) in Figure 5. The number of variables is not changed, even if the class size is changed. This shows that the value of constants deeply influence the performance of the MILP solver. As shown in our experimental results, we could not obtain the optimal or a feasible solution when there are a large number of examples. Though the main reason for this is the performance of the MILP solver, we feel that improving problem descriptions might also help.
Fig. 6. An Example of Minimum State Transition Model
482
6
N. Inui and Y. Shinano
Conclusion
In this paper, we proposed a new method for the classification of strings using state transition models. In this approach, final states express the class of strings, analogous to the DFA where the final states express the acceptance of strings. In our method, a state transition is expressed in an incomplete way; for the rejection is not explicitly expressed. We apply this model to classify strings, depending on the possibility of the modification by adverbs. The minimization is described using the MILP approach. By this method, the optimal solution is guaranteed without any heuristic method. Experimental results showed that the reduction rate of states becomes smaller as the number of states in the initial state transition model (PTA) becomes larger. We, however, found that the feasibility of our method was low when the number of examples is large. In the future research, we plan to apply the minimum state transition models to analyze the meanings of adverbs.
Acknowledgments We would like to thank Bipin Indurkha for revising our paper and giving good ideas.
References 1. Campeanu, C., Santean, N.,Yu, S: Minimal Cover-Automata for Finite Language. Theoretical Computer Science. 267 (2001) 3-16 2. Carrasco, R. C., Forcada, M. L., Valdes-Munoz, M. A., Neco, R. P.: Stable Encoding of Finite-State Matches in Discrete-Time Recurrent Neural Nets with Sigmoid Units. Neural Computation 12 (2000) 2129-2174 3. Holzmann, G. J., Puri, A.: A Minimized Automaton Representation of Reachable States. STTT ’99 bf 3.2. (1999) 270-278 4. Inui,N., Kotani, Y.,Nisimura, H.: Classifying Adverbs based on an Existing Thesaurus using Corpus. Natural Language Processing Pacific Rim Symposium. (1997) 501-504 5. Oliveira, A.L., Silva, J.P.M.: Efficient Search Techniques for the Inference of Minimum Size Finite Automaton. String Processing and Information Retrieval. (1998) 81-89 6. Sgarbas, K., Fakotakis, N., Kokkinakis, G.: Incremental Construction of Compact Acyclic NFAs. ACL-2001. (2001) 474-481 7. Serafin, R., Eugenio, B.D.: FLSA: Extending Latent Semantic Analysis with features for dialogue act classification. The 42th Annual Meeting of the ACL. (2004) 692-699 8. Wang, X., Chaudhari, N.S.: Classification Automaton and Its Construction Using Learning. Advances in Artificial Intelligence: Proceedings-AI 2003. (2003) 515-519
Overview of Metaheuristics Methods in Compilation Fernanda Kri, Carlos G´ omez, and Paz Caro Universidad de Santiago de Chile, Departamento de Ingenier´ıa Inform´ atica, Av. Ecuador 3659, Santiago, Chile {fdakri, cgomez, pcaro}@diinf.usach.cl
Abstract. Compilers are nowadays fundamental tools for the development of any kind of application. However, their task gets increasingly difficult due to the constant increase in the complexity of modern computer architecture, as well as to the increased requirements imposed upon programming languages by the great diversity of applications handled at present. In the compilation process several optimization problems must be solved, some of them belonging to the NP-Hard class. The quality of the solution found for these problems has direct impact over the quality of the generated object code. To solve them, compilers do it locally through naive heuristics which might consequently lead to solutions that are far from optimal. Knowing that metaheuristics methods have recently been used massively and successfully to solve combinatorial optimization problems, similar performance in the problems found in the compilation process can be expected beforehand. Following this line of reasoning, such problems are presented in this paper and the potential use of metaheuristics techniques to find their solutions is analyzed. A review is also made of the work that has been done in this field, and finally a proposal is made of the road that this development should follow. Keywords: Metaheuristics methods, compiler.
1
Introduction
At present, compilers are fundamental tools for the development of any kind of application. Even though compilers can be considered as black boxes into which a source program written in a high level language goes in and from which an equivalent program written in a language understandable by the machine comes out, they are highly complex tools. The constant increase in the complexity of architectures and programming languages, as well as the diversity of applications that are developed at present, are making the task of compilers more difficult every day. In the process of compilation several optimization problems must be solved, some of them NP-hard [1]. The quality of the solutions found for these problems has direct impact on the quality of the generated object code. Normally, compilers use naive heuristics and solve these problems locally, leading to solutions that are far from optimal. When we refer to a better quality object A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 483–493, 2005. c Springer-Verlag Berlin Heidelberg 2005
484
F. Kri, C. G´ omez, and P. Caro
code, we understand that there is a criterion for determining whether an object code is better than another. This criterion depends on the objective sought, e.g. if the program is going to be executed in a restricted memory system (a smart card or a mobile device), we may be interested in getting the smallest possible program. On the other hand, if what we are interested in is response time, we will look for the fastest program, i.e. that which has the shortest execution time for a given architecture. Compilers, therefore, compile for a specific architecture [2]. Thus the heuristics used consider details of the machines’ organization. If we consider basic machines (Von Neumann architecture), defining heuristics that have a reasonable performance when solving these optimization problems is not so complex. Nowadays, however, with the incorporation into the architectures of cache memories, pipeline, jump speculation, out of order execution, prefetching, dynamic instruction scheduling, registry renaming, etc., the concept of efficient heuristics has become an extremely difficult task. To solve this, compilers carry out architecture simplification, generating codes that do not actually use all the advantages of the hardware. To this complexity must be added that the speed at which changes in architecture occurs is much greater than the speed at which new compilers are built. Let us assume that a new architecture gets into the market today, and we start developing a compiler that makes use of its characteristics; it is probable that by the time the compiler is ready to go to market the architecture for which the compiler was developed will already have undergone many changes, which means that our compiler will no longer be as optimizing as we conceived it. For example, let us think of the historical discussion of RISC (Reduce Instructions Set Computer) vs. CISC (Complex Instructions Set Computer). In recent years various benchmarking results [2] have shown that RISC is better than CISC. It is clear that for CISC machines to incorporate complex instructions in their instruction set, they have had to pay a cost in speed due to the complexity of the hardware, expecting that the use of these complex instructions will improve the machine’s performance. However, what happens if the compilers do not use these new instructions? The manufacturer pays a cost (monetary and in speed) expecting a benefit that depends on the use that the compilers make of these new instructions. According to [2], when the SPECint92 benchmark is executed on a machine of the 80x86 family (a CISC machine), 96% of the instructions are executed with simple instructions (load, store, add, and y branch) that certainly exist in a RISC machine. Then complex instructions are used only 4% of the time. Apparently, the cost paid by the manufacturer is not justified. But is it a poor decision of the manufacturer or is it rather a weakness in the construction of the compilers? Nowadays it is necessary to build compilers that actually use the hardware’s characteristics. All this complexity makes it necessary to change the way in which compilers are built. The use of metaheuristics methods is an alternative. Compilers consist of two parts: analysis (front end) and synthesis (back end). The process of analysis verifies that the program has no lexical, syntactic and
Overview of Metaheuristics Methods in Compilation
485
semantic errors. The process of synthesis generates the final code with the details inherent to the target machine. It is at this stage where the largest code optimization sources are found, since it is here where the machine’s resources are limited (in the process of analysis the resources are not taken into account, with some exceptions). Within this context there is a long list of optimization problems that have been studied and others that have not. The construction of heuristics and their implementation in compilers has a long way to go, since the problem generating optimum code is undecidable [1]. The latter is what is most important to researchers, since it means that the doors will always be open for invention and application of new heuristics methods to this problem, which according to some authors is the most complex one of informatics engineering. Metaheuristics methods have been used with great success for solving NPhard problems [3]. It is clear that metaheuristics require usually computation times that are often significantly larger than that of heuristic. Hence, this aspect also gives an indication where the application of metaheuristics may be most useful (e. g. static problems or problems where the optimization goal is to generate a small code for smart cards, since in these cases computation time is less critical). Why not use them to solve globally the difficult problems that must be faced by the compiler? In this paper we present the compilation problems in which metaheuristics can be applied, a review of the work that has been done along this line, and finally we introduce what we believe is the road to be followed in this development.
2
Optimization Problems
The following are some of the classical optimization problems in compilers [4]: – – – –
Instruction selection Instruction scheduling Register allocation Function inlining
The first three must be solved in order to generate the code; they are of great importance in performance and are largely dependent on the architecture, and that is why they are the most widely studied problems in the literature. The inlining problem, on the other hand, is considered new among the optimizations carried out by the compiler, it is dependent on the architecture, and its impact on the quality of the object code has not yet been established clearly. 2.1
Instruction Selection
Instruction selection (IS) is one of the stages in the generation of object code. In general, the IS problem consists in, given an intermediate representation of the source program, transforming it into an identical logical representation in target machine instructions (available in the form of the machine’s instruction set). Multiple restrictions can also be added, such as, for example, defining the
486
F. Kri, C. G´ omez, and P. Caro
ASSING
ASSING ADD
ID (i) ID (i)
ADD
ID (i)
CONST 1
(a)
ID (i)
CONST 1 (b)
Fig. 1. Intermediate representation tree and two tiling operations for the instruction i := i + 1
mode of addressing the data. This problem is generally solved with tree pattern matching techniques [1]. Since generally the source program is in intermediate representation in the form of a syntactic tree, with this technique the target machine instructions are represented as template patterns, and what is done is to cover the source program with these patterns following some function objective, such as minimum number of instructions (smaller number of patterns). The set of template patterns is extracted (manually) from the set of instructions [5]. With some restrictions, optimum code is generated with dynamic programming [6]. Figure 1 shows the intermediate representation, in the form of a syntactic tree, for the instruction i := i + 1. Figures 1.(a) and 1.(b) show two possible tilings of the syntactic tree that depend completely on the template patterns. The code of table 1.(a) is the one generated by the tiling of table 1.(a), and similarly, the code of table 1.(b) is the one generated by the tiling of table 1.(b). Let us take codes (a) and (b) of table 1, which correspond to the code i := i + 1. Both are correct and are equivalent, i.e., they carry out the operation desired by the user or programmer. Also, let us assume that the code of table 1.(a) takes 3 units of time (1 unit for each instruction), and that of table 1.(b) takes 2 units of time (2 units for that single instruction). What happens if the programmer is interested in the size of the code? The answer to this is that, for that requirement, it is certainly better for the compiler to generate the code of table 1.(b). If the programmer is interested in the program’s speed, then it is obvious that the second code fulfills the programmer’s objective. Depending on the instruction selection scheme used, the code of table 1.(a) could be generated, and this would certainly have an effect from the standpoint of optimization. This is roughly what the compiler must do at this stage, but generally it is not done well, since compiler designers at times use a subset of instructions of the total Table 1. Instructions generated by the tiling process 1.LOAD EAX, [i] 2.INC EAX 3.STORE [i], EAX (a)
1.INC [i]
(b)
Overview of Metaheuristics Methods in Compilation
487
instructions available to the machine. If each instruction were independent of the others, the exact time for each instruction could be calculated and, with dynamic programming, an optimum solution could be obtained [6]. This involves a great simplification, since in addition to the time for each instruction the latencies of the relation between the instructions must be associated. 2.2
Instruction Scheduling
Modern CPUs can carry out instructions concurrently. Within this stage lies implicit the concept of pipeline [2]: when the instructions are divided into phases, instructions can be superposed so that they can speed up the computation (the use of resources at each stage must be examined in order to be able to superpose instructions). Within the context of the compilers we must exploit this enormous potential of the machines, using at the maximum each clock cycle and each execution phase of the instructions. The last two concepts are exploited in the instruction scheduling (ISC), which in simple words translates into obtaining a rearrangement code such that it makes use of instruction level parallelism (ILP). This generally leads to faster execution by hiding or removing latencies between the instructions. With respect to the rearrangement of instructions, not all of them can be rearranged because there are dependencies between them (data dependency and resource dependency). There are two kinds of instruction scheduling: – Dynamic scheduling: It is decided at execution time and is carried out by the hardware. The idea is to get a group of instructions (usually between 8 and 64) and carry out an arrangement only of those instructions at the time of executing them. This is usually called out of order execution. – Static scheduling: It is decided at compilation time. In compilation all the instructions (dependencies) are available and the arrangement is made based on that. The scheduling problem as such NP-hard problem [7], has been studied through multiple heuristics methods such as list scheduling, tabu search, simulated annealing, and genetic algorithms, among others. With respect to the instruction scheduling problem, on the contrary, few studies have been made trying to apply the knowledge gathered on the scheduling problem to this phase of the compilation process. This problem, which is NP-hard [8], opens a great possibility of applying the gathered knowledge (mentioned previously) to optimize the compilation process. Very few heuristics methods have been proposed for this problem; they include list scheduling [9], tabu search [10], simulated annealing [11] and ant system [12]. In compiler implementation, list scheduling and some of its variations are the most widely used. When rearranging the instructions it is absolutely necessary to respect dependencies between them. There is a dependency between two instructions if the resource in instruction i that has been loaded or set is used for an operation in instruction j (i < j). If there is a dependency, we must not change the order of execution between the operations involved, because the resultant code would not produce the result desired by the programmer.
488
F. Kri, C. G´ omez, and P. Caro
Table 2. Code (a) with dependencies; (b) without dependencies; and (c) code of (b) with rearrangement 1. 2. 3. 4. 5.
LOAD R0, a ADD R1, R0 ADD R1, R4 LOAD R2, R1 ADD R1, R2 (a)
1. 2. 3. 4. 5.
LOAD R0, a ADD R1, R0 ADD R3, R2 LOAD R4, b LOAD R5, c (b)
1. 3. 4. 5. 2.
LOAD R0, a ADD R3, R2 LOAD R4, b LOAD R5, c ADD R1, R0 (c)
Table 2.(a) shows an object code in which there are dependencies between the instructions, table 2.(b) shows an object code in which there are dependencies only between the first two instructions, and table 2.(c) shows a rearrangement made to code 2.(b). The first two instructions of table 2.(a) deserve further explanation. There is a data dependence between these two instructions, because the datum loaded in instruction 1 (R0) is used in instruction 2 (sum). The order of these instructions must be preserved. In these same instructions and from the viewpoint of the latencies, it should be noted that in instruction 1 a is being loaded into R0, therefore the value in R0 will not be available until the end of the execution of instruction 1. Under this context, instruction 2 can not start until instruction 1 is completely finished. Here it is said that there is a latency associated with these instructions and use is not being made of their pipeline. In code 2.(a) all the instructions have data dependencies, so the latency mentioned above can not be removed, thereby affecting the program’s execution time. In table 2.(b) it is seen that there are dependencies between instructions 1 and 2 only, with the associated latency. In this case the code can be rearranged in such a way that the latencies are decreased. One way of reorganizing the code is shown in table 2.(c). If in this code rearrangement we succeed in hiding some latencies, we would be gaining some time in execution. This is roughly what must be done in this stage of the compilation process. 2.3
Register Allocation
The analysis phase produces an intermediate representation in which for each arithmetic operation, temporary variables are used. In computers there is a small number of registers (8 general purpose registers with 32 bits and 8 registers for floating point operations with 80 bits in the Pentium 80586 architecture), and in an average program there are many declared variables in the program, in addition to those created by the compiler. Under this context there is much demand and little supply. It is for that reason that efficient use of the registers is very important for the performance of the programs in execution time. All this is derived from the large difference in access time of these resources (internal register and main memory). It is important to point out that when code is generated, each variable must be allocated to a register or, in the worse case, to a memory location. When a variable is allocated to memory, instructions must be added to load this value in the register and store it in memory [4]. The life of
Overview of Metaheuristics Methods in Compilation
489
Table 3. (a) Code fragment in target machine instructions;(b) final code generated 1.LOAD t1,a 2.LOAD t2,b 3.MUL t1,w 4.LOAD t3,c 5.LOAD t4,d 6.ADD t2,x 7.ADD t4,y 8.ADD t3,z
(a)
1.LOAD R2,a 2.LOAD R1,b 3.MUL R2,w 4.LOAD R2, c 5.STORE [MEM1],d 6.ADD R1, x 7.STORE [MEM2],R2 8.LOAD R2,[MEM1] 9.ADD R2,y 10.STORE [MEM1],R2 11.LOAD R2,[MEM2] 12.ADD R2,z (b)
a variable can be defined as the time in which it is used. The beginning of the variable’s life is the moment in which it is created, usually the variable’s load or initialization. The end of a variable’s life is the last instruction that uses that value. This time period is called the variable’s life interval. In the optimization phase the number of temporaries used, the life interval of the temporaries (or variables), and the number of registers of the target machine must be examined. With this information an allocation of variables in registers must be found. This process has been usually solved with graph coloring [13], which is NP-hard. In this model each variable a is represented by a node, and each edge of the graph between nodes a and b means that at some instant of time the life intervals of these variables intersect, i.e., they can not de allocated to the same register. The idea consists in coloring the graph with smallest number of colors (one color means one register). There are also register allocations with polynomial algorithms [14, 15], but usually they do not generate a good code. The code of table 3.(a) is the translation of a program into its equivalent representation in instructions of the target machine. It is seen that there are only temporary values, which must be transferred or assigned to registers for the program’s operation. It must also be assumed that each arithmetic instruction must have at least one operand in register. The life intervals of the variables are obtained from the examination of this code, and it is seen that, for example, the life interval of variable t1 is from instruction 1 (load) to 3 (use), because after this it is not used any more. The interval of variable t3 is from instruction 4 to 8, and so on. From this examination the interference graph, shown in figure 2, is determined. This graph contains the relations between the life intervals of the variables. There is an edge from u to v if there is an instant in time in which variables u and v are simultaneously alive. If we have two registers in the target machine, we must color the graph with no more than 2 colors. In case the graph is not K-colorable (K = 2), some variables must be chosen to be loaded in memory until they are used. In the case of figure 2, temporary 1 and 3 are assigned to
490
F. Kri, C. G´ omez, and P. Caro
t2
R2
t1
R1
t3
R2
t4
Fig. 2. Interference graph with coloring in 2 registers for code 3
register 2 and temporary 2 is assigned to register 1. Temporary 4 has been chosen to be in memory. Since temporary 4 is not assigned to a register, it must be located at a memory address for the arithmetic operation. This temporary is assigned, according to table 3.(b), to the memory position M EM 1 (instruction 5). When it is required to use this variable in some arithmetic operation, it must be loaded in a register to perform the operation. If we choose register 2 for this purpose, then the value stored previously in this register must be stored in a memory position for it not to be lost. In the example of figure 3.(b) the value of register 2 is stored in memory position M EM 2 (instruction 7), then memory position M EM 1 (instruction 8) is loaded in register 2 and the arithmetic operation (instruction 9) is carried out. After performing the arithmetic operation, the content of register 2 must be transferred to M EM 1 (instruction 10), since register 2 is not assigned to temporary 4 but to temporaries 1 and 3. Finally, the previous value that was in register 2 must be loaded to continue with the normal operation (instruction 11). It should also be noted that the relation between the problems described above is important and is based on the order in which they are solved during the compilation process. Once the program’s intermediate representation has been obtained, code must be generated for the target machine. This stage is that of instruction selection, which must be carried out before register allocation and instruction scheduling, since these two stages use the code for the target machine. The relation between the two remaining processes is rather diffuse. If we carry out the register allocation first, when instructions are added for loading and storing values in memory and register, further dependencies are created adding more restrictions and making instruction scheduling even more restrictive. If instruction scheduling is done first, the life time of one or more variables may be extended, making the register allocation problem more complex. Usually, the process is the following: first, instruction selection is executed (without hiding the latencies between the instructions and with m registers or temporary values), followed by instruction scheduling (with m registers or temporary variables), and finally register allocation (in k registers, usually k UCP>NP>VP>SBAR=PP=PRT >ADJP=ADVP. As the features of INTJ, LST and CONJP are “word” based. There are fixed word and the quantity is limited. Therefore, serious data sparseness does not occur, and so the highest priority is set for INTJ, LST and CONJP. UCP can be easily regarded as noun phrase, so its priority was set higher than that of a noun phrase. The frequency of NP and VP in a sentence is high, so it is important to identify NP and VP. The priority of noun phrase is higher than that of verb phrase because some verbs with POS =VBG are not always verb phrases, on the contrary, they often are included within a noun phrase. SBAR, PP and PRT have communicated with each other during
758
Y.-H. Liang and T.-J. Zhao
the course of identification, so they have the same priority. Their priorities are lower than those of NP and VP because they can not cover the result of NP and VP. ADJP and ADVP are difficult to identify because the word with POS =JJ is often within a noun phrase, while the word with POS =RB is often within a verb phrase, so their priority is the lowest.
4 Experimental Result and Analysis We use the public corpus (Penn Treebank WSJ15-18 is training corpus and WSJ20 is the test corpus). Eleven English phrases are identified using Distributed Multi-Agent strategy. The result comparison between Distributed Multi-Agent strategy and other methods is listed in Table 4 (using the same corpus). Table 4. The comparison of Distributed Multi-Agent strategy and other methods
method result Precision (%) Recall (%) F β = 1 (%)
SVM
93.45 93.51 93.48
Memory-based method
Winnow
94.04 91.00 92.50
94.28 94.07 94.17
Distributed Multi-Agent strategy 95.31 96.09 95.70
SVM, Memory-based method and Winnow are typical methods in English chunking, and their results are state of the art. The above comparison implies that Distributed Multi-Agent strategy achieves state of the art performance with less computation than previous systems. Moreover, Distributed Multi-Agent strategy has the following advantages: (1) Distributed Multi-Agent strategy only uses sensitive features, so it occupies smaller memory. (2)The time cost of the proposed method is more bearable. We tested the speed of this method within a computer whose CPU is PIV 1.5G, with 256M memory and the speed from training to test is no more than 1.5 minutes. The success of this method relies on the Distributed Multi-Agent’s ability to use individual model to identify individual phrases and the communication ability among the agents. Table 5 is the comparison between the results of Winnow and those using Distributed Multi-Agent strategy (using the same corpus). Table 5 shows that all the results using the Distributed Multi-Agent strategy are higher than those using the Winnow method. This illuminates that Distributed MultiAgent strategy can improve the result with all phrases. It is worthwhile to note that the improvement of INTJ, LST and CONJP is larger than other phrases as the feature “word” used by these three phrases in Distributed Multi-Agent strategy, and the quantity of these words is limited. As a result, data sparseness does not occur, and this proves that by using different feature for different phrase data sparseness can be avoided in Distributed Multi-Agent strategy. The improved scope of PRT and SBAR phrases is large too, which illuminates that the communication between these two
Distributed English Text Chunking Using Multi-agent Based Architecture
759
phrases is effective. In addition, the results of other phrases are improved to a certain extent through the adoption of prioritizing results. Table 5. The result comparison between Winnow and Distributed Multi-Agent strategy
Winnow method
Distributed Multi-Agent strategy (%)
Precision (%)
Recall (%)
(%)
73.29
77.26
81.35
90.42
85.65
82.63
81.29
81.96
93.05
88.21
90.57
CONJP
55.56
55.56
55.56
76.00
100.00
86.36
INTJ
100.00
50.00
66.67
66.67
80.00
72.73
LST
0.00
0.00
0.00
100.00
100.00
100.00
NP
94.39
94.37
94.38
94.65
95.75
95.20
PP
97.64
98.03
97.83
98.32
98.50
98.41
PRT
81.44
74.53
77.83
92.72
91.50
92.11
SBAR
91.15
88.60
89.86
92.45
95.26
93.83
VP
94.38
94.78
94.58
96.78
96.72
96.75
all
94.28
94.07
94.17
95.31
96.09
95.70
Phrase
Precision (%)
Recall (%)
ADJP
81.68
ADVP
Fβ = 1
Fβ = 1
5 Conclusion and Future Work English chunking is a core part of shallow parsing. Researchers have previously paid more attention to the various approaches for chunking. However, the characteristics of phrases and the relationship between phrases have been ignored. In this paper, a Distributed Multi-Agent English chunking strategy is proposed. As this strategy uses different models and sensitive features for different phrases, and the characteristics of each phrase are sufficiently considered. At the same time, data sparseness is avoided with sensitive features. The chunking result is improved by the communication among agents and performance and speed are also improved considerably when compared with other approaches. The proposed method offers a brand-new strategy for chunking and experimental results show that the result using the proposed method is significantly better than the current comparable state-of-the-art approach for English text chunking task. This paper proposes and implements a chunking model with Distributed MultiAgent strategy, and as it is in its initial stages there is obviously much scope for improvement. Our future work will focus two aspects: (1) Searching for new suitable algorithms in the identification of each phrase (especially noun and verb phrases) to further increase the performance of the model; (2) To identify Chinese text chunks using Distributed Multi-Agent strategy.
760
Y.-H. Liang and T.-J. Zhao
References 1. Abney S. : Parsing by chunks. Principle Based Parsing. Berwick, Abney and Tenny. Kluwer A. Publishers. 1991. 2. Abney S. : Partial parsing via finite-state cascades. Workshop on Robust Parsing, 8th European Summer School in Logic, Language and Information. Prague, Czech Republic. (1996) 8-15. 3. Skut W. and Brants T. : A maximum-entropy partial parser for unrestricted text. Proceedings of the 6th Workshop on Very Large Corpora. Montreal, Quebec. 1998. 4. Tjong Kim Sang E.F. : Introduction to the CoNLL-2000 Shared Task: Chunking. Proceedings of CoNLL-2000 and LLL-2000. Lisbon, Portugal. ( 2000) 127-132. 5. Kudoh T. and Matsumoto Y. : Use of Support Vector Learning for Chunk Identification. Proceedings of CoNLL-2000 and LLL-2000. Lisbon, Portugal. (2000) 127-132. 6. Tjong Kim Sang E. F. : Memory-Based Shallow Parsing. In proceedings of CoNLL-2000 and LLL-2000. Lisbon, Portugal. (2000) 559-594. 7. Zhang T. , Damerau F. and Johnson D. : Text Chunking based on a Generalization of Winnow. Machine Learning Research. 2 (2002) 615-637. 8. HongLin Sun and ShiWen Yu: The summarization of shallow parsing method. The linguistics of the present age. (2000) 063-073. 9. Michael W. : An Introduction to Multi-Agent Systems. Chichester. England. 2002. 10. Kargupta H. , Hamzaoglu I. and Stafford B. : Web Based Parallel/Distributed Medical Data Mining Using Software Agents. Extended Proceedings of the 1997 Fall Symposium, American Medical Informatics Association. (1997). 11. YingHong Liang and TieJun Zhao: The Identification of English Base Noun Phrase Based on the Hybrid Strategy. Computer Engineering and Application. 35 (2004) 1-4.
A Similarity-Based Approach to Data Sparseness Problem of Chinese Language Modeling Jinghui Xiao, Bingquan Liu, Xiaolong Wang, and Bing Li School of Computer Science and Techniques, Harbin Institute of Technology, Harbin, 150001, China {xiaojinghui, liubq, wangxl, bli}@insun.hit.edu.cn
Abstract. Data sparseness problem is inherent and severe in language modeling. Smoothing techniques are usually widely used to solve this problem. However, traditional smoothing techniques are all based on statistical hypotheses without concerning about linguistic knowledge. This paper introduces semantic information into smoothing technique and proposes a similarity-based smoothing method which is based on both statistical hypothesis and linguistic hypothesis. An experiential iterative algorithm is presented to optimize system parameters. Experiment results prove that compared with traditional smoothing techniques, our method can greatly improve the performance of language model.
1 Introduction Statistical language model plays an important role in natural language processing and [1] has a wide range of applications in many domains, such as speech recognition , [2] [3] [4] OCR , machine translation , and pinyin-to-character conversion , etc. Data sparseness is an inherent problem in statistical language modeling. Because of the limitation of training corpus there always exist linguistic events that never occur or only occur few times. In such circumstances, it’s impossible to accurately estimate their probabilities from the observed sequences by MLE (Maximum Likelihood Estimation) principle and other estimation schemes have to be used. The above problem is called data sparseness problem. Data sparseness problem is very severe even using large scale of training corpus. [5] For instance, Brown constructed an English trigram model by the corpus consisting of 366 million English words and discovered that there were 14.7% word triples of the test corpus that never occurred in the training corpus. In this paper, a Chinese bigram model is constructed with the corpus of 5 million Chinese characters. In the test corpus, 23.5% word pairs are absent from the training samples. The common solutions to data sparseness problem are smoothing techniques, such [6] [7] [8] as adding one smoothing , Good-Turing smoothing , back-off smoothing , [9] [10] gives a comprehensive comparison interpolation smoothing , etc. Literature between common smoothing techniques. All these techniques are based on some statistical hypotheses. For example, adding one smoothing assumes that all the linguistic events should be observed at least one time. Back-off smoothing adopts the lower-order model to substitute the current model when encountering data sparseness. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 761 – 769, 2005. © Springer-Verlag Berlin Heidelberg 2005
762
J. Xiao et al.
The above hypotheses are all based on the statistical approach, rather than the linguistic approach, which do not fit in for the realities. This paper introduces semantic information into smoothing technique and proposes a similarity-based smoothing technique. Such a linguistic assumption is made that those words with similar meanings provide similar syntax functions and should appear in similar contexts. Then such words can help to predict the current words in the smoothing process for language model. In this paper, an extensive ngram model by word similarity is firstly constructed. Then we combine it with traditional interpolation smoothing method and propose a similarity-based smoothing technique. At last an experiential iterative algorithm is presented to optimize system parameters. This paper is organized as follows. In section 2, the similarity-based smoothing technique is presented and several relevant questions are discussed, including word similarity calculation, parameters optimization. Experiment results are described and then discussed in section 3. We outline the related works in section 4 and manage to draw the conclusions in section 5.
2 Similarity-Based Smoothing Technique 2.1 Ngram Model A language model is aiming at estimating the probability of a sequence of words. According to the Bayesian rule, the probability of word sequence w1 , w2 ...wm is typically broken down into its component probabilities: P ( w 1 , w 2 ...w m ) =
m
∏
i=1
P ( w i |w 1 , w 2 . . . w i − 1 )
(1)
Since there are too many parameters to be estimated for large i, it’s difficult to compute a probability of form (1). Usually a Markovian assumption on words dependencies is made: the current word’s probability is only dependent on the previous n-1 words at most. Thus the probability is determined by:
P ( w 1 , w 2 ... w m ) =
m
∏
i =1
P ( w i |w i − n + 1 , ... w i − 1 )
(2)
wi − n +1 ,...wi −1 are called the history words and wi is called the current word or the predicted word. Usually n=2 or 3. Because of its simplicity and efficiency, ngram model becomes one of the most popular language models. 2.2 Similarity-Based Ngram Model
This paper makes such a linguistical assumption that similar words should appear in similar contexts and can help to predict the probability of the current word in language modeling. In this section, an extensive ngram model by word similarity is constructed. According to the above assumption, if a word is observed in normal ngram model, its similar words should appear in the similarity-based ngram model, and vice versa. The similarity-based ngram model is formulized by:
A Similarity-Based Approach to Data Sparseness Problem
Psim ( w i | w i − n + 1 , ...w i −1 ) =
¦
S ( w i , w i' ) P (w i' | w i − n + 1 , ...w i −1 )
w i' ∈ Sim Set ( w i )
763
(3)
where SimSet ( wi ) is the similar word set of wi , S ( wi , wi' ) is the normalized weight for word similarity, P is the normal ngram probability and Psim is the similarity-based ngram probability. When data sparseness happens, Psim is helpful to predict the value of P . 2.3 Similarity-Based Smoothing Technique
To deal with data sparseness problem, it is from the linguistical view for similaritybased ngram model, while it’s the statistical view for traditional smoothing techniques. This paper combines the two points of views together and proposes a similarity-based smoothing technique. It is formulized by
Psmoothed (wi | wi−n+1,...wi−1) = λ×Pinter (wi | wi−n+1,...wi−1) +(1−λ)×Psim(wi | wi−n+1,...wi−1)
(4)
where Psmoothed is the ultimate smoothed probability and Pint er is the probability calculated by traditional smoothing technique. This paper adopts the interpolation smoothing technique and it can be recursively defined as below:
Pint er (wi | wi−n+1,...wi−1) =θn × Pinter (wi | wi−n+2,...wi−1) + (1−θn )× P(wi | wi−n+1,...wi−1)
(5)
where θ k k = 1, 2..n are the coefficients for k-order language model. 2.4 Word Similarity Calculation
There are two kinds of methods to calculate word similarity. One is the statistical method and makes use of word frequency. The other is the semantic way to use the [11] [12] compiled knowledge database, such as WordNet and Hownet . For data sparseness problem, since there are no enough words to estimate word probability, it’s not enough to calculate word similarity which is usually a function of word probability. Then this paper adopts the semantic way and use Hownet2004 and “TongYiCi [13] CiLin” in word similarity calculation. Hownet is a semantic knowledge database whose mainly descriptive object is c2 is defined as below: concept. The similarity of two concepts c1
Sim(c1 , c2 ) = α1ClsSim(c1 , c2 ) + α 2ClsFrm(c1 , c2 ) + α 3 DefSim(c1 , c2 ) + α 4 DefInclude(c1 , c2 )
(6)
In the above formula, ClsSim(c1 , c2 ) is the class similarity that is calculated
c2 ClsFrm(c1 , c2 ) is the class framework between the concept classes of c1 similarity that is calculated according to the frameworks between the concept classes c2 DefSim(c1 , c2 ) is the definition similarity which is calculated by the of c1 definitions of c1
c2
And DefInclude(c1 , c2 ) is the similarity of the included
764
J. Xiao et al.
concept definitions which is calculated between the concepts that are included in c1 c2 (the sub-concepts of c1 c2 ). α1 , α 2 , α 3 and α 4 are scale coefficients. Word similarity is usually calculated through concept similarity. A word typically has several concepts and there are three ways to get word similarity from their concept similarities: 1. Take the maximum concept similarity as word similarity. 2. Take the minimum concept similarity. 3. Choose the average concept similarity. This paper adopts the last method to make good use of the information of each concept. In word similarity computing, it’s straightforward to calculate the similarity between each word in lexicon. However it’ll cost too much time in real world applications. This paper decomposes similarity computation into two steps. The first step is to get some semantic subsets instead of the whole lexicon. In the second step, we calculate the similarity between each word in each subset. This paper chooses the synonym set of hownet2004 as the first subset, the antonym set of hownet2004 as the second and at last choose each word class of “TongYiCi CiLin”1 as the rest subsets. The words in each subset all tend to be substitutable to each other. Different smoothed language models can be built up based on one or more different semantic subsets and different performances are yielded. We’ll discuss it in detail in section 3. 2.5 Parameter Optimization
Besides word frequencies, there are two other kinds of parameters to estimate to construct the language model suggested by formula (4): λ for formula (4) and θ k k = 1, 2..n for formula (5). This paper proposes an experiential iterative algorithm to optimize λ and θ k k = 1, 2..n which adjusts them to maximize the probability of the held-out corpus. The algorithm can not be strictly deduced by mathematics, whereas it works surprisingly well in practices. Thus we call it an “experiential” one. The procedures are summarized as follows: 1. Initialize the values of λ and θ k in the range of [0, 1]. 2. Fixing θ k , optimize λ to maximize the probability of the held-out corpus. 3. Fixing λ , optimize each θ k in a recursive way so as to make the probability of the held-out corpus maximal. 4. Calculate the perplexity of the held-out corpus, if converged, break the iteration; otherwise, go to step (2). We will detail the step (2) and step (3) in the rest of this section. 2.5.1 Fixing θ k , Get the Optimal Value for λ This step is to optimize λ so as to maximize the probability of held-out corpus. Let H denote the held-out corpus, and we try to find λ = arg max(log( Psmoothed ( H )) . λ
According to the formulas (4), we can get: 1
“TongYiCi CiLin” is a machine-readable lexicon which contains more than seventy thousands lemmas. These lemmas are organized by their senses and rhetoric, and they are divided into several hierarchical classes. Each class contains similar words. There are totally seven general classes and more than one thousand detailed classes.
A Similarity-Based Approach to Data Sparseness Problem
log( Psmoothed ( H )) = =
¦
N (w1 , w2 ,...wn ) log( Psmoothed ( wn | w1 , w2 ,...wn −1 ))
¦
N (w1 , w2 ,...wn ) log( λ × Pint er ( wn | w1 , w2 ,...wn −1 )
( w1 , w2 ,... wn )∈ H ( w1 , w2 ,... wn )∈ H
765
(7)
+ (1 − λ ) × Psim ( wn | w1 , w2 ,...wn −1 ))
Take the derivative of formula (7) with respect to λ , perform some simple arithmetic and equate the result to zero, we can get the equation below:
¦
Pinter (wn | w1, w2,...wn−1) −Psim(wn | w1, w2,...wn−1) ] =0 λ×Pinter (wn | w1, w2,...wn−1)+(1−λ)×Psim(wn | w1, w2,...wn−1)
N(w1, w2,...wn)[
(w1,w2,...wn )∈H
(8)
Since θ k is assumed to be fixed and Pint er can be calculated, the equation (8) has a single independent variable λ . Furthermore, there is only one solution for that equation, because the second derivative of (7) is equal to −2
Psim(wn | w1, w2,...wn−1) − ¦ N(w1, w2,...wn )[λ + ] Pint er (wn | w1, w2,...wn−1) − Psim(wn | w1, w2,...wn−1) (w1,w2 ,...wn )∈H
(9)
which is negative for all the values of λ and the left part of (8) is a decreasing function about λ . Therefore we can choose any appropriate interval search algorithm to find the root of equation (8) which is the optimal λ that make the formula (7) maximal. 2.5.2 Fixing λ , Get the Optimal Value for θ k
This step is to optimize each θ k k = 1, 2..n in condition of the fixed λ . The procedure is a recursive process. We first fix all θ k k = 1, 2..n − 1 and get the optimal value of θ n . Then we fix all θ k k = 1, 2..n − 2 , together with the value of θ n , and calculate the optimal value of θ n −1 . Continue the above process until we get each optimal value of θ k k = 1, 2..n . The deductive procedures are very similar to the above procedures of getting the optimal λ value, and we can get the optimal value for θ k k = 1, 2..n by recursively solving the following equation: n
¦
N(w1, w2,...wn )[
(w1,w2 ,...wn )∈H
λ× ∏θm ×(Pinter (wn | wn−k+2,...wn−1) − P(wn | wn−k+1,...wn−1)) m=k+1
λ×Pinter (wn | w1, w2,...wn−1) +(1−λ)×Psim(wn | w1, w2,...wn−1)
] =0
(10)
θ k is hidden in the formula of Pint er ( wn | w1 , w2 ,...wn −1 ) , we don’t expand it because of the limitation of paper width.
3 Experiment and Discussion 3.1 Evaluation
This paper evaluates the smoothing algorithm by the performance of the language model which is smoothed by that method. The most common metric for language
766
J. Xiao et al.
model is perplexity. Perplexity is the reciprocal of the geometric average probability assigned by language model to each word of test corpus and is defined as below:
PPc = 2
−
1 Nc
Nw
¦ log 2 Psmoothed ( wi | wi − n ,... wi −1 )
(11)
i =1
where N c and N w are the number of characters and the number words of the test corpus respectively. It’s generally regarded that lower perplexity correlates with better performance. 3.2 Results and Discussions
We take our experiments on two kinds of corpus. One is the People’s Daily corpus which consists of approximately 8 million Chinese characters. The other is the tour corpus collected from some tour websites which consists of 10 million Chinese characters. For the People’s Daily corpus, it’s divided into three parts: the training corpus consisting of 5 million Chinese characters, the held-out corpus containing 1.5 million characters and the test corpus which is built up by the rest characters. We evaluate our algorithm by the performance of the smoothed bigram model. The results are presented in the table below: Table 1. Perplexity on Different Smoothed Language Models on People’s Daily Corpus
Perplexity Reduction
Model S
Model A
Model B
Model C
88.63
73.72 16.82%
69.73 21.32%
53.78 39.32%
------
Model S is the baseline language model which is smoothed by the standard linear interpolation algorithm. Model A, B and C are all smoothed by the similarity-based method this paper proposed, but they choose different semantic subsets in word similarity calculation. Model A only uses the synonym set of Hownet2004. Model B adopts both the synonym set and antonym set of Hownet2004. Model C not only uses the Hownet semantic subsets, but also adopts the word class of “TongYiCi CiLin”. For the tour corpus, it’s also divided into three parts: the training corpus consisting of 8 million Chinese characters, the held-out corpus containing 1 million characters and the test corpus built up by the rest characters. The results are listed in the table below: Table 2. Perplexity of Different Smoothed Language Models on Tour Corpus
Perplexity Reduction
Model S
Model A
Model B
Model C
59.79
53.64 10.29%
52.52 12.16%
43.20 27.75%
------
From the two tables we can see that the perplexities of model A, B and C are much lower than that of the baseline model. As much as 39% perplexity reduction is achieved in table 1, and 27% perplexity reduction in table 2. These models show much more predictive capability. Thus we can conclude that the similarity-based
A Similarity-Based Approach to Data Sparseness Problem
767
smoothing method which this paper proposes is far more effective than the traditional smoothing algorithm and higher performance language model can be achieved in this way. Meanwhile, we can also see that as the semantic subsets are increasingly adopts (from model A to C), the perplexity of language model becomes lower and lower, and more powerful model is obtained. Then the second conclusion can be made that the improvement of the performances of A, B and C is due to the increasing semantic information in the language model, which verifies this paper’s linguistic hypothesis. In the rest of this section, we check the performance of the iterative algorithm proposed in section 2.5. The results are described in figure 1 and figure 2: Model S Model A Model B Model C
100 95
Model S Model A Model B Model C
65
90 60
80
Perplexity
Perplexity
85
75 70
55
50
65 60
45
55 50
40
1
10
20
30
40
50
60
70
5
10
15
20
25
Iteration Number
Iteration Number
Fig. 1. Performance of Iterative Algorithm on People’s Daily Corpus
Fig. 2. Performance of Iterative Algorithm on Tour Corpus
For comparison convenience, we also present Model S (which is not optimized by the iterative algorithm) in the two figures. As the figures show, Model A, B and C outperform S during the iterations, which verify our first conclusion above. And as the iteration number increases, the perplexities of A, B and C are constantly reduced, until the algorithms converge. To further verify the effectiveness of the experiential iterative algorithm, we compare it with EM (Expectation-Maximum) algorithm and carry out the experiments on the People’s Daily corpus. The results are presented in table 3: Table 3. Perplexity of Language Models Optimized by Different Algorithms
EI Algorithm EM Algorithm
Model A
Model B
Model C
73.72 75.86
69.73 73.42
53.78 55.47
In table 3, we take EI algorithm as experiential iterative algorithm for short. As the table shows, the models, which are optimized by EI algorithm, achieve lower perplexities and obtain more predictive capability. Then we can make the last conclusion that the experiential iterative algorithm is effective to optimize the parameters for the similarity-based smoothing method.
768
J. Xiao et al.
4 Related Works [14]
Essen first proposed similarity-based method for data sparseness problem and [15] introduced word similarity into language modeling. Dagan extended Essen’s idea and integrated word similarity into back-off framework. Essen and Dagan’s ideas greatly illuminate our work. But there are two important differences between our work and Essen and Dagan’s. Firstly, Essen and Dagan adopted statistical methods to calculate word similarity. But since the training corpus is already sparse to stat word frequency, it is definitely sparse to calculate word similarity which is usually a function of word frequency. Obviously the performances of these methods are limited. To avoid the above problem, we turn to semantic way in similarity computation in our work. Secondly, this paper proposes an experiential iterative algorithm to optimize system parameters, whereas Dagan determined parameters merely by people’s trials.
5 Conclusions For data sparseness problem of language modeling, this paper introduces semantic information into smoothing technique and presents a similarity-based approach to data sparseness problem, which is based on both the statistical assumption and the linguistical assumption. Then an experiential iterative algorithm is proposed to optimize system parameters. From the experiment results, we can get three conclusions: • The similarity-based smoothing technique is far more effective than the traditional smoothing method, and high performance language model can be obtained. • The performance improvement of the language model smoothed by similaritybased technique is duo to the increasing semantic information in the models. • The experiential iterative algorithm is effective to optimize system parameters for similarity-based smoothing technique.
Acknowledgement This investigation was supported emphatically by the National Natural Science Foundation of China (No.60435020) and the High Technology Research and Development Programme of China (2002AA117010-09). We especially thank the anonymous reviewers for their valuable suggestions and comments.
References 1. F. Jelinek. Self-Organized Language Modeling for Speech Recognition. IEEE ICASSP, 1989. 2. George Nagy. At the Frontier of OCR. Processing of IEEE. 1992. 80(7). 3. Peter F. Brown, Stephen A. Della Pietra, Vincent J. Della Pietra, and Robert L. Mercer. The Mathematics of Statistical Machine Translation: Parameter Estimation. Computational Linguistics. 1992. 19(2).
A Similarity-Based Approach to Data Sparseness Problem
769
4. Liu Bingquan, Wang Xiaolong and Wang Yuying, Incorporating Linguistic Rules in Statistical Chinese Language Model for Pinyin-to-Character Conversion. High Technology Letters. Vol.7 No.2, June 2001, P:8-13 5. Brown, Peter F., Vincent J. Della Pietra, Peter V. deSouza, Jenifer C. Lai, and Robert L. Mercer. Class-based n-gram models of natural language. Computational Linguistics, 18(4):467-479. 1992. 6. Harold Jeffreys. Theory of Probability. Clarendon Press, Oxford, second Edition, 1948. 7. Irving J. Good. The population frequencies of species and the estimation of population parameters. Biometrika, 40, pp. 237-264, 1953. 8. Slava M. Katz. Estimation of probabilities from sparse data for the language model component of a speech recognizer. IEEE Transactions on Acoustics, Speeech and Signal Processing, 35(3):400-401. 1987. 9. F. Jelinek and R. L. Mercer. Interpolated estimation of markov source parameters from sparse data. In Pattern Recognition in Practice, pp. 381--397, 1980. 10. Stanley F. Chen and Joshua Goodman. An empirical study of smoothing techniques for language modeling. Computer Speech and Language, 13:359-394, October 1999. 11. George A. Miller, Richard Beckwith, Christiane Fellbaum, Derek Gross, and Katherine Miller. Introduction to WordNet: An On-line Lexical Database[EB], Cognitive Science Laboratory Princeton University, 1993. 12. www.keenage.com 13. Mei Jiaju, Chinese thesaurus “Tongyici Cilin”, Shanghai thesaurus Press, 1983. 14. Essen, Ute and Volker Steinbiss. Coocurrence smoothing for stochastic language modeling. In Proceedings of ICASSP, volume I, pp. 161-164. 1992. 15. Ido Dagan, Lillian Lee, and Fernando C. N. Pereira. Similarity-based models of word cooccurrence probabilities. Machine Learning, 34(1-3):43--69, 1999.
Self-training and Co-training Applied to Spanish Named Entity Recognition Zornitsa Kozareva, Boyan Bonev, and Andres Montoyo Departamento de Lenguajes y Sistemas Inform´ aticos, Universidad de Alicante, Spain {zkozareva, montoyo}@dlsi.ua.es {bib}@alu.ua.es
Abstract. The paper discusses the usage of unlabeled data for Spanish Named Entity Recognition. Two techniques have been used: selftraining for detecting the entities in the text and co-training for classifying these already detected entities. We introduce a new co-training algorithm, which applies voting techniques in order to decide which unlabeled example should be added into the training set at each iteration. A proposal for improving the performance of the detected entities has been made. A brief comparative study with already existing co-training algorithms is demonstrated.
1
Introduction
Recently there has been a great interest in the area of weakly supervised learning, where unlabeled data has been utilized in addition to the labeled one. In machine learning, the classifiers crucially rely on labeled training data, which was previously created from unlabeled one with some associated cost. Self-training and co-training algorithms allow a classifier to start with few labeled examples, to produce an initial weak classifier and later to use only the unlabeled data for improving the performance. In previous research by Collins and Singer [2], co-training was applied only to Named Entity classification, by making a split of features into contextual and spelling ones. They point as a future work the development of a complete Named Entity Recognition (NER)1 system, which we build using self-training and co-training techniques. We studied the already existing co-training methods and we introduce a new so called ”voted co-training” algorithm. The method guarantees the labeling confidence of the unlabeled examples through a voting scheme. The system has been developed and tested for Spanish language, but having the proper feature set for a NER system in another language, we can say that 1
NER system consists in detecting the words that make up the entity and then classify these words into predefined categories such as people, organization and location names, temporal expressions etc.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 770–779, 2005. c Springer-Verlag Berlin Heidelberg 2005
Self-training and Co-training Applied to Spanish Named Entity Recognition
771
the same experiments can be conducted with no restrains. For Spanish the obtained results are encouraging, 90.37% f-score for detecting 2000 entities using 8020 unlabeled examples and 67.22% f-score for entity classification with 792 unlabeled examples.
2
Named Entity Recognition
One Named Entity Recognition system plays important role in lots of natural language applications such as Information Extraction, Information Retrieval, Question Answering etc., by providing the most informative instances in a text, for instance names of people, locations, organizations. A NER task consists of two subtasks, one for entity detection and another for entity classification. Recently there has been a great interest in entity recognition using diverse machine learning techniques such as AdaBoost, Maximum Entropy, Hidden Markov Models etc., as well as the development of the features needed by these classifiers. However the focus of our paper is NER system build on unlabeled data. For the experimental settings, we incorporated the feature set previously studied by Kozareva et al., [5]. lexical – p: position of w0 (e.g. the word to be classified) in a sentence – c[−3, +3]: word forms of w0 and the words in its window ±3 – fW: first word making up the entity – sW: second word making up the entity if present orthographic – aC: all letters of w0 in capitals – iC[−3, +3]: w−3 , w−2 , w−1 , w0 , w+1 , w+2 , w+3 initiate in capitals trigger word: w−1 and w+1 trigger word for location, person, organization gazetteer word: w0 belong to gazetteer list Fig. 1. Features for NE detection and classification
For NED, we used the BIO model proposed by [7]. A word should have one of the following three tags: B indicating a word at the beginning of a NE, I for word inside a NE and O tag for words outside a NE. The annotation scheme is demonstrated in the example: Soy O Antonio B Guijero I de O Portugal B . O 2 . The following features have been used for NED: p, c[−2, +2]3, aC and iC[−2, +2]. We classify our entities into four categories - PERson, LOCation, ORGanization and MISCellanegous. The following set of features has been considered: c[−3, +3], fW, sW, aC, iC[−3, +3], trigger4 and gazetteer5 word. 2 3 4 5
the English meaning is: I am Antonio Guijero from Portugal. in our example the word form at position 0 is Soy. semantically significant word pointing to some of the categories person, location, organization; e.g. city is a trigger word for locations. collections of names of people, locations, organizations.
772
3
Z. Kozareva, B. Bonev, and A. Montoyo
Weakly Supervised Algorithms
In this section we mention already existing co-training and self-training algorithms, and describe the proposed by us voted co-training. 3.1
Co-training
Blum and Mitchel [1] assume that there exists two independent and compatible feature sets or views of data, where each feature set defining a problem is sufficient for learning and classification purposes. A classifier learned on each of those redundant feature subsets can be used to label data for the other and thus expand each other’s training set. However in a real-world application, finding independent and redundant feature splits can be unrealistic and this can lead to deterioration in performance [6]. From another side Goldman and Zhou [4], proposed a co-training strategy that doesn’t assume feature independence and redundancy. They learn two different classifiers from a data set. The idea behind this strategy is that the two algorithms use different representations for their hypotheses and thus they can learn two diverse models that can complement each other by labeling some unlabeled data and enlarge the training set of the other. In order to decide which unlabeled examples a classifier should label, they derive confidence intervals. We adopt this co-training strategy, having two different basic classifiers and a third (external) classifier, that decides which labeled example to be included into the training data, when the initial classifiers disagree. Collins and Singer [2] introduce the CoBoost algorithm to perform Named Entity classification, which boosts classifiers that use either the spelling of the named entity, or the context in which that entity occurs. Our approach differs from theirs by the co-training algorithm we use, the classification methods we worke with and the feature sets used for the NED and NEC modules. 3.2
Self-training
The definition for self-training could be found in different forms in the literature, however we adopted the definition of Nigam and Ghani [6]. We need only one classifier, without any split of features. For several iterations the classifier labels the unlabeled data and converts the most confidently predicted examples of each class into a labeled training example. 3.3
Voted Co-training Algorithm
After the resume of the existing co-training algorithm, here we introduce our method. Voted co-training starts with a small set of hand-labeled examples and three classifiers that learn the same pool of unlabeled examples. For each iteration the unlabeled data set is turned into labeled and instances with some growing size predefined by the user are added into the training set. In order to guarantee the labeling confidence of the unlabeled examples, for each example
Self-training and Co-training Applied to Spanish Named Entity Recognition
U
773
add
L pU
pU
pU
C2
C1
pU labeled
C3
pU labeled
Compare classes
pU labeled
Compare classes
disagree
agree
T
agree
G
– – – – –
C1 and C2 two different classifiers C3 external different classifier used in voting L a set of labeled training examples U a set of unlabeled examples T a temporal set of instances Loop for I iterations:
do a pool pU of P randomly selected examples ej from U use L to individually train classifiers C1 , C2 , C3 and label examples in pU ∀ej ∈ pU whose classes agree by C1 and C2 , do T = T ∪ {ej } ∀ei ∈ pU whose classes disagree by C1 and C2 , use C3 and apply voting; select examples whose classes agree between two classifiers and add them to T 5. take randomly G examples from T and add them to L, while maintaining the class distribution in L 6. empty T
1. 2. 3. 4.
Fig. 2. the proposed Voted Co-training Algorithm
a voting strategy has been applied. Two initial classifiers compare the predicted class for each instance. When they agree, this instance is added directly into a temporal set T , when they disagree, the prediction of an external classifier is considered and voting among them is applied. To the already existing temporal set T are added only those instance on which the external classifier agrees with at least one of the initial classifiers. We incorporate voting, knowing that such technique is used to examine the outputs of several various models and select the most probable category pre-
774
Z. Kozareva, B. Bonev, and A. Montoyo
dicted by the classifiers. From another side by voting, the performance of a single classifier is outperformed. The voted co-training scheme is presented in Figure 2. For further notations in this paper, we refer to I as the number of iterations, to P as the pool size (e.g. number of examples selected from the unlabeled set U needed for annotation at each iteration), to G as the growing size (e.g. the number of most confidently labeled examples added at each iteration to the set of labeled data L). 3.4
Data and Evaluation
The experimental data we worked with is part of the Spanish Efe corpus, used in the competitions of Clef 6 . The test file contained around 21300 tokens of which 2000 have been annotated by human as NEs. The correct classes of the test file have been used only when the results are calculated with the conlleval 7 evaluation script.
4
Self-training for Named Entity Detection (NED)
Considering the time-performance disadvantage of self and co-training techniques, and the complexity of each one of the tasks we have to resolve, we decided to use self-training for NEDetection. The self-training algorithm starts with small set of 20 hand-labeled instances as a training set8 . At each iteration a pool of P unlabeled examples is made, and one single classifier turns them into labeled ones. Only the most confident examples are added into L, keeping a constant ratio in the training data, for avoiding to introduce imbalance of the class set. The classifier we used has been K-nn algorithm9 , known with its property of taking into consideration every single training example when making the classification decision and significantly useful when training data is insufficient. 4.1
Experiments and Results
The parameter settings are: growing size G = {10, 20, 30, 40, 50, 100, 200, 500}, pool P = {30, 50, 60, 70, 80, 200, 500, 1000} , I = 40. The constant ratio in the training data is 5:3:2 for O, B and I tags, due to the frequent appearance of tag O compared to the other two categories. The achieved performances with these settings can be found in Table 1. Note that the exposed results are after BIO error analysis, which we discuss in section 6 7
8 9
http://clef.isti.cnr.it/ the script contained the following measures: Precision (of the tags allocated by the system, how many were right), Recall (of the tags the system should have found, how many did it spot) and Fβ=1 (a combination of recall and precision). in our case, the first sentences in the unlabeled data. with one nearest neighbour.
Self-training and Co-training Applied to Spanish Named Entity Recognition
775
4.2. We indicate with G1010 the f-score obtained for all BIO tags with growing size G equal to 10, for each one of the 40 iterations. In Table 1, the best performance per setting is denoted in bold. For instance, G10 reached 81.71% with 340 training size. Comparing G10’s best performance with 340 training examples to the other settings, it can be seen that performance is not the same11 . The difference comes from the examples added to L, which for each iteration and experimental setting did not repeat. For the next growing sizes of 20, 30, 40 and 50, the maximum performance is around 80.43%, 76.9%, 79.88% and 78.88%. For G = 100 with 1320 training examples 82.54% have been obtained; compared to the best performance of G10 this result is higher, however the number of examples participating in the training set is bigger. For all experimental settings, the best performance of 84.41% has been reached with 1620 examples and growing size 200. Summarizing, we can say that satisfactory results for NE detection can be reached, using small sized training data. From another side for instance-based learning, it is not necessary to be stored all training instances, rather few examples inside stable regions. It can happen that an instance correctly classified by the self-training algorithm and added to L may not contribute with new information. Thus the performance will not improve. In future, we would like to measure the informativeness of each individual instance and include only those bringing novel information. 4.2
Error Analysis of the Detected Entities
We made analysis of the obtained results and managed to resolve and correct around 16% of the occurred errors. The postprocessing consist of: BIO substitution, applied when tag O is followed by I. We simply replace I by B when the analyzed word starts in capital letter, in the other case we put O. As can be seen from the example in Section 2 and regarding the definition given in [7], tag O cannot be followed by tag I. The first 6 columns in Table 1 demonstrate the performance of each individual tag (e.g. B and I). With BIO substitution, performance is improved with 10%. Statistical representation, compares f (wi ), the frequency of a word wi starting in capital letter and tagged as B, versus f ∗ , the frequency of the same word wi taking its lowercased variant frequency from the test file. Tambien B is detected 63 times as possible entity, but its variant f ∗ (tambien) = 265, shows that the word tends to be written in lowercased letters. In this case tag B is transformed into O. For entities as La B Mancha I, this substitution will be erroneous. First La is part of the entity and is correctly classified, but its lowercase variant la is 10
11
For the other notations, the number next to G indicates the growing size per iteration. The first 5 columns represent the scores before and after postprocessing. With iB, iI and iG10 are denoted the initial results of self-training without BIO error analysis and with cB, cI and G10, the results after BIO error analysis. the comparison for the same training size with the other settings is denoted in italic in Table 1.
776
Z. Kozareva, B. Bonev, and A. Montoyo Table 1. Self-training performance for NED task
I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
iB cB iI cI iG10 64.40 79.78 34.31 47.01 52.94 66.10 81.92 33.63 52.35 53.69 67.69 81.53 34.84 53.88 55.69 72.10 81.52 41.10 53.98 61.20 72.17 80.86 41.98 54.95 61.52 72.07 80.79 39.72 54.38 60.39 72.29 81.09 38.25 55.56 60.11 73.62 81.12 38.14 55.37 61.67 72.65 80.97 38.10 52.36 60.66 72.56 80.75 37.11 50.92 60.24 74.11 80.95 32.94 50.04 60.15 76.46 80.14 35.57 50.19 63.54 76.25 80.20 38.33 56.63 64.81 76.53 80.20 32.96 57.44 61.71 76.75 79.89 36.15 62.61 63.29 81.85 85.47 39.20 65.68 67.02 82.68 87.06 42.62 66.72 68.43 83.15 86.79 44.16 67.83 69.43 84.41 86.79 48.22 67.83 71.53 84.60 86.55 47.69 66.55 71.49 83.71 86.64 44.85 66.72 70.10 83.55 86.58 43.37 67.08 69.09 82.54 85.57 50.73 67.08 71.70 81.74 84.55 50.85 68.15 71.40 81.67 84.25 47.30 68.20 69.56 76.29 78.99 47.76 69.29 66.89 75.84 78.42 46.43 66.61 66.14 81.70 85.08 46.76 68.45 69.43 81.60 85.01 46.95 68.68 69.44 81.70 85.01 47.30 68.74 69.60 81.74 85.27 47.46 68.37 69.74 81.62 86.03 49.14 71.63 70.15 81.23 85.38 46.23 67.43 68.85 81.35 85.46 46.24 66.84 68.94 76.25 79.96 47.67 68.26 66.83 76.32 80.01 47.55 67.60 66.80 76.31 80.01 47.36 68.01 66.68 76.35 80.03 46.59 65.92 66.44 76.01 79.82 45.66 64.90 65.84 76.74 79.80 45.75 64.79 66.55
G10 G20 G30 G40 G50 G100 G200 G500 69.26 73.51 70.23 74.00 66.32 71.80 73.91 77.76 72.43 78.41 70.69 71.83 71.13 73.16 71.93 78.47 72.85 74.29 72.57 78.30 72.73 73.91 75.39 76.18 72.92 73.88 71.59 78.12 73.9 79.39 76.73 80.26 72.81 70.85 76.62 79.04 76.71 76.64 74.72 81.73 72.56 66.53 76.10 72.93 74.93 78.40 76.00 81.38 73.09 73.74 74.19 76.39 75.76 77.28 76.67 81.91 73.04 74.10 73.44 78.24 76.65 79.29 77.40 81.42 71.95 70.42 73.48 76.06 76.01 79.91 77.49 81.23 71.32 73.75 73.94 77.15 76.81 80.27 78.06 81.83 70.96 75.23 72.82 68.91 76.84 81.99 77.84 81.76 70.66 74.56 73.20 71.18 76.99 81.82 79.22 81.83 72.89 75.57 75.16 72.77 77.90 82.54 80.60 82.22 73.18 76.33 75.21 74.96 78.88 82.17 80.93 82.40 74.78 78.24 75.12 75.45 78.29 80.44 81.32 82.94 79.36 78.30 75.24 75.17 78.26 80.43 82.03 82.80 80.82 78.34 75.17 75.07 78.38 79.63 81.59 83.00 80.99 78.20 74.94 76.03 77.63 79.75 81.41 83.16 80.99 77.97 74.87 76.34 76.42 80.80 81.54 83.27 80.44 77.99 74.56 76.00 76.43 80.73 81.16 83.43 80.55 80.43 73.76 76.06 77.27 80.92 81.23 83.51 80.62 78.72 74.05 76.22 77.27 80.88 80.87 83.63 79.97 76.99 74.33 76.72 77.31 80.41 80.90 83.56 79.67 77.55 74.01 77.49 77.04 79.87 81.83 83.85 79.46 77.53 74.07 77.48 77.03 80.28 81.49 83.50 76.31 79.32 75.07 76.80 77.59 79.82 81.06 83.90 75.13 79.14 76.00 77.36 77.54 80.06 81.09 83.79 80.17 77.95 76.12 77.99 77.40 79.18 81.49 83.87 80.18 78.08 76.02 77.93 76.36 78.78 81.37 83.94 80.20 78.10 76.22 78.24 76.72 78.28 81.74 83.48 80.25 78.03 76.18 78.22 77.16 78.48 82.22 83.71 81.71 77.69 76.12 78.57 77.16 78.35 82.72 83.59 80.02 78.24 76.58 78.96 77.97 79.03 83.63 83.81 79.87 78.32 76.18 78.99 77.58 79.36 83.81 84.39 76.70 78.45 76.25 78.79 77.72 79.55 83.80 84.11 76.53 78.38 75.20 78.85 77.64 79.81 83.96 83.87 76.65 79.39 76.57 79.32 77.62 80.13 83.68 84.03 76.02 79.13 76.76 79.61 77.36 80.05 84.05 83.81 75.56 79.32 76.90 79.80 77.93 79.65 84.25 83.93 75.51 77.75 76.90 79.88 77.96 79.75 84.41 84.02
a determiner for female gender in Spanish language and has higher frequency than La. To avoid such substitutions, pairwise frequency of bigrams is considered. When the frequency of La Mancha is higher than the frequency of la Mancha, tag B for La is kept, otherwise is changed into La O Mancha B.
Self-training and Co-training Applied to Spanish Named Entity Recognition
777
This transformation improved the f-score with 6%, for the experimental settings of P=500, G=200 at iteration 40. The final f-score for BIO classification achieved 90.37%, tag B was detected with 93.97% f-score and tag I reached 81.94%.
5
Co-training for Named Entity Classification (NEC)
The instances detected by the self-training algorithm are classified with the voted co-training method, as described in Figure 2. The learning process started with 10 hand-labeled examples in the following ratio 3:3:3:1, for ORG, PER, LOC and MISC classes. The instances representing MISC class tend to have rare appearance in text and the probability of encountering such instance is lower. As main classifiers have been used decision trees and k-nn, all implemented in TiMBL’s package[3]. The HMM toolkit [8] has been developed for post tagging purposes, but we adopted it for NER purposes.
70
70
68 65
66 64 ORG F−score (%)
LOC F−score (%)
60
55
50
45
60 58 56 54
agreedCoTr−IB10 agreedCoTr−Dtree10 ourVotedCoTr−IB10 ourVotedCoTr−Dtree10 crossedCoTr−IB10 crossedCoTr−Dtree10
40
35
62
5
10
15
20 Iterations
25
30
35
agreedCoTr−IB10 agreedCoTr−Dree10 ourVotedCoTr−IB10 ourVotedCoTr−Dtree10 crossedCoTr−IB10 crossedCoTr−Dtree10
52 50 48 40
5
10
15
20 Iterations
25
30
35
40
75
16
agreedCoTr−IB10 agreedCoTr−Dree10 ourVotedCoTr−IB10 ourVotedCoTr−Dtree10 crossedCoTr−IB10 crossedCoTr−Dtree10
70
14 65
MISC F−score (%)
PER F−score (%)
12 60
55
50
10
8
6 45
agreedCoTr−IB10 agreedCoTr−Dtree10 ourVotedCoTr−IB10 ourVotedCoTr−Dtree10 crossedCoTr−IB10 crossedCoTr−Dree10
40
35
5
10
15
20 Iterations
25
30
35
4
2 40
5
10
15
20 Iterations
25
30
35
40
Fig. 3. From top to bottom and from left to right are represented the performances of three different co-training algorithms using k-nn and decision tree, for classifying the entities into location, organization, person and miscellaneous classes. The growing size used has been 10 for each of the 40 iterations.
778
5.1
Z. Kozareva, B. Bonev, and A. Montoyo
Comparative Study and Discussion of the Obtained Results
A brief comparative study with other co-training algorithms has been made. The obtained results for each category are represented in separate graphics in Figure 3. By crossedCoT r is denoted the co-training algorithm where two classifiers simply exchange the instances they learn, feeding each other’s input. ourV otedCoT r represents the proposed by us algorithm. The performance of a co-training where only the instances on which two classifiers agree and have been added into the training set L is denoted as agreedCoT r. In the graphics can be seen how for each one of the four classes, our voted cotraining outperforms the other two algorithms. For location class agreedCoT r − IB10 and ourV otedCoT r − IB10 start with similar efficiency, however after the 7th iteration, the curve of the voted co-training starts improving. For the same class ourV otedCoT r − Dtree keeps 5% higher score than agreedCoT r − Dtree. In general K-nn and decision tree dealt well with LOC and ORG classes reaching 68-70% performance. The contribution of the external classifier has been for PER and MISC classes. Compared to the other two methods, MISC class gained 8-9% better performance with ourV otedCoT r. This was due to the additional information provided with the agreement of the external classifier. In future we would like to work with more discriminative feature set for MISC class, since this was the class that impeded classifier’s performance. As can be seen in the graphic, for many iterations two classifiers could not agree with an instance belonging to MISC class and the performance kept the same score.
6
Conclusions and Future Work
In this paper we demonstrated the building of a complete Named Entity Recognition system, using small set of labeled and large amount of unlabeled data, by the help of self-training and co-training. The obtained results are encouraging, reaching 90.37% for detection phase and 65% for classification12 . The detection task was easily managed only with self-training. The Named Entity Classification task is more difficult, but with the proposed by us voted cotraining algorithm, an outperformance of 5% per class was obtained compared to other co-training algorithms. The features used for miscellaneous class have not been so discriminative, and we would like to repeat the same experiment with a better set. In future we would like to make a comparative study of self-training, active learning and the proposed by us voted co-training, while dealing with the NEC task. More challenging will be to investigate how voted co-training behaves compared to a supervised machine learning NER system. Finally for evaluating the effectiveness of the proposed method, it will be applied to other natural language processing task such as word sense disambiguation. 12
considering the performance of person, location, organization and miscellaneous classes altogether.
Self-training and Co-training Applied to Spanish Named Entity Recognition
779
Acknowledgements This research has been partially funded by the Spanish Government under project CICyT number TIC2003-0664-C02-02 and PROFIT number FIT-340100-2004-14 and by the Valencia Government under project numbers GV04B-276 and GV04B268.
References 1. A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In COLT: Proceedings of the Workshop on Computational Learning Theory, pages 92–100, 1998. 2. M. Collins and Y. Singer. Unsupervised models for named entity classification. In Proceedings of the Joint SIGAT Conference on EMNLP and VLC, pages 100–11, 1999. 3. W. Daelemans, J. Zavrel, K. Sloot, and A. van den Bosch. TiMBL: Tilburg MemoryBased Learner. Technical Report ILK 04-02, Tilburg University, 2004. 4. S. Goldman and Y. Zhou. Enhancing supervised learning with unlabeled data. In Proceedings of the Seventeenth International Conference on Machine Learning, pages 327–334, 2000. 5. Z. Kozareva, O. Ferrandez, A. Montoyo, R. Mu˜ noz, and A. Su´ arez. Combining datadriven systems for improving named entity recognition. In Proceedings of Tenth International Conference on Applications of Natural Language to Information Systems, pages 80–90, 2005. 6. K. Nigam and R. Ghani. Analyzing the effectiveness and applicability of co-training. In Proceedings of Ninth International Conference on Information and Knowledge Management, pages 86–93, 2000. 7. T. K. Sang. Introduction to the conll-2002 shared task: Language independent named entity recognition. In Proceedings of CoNLL-2002, pages 155–158, 2002. 8. I. Schroder. A case study in part-of-speech tagging using the icopost toolkit. Technical Report FBI-HH-M-314/02, Department of Computer Science, University of Hamburg, 2002.
Towards the Automatic Learning of Idiomatic Prepositional Phrases* Sofía N. Galicia-Haro1 and Alexander Gelbukh2 1
Faculty of Sciences UNAM Universitary City, Mexico City, Mexico [email protected] 2 Center for Computing Research, National Polytechnic Institute, Mexico gelbukh@ cic.ipn.mx, www.Gelbukh.com |
Abstract. The objective of this work is to automatically determine, in an unsupervised manner, Spanish prepositional phrases of the type preposition - nominal phrase - preposition (P−NP−P) that behave in a sentence as a lexical unit and their semantic and syntactic properties cannot be deduced from the corresponding properties of each simple form, e.g., por medio de (by means of), a fin de (in order to), con respecto a (with respect to). We show that idiomatic P−NP−P combinations have some statistical properties distinct from those of usual idiomatic collocations. We also explore a way to differentiate P−NP−P combinations that could perform either as a regular prepositional phrase or as idiomatic prepositional phrase.
1 Introduction Any computational system for natural language processing must cope with the ambiguity problem. One of the most frequent ambiguities in syntax analysis is the prepositional phrase attachment. A preposition can be linked to a noun, an adjective, or a preceding verb. There are certain word combinations of the type preposition - nominal group - preposition (P−NP−P) that can be syntactically or semantically idiosyncratic in nature or both, that we called IEXP. The automatic determination of such IEXP groups should reduce the prepositional phrase attachment problem by defining three or more simple forms (since the nominal group can contain more of a simple form) as one lexical unit. Spanish has a great number of prepositional phrases of the type P−NP−P more or less fixed. Among them: a fin de (in order to), al lado de (next to), en la casa de (in the house of), etc. The IEXP (a fin de, al lado de), can be analyzed assuming that these expressions behave as a syntactic unit and therefore could be included directly in a computational dictionary. Specifically, such combinations are frequently equivalent to prepositions, i.e., they can be considered as one multiword preposition: e.g., in order to is equivalent to for (or to) and has no relation with order; other examples: in front of (before), by means of (by), etc. Such dictionary can be useful in prepositional phrase attachment: given a compound preposition in_order_to is present in the *
Work partially supported by Mexican Government (CONACyT, SNI, CGPI-IPN, PIFI-IPN).
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 780 – 789, 2005. © Springer-Verlag Berlin Heidelberg 2005
Towards the Automatic Learning of Idiomatic Prepositional Phrases
781
dictionary, the to in John bought flowers in order to please Mary would not be attached to bought. For example, the phrase El Tratado estableció la devolución del canal por parte de Estados Unidos (The Treaty established the return of the canal by the United States) has the following structure according to Dependency Grammars [11]:
el
Tratado
estableció la
devolución
del
canal por parte de
Estados Unidos
In opposition, regular P−NP−P are analyzed considering the initial combination P−NP like a unit, and the second preposition as a one introducing a complement, not always linked to the preceding NP. For example, the phrase El Senado autorizó la adopción de niños por padres del mismo sexo (The Senate authorized the adoption of children by same sex parents) that is very similar to the previous example in the POS of most words has the following structure:
el
Senado
autorizó
la
adopción
de
niños por
padres del
mismo sexo
We could observe that there are more links in a structure with regular prepositional phrases. Therefore it is necessary to distinguish which of the Spanish P−NP−P should be analyzed as a IEXP and which should be analyzed as a P−NP−P. But there is no a complete compilation of the IEXP groups. Nañez [12] compiled the most wide list but he himself considers that a prepositive relation study is something incomplete “susceptible of continuous increase”. In addition, the main Spanish dictionaries [4], [14] do not contain the information necessary for a computational dictionary of this type. The IEXP groups are used frequently in everyday language, therefore natural language applications need to be able to identify and treat them properly. Apart from syntactic analysis the range of applications where it is necessary to consider their specific non compositional semantic is wide: machine translation, question-answering, summarization, generation. But IEXP could present different uses and their meaning agree with context. In this work, we mainly investigated corpus-based methods to obtain the prepositional phrases of the type IEXP (idiomatic expressions), and the form to differentiate their use as fixed forms from the literal ones, for example: 1. Idiomatic expression: a fin de obtener un ascenso (to obtain a promotion, literally: ‘at end of’), 2. Free combination: a fin de año obtendrá un ascenso (at the end of the year she will be promoted), 3. Part of a larger idiom: a fin de cuentas (finally, literally: ‘at end of accounts’). More precisely our aims are: • To analyze the linguistic characteristics that differentiate IEXP groups from the regular prepositional phrases
782
S.N. Galicia-Haro and A. Gelbukh
• To find by statistical measures the IEXP groups that should be included in a computational dictionary for syntactic analysis • To identify the different uses of the IEXP groups as idiomatic expression, free combination (literal), and part of a larger idiom. In section 2 we present the linguistic analysis, then we present the characteristics of the corpus and some frequencies obtained from it. In section 4, we present the obtained results applying the statistical methods and our exploration to differentiate regular from idiomatic use for the same prepositional phrase.
2 Linguistic Analysis It is important to emphasize some linguistics properties that place IEXP in a different group from the regular prepositional phrases. In Spanish grammar these groups are denominated adverbial locutions [15] or prepositional locutions [12] according to their function. As it is indicated in [15], locutions could be recognized by its rigid form that does not accept modifications and the noun that shows a special meaning, or by its global meaning, that is not the sum of the meanings of its components. For word combinations lexically determined that constitute particular syntactic structures, as it is indicated in [10], their properties are: restricted modification, non composition of individual senses and the fact that nouns are not substitutable. 1. Some features of prepositions and nouns in IEXP’s Some IEXP groups are introduced by the preposition “so”. This preposition is considered old fashioned by [15]. It has a restricted use or appears in fixed forms. We found 389 cases from the corpus: so capa de (1 case), so pena de (203 cases), so pretexto de (177), so riesgo de (5), so peligro de (1) and one case for P-NP. Other IEXP groups contain nouns that are rarely used outside the context of fixed expressions. Examples obtained from corpus are: a fuer de (in regard to, 44 cases), a guisa de (like, 54 cases) and a la vera de (to the side of, 187 cases). 2. Restricted modification Many of the nouns found in IEXP groups cannot be modified by an adjective. For example: por temor a (literally: by fear of) vs. por gran temor a (avoiding vs. by great fear of), a tiempo de vs. a poco tiempo de (at the opportune moment vs. a short time after), etc. In some cases, the modification forces to take a literal sense of the prepositional phrase, for example in the following sentences: • … por el gran temor a su estruendosa magia (by the great fear to its uproarious magic) , por el gran temor has a literal meaning related to fear. • … denegó hoy la libertad bajo fianza por temor a una posible fuga. (today denied the freedom on bail to avoid a possible flight), por temor a has a meaning related to avoid 3. Non substitutable nouns The noun inside the IEXP cannot be replaced by a synonym. For example in the phrase: se tomará la decisión de si está a tiempo de comenzar la rehabilitación (the decision will be taken on if it is the right time to begin the rehabilitation), where a tiempo de cannot be replaced by a período de (on period of), a época de (time of).
Towards the Automatic Learning of Idiomatic Prepositional Phrases
783
4. Variations in the nominal group The nominal groups of certain IEXPs present variations due to inflection of the noun. For example, a mano(s) de : • ... tras la traición que han sufrido a mano de sus antiguos protectores argelinos. (... after the treason that, apparently, has undergone by cause and action of their old Algerian protectors) • ... habitantes enardecidos por el asesinato de un profesor a manos de un policía... (... inhabitants inflamed by the murder of a professor by cause and action of a policeman …) 5. Different uses, meaning agree with context Some IEXP groups initiate fixed phrases or can be literal phrases according to the context, in addition to their use as idiomatic expressions. Examples: “al pie de” It appears as idiomatic expression in: • La multitud que esperó paciente al pie de la ladera de la sede de la administración del canal, corrió hacia arriba ... (The patient multitude that waited at the base of the slope of the seat of the channel administration, run upwards ....) “al pie de” It initiates a larger idiom: al pie de la letra (exactly) in: • Nuestro sistema de procuración de justicia se ha transformado y en vez de observar al pie de la letra las leyes … (Our system of justice care has been transformed and instead of observing the laws exactly …) “al pie de” It initiates a free combination in: • El anillo estaba junto al pie de María (The ring was next to the foot of Maria)
3 Characteristics of the Corpus For our analysis, we selected four Mexican newspapers that are daily published in the WEB with a considerable part of their complete publication. The texts correspond to diverse sections: economy, politics, culture, sport, etc. from 1998 to 2002. The text collection has approximately 60 million words [7]. Initially, to analyze the word groups of the type P−NP−P we used a POS tool to assign morphological annotation. We developed a program to extract the P−NP−P patterns where prepositions correspond to a very wide list of simple prepositions that was obtained from [12] which includes prepositions with liberality. We extracted all word strings corresponding to P−NP−P using the following grammar: PP
→ P NP P
NP
→ N | D N | V-Inf | D V-Inf
where P stands for preposition, N for noun, D for determinant, and V-inf for infinitive verb (in Spanish, infinitives can be modified by a determinant: el fumar está prohibido, literally: ‘the to-smoke is prohibited’). In the complete text collection, we found 2,590,753 strings of the type P−NP−P, with 372,074 different types. The different groups with frequency greater than two were 103,009. In these strings, the above described cases for syntactic analysis were
784
S.N. Galicia-Haro and A. Gelbukh
recognized: compound words of type IEXP, and the combination P−NP followed by a preposition that introduces a second prepositional phrase. Since many IEXP are traditionally considered as complex prepositions and functional words have high frequency we obtained the frequencies of P−NP−P groups recognized with the grammar as a first approximation to determine them. Table 1 shows the frequencies of the 20 more frequent groups, where we could observe that 17 groups are IEXP type and only three phrases: en la ciudad de (literally: in the city of), del gobierno de (literally: of the government of), del estado de (literally: of the state of), do not correspond to IEXP type. The groups en la ciudad de, del estado de have a high score since there are two Mexican names that include the nouns ‘city’ (ciudad) and ‘state’ (estado) to differentiate them from the country: ciudad de Mexico (Mexico City) and estado de México (Mexico State). The group del gobierno de has a high score since ‘government’ has immediately an attribute related to persons and countries linked with preposition ‘of’. Most of the 17 IEXPs are equivalent to a single preposition. The sequences of words that compose the nominal groups are distributed of the following way in the text collection: NP constituted by a noun: 44,.646; NP constituted by several words: 58,363. It is observed that more than 50% contain determinants. Table 1. Frequencies of P−NP−P patterns Frequency 11612 11305 10586 10418 7982 7240 6819 6512 5904 5758
P GN P a pesar de a partir de de acuerdo con en contra de por parte de en la ciudad de a fin de en materia de en el caso de por lo menos
Frequency 5403 4998 4899 4882 4779 4510 4469 4186 4124 4114
P GN P en favor de a partir del en el sentido de con el fin de a lo largo de en caso de del gobierno de en cuanto a del estado de por medio de
4 Statistical Procedure From the linguistic analysis we noted that IEXP could be classified as collocations. The extracting criteria is based on such assumption applying general methods for collocation extraction in addition to frequency. Diverse statistical measures have been used to identify lexical associations between words from corpus [2], [5], [6], [16]. The measures that we used to determine the lexical association of words are: • • • •
Frequency (Freq), Point-wise mutual information (PMI), Log-likelihood (LL), Pearson measure (χ2, or Chi-2).
We obtained these four measures for the complete collection of texts using the statistical program NSP, developed by [1]. Because of the total size of the collection we
Towards the Automatic Learning of Idiomatic Prepositional Phrases
785
first split it in sixty parts and we applied the NSP ngram module to each part. Then we combined the results and we extracted automatically all P−NP−P groups determined by the grammar. Finally we applied each of the above four statistical measures by the corresponding NSP module and we obtained the ranked measures for them. In order to prove the methods of idiomatic expression identification, we eliminated the P−NP−P groups that appeared less than three times, because when applying statistical methods to sparse data poor results are obtained. Since in the text collection the prepositional groups are not annotated as composed words, we compared the results against the most wide list of prepositional locutions available (LPL), that of [12]. In Figure 1 we present the learning curves automatically obtained, the horizontal axis correspond to the number of the top P−NP−P ranked by each method and the vertical axis correspond to the number of IEXP detected. In the first step we considered the top one hundred prepositional phrases ranked by the statistical measure and automatically were searched the groups considered in LPL, then we considered the top ten thousand to apply the same detection, then we considered the top twenty thousand prepositional phrases and so on augmenting ten thousand P−NP−Ps each time. 300
250
200
150
LL Chi-2 revPMI PMI Freq
100
50
0 100
10,000
20,000
30,000
40,000
50,000
60,000
70,000
80,000
90,000 100,000
Fig. 1. Statistical measures for the P-NP-P with a minimum occurrence of 3
We considered 252 cases of LPL that correspond to specific IEXP groups, since the author considers very general cases as “a ... en” (literally: to … in), “a ... por” (literally: to … by), etc. An extract of LPL is the following group: 197. con ganas de 198. con idea de 199. con independencia de 200. con intención de 201. con la mira en 202. con miras a 203. con motivo a
204. con motivo de 205. con objeto de 206. con occasion de 207. con omission de 208. con... para... 209. con peligro de 210. con... por...
786
S.N. Galicia-Haro and A. Gelbukh
Since there is no generally accepted definition of the latter three measures for three elements, we applied pair-wise measures to [P−NP] and [P] of the whole combination P−NP−P: e.g., the PMI assigned to a fin de was the PMI of the two strings (1) a fin and (2) de. Evaluation of other possible ways of calculating the dependency between the three elements was left for our future work. 4.1 Discussion The best measure proved to be simple frequency, and log-likelihood shows nearly the same performance. On the first 100 items the precision obtained with frequency measure was 50% (which is 20% recall on LPL). However, manual inspection of the results revealed among the top elements new IEXP, such as a las afueras de (literally: ‘to the outskirts of’), bajo los auspicios de (literally: ‘under the auspices of’), en el marco de (literally: ‘in the frame of’), con el objetivo de (literally: ‘with the objective of’), a efecto de (literally: ‘to effect of’), por concepto de (literally: ‘by concept of’), etc. and variants of existing ones in LPL such as: por la vía de (literally: ‘by the way of’), en las manos de (literally: ‘in the hands of’). Thus, real precision of our method is better than that measured by comparison with LPL, and the method allows detection of new combinations. PMI gives very poor results, which is in accordance with the general opinion that PMI is not a good measure of dependency (though it is a good measure of independency) [10]. What is more, PMI seems to have inverse effect: it tends to group the idiomatic examples nearer the end of the list. With this, ordering the list in reverse order by PMI (revPMI in Figure 1) gives better results. However, such order is much worse than Freq and LL orders: it groups most of the combinations in question around the positions from 25,000 to 35,000 in the list of 100,000. Pearson measure also shows much worse performance than LL. For a detailed comparison of the loglikelihood and chi-squared statistics, see [13]. A possible explanation for the fact that simple frequency performs in our case better than statistical dependency measures is as follows. A usual collocation is often a new term formed out of existing words, so it is more specific, and of more restricted use, than each of the two words separately. However, in our case the idiomatic (IEXP) combinations are equivalent to functional words—prepositions—which are of much more frequent use than the corresponding NP used in its literal meaning. Also, it is suggested in [9] that frequent word chains of some specific POSs (such as P−NP−N) tend to be terminological; our study can be considered as a particular case of this method. This P−NP−P construction seems to be common across various languages, mainly among Romance languages. The work of [16] is dedicated to Dutch where less quantity of P−NP−P (34% compared with Spanish) and uses were analyzed; so the same method could be used for other languages. The obtained results could be used to create the input databases employed by tokenizer processors such as that of [8] where authors view IEXP identification as a tokenization ambiguity problem.
Towards the Automatic Learning of Idiomatic Prepositional Phrases
787
4.2 Differentiating Idiomatic Expressions We consider heuristic or filters as a form to differentiate the idiomatic expressions from the free combinations and the fixed ones. We considered to identify the grammar categories of the IEXP neighbors, based on sequences of 5 and 6 contiguous words, obtained of the total text collection with the purpose of measuring the results for the variants use. For the group “a fin de” we obtained in an automatic form the following groups: 1. a fin de V_inf 2. a fin de Conj (que) 3. a fin de S (cuenta, cuentas, año, abril, mayo, julio, agosto, noviembre mes, milenio, semana sexenio, siglo) 4. a fin de Adv (no)
70.3% 21.92% 2.8% 1.6% 0.066% 0.69% 0.1% 0.044% 0.055% 0.38% 1.66%
Where: Conj means conjunction and Adv means adverb. Variants 1 and 4 can be grouped since the fourth is the denied version of the first variant. In the line of "año" (year) the corresponding Spanish noun phrases to the following noun phrases are considered: year, the year, this year, the present year. In the line of "siglo” (century) the noun phrases correspond to: century, the century, this century. In "sexenio" and "milenio" the noun phrases considered are: sexenio, the sexenio, millennium, the millennium. In the line of "mes” (month) the nouns are: month, this month. Additionally three groups exist: 1) punctuation mark (0.32%) although immediately an infinitive verb appears, 2) number (0.022%) referred to a year: 1997, 3) adverb (0.011%) followed by an infinitive verb and 4) anomalous constructions (0.033%). As it is reported in [3] idiomatic expressions combine with a more restricted number of neighboring words than free combinations. They computed three indices on the basis of three-fold hypothesis: a) idiomatic expressions should have few neighbors, b) idiomatic expressions should demonstrate low semantic proximity between the words composing them, and c) idiomatic expressions should demonstrate low semantic proximity between the expression and the preceding and subsequent segments Considering the first hypothesis we observed the opposite effect: a fin de as IEXP combines with almost any infinitive verb, whereas a fin de as free combination combines with few neighbors: nominal groups with semantic mark of time (year, month). The explanation could be the one suggested in the previous section. Also a fin de combines with few neighbors to form the fixed phrases: a fin de cuenta y a fin de cuentas (literally: at end of account-s).
788
S.N. Galicia-Haro and A. Gelbukh
Considering the third hypothesis: the semantic proximity between the expression and its neighbors will be high if the expression has a literal meaning, and low if it is figurative. For the example, we found in group 3 the literal variants in the context of nouns with semantic mark of time since they are semantically near to fin (end). We considered a simple semantic proximity to the IEXP noun, using EurowordNet1 and looking for similar terms (synonymous) in their glosses. The forms a fin de cuenta and a fin de cuentas were analyzed in the same form satisfying the third hypothesis. For fin (end) and año (year) the following nouns were found: “time” (tiempo), “period” (periodo), then they form an expression with literal meaning. Data for fin 09169786n 11 conclusión_8 [99%] terminio_1 [99%] terminación_4 [99%] final_10 [99%] fin_4 [99%] finalización_6 [99%]
Tiempo en el que se acaba una cosa: "el final del año académico"; "la finalización del periodo de garantía"
Data for año 09125664n 4 año_1 [99%] 09127492n 10 año_2 [99%]
Tiempo que tarda un planeta en completar su vuelta alrededor del sol Periodo de tiempo que comprende 365 días
But we did not find similar terms in the glosses for cuenta (account) and fin (end), then they form an expression with figurative meaning. Data for cuenta 00380975n 7 numeración_1 [99%] enumeración_1 [99%] cómputo_1 [99%] cuenta_1 [99%] conteo_1 [99%] 02130199n 1 cuenta_2 [99%] 04270113n 0 cuenta_3 [99%] nota_4 [99%] 08749769n 0 cuenta_4 [99%] 08318627n 3 cuenta_5 [99%] cómputo_4 [99%] recuento_2 [99%]
Acción de contar Pequeña bola atravesada por un agujero Factura o recibo en un restaurante Dinero que se debe El número total contado: “recuento globular”
Future work will comprise acquiring the context of all IEXP groups and we will carry out the above process. In addition, we will try to distinguish the diverse IEXP from the P−NP−P with high frequency using the same method.
5 Conclusions Idiomatic word combinations of IEXP type, usually functioning as compound prepositions, have statistical properties distinct from those of usual idiomatic collocations. In particular, they combine with a greater number of words than usual idioms. For 1
http://nipadio.lsi.upc.edu/cgi-bin/wei4/public/wei.consult.perl
Towards the Automatic Learning of Idiomatic Prepositional Phrases
789
their unsupervised determination from a corpus, a simple frequency measure performs better than other statistical dependence measures. In particular, among most frequent P-NP-P word chains, about 50% are idiomatic. Inspection of the most frequent chains of this type permits to detect idiomatic combinations not present in existing dictionaries. We presented an approach to differentiate them from fixed phrases and free combinations by means of semantic proximity.
References 1. Banerjee, S. & Pedersen, T.: The Design, Implementation, and Use of the Ngram Statistic Package. Proceedings of the Fourth International Conference on Intelligent Text Processing and Computational Linguistics, México (2003) 2. Church, K.W. and P. Hanks.: Word association norms, mutual information, and lexicography. In Proceedings of the 27th Annual Meeting of the Association for Computational Linguistics (1989) 76-83 3. Degand, Liesbeth & Bestgen, Yves.: Towards automatic retrieval of idioms in French newspaper corpora. Literary and Linguistic Computing (2003) 18 (3), 249-259 4. Diccionario de María Moliner.: Diccionario de Uso del Español. Primera edición versión electrónica (CD-ROM) Editorial Gredos, S. A. (1996) 5. Dunning, Ted.: Accurate methods for the statistics of surprise and coincidence” Computational Linguistics. (1993) 19(1):61-74 6. Evert, Stefan & Brigitte Krenn.: Methods for the Qualitative Evaluation of Lexical Association In Proceedings of the 39th Annual Meeting of the Association for Computational Linguistics. Toulouse, France. (2001) pp. 188-195 7. Galicia-Haro, S. N.: Using Electronic Texts for an Annotated Corpus Building. In: 4th Mexican International Conference on Computer Science, ENC-2003, Mexico, pp. 26–33. 8. Graña Gil, J., Barcala Rodríguez, F.M., Vilares Ferro, J.: Formal Methods of Tokenization for Part-of-Speech Tagging. Proceedings of the Third International Conference on Computational Linguistics and Intelligent Text Processing (CICLing-2002) Lecture Notes in Computer Science vol. 2276 Springer-Verlag (2002) pp. 240-249 9. Justeson, J. S., S. M. Katz. Technical Terminology: Some Linguistic properties and an algorithm for identification in text. Natural Language Engineering (1995) 1:9–27 10. Manning, C. D. & Schutze, H.: Foundations of Statistical Natural Language Processing. The MIT Press, Cambridge, Massachusetts. (1999) 11. Mel'cuk, Igor.: Dependency Syntax: Theory and Practice, New York: State University of New York Press. (1988) 12. Nañez Fernández, Emilio.: Diccionario de construcciones sintácticas del español. Preposiciones. Madrid, España, Editorial de la Universidad Autónoma de Madrid. (1995) 13. Rayson, P., Berridge, D., Francis, B. Extending the Cochran rule for the comparison of word frequencies between corpora. In Vol. II of Purnelle G. et al. (eds.) Le poids des mots: Proc. of 7th International Conf. on Statistical analysis of textual data (JADT 2004), Presses universitaires de Louvain (2004) pp. 926–936. 14. Real Academia Española.: Diccionario de la Real Academia Española, 21 edición (CDROM), Espasa, Calpe (1995) 15. Seco, Manuel.: Gramática esencial del español, introducción al estudio de la lengua, Segunda edición revisada y aumentada, Madrid, Espasa Calpe. (1989) 16. Villada, Begoña & Bouma, Gosse. A corpus-based approach to the acquisition of collocational prepositional phrases. Proceedings of EURALEX 2002, Copenhagen. Denmark (2002) pp. 153–158
Measurements of Lexico-Syntactic Cohesion by Means of Internet* Igor A. Bolshakov1 and Elena I. Bolshakova2 1
Center for Computing Research (CIC), National Polytechnic Institute (IPN), Mexico City, Mexico [email protected] 2 Moscow State Lomonosov University, Faculty of Computational Mathematics and Cybernetics, Moscow, Russia [email protected]
Abstract. Syntactic links between content words in meaningful texts are intuitively conceived ‘normal,’ thus ensuring text cohesion. Nevertheless we are not aware on a broadly accepted Internet-based measure of cohesion between words syntactically linked in terms of Dependency Grammars. We propose to measure lexico-syntactic cohesion between content words by means of Internet with a specially introduced Stable Connection Index (SCI). SCI is similar to Mutual Information known in statistics, but does not require iterative evaluation of total amount of Web-pages under search engine’s control and is insensitive to both fluctuations and slow growth of raw Web statistics. Based on Russian, Spanish, and English materials, SCI presented concentrated distributions for various types of word combinations; hence lexico-syntactic cohesion acquires a simple numeric measure. It is shown that SCI evaluations can be successfully used for semantic error detection and correction, as well as for information retrieval.
1 Introduction Syntactic links between content words in meaningful texts are intuitively conceived ‘normal,’ thus ensuring text cohesion. Nevertheless we are not aware on such numerical measure for cohesion between words syntactically linked in terms of Dependency Grammars [11] that is broadly accepted and convenient for evaluations through Internet. In fact, the task of measurement of cohesion between words arose many years ago, in relation with information retrieval (e.g., [7, 14]) and, in the recent decades, to collocation extraction and acquisition (e.g., [10, 13]). The well-known purely statistic measure reckoning on numbers of occurrences of words and their combinations is Mutual Information [10] appropriate for text corpora evaluations. Rapid development of Internet compels to revise the available methods and criteria oriented to text corpora [9]. In Web search engines, raw statistical data are measured in numbers of relevant pages rather then in word occurrences. *
Work done under partial support of Mexican Government (CONACyT, SNI, CGEPI-IPN).
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 790 – 799, 2005. © Springer-Verlag Berlin Heidelberg 2005
Measurements of Lexico-Syntactic Cohesion by Means of Internet
791
In this paper we propose to measure lexico-syntactic cohesion between content words with a specially introduced Stable Connection Index (SCI). The form of SCI is similar to Mutual Information, but it operates by statistics of relevant Web-pages and thus is convenient for Web measurements. It does not require iterative evaluation of the total amount of pages under search engine’s control and is nearly insensitive to both quick fluctuations and slow growth of all raw Web statistics delivered by the engine. Our additional goal is to compare SCI with a modified version of Mutual Information introduced below. Purposes for measuring word cohesion are at least as follows. The first is the need of computational linguistics to extract from texts stable word combinations— collocations and coordinate pairs. Being gathered into special DBs [1, 5, 12], such word combinations can be used in diverse applications. The second purpose is direct use of cohesion measurements for detection and correction of malapropisms, i.e. semantic errors of special type. It is shown that erroneous word combinations always have SCI values less than the intended (correct) combinations [3, 4, 6]. The third purpose is selection of sequences of words—composite terms and names—that should be used in information retrieval. The Yandex search engine (www.yandex.ru) was used for experiments in Russian, and Google, for experiments in Spanish and English.
2 Word Cohesion Each natural language text is a sequence of word forms (tokens), i.e. strings of letters from one delimiter to the next (e.g., links, are, very, short). Word forms pertaining to the morpho-paradigm with common meaning are associated into lexemes. One word form from a paradigm is taken as the lexeme’s title for the corresponding dictionary entry, e.g. pen is taken for {pen, pens}; go, for {go, going, gone, went}. In languages with rich morphology, paradigms are broader. We divide lexemes into three categories: • Content words: nouns; adjectives; adverbs; verbs except auxiliary and modal ones; • Functional words: prepositions; coordinate conjunctions; auxiliary and modal verbs; • Stop words: pronouns; proper names except of well known geographic or economic objects or personalities reflected in academic dictionaries and encyclopedias; any other parts of speech. According to Dependency Grammars [11], each sentence can be represented at the syntactic level as a dependency tree with directed links “head → its dependent” between nodes labeled with word forms. Following these links in the same direction of the arcs, from one content node through any linking functional nodes down to another content node, we obtain labeled subtree structure corresponding to a word combination. In a meaningful text, we consider each revealed combination with subordinate dependencies as a collocation. E.g., in the sentence she hurriedly went through the big forest, the collocations are went → through → forest, hurriedly ← went and big ← forest, whereas she ← went and the ← forest are not collocations, as having stop words at the extreme nodes. The combinations may be also of coordinate type, e.g.
792
I.A. Bolshakov and E.I. Bolshakova
mom → and → dad. Thus, the syntactic links in such word combinations can be immediate or realized through functional words. We name the defined above type of word combinability lexico-syntactic cohesion. It implies a syntactic link between components and semantic compatibility of corresponding lexemes. Such combinations are either idiomatic or free. As to their stability, thus far not defined, it is very important issue for any applications: we should primarily work with stable word combinations in computational linguistics and information retrieval. Combinable components can be linearly separated not only by their own functional word(s) but by many others usually dependent on one of these components. In other words, a close context in a dependency tree is in no way a close linear context. This makes difference with intensively studied bigrams [9]. For example, collocation leave position can contain intermediate contexts in principle of any length l:
l = 0: leave position; l = 1: leave the position; l = 2: leave her current position ...
Coordinate pairs are word combination of two content words (or content word compounds) linked by a coordinative conjunction. In the most frequent case the components P1 and P2 of a stable coordinate pair are linked according to the formula P1→C→P2, where the coordinate conjunction C is and, or, but. The third type of word combinations interesting mainly for information retrieval is composite proper names. Many of them contain two word forms and can be treated as collocations (President → Bush, George ← Bush) or stable coordinate pairs (Trinidad → and → Tobago). However, numerous are names of tree and more words. For humans, the composite names can contain addressing (Sir, Mr., etc.), personal name(s), family name (usually repeating father’s family name), patronymic name (derived from the father’s personal name—in Russian tradition: Boris Nikolayevich Yeltsyn), family name of the mother (in Hispanic tradition: Andrés López Obrador). The binary decomposition for such sequences is not clear, but the usage of various shorter versions suggests corresponding dependency subtrees. For example, we take a subtree for the name of the VIP in the shape
President | George Bush.
Since one cannot say President George, the uniquely possible binary decomposition of the triple at the highest level is that shown by the vertical bar.
3 Numerical Criteria of Word Cohesion Let us forget for a while about syntactic links between components of word combinations, considering their occurrences and co-occurrences in a text corpus at some limited distance between them as random events. Then their co-occurrence should be considered steady (or stable), if the relative frequency (= empirical probability) N(P1,P2)/S of the co-occurrence of P1 and P2 is greater than the product of relative
Measurements of Lexico-Syntactic Cohesion by Means of Internet
793
frequencies N(P1)/S and N(P2)/S of the components taken apart (S is the corpus size). Using logarithms, we have the criterion of word cohesion known as Mutual Information [10]:
MI ( P1 , P2 ) ≡ log
S ⋅ N ( P1 , P2 ) . N ( P1 ) ⋅ N ( P2 )
MI has important feature of scalability: if the sizes of all its ‘building blocks’ S, N(P1), N(P2), and N(P1,P2) are multiplied by the same positive factor, MI conserves its value. Other known criteria differing from MI but including the same building blocks, e.g., scalable Pearson Correlation Coefficient [6] or non-scalable Association Factor [13], do not seem more reasonable from statistical viewpoint, and we ignore them. Any Web search engine automatically delivers statistics about a queried word or a word combination measured in numbers of relevant pages, and no information on word occurrences and co-occurrences is available. We can re-conceptualize MI with all N() as numbers of relevant pages and S as the page total managed by the engine. However, now N()/S are not the empirical probabilities of relevant events: the words that occur at the same a page are indistinguishable in the raw statistics, being counted only once, while the same page is counted repeatedly for each word included. We only keep a vague hope that the ratios N()/S are monotonically connected with the corresponding empirical probabilities for the corresponding events. In such a situation we may construe new criteria from the same building blocks. Since evaluation of the page total S is not simple [2], we try to avoid its use in the target criterion but to conserve its scalability. The following criterion of word cohesion named by us Stable Connection Index seems good:
SCI ( P1 , P2 ) ≡ 16 + log2
N ( P1 , P2 ) . N ( P1 ) ⋅ N ( P2 )
The additive constant 16 and the logarithmic base 2 were chosen quite empirically, analyzing a multiplicity of Russian word combinations intuitively considered cohesive. We have only tried to allocate a majority of their SCI values in the interval [0...16]. Hereafter we determine words P1 and P2 cohesive by the formula SCI(P1,P2) > 0. Depending on a specific search engine, the values N(P1), N(P2), and N(P1,P2) can be got by only query (the case of Yandex) or by three sequential queries close in time (the case of Google). Anyhow the scalability spares SCI of the influence of slow and steady growth of the engine’s resources. However, quick fluctuations of measurements from one access to Web to another implied by variations of search trajectories within the engine’s resources can be automatically compensated only in the case of obtaining all values through one query (Yandex). Fortunately, the quick fluctuations usually do not exceed ±5% of the measured values, and this gives the insignificant SCI variations (±0.1). By the way, it means that while computing SCI we should retain only one decimal digit after the point. Replacing S in the formula of MI by page number Nmax valid for one of the most frequent functional words in a given language, we have construed the criterion, which
794
I.A. Bolshakov and E.I. Bolshakova
is very similar to MI and keeps the scalability. We name it Modified Mutual Information and intend it for comparison with SCI:
MMI ( P1 , P2 ) ≡ k1 log2
k2 ⋅ N max ⋅ N ( P1 , P2 ) N ( P1 ) ⋅ N ( P2 )
The constants k1 and k2, and the functional word met in Nmax pages will be chosen later.
4 Correspondence of Web Statistics to Word Combinations In all statistical considerations above, we were ignoring the issue whether a cooccurrence of two given words in a counted Web-page corresponds to a directly linked word combination or merely to a random encounter of given components. Now we should compare the number of syntactically linked pairs in the Web snippets delivered for the corresponding query with the total number automatically evaluated by the search engine. The components of a word combination met in a given text fragment are at a certain distance. For a greater generality, we should make the comparison for various distances, with especial confidence to the most probable ones. Such a comparison was made for English [3], Spanish [4], and Russian [6]. Below we shortly outline results for English. Table 1. Statistics of co-occurrences and collocations Collocation act of … force main … goal lift … veil moved with … grace give … message bridge across … river dump … waste
Stat. type GS TP CS GS TP CS GS TP CS GS TP CS GS TP CS GS TP CS GS TP CS
0 6910 0.99 6840 1470000 0.99 1455300 17300 1.00 17300 557 0.96 534 6040 0.73 4410 726 0.99 718 12800 0.85 10900
Number of intermediate words 1 2 3 4 3590 0.67 2400 37500 0.96 36000 38400 1.00 38400 4780 1.00 4780 106000 0.85 90100 37800 0.96 36300 30500 0.81 24700
5470 0.14 765 19700 0.25 4920 5970 0.93 5550 3930 0.96 3770 221000 0.73 161300 52800 0.97 51200 16800 0.43 7220
9800 0.07 686 17200 0.04 690 1880 0.88 1650 1980 0.94 1860 156000 0.63 98300 6530 0.85 5550 13100 0.10 1310
10600 0.00 0 19900 0.01 200 993 0.64 635 801 0.81 648 96600 0.27 26100 1840 0.55 1010 12900 0.15 1930
5 10200 0.00 0 16700 0.01 167 438 0.44 193 191 0.37 71 145000 0.03 4350 753 0.54 407 18400 0.11 2024
Google statistics of co-occurrences of two words with any N intermediate words in between can be gathered by a query in quotation marks containing these words separated with N asterisks (* wildcard operators). We took a few of commonly used collo-
Measurements of Lexico-Syntactic Cohesion by Means of Internet
795
cations. The co-occurrence frequencies for each of them were automatically evaluated with N intermediate asterisks, N = 0...5. Since we did not dispose a dependency based syntactic analyzer of English, the counting of the syntactically linked combinations among them was done manually and only for the initial portions of deliveries. To evaluate the true portions (TP) of collocations in the automatically counted amounts, we looked through the first hundred co-occurrence snippets with various lengths of intermediate context, mentally analyzing syntax of the fragments. Multiplying the Google statistics GS by TP values, we got approximate collocation statistics (CS), cf. Table 1. One can see that GS has one or more local maximums in the interval N = 0...5, while the first local maximum of CS is disposed at N = 0, 1 or 2. In great majority of cases the maximum of CS is unique, coinciding with the first local maximum of GS. So we can believe Google statistics in that the most probable distance between components of collocations corresponds to the first local maximum of GS, and up to this point CS is approximately equal to GS. Both maxima are to be searched in the interval [0...2] of intermediate context lengths (i.e. in the interval [1...3] of distances between components). In other words, the majority of co-occurrences counted by the Web at the distances not exceeding 3 between components are real collocations, whereas at the greater distances they are mostly random encounters, without direct syntactic links between words. This in no way means that collocation components cannot be more distant from each other (cf. Section 2), but the Web is not suited for evaluation of the numbers of syntactically linked combinations at greater distances.
5 Main Experiment and Comparison of Criteria Our main experimental set for SCI evaluations was a collection of ca. 2200 Russian coordinate pairs [5]. Similar pairs exist in any European language. This can be demonstrated by the following Russian stable coordinate pairs: damy i gospoda ‘ladies and gentlemen’; zhaloby i predlozheniya ‘complaints and suggestions’; geodeziya i kartografiya ‘geodesy and cartography’; avtobusy i avtomobili ‘buses and cars’; amerikanskiy i britanskiy ‘American and British’; analiz i prognoz ‘analysis and forecasting’; bezopasnost’ i obschestvennyy poryadok ‘security and social order’; biznes i vlast’ ‘business and authorities,’ etc. Many of these pairs are sci-tech, economical or cultural terms and can be used for information retrieval. SCI values were computed for all these pairs and in 95 percents they proved to be positive, so that the pairs that passed the test are considered stable. The distribution of SCI rounded to the nearest integer is given in Fig. 1. It has concentrated bell-like form with the mean value MSCI = 7.30 and the standard deviation DSCI = 3.23. As many as 69% SCI values are in the interval MSCI ± DSCI. Another criterion computed for the same set was Modified Mutual Information. We have selected functional word i ‘and’ as having the rank 2 among the most frequent Russian words. During the experiment we observe Nmax ≈ 1.5 · 109, and constants k1 and k2 were chosen so that the mean values and the standard deviations for both criteria were nearly the same as for SCI: k1 = 0.7 and k2 = 360 gave MMMI = 7.09 and DMMI = 3.32.
796
I.A. Bolshakov and E.I. Bolshakova
The direct comparison of SCI and MMI distributions (Fig. 1 and Fig. 2) shows their proximity. Making a difference, the SCI distribution has strict cutoff edge 16, while the MMI distribution is sloping more gently to the greater values. Nevertheless, the computing of the cosine value between the two vectors of measurements gave the value .96, thus demonstrating nearly complete coincidence of the two criteria.
Distribution Density
0.15
0.10
0.05
0.00 0
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16
Stable Connection Index
Fig. 1. Distribution for Stable Connection Index
Distribution Density
0.15
0.10
0.05
0.00 0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19
Modified Mutual Information Index
Fig. 2. Distribution for Modified Mutual Information
The comparison of SCI and MMI ranks for the same subset has shown that some interspersion does occur. E.g., the initial twenty SCI ranks differ from corresponding MMI ranks by 2 to 40, but the maximal difference constitutes only 1/50 of the whole set size. We can conclude that the compared criteria are equivalent, but MMI requires evaluating through the Web four numbers rather than three for SCI.
Measurements of Lexico-Syntactic Cohesion by Means of Internet
797
6 Other Experimental Results The successful application of SCI is detection and correction of malapropisms. Malapropism is a type of semantic error that replaces one content word by another legitimate content word similar in sound or letters but semantically incompatible with the context and thus destroying text cohesion, e.g., the correct collocation travel around the world transforms to the erroneous travel around the word. Experiments on malapropism detection and correction in English [3], Spanish [4], and Russian [6] have shown that nearly always SCI values for malapropos word combinations of various syntactic types proved to be lower then a predetermined threshold and thus can be detected, while SCI values for the intended (correct) collocations are always positive. Statistics of SCI evaluations for the three languages are rather scarce now (100 to 125 malapropisms and their corrections for each language). They are characterized by the mean values and the standard deviations given in Table 2. Malapropos combinations may give the zero number of pages with co-occurrences (65% for Russian, 57% for Spanish, and 14% for English, the language most noise prone in Internet). Such cases are represented in Table 2 by SCI value −∞. Table 2. SCI evaluations for malapropisms Language
Intended collocations
Malapropos combinations
Russian Spanish English
7.54 ± 3.25 6.48 ± 2.82 6.14 ± 2.79
−∞ or 0.70 ± 2.58 −∞ or −1.77 ± 2.37 −∞ or −1.72 ± 3.22
Table 3. SCI values for VIP names VIP Bush
Chirac
Putin
Fox
Name version George | Bush presidente | George Bush presidente | Bush Jacque | Chirac presidente | Jacque Chirac presidente | Chirac Vladimir | Putin presidente | Vladimir Putin presidente | Putin Vicente | Fox presidente | Vicente Fox presidente | Fox
SCI values in Spanish in Russian 8.3 8.4 6.5 5.5 7.3 5.7 4.3 8.6 1.8 4.6 5.1 3.6 8.5 7.5 5.5 6.2 5.1 5.8 9.1 5.9 7.9 3.3 4.7 0.4
These data show that SCI scale selected initially for Russian well suits for other languages too. All distributions are rather concentrated, and the mean values and standard deviations in various languages differ not so much. Our recent small experiment on SCI evaluation consider name sequences of four present presidents in the world, namely, of USA, France, Russia, and Mexico. Each
798
I.A. Bolshakov and E.I. Bolshakova
name sequence was taken in three versions. The results are given in Table 3, where vertical bars denote binary decomposition, and Cyrillic transliteration of the names used for searches in Yandex is omitted. Table 3 shows that for all name versions SCI values for the two languages are comparable and usually rather high. This means that the composite names of VIPs are stable and thus selective for information retrieval, whereas their component presidente is so frequent that it cannot provide any selectivity. The most stable version in both languages proved to be . Independently of versions, names of Bush and Putin are nearly equally ‘popular’ in both languages. Chirac is more ‘popular’ in Russian, while Fox is more ‘popular’ in Spanish. All this seems quite natural.
7 Conclusions and Future Work We have proposed a numerical measure for lexico-syntactic cohesion between content words—Stable Connection Index. It is computed based on the raw statistics automatically delivered by a Web search engine about pages with content words and their pairs. SCI proved to be nearly insensitive to both slow growth of search engine’s resources and quick fluctuations of raw Web statistics. It is shown that SCI can be used for acquisition of new collocations from the Web, for detection and correction of semantic errors in texts, and for extraction of composite terms and names—for needs of information retrieval. So far the experiments on SCI evaluations were rather limited in size, being measured in few thousands for Russian and in few hundreds for English and Spanish. However they already permit to assert that SCI values of collocations and stable coordinate pairs are distributed in a concentrated unimodal manner with the mean values in the interval 6 to 8 (depending on language) and with the standard deviations in the interval 2 to 3.5. The broadening of these experiments should be welcomed for any language and for any application, in order to reveal more precise statistical laws. In the foreseeable future, we can imagine for each well-spread language a network with the nodes labeled by lexemes, and the oriented arcs labeled with types of possible syntactic links and corresponding SCI values. Creation of such structure is very hard task, but some operations can be automated. The network representation of language resources implemented as a special DB can facilitate numerous application of computational linguistics.
References 1. Bolshakov, I.A. Getting One’s First Million…Collocations. In: A. Gelbukh (Ed.). Computational Linguistics and Intelligent Text Processing (CICLing-2004). Lecture Notes in Computer Science, N 2945, Springer, 2004, p. 229–242. 2. Bolshakov, I.A., S.N. Galicia-Haro. Can We Correctly Estimate the Total Number of Pages in Google for a Specific Language? In: A. Gelbukh (Ed.). Computational Linguistics and Intelligent Text Processing (CICLing-2003). Lecture Notes in Computer Science, N 2588, Springer, 2003, p. 415–419.
Measurements of Lexico-Syntactic Cohesion by Means of Internet
799
3. Bolshakov, I.A., S.N. Galicia-Haro. Web-Assisted Detection and Correction of Joint and Disjoint Malapropos Word Combinations. In: A. Montoyo, R. Muñoz, E. Metais (Eds.) Natural Language Processing and Information Systems (NLDB’2005). Lecture Notes in Computer Science, N 3513, Springer, 2005, p.126–137. 4. Bolshakov, I.A., S.N. Galicia-Haro, A. Gelbukh. Detection and Correction of Spanish Malapropisms by means of Internet search. In: Text, Speech and Dialogue (TSD’2005). Lecture Notes in Artificial Intelligence, N 3658, Springer, 2005, p. 115–122. 5. Bolshakov, I.A., A. Gelbukh, S.N. Galicia-Haro. Stable Coordinated Pairs in Text Processing. In: V. Matoušek, P. Mautner (Eds.) Text, Speech and Dialogue (TSD 2003). Lecture Notes in Artificial Intelligence, N 2807, Springer, 2003, p. 27–34. 6. Bolshakova, E.I., I.A. Bolshakov, A.P. Kotlyarov. Experiments in detection and correction of Russian malapropisms by means of the Web. International Journal on Information Theories & Applications (forthcoming). 7. Borko, H. The Construction of an Empirically Based Mathematically Derived Classification System. Proceedings of the Western Joint Computer Conference, May 1962. 8. Keller, F., M. Lapata. Using the Web to Obtain Frequencies for Unseen Bigram. Computational linguistics, V. 29, No. 3, 2003, p. 459–484. 9. Kilgarriff, A., G. Grefenstette. Introduction to the Special Issue on the Web as Corpus. Computational linguistics, V. 29, No. 3, 2003, p. 333–347. 10. Manning, Ch. D., H. Schütze. Foundations of Statistical Natural Language Processing. MIT Press, 1999. 11. Mel’þuk, I. Dependency Syntax: Theory and Practice. SUNY Press, NY, 1988. 12. Oxford Collocations Dictionary for Students of English. Oxford University Press, 2003. 13. Smadja, F. Retreiving Collocations from text: Xtract. Computational Linguistics. Vol. 19, No. 1, 1990, p. 143–177. 14. Stiles, H. E. The Association Factor in Information Retrieval. Journal of the Association for Computing Machinery, Vol. 8, No. 2, April 1961, pp. 271–279.
Inferring Rules for Finding Syllables in Spanish René MacKinney-Romero and John Goddard Departmento de Ingeniería Eléctrica, Universidad Autónoma Metropolitana, México D.F. 09950, México [email protected], [email protected]
Abstract. This paper presents how machine learning can be used to automatically obtain rules to divide words in Spanish into syllables. Machine learning is used in this case not only as a classifier to decide when a rule is used but to generate meaningful rules which then can be used to syllabify new words. Syllabification is an important task in speech recognition and synthesis since every syllable represents the sound in a single effort of articulation. Experiments were carried out using an Inductive Logic Programming (ILP) tool. The experiments were made on different sets of words to ascertain the importance of the number of examples in obtaining useful rules. The results show that it is possible to automatically obtain rules for syllabifying. Keywords: machine learning, syllabification, ILP, inducing rules.
1
Introduction
A syllable is a unit of speech that is made up of one or more phones. Syllabification consists of separating a word into its individual syllables. Most speakers have no difficulty in performing this separation, even though they are often unaware of the underlying rules that they have applied in order to achieve it. Phonotactics refers to the valid sequences of sounds which are valid in a language. For instance the sound /ps/ is not valid at the start of a word in english but it is fine in greek. The study of phonotactis is usually done using data that contains information about the inflection of a particular sound in a word. Using such data, some techniques of machine learning have been used to automatically find rules for syllabification for a given language, such as genetic algorithms [1], decision trees [10], neural nets [11] and inductive logic programming [8]. Spanish provides an interesting test bed for this problem given that, unlike other languages, words are made of sequences of syllables with clear boundaries. Also, the set of rules for syllabification is known. This paper presents ongoing work on automatically creating a syllabifying system (by inducing rules to syllabify) using machine learning on text previously syllabified by a native speaker. This text represents the positive data, the negative data is produced by automatically generating incorrect syllabifications upto a certain length. It must be noted that we use only text with no additional information. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 800–805, 2005. c Springer-Verlag Berlin Heidelberg 2005
Inferring Rules for Finding Syllables in Spanish
801
The results are based on a corpus of a well known Spanish text syllabified by a native speaker. The first non-repetitive words of the text were then selected. Additionally the learning task was simplified by selecting only words with no diacritics. An ILP system was then used to induce rules to syllabify. The result is a theory in prolog that, with some additional predicates, is capable of syllabification of words. A differente text was used for testing purposes.
2
Machine Learning
Learning rules from examples is an important field of Machine Learning. The goal is to obtain general rules, which can be represented, for instance, as functions or first order theories. Such rules can then be used to make decisions on unseen instances of the problem. One particular field of machine learning is adequate to our learning task: inductive logic programming (ILP) [6]. It allow us to deal with the structure of a word and provide, by means of background knowledge, tools to extract and test the elements that compose the word. In the case of ILP all examples and background knowledge are expressed as prolog predicates and clauses. Rules are generated from a given vocabulary which contains the predicates or functions which can be used to generate the rules. The main issue using such a machine learning system that generates rules is the vocabulary given to it. On one hand we want to give the learning system as little information as is needed but on the other hand it is likely that unless we give the “right” information the learning system won’t be able to produce anything of interest. The work by Nerbonne and Konstantopoulos [8] focuses the impact on using different background knowledge, each based on a different approach, to learn valid affixes to a partial syllable. The results indicate that background knowledge is crucial to the learning task. Achieving different results on both accuracy and number of rules depends on the background knowledge used. Our work focuses on a different question. We wanted to see if it is possible for a learning system to induce rules for syllabification given simple background information, not using any knowledge about known rules, and if such a system could then be used to learn rules for syllabification for other languages using the same information. This work answers the first question, whilst the second remains as future work.
3
Learning Framework
The learning task was carried out trying to investigate if useful rules can be generated using machine learning systems. Therefore, it was conducted using small corpora of only a few hundred words. Three sets of roughly 120, 200 and 300 words were used throughout the experiments.
802
R. MacKinney-Romero and J. Goddard
The learning system Aleph was used [9], this learning system implements the PROGOL algorithm [7] and provides canonical ILP support using three files as input: background knowledge, positive data and negative data. The background knowledge file contains the definition of predicates that can be used in the generation of hypotheses. It also has information on how a particular predicate can be used, provided in a mode declaration such as :-modeb(1,hasPattern(+syllable,#pattern))? The declaration states which are the expected inputs(+), outputs(-) and constants(#) with their type. It also indicates, in this case one, how many times the predicate can appear on the body of a clause. The type information is provided as predicates which are true if a term has a certain type. The main issue, as was mentioned before, is which predicates should be given to the ILP system in order to induce the rules. The obvious ones are predicates that identify vowels, consonants and equalities with letters. Additionally, as a first approach, a set of general predicates were given that extracted letters from words. The problem here was that the rules generated were so complex that the system was unable to learn anything interesting. A more standard approach was then preferred using the patterns of vowels (v) and consonants (c) in words. We say that a word has a pattern if the word starts with the pattern of vowels and consonants given. For example, the word “eco” has the pattern vcv (vowel, consonant, vowel) and the word “audaz” has the pattern vvc. Two predicates were provided: hasPattern(A, B), which is true if word A has pattern B, and usePattern(A, B, C), which is true if C has the letters in pattern B of word A. For instance, the following predicates are true: hasPattern(eco, vcv). hasPattern(aludir, vcv). usePattern(eco,v,e). usePattern(aludir,v,a). Patterns can be given to the learning system using the type facility. Patterns of up-to size 5 are provided using this facility. The following predicates state that vcv and v are valid patterns. pattern(vcv). pattern(v). The syllabification performed by the native speaker produced all syllables for each word. For intance, the word “olvidar” is syllabized as ol-vi-dar. The positive data file contains all positive examples of correct syllabifying. These are provided as a predicate syll(A, B) where A is the word and B the first syllable obtained from the word. The following are some such examples: syll(eco,e). syll(audaz,au). syll(aludir,a).
Inferring Rules for Finding Syllables in Spanish
803
The file also contains subword syllabifying which includes a subword and the syllable that can be obtained. For instance, “olvidar” produces the following positive examples: syll(olvidar,ol). syll(vidar,vi). syll(dar,dar). This is possible since in spanish syllabification process is context free. That is, syllabification of a subword uses the same rules that for a word. Finally the negative data file contains examples of incorrect syllabifying. These were generated simply taking all incorrect syllables. For instance given the positive example syll(eco,e) the following negative examples were generated: :-syll(eco,ec). :-syll(eco,eco). Negative examples were limited to a length of 4 letters. Because of this, the negative data file contains almost thrice as many examples than the positive examples file.
4
Experiments
The learning corpora was obtained from “El Quijote de La Mancha”[2] by taking, as has been pointed out before, the first words with no diacritics until a certain amount of unique words had been reached. For testing a similar effort was done with “Cien años de soledad”[5]. Experiments were carried out on three different sets of words. The first one with 120 words, the second with around 200 words and the third with approximately 300. In all cases a test data set of 129 words was used. Since Aleph uses a sequential covering algorithm [4] it seems possible that the order in which examples are presented may bias the learning of rules. An effort was made to investigate this for the smaller of the sets. No difference was encountered on the rules generated despite the reordering of examples.
5
Results and Future Work
Table 1 shows the results obtained with the test data. Accuracy is the percentage of syllables correctly obtained from subwords. In all cases accuracy for learning examples was 100%. It can be seen that accuracy does not significantly increase even thought the last set provides almost triple the amount of examples. The system was capable of inducing the following rules syll(A,B):-hasPattern(A,cvcv), usePattern(A,cv,B). syll(A,B):-hasPattern(A,vcv),
804
R. MacKinney-Romero and J. Goddard Table 1. Syllabification Results for Test Set Words #Rules 120 205 290
69 116 179
Accuracy Training Test 100% 79.64% 100% 80.73% 100% 78.91%
usePattern(A,v,B). syll(A,B):-hasPattern(A,vvcv), usePattern(A,vv,B). syll(A,B):-hasPattern(A,vvcc), usePattern(A,vvc,B). syll(A,B):-usePattern(A,cvvc,B). syll(A,B):-usePattern(A,cvvv,B). syll(A,B) :hasPattern(A,ccvcv), usePattern(A,ccv,B). syll(A,B) :hasPattern(A,cvccv), usePattern(A,cvc,B). The first three rules represent a well known rule in spanish “if there is a consonant between two vowels the consonant will form a syllable with the second vowel” meaning that anything before that consonant forms a syllable. The fourth and last also represent a well known rule “if there are two consonants between two vowels the second consonant will form a syllable with the second vowel” When a hypothesis is selected the learning system clears all redundant clauses (examples covered by the hypothesis). For instance, for the example syll(infante,in). there is no rule that can be applied. According to [3] the above rules are valid rules for syllabification in Spanish. Although the fourth and fifth rule have exceptions and can’t be always applied. The exceptions in both cases are closely related to the letters which appear in the word. When the letters fall in a certain category another rule is applied. There are two basic tasks ahead. The first is to see if it is possible for the learning system to induce the categories of letters on which exceptions are based; the second is to see how well the rules found by the system are capable of syllabifying an unseen set of words. Even if categories are not induced it may
Inferring Rules for Finding Syllables in Spanish
805
be possible to identify exceptions well enough to induce a system that is very capable to syllabify. This work is intended only to be using Spanish as a base to see how well it can be applied to other languages. That would then allow a syllabifying system to be quickly obtained for many languages.
References 1. Anja Belz and Berkan Eskikaya. A genetic algorithm for finite state automata induction with an application to phonotactics. In B. Keller, editor, Proceedings of the ESSLLI-98 Workshop on Automated Acquisition of Syntax and Parsing, pages 9–17, Saarbruecken, Germany, August 1998. 2. Miguel de Cervantes Saavedra. El Ingenioso Hidalgo Don Quijote de la Mancha. htp://www.elquijote.com, 1605. 3. Karina Figueroa. Sintesis de voz en español, un enfoque silábico. Tesis de Licenciatura, 1998. Asesor: Leonardo Romero, Universidad Michoacana de San Nicolas de Hidalgo. 4. Tom M. Mitchell. Machine Learning. McGraw-Hill, New York, 1997. 5. Gabriel García Márquez. Cien años de soledad. Plaza & Janés Editores, 1998. 6. S. Muggleton, editor. Inductive Logic Programming. Academic Press, 1992. 7. S. Muggleton. Inverse entailment and Progol. New Generation Computing, Special issue on Inductive Logic Programming, 13(3-4):245–286, 1995. 8. John Nerbonne and Stasinos Konstantopoulos. Phonotactics in inductive logic programming. In Mieczyslaw A. Klopotek, Slawomir T. Wierzchon, and Krzysztof Trojanowski, editors, Intelligent Information Systems, Advances in Soft Computing, pages 493–502. Springer, 2004. 9. Ashwin Srinivasan. A learning engine for proposing hypotheses (Aleph). http://www.comlab.ox.ac.uk/oucl/research/areas/machlearn/Aleph/, 1999. 10. A. Van den Bosch. Learning to pronounce written words. A study in inductive language learning. PhD thesis, Universiteit Maastricht, 1997. The Netherlands. 11. Van den Bosch A. Vroomen J. and De Gelder B. A connectionist model for bootstrap learning of syllabic structure. Language and Cognitive Processes, Special issue on Language Acquisition and Connectionionism, 13:2/3:193–220, 1998. Ed. K. Plunkett.
A Multilingual SVM-Based Question Classification System Empar Bisbal1 , David Tomás2 , Lidia Moreno1 , José L. Vicedo2 , and Armando Suárez2 1
Departamento de Sistemas Informáticos y Computación, Universidad Politécnica de Valencia, Spain {ebisbal, lmoreno}@dsic.upv.es 2 Departamento de Lenguajes y Sistemas Informáticos, Universidad de Alicante, Spain {dtomas, vicedo, armando}@dlsi.ua.es
Abstract. Question Classification (QC) is usually the first stage in a Question Answering system. This paper presents a multilingual SVMbased question classification system aiming to be language and domain independent. For this purpose, we use only surface text features. The system has been tested on the TREC QA track questions set obtaining encouraging results.
1
Introduction
In the last years, Question Answering (QA) has become one of the main challenges in Natural Language Processing (NLP) research. The QA task tries to obtain exact answers to questions formulated in natural language. That is the main difference between QA and Information Retrieval (IR) systems [1], which just return a list of documents that may contain the answer. Most QA systems [2] [3] [4] [5] are based on a three-stages pipeline architecture: question analysis, document or passage retrieval, and answer extraction. Question Classification (QC) is the main task in question analysis, trying to assign a class or category to the searched answer. Answer extraction process depends on this classification as different strategies may be used depending on the question type. Consequently, the performance of the whole system depends directly on question classification. For instance, if a question like “Which is the biggest city of Germany” occurs, the system will only select city names as possible answers. In this paper we present a multilingual Support Vector Machines (SVM) based question classification system. It uses only surface text features for language independence purposes. The system has been tested on Spanish and English corpora. Next section shows current research on question classification.
This work has been developed in the framework of the project CICYT R2D2 (TIC2003-07158-C04) and it has been partially funded by the Spanish Government through the grant BES-2004-3935.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 806–815, 2005. c Springer-Verlag Berlin Heidelberg 2005
A Multilingual SVM-Based Question Classification System
807
Section 3 describes the SVM framework. Section 4 describes in detail our system and section 5 shows the experiments carried out and the results obtained. Finally, conclusions and future work are discussed in section 6.
2
Question Classification
Question Classification is the process of mapping a question to a predefined set of answer types. This semantic restriction narrows down the set of candidate answers, facilitating this way the answer extraction stage. Different answer extraction strategies may be used depending on question class: the process to search the answer for a question like “What is nitre?” is probably different to the process carried out to answer “Who invented the radio?”. The first question is asking for a definition while the second one expects the name of a person. An analysis made on the errors of open domain QA systems [6] revealed that 36% of them directly laid on the QC module. Most QC systems are based on heuristic rules and hand made patterns [7] [8] [9] [10]. This kind of systems presents two main problems. First, the great amount of human effort needed to define the patterns as there are many different ways to query the system (“Why is Jane Goodall famous?”, “What is Jane Goodall known for?”, “What made Jane Goodall famous?”...). Secondly, the lack of flexibility and domain dependency of these systems: changing the domain of application or adding new classes would involve the revision and redefinition of the whole set of heuristics and patterns. By applying Machine Learning (ML) techniques to QC modules, we expect to bypass such limitations, creating applications that can be easily adapted to changes in the process environment. With this purpose in mind we consider very important to select the features carefully when training the system because questions are often short sentences with a restricted amount of information. Moreover, using complex linguistic information like chunking, semantic analysis [11] or named entity recognition [12] seems not to fit our goal as it provides undesired language and domain dependency. This paper presents a QC system for English and Spanish based on a machine learning method, Support Vector Machines, using only surface text features. Next section briefly describes the foundations of SVM.
3
Support Vector Machines
SVM have demonstrated to perform well with high dimensional data used in many NLP tasks, like text classification. This method tries to find an optimum hyperplane (boundary) that can distinguish between two classes of samples. The nearest instances to the boundary are known as support vectors. The optimum hyperplane is the one that maximizes the margin (the distance between support vectors and the boundary). If the set is not linearly separable, SVM use a socalled “kernel function” to map the original data into a higher dimensional space where they try to find the optimum hyperplane again.
808
E. Bisbal et al.
Formally, given a binary training corpora of m pairs (xi , yi ), i = 1..m, where xi ∈ Rn is the feature vector and yi ∈ {1, −1} is the tag indicating if the sample belongs or not to the class, SVM [13] [14] get the solution to this optimization problem: 1 T w w+C ξi 2 i=1 m
min
w,b,ξ
being yi (wT φ(xj ) + b) ≥ 1 − ξi , ξi ≥ 0 C > 0 is the penalty parameter of the error term. ξi variables were introduced to manage non-linearly separable data sets, where a little error is permitted. The function K(xi , xj ) = φ(xi )T φ(xj ) is known as kernel. There are four well-known kernels: – – – –
Lineal → K(xi , xj ) = xTi xj Polynomial → K(xi , xj ) = (γxTi xj + r)d , γ > 0 RBF → K(xi , xj ) = exp(−γ-xi − xj -2 ), γ > 0 Sigmoid → K(xi , xj ) = tanh(γxTi xj + r)
γ, r y d are kernel parameters. Kernel selection and other model’s parameters have to be set while tuning the system. Support Vector Machines were designed to solve binary problems. This means that they could only deal with the problem of detecting if a sample belonged or not to a particular class. In order to classify into k-classes there are two basic approaches: one − versus − all, where k SVM are trained and each one separates models are one class from the others; and one − against − one, where k(k−1) 2 trained and each one separates a pair of classes. It is important to note that as one-against-one works with less number samples, it has more freedom to find a boundary that separates both classes. The training cost of one-versus-all is better than one-against-one as it has to train only k SVM. The testing cost in both strategies is similar as one-versus-all needs k evaluations and one-against-one k − 1.
4
System Description
Our SVM-based QC system uses the same learning features for all the languages tested. Some details about system training and evaluation are described in next subsections, as the corpora and the vectors of features employed in the task. 4.1
Corpus
When this research began, we realized that there were no free parallel and large enough corpora of questions that fitted our needs to train a machine learning system. Thus we decided to develop our own corpus. We collected 2393 questions
A Multilingual SVM-Based Question Classification System
809
Table 1. Number of instances per class Class Examples PROPER_NAME 362 ORGANIZATION 89 LOCATION 411 FACILITY 58 PRODUCT 131 DISEASE 9 EVENT 7 TITLE 0 LANGUAGE 7 RELIGION 2 NATURAL_OBJECT 73 COLOR 16 TIME_TOP 324 NUMEX 333 DEFINITION 563 ACRONYM 8 TOTAL 2393
from the TREC1 QA track 1999 to 2003 in English. This set of questions was annotated with our own classification, based on the entity hierarchy described by Sekine [15]. To build the Spanish corpus we used the translations made by the UNED2 Natural Language Processing and Information Retrieval Group3 from TREC 1999 to 2002. We translated TREC QA 2003 questions and, in order to have a uniform translation, we reviewed translated questions from previous competitions. As a result we got a parallel corpus of 2393 questions in English and Spanish annotated using our own classification. Our type hierarchy has three levels of annotation, beginning with a first coarse level till the third and finest one. Since there were not enough samples for some fine-grained classes, only first level types were used in the experiments. This level consists of 16 classes. Table 1 shows the classification and the number of examples pertaining to each class in the corpus. 4.2
Feature Vector
In the SVM method, every instance of the corpus is transformed into a so-called feature vector, an array of values representing the linguistic properties of the example and the class it belongs to. As mentioned in previous sections, our main goal is to obtain a language and domain independent system. Therefore, only surface text features are used to define the feature vector. 1 2 3
Text REtrieval Conference, http://trec.nist.gov Universidad Nacional de Educación a Distancia, http://www.uned.es http://nlp.uned.es
810
E. Bisbal et al.
Questions were pre-processed to detect the first feature of our feature vector: the wh-word. Obviously, when dealing with an imperative question, this feature value is void. In addition, the three words following the wh-word that are not stopwords4 were used to build unigrams and bigrams by means of combinations between them: w1 , w2 , w3 , w12 , w13 , and w23 . An additional feature was added in order to improve the representation of long questions: the number of words (non-stopwords) that appeared after the wh-word. This feature is very useful for discriminating “who”-questions. These questions may belong to both PROPER_NAME and DEFINITION classes. For instance, “Who is the author of ’the divine comedy’ ?” must be classified as PROPER_NAME, but “Who is Marlon Brando?” must belong to DEFINITION; “who”-questions that belong to DEFINITION are usually short questions, formed only by the question word and one or two additional words.
5
Experiments
Several experiments have been done to test the QC system. First group of experiments were carried out in order to evaluate the impact on accuracy when using the additional feature that represents the number of non-stopwords words in the question. We have also tested the difference between using words or stems5 , looking for a larger generalization. Both English and Spanish experiments were carried out over the corpus described in section 4.1 using a 10-fold cross-validation. The main problem with this corpus is that for some classes there are less than 50 samples, which seems not large enough to train a machine learning application. Therefore we collected all these classes (DISEASE, EVENT, TITLE, LANGUAGE, RELIGION, COLOR, ACRONYM) in a more general one, called MIXED, and made the same experiments, this time with 10 classes instead of 16. Finally, an additional experiment was carried out using the corpus of the Cognitive Computation Group6 [11]. This experiment tried to test the flexibility of the system using another corpus and a different set of question types. This corpus has 5442 training questions and 500 for testing purpose in English that were annotated with 6 different question classes. The results obtained with this corpus allow the comparison between our approach and the CCG system that relies in more complex linguistic information. For all these experiments we used the SVM implementation of WEKA [16], a set of machine learning tools written in Java. This tool uses one-against-one technique to solve multi-class problems. The optimization algorithm implemented to train SVM is the Platt’s sequential minimal optimization algorithm [17]. After many experiments, we decided that the best kernel to use (the one that pro4 5 6
Words (typically articles or prepositions) which frequency in corpus is too high and poorly informative to be used in indexing or even in training processes. A stem is the base part of the word including derivational affixes but not inflectional morphemes, i. e. the part of the word that remains unchanged through inflection. http://l2r.cs.uiuc.edu/~cogcomp/
A Multilingual SVM-Based Question Classification System
811
duces best results and takes less time to train) was the lineal kernel, with the C parameter set to 1. Table 2 shows a summary of the results of the experiments described above. QA-R2D2 refers to our own corpus, while CCG is the corpus of the Cognitive Computation Group. Third column describes the number of classes experiments have been developed with: 16 in the original corpus, 10 when classes with less than 50 samples were unified in MIXED and 6 for the CCG corpus. Fifth column shows whether stems were used in the feature vector or not, and the last two columns show the precision with the feature vectors described in section 4.2: feature-1 does not include the number of non-stopwords in the question whereas feature-2 refers to experiments where such feature was used. This table shows only precision values because the system assigns a class for all the questions (100% coverage). 5.1
Discussion
The use of stems seems not to be decisive as the results fluctuate between little gains and losses depending on the experiment. With respect to the set of classes, the experiments using only 10 classes does not perform better than experiments with 16. We think this behavior is due to the fact that MIXED class is a too heterogeneous group of questions from the point of view of their respective syntactic and semantic characteristics. This way, the expected improvement was overran by the noise introduced. On the other hand, the experiments with the CCG corpus were remarkably better. This behavior was not surprising for a machine learning system because of the higher number of training instances (5542 against the 2393 of QA-R2D2), whereas the number of target classes was smaller (6 against 16). If we compare our best results with CCG corpus, 87%, with the results obtained by [11], 91%, there isn’t a great difference, taking into account that this other system uses deep linguistic information, syntactic parsing and semantic analysis, what makes the Table 2. Precision values for experiments on Spanish and English, corpora, and sets of features Corpus
Test type Classes Language stem feature-1 Precision feature-2 Precision Yes 79.44% 81.11% English No 79.36% 80.82% 16 Yes 80.32% 81.91% Spanish No 80.32% 81.91% QA-R2D2 10-fold cv Yes 79.31% 80.90% English No 79.19% 80.48% 10 Yes 80.36% 81.61% Spanish No 80.11% 81.70% Yes 85.40% 86.00% CCG train/test 6 English No 85.40% 87.00%
812
E. Bisbal et al. Table 3. Results for Spanish (16 classes + No stem) Precision 0.79 0.766 0.867 0.719 0.824 0.714 0 0 0.75 0 0.729 1 0.967 0.914 0.711 1
Recall F-Measure Class 0.854 0.821 PROPER_NAME 0.551 0.641 ORGANIZATION 0.871 0.869 LOCATION 0.397 0.511 FACILITY 0.573 0.676 PRODUCT 0.556 0.625 DISEASE 0 0 EVENT 0 0 TITLE 0.857 0.8 LANGUAGE 0 0 RELIGION 0.479 0.579 NATURAL_OBJECT 1 1 COLOR 0.895 0.929 TIME_TOP 0.898 0.906 NUMEX 0.876 0.785 DEFINITION 0.25 0.4 ACRONYM
Table 4. Results for English (16 classes + No stem) Precision 0.791 0.882 0.865 0.552 0.679 0.5 0 0 0.857 0 0.583 0.933 0.971 0.879 0.714 1
Recall F-Measure Class 0.826 0.808 PROPER_NAME 0.506 0.643 ORGANIZATION 0.905 0.885 LOCATION 0.276 0.368 FACILITY 0.58 0.626 PRODUCT 0.222 0.308 DISEASE 0 0 EVENT 0 0 TITLE 0.857 0.857 LANGUAGE 0 0 RELIGION 0.384 0.463 NATURAL_OBJECT 0.875 0.903 COLOR 0.926 0.948 TIME_TOP 0.874 0.877 NUMEX 0.856 0.779 DEFINITION 0.375 0.545 ACRONYM
system largely language dependent. On the contrary, obtained by our system for both English and Spanish are very similar. This fact demonstrates that our approach can manage with different languages with a similar performance. In order to study the results in more detail, we selected the experiments with 16 classes and no stemming. Tables 3 and 4 show precision, recall and F-Measure for each class. For better understanding, we must also refer to table 1. This table shows that there are no instances for TITLE class in the training corpus, and
A Multilingual SVM-Based Question Classification System
813
Table 5. Confusion matrix for Spanish (16 classes + No stem) a b 3095 18 49 3 2 7 0 19 4 1 0 1 1 0 0 0 0 0 0 4 0 0 0 3 0 1 0 25 3 0 0
c d 2 0 4 0 3588 10 23 4 0 0 0 0 0 0 0 0 0 2 0 5 0 0 0 7 0 5 0 15 1 1 0
e 5 2 0 2 75 0 2 0 0 0 0 0 0 0 5 0
f 0 0 0 0 0 5 0 0 0 0 0 0 0 0 2 0
g 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
h 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
i 0 0 1 0 0 0 0 0 6 0 0 0 0 0 1 0
j 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
k 2 0 1 0 1 0 0 0 0 0 35 0 0 0 9 0
l 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 0
m n o p 0 0 39 0 0 0 16 0 0 8 30 0 1 0 15 0 0 2 26 0 0 0 3 0 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 28 0 0 0 0 0 29013 11 0 5 29923 0 4 4 4930 0 0 5 2
← classified as a = PROPER_NAME b = ORGANIZATION c = LOCATION d = FACILITY e = PRODUCT f = DISEASE g = EVENT h = TITLE i = LANGUAGE j = RELIGION k = NATURAL_OBJECT l = COLOR m = TIME_TOP n = NUMEX o = DEFINITION p = ACRONYM
Table 6. Confusion matrix for English (16 classes + No stem) a b 2993 21 45 3 0 9 0 12 1 1 0 1 0 0 0 0 0 0 0 4 0 0 0 3 0 2 0 22 2 1 0
c d 5 1 3 3 3726 14 16 1 1 0 0 2 0 0 0 0 0 1 0 12 0 0 0 1 0 8 2 11 0 0 0
e 11 4 1 4 76 1 0 0 1 0 1 0 0 0 13 0
f 0 0 0 0 1 2 0 0 0 0 0 0 0 0 1 0
g 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
h 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
i 0 0 0 0 0 0 0 0 6 0 0 0 0 0 1 0
j 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
k 0 0 4 1 1 0 0 0 0 0 28 1 1 0 12 0
l 1 0 0 0 0 0 0 0 0 0 0 14 0 0 0 0
m n o p 0 2 40 0 0 0 13 0 0 6 19 0 0 0 14 0 0 1 37 0 0 0 5 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 3 25 0 0 0 1 0 30013 6 0 6 29124 0 3 15 4820 0 0 4 3
← classified as a = PROPER_NAME b = ORGANIZATION c = LOCATION d = FACILITY e = PRODUCT f = DISEASE g = EVENT h = TITLE i = LANGUAGE j = RELIGION k = NATURAL_OBJECT l = COLOR m = TIME_TOP n = NUMEX o = DEFINITION p = ACRONYM
consequently its F-Measure is 0. DISEASE, EVENT, LANGUAGE, RELIGION, COLOR, and ACRONYM have between 2 and 16 instances, so their figures are difficult to evaluate, probably not being statistically relevant. The system works quite well for DISEASE, LANGUAGE, and COLOR class, mainly because these kinds of questions include always specific words. For example, questions about colors always include the word “color” as in “What primary colors do you mix to make orange?”, or “What language is mostly spoken in
814
E. Bisbal et al.
Brazil?” (for LANGUAGE class). The performance of DISEASE class decreases since there are many different ways to ask about diseases without using the word “disease” itself. For instance: “What is the most common cancer?”. Again, there are no great differences between English and Spanish results. Finally, tables 5 and 6 show the confusion matrixes for Spanish and English respectively. The higher confusion is produced between DEFINITION class and the other classes. We think this is due to the fact that we annotated questions as DEFINITION when they expected a long answer so that these questions have very different query forms and do not present a clear uniform pattern.
6
Conclusions
In this paper, a multilingual SVM-based question classification system has been presented. Question classification is one of the most important modules in a question answering system. As SVM is a machine learning method based on features, their selection is a critical issue. Opposite to other QC systems, we chose to only use surface text features in order to facilitate language and domain independency. Specifically, both English and Spanish results are not statistically different, while the overall accuracy of the system proves it to be competitive enough if compared with systems using more complex linguistic data. Thinking of future developments, in order to improve our system we are going to collect a higher number of training samples and we are going to redefine the set of classes. As we want to test our system on other languages, new corpora will be acquired.
References 1. Salton, G., McGill, M.J.: Introduction to Modern Information Retrieval. McGrawHill, Inc. (1986) 2. Moldovan, D.I., Harabagiu, S.M., Girju, R., Morarescu, P., Lacatusu, V.F., Novischi, A., Badulescu, A., Bolohan, O.: Lcc tools for question answering. In: TREC. (2002) 3. Soubbotin, M.M., Soubbotin, S.M.: Use of patterns for detection of likely answer strings: A systematic approach. In: TREC. (2002) 4. Yang, H., Chua, T.S.: The integration of lexical knowledge and external resources for question answering. In: TREC. (2002) 5. Magnini, B., Negri, M., Prevete, R., Tanev, H.: Mining knowledge from repeated co-occurrences: Diogene attrec 2002. In: TREC. (2002) 6. Moldovan, D.I., Pasca, M., Harabagiu, S.M., Surdeanu, M.: Performance issues and error analysis in an open-domain question answering system. ACM Trans. Inf. Syst. 21 (2003) 133–154 7. Voorhees, E.M.: The trec-8 question answering track report. In: TREC. (1999) 8. Voorhees, E.M.: Overview of the trec-9 question answering track. In: TREC. (2000) 9. Voorhees, E.M.: Overview of trec 2001. In: TREC. (2001) 10. Hermjakob, U.: Parsing and question classification for question answering. In: Proceedings of the ACL 2001 Workshop on Open-Domain Question Answering. (2001) 17–22
A Multilingual SVM-Based Question Classification System
815
11. Li, X., Roth, D.: Learning question classifiers. In: COLING. (2002) 12. Hacioglu, K., Ward, W.: Question classification with support vector machines and error correcting codes. In: HLT-NAACL. (2003) 13. Boser, B.E., Guyon, I., Vapnik, V.: A training algorithm for optimal margin classifiers. In: Computational Learing Theory. (1992) 144–152 14. Cortes, C., Vapnik, V.: Support-vector networks. Machine Learning 20 (1995) 273–297 15. Sekine, S., Sudo, K., Nobata, C.: Extended named entity hierarchy. In: Proceedings of the Language Resource and Evaluation Conference (LREC). (2002) 16. Witten, I.H., Frank, E.: Data mining: practical machine learning tools and techniques with Java implementations. Morgan Kaufmann Publishers Inc. (2000) 17. Platt, J.C.: Fast training of support vector machines using sequential minimal optimization. (1999) 185–208
Language Independent Passage Retrieval for Question Answering José Manuel Gómez-Soriano1, Manuel Montes-y-Gómez2, Emilio Sanchis-Arnal1, Luis Villaseñor-Pineda2, and Paolo Rosso1 1 Polytechnic University of Valencia, Spain {jogomez,esanchis,prosso}@dsic.upv.es 2 National Institute of Astrophysics, Optics and Electronics, Mexico {mmontesg, villasen}@inaoep.mx
Abstract. Passage Retrieval (PR) is typically used as the first step in current Question Answering (QA) systems. Most methods are based on the vector space model allowing the finding of relevant passages for general user needs, but failing on selecting pertinent passages for specific user questions. This paper describes a simple PR method specially suited for the QA task. This method considers the structure of the question, favoring the passages that contain the longer n-gram structures from the question. Experimental results of this method on Spanish, French and Italian show that this approach can be useful for multilingual question answering systems.
1 Introduction The volume of online available information is growing every day. Complex information retrieval (IR) methods are required to achieve the needed information. QA systems are IR applications whose aim is to obtain specific answers for natural language user questions. Passage Retrieval (PR) is typically used as the first step in current QA systems [1]. Most of these systems apply PR methods based on the classical IR vector space model [2, 3, 4, 5], allowing the finding of relevant passages for general user needs, but failing on selecting pertinent passages for specific user questions. These methods use the question keywords in order to find relevant passages. For instance, for the question “Who is the president of Mexico?”, they return a set of passages containing the words president and Mexico, but not necessarily a passage with the expected answer. In [6, 7] it is shown that standard IR engines (such as MG and Okapi) often fail to find the answer in the documents (or passages) when presented with natural language questions. On the contrary, PR approaches based on Natural Language Processing (NLP) produce results that are more accurate [9, 10, 11, 12]. However, these approaches are difficult to adapt to several languages or to multilingual tasks. Another common strategy for QA is to search the obviousness of the answer in the Web [13, 14, 15]. The idea is to run the user question into a Web search engine (usually Google) with the expectation to get a passage –snippet– containing the same expression of the question or a similar one. The methods using this approach suppose that due to high redundancy of the Web, the answer is written in several different A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 816 – 823, 2005. © Springer-Verlag Berlin Heidelberg 2005
Language Independent Passage Retrieval for Question Answering
817
ways including the same form of the question. To increase the possibility to find relevant passages they make reformulations of the question, i.e., they move or delete terms to search other structures with the same question terms. For instance, they produce the reformulation “the president of Mexico is” for the question “Who is the president of Mexico?”. Thanks to the redundancy, it is possible to find a passage with the structure “the president of Mexico is Vicente Fox”'. [14] makes the reformulations carrying out a Part Of Speech analysis of the question and moving or deleting terms of specific morph-syntactic categories. Whereas [13] makes the reformulations without doing any linguistic analysis, but just considering certain assumptions about the function of the words, such as the first or second question term is a verb or an auxiliary verb. The problem of these methods is that not all possible reformulations of the question are considered. With these methods, it would be very costly to realize all possible reformulations, since the search engine must search for every reformulation. Our QAoriented PR system makes a better use of the document collection redundancy bearing in mind all possible reformulations of the question efficiently running the search engine with just one question. Later the system searches for all word sequences of the question in the returned passages and weights every passage according to the similarity with the question. The passages with the more and the greater question structures will obtain better similarity values. Moreover, given that our PR method does not involve any knowledge about the lexicon and the syntax of the specified language, it can be easily adapted to several different languages. It is simply based on the “superficial” matching between the question and the passages. As a result, it would work very well in any language with few differences between the question and the answer passages. In other words, it would be adequate for moderately inflected languages like English, Spanish, Italian and French, but not for agglutinative languages such as German, Japanese, and Nahuatl. This paper presents the basis of our PR system and demonstrates it language independence condition with some experiments on three different languages. It is organized as follows. The section 2 describes the general architecture of the system and the equations. The section 3 discusses the experimental results of the method on Spanish, French and Italian. Finally, the section 4 presents our preliminary conclusions.
2 Passage Retrieval System 2.1 Architecture The architecture of our PR system is shown in the figure 1. Given a user question, it is firstly transferred to the Search Engine module. The Search Engine finds the passages with the relevant terms (non-stopwords), using a classical IR technique based on the vector space model. This module returns all passages that contain some relevant terms, but since the n-gram extraction is computationally expensive, it is necessary to reduce the number of passages for the N-grams Extraction module. Therefore, we only take, typically, the first 1000 passages (previous experiments have demonstrated that this is an appropriated number since it covers, in most of the cases, the whole set of relevant passages).
818
J.M. Gómez-Soriano et al. User question
Question
Search Engine
User question
Ranked passages
N-grams extraction
N-grams extraction Passage n-grams
Question n-grams
N-grams comparison
Re-Ranked Passages
Fig. 1. Diagram of the PR system
Once the passages are obtain by the Search Engine module, the sets of unigrams, bigrams,..., n-grams are extracted from the passages and from the user question by means of the N-grams Extraction modules. In both cases, n is the number of question terms. Then, the N-grams Comparison module measures the similarity between the ngram sets of the passages and the user question in order to obtain the new weights for the passages. The weight of a passage is related to the lager n-gram structure of the question that can be found in the passage itself. The larger the n-gram structure, the greater the weight of the passage. Finally, the passages with the new weights are returned to the user. 2.2 Passage Ranking The similarity between a passage d and a question q is defined by (1).
¦ ¦ h(x, D ) n
sim(d , q ) =
j
j =1 ∀x∈Q j
¦ ¦ h(x, Q ) n
(1)
j
j =1 ∀x∈Q j
Where sim(d, q) is a function which measures the similarity of the set of n-grams of the question q with the set of n-grams of the passage d. Qj is the set of j-grams that are generated from the question q and Dj is the set of j-grams of the passage d to compare with. That is, Q1 will contain the question unigrams whereas D1 will contain the passage unigrams, Q2 and D2 will contain the question and passage bigrams respectively, and so on until Qn and Dn. The result of (1) is equal to 1 if the longest n-gram of the question is in the set of passage n-grams.
Language Independent Passage Retrieval for Question Answering
819
The function h(x, Dj) measures the relevance of the j-gram x with respect to the set of passage j-grams, whereas the function h(x, Qj) is a factor of normalization. The function h assigns a weight to every question n-gram as defined in (2). n ° wk h(x, D j ) = ®¦ k =1 °¯ 0
if x ∈ D j
(2)
otherwise
Where w1,w2,...,w|x| are the associated weights of the terms of the j-gram x. These weights give an incentive to those terms that appear rarely in the document collection. Moreover, the weights should also discriminate the relevant terms against those (e.g. stopwords) which often occur in the document collection. The weight of a term is calculated by (3): wk = 1 −
log(nk ) 1 + log( N )
(3)
Where nk is the number of passages in which appears the term associated to the weight wk and N is the total number of passages in the collection. We assume that the stopwords occur in every passage (i.e., nk takes the value of N). For instance, if the term appears once in the passage collection, its weight will be equal to 1 (the maximum weight), whereas if the term is a stopword, then its weight will be the lowest. 2.3 Example Assume that the user question is “Who is the president of Mexico?” and that we obtain two passages with the following texts: “Vicente Fox is the president of Mexico…” (p1) and “The president of Spain visited Mexico in last February…” (p2). If we split the original question into five sets of n-grams (5 is the number of question terms without the question word Who) we obtain the following sets: 5-gram: ''is the President of Mexico''. 4-gram: ''is the President of'', ''the President of Mexico''. 3-gram: ''is the President'', ''the President of'', ''President of Mexico''. 2-gram: ''is the'', ''the President'', ''President of'', ''of Mexico''. 1-gram: ''is'', ''the'', ''President'', ''of'', ''Mexico''. Next, we obtain the five sets of n-grams from the two passages. The passage p1 contains all the n-grams of the question (the one 5-gram, the two 4-grams, the three 3grams, the four 2-grams and the five 1-grams of the question). If we calculate the similarity of the question with this passage, we obtain a similarity of 1. The sets of n-grams of the passage p2 contain only the “the President of” 3-gram, the “the President”' and “President of” 2-grams and the following 1-grams: “the”, “President”, “of” and “Mexico”. If we calculate (1) for this passage, we obtain a similarity of 0.29, a lower value than for p1 because the second passage is very different with respect to the original question, although it contains all the relevant terms of the question.
820
J.M. Gómez-Soriano et al.
3 Experimental Results This section presents some experimental results on three different languages: Spanish, Italian and French. The experiments were carried out using the CLEF-20041 data set. This data set contains a corpus of news documents for each language as well as a list of several questions and their corresponding answers. Table 1 shows some numbers from the document corpora. Table 1. Corpora statistics
Spanish Italian French
# documents 454,045 157,588 129,806
# sentences 5,636,945 2,282,904 2,069,012
# words 151,533,838 49,343,596 45,057,929
For the experiments detailed in this section, we considered only the subset of factual questions (the questions having a named entity, date or quantity for answer) stated on the Multi-Eight CLEF04 question set having an answer in the Spanish, Italian or French document corpora. For the evaluation we used a metric know as coverage (for more details see [7]). Let Q be the question set, D the passage collection, AD,q the subset of D containing correct answers to q∈Q, and RD,q,n be the top n ranked documents in D retrieved by the search engine given a question q. The coverage of the search engine for a question set Q and a document collection D at rank n is defined as: COVERAGE(Q, D, n ) ≡
{q ∈ Q R
D ,q ,n
}
∩ AD,q ≠ 0
Q
(4)
Coverage gives the proportion of the question set for which a correct answer can be found within the top n documents retrieved for each question. The figure 2 shows the coverage results on Spanish. It compares our n-gram model against the vector space model. From the figure, it is possible to appreciate the improvement of our model with respect to the classical vector model. This improvement was slightly greater for passages of one sentence, but it was also noticed when using passages of three sentences. We can also observe that the bigger the size of the passage, the greater the resultant coverage. We believe this situation is produced by some anaphoric phenomena. It indicates that the answer is not always located in the sentence containing the n-grams of the question, but in the previous or following sentences. However, even when the bigger passages produce better coverage results, the small passages are preferred. This is because the complexity of the answer extraction (next module in the QA process) increases when dealing with bigger passages.
1
The Cross-Language Evaluation Forum; http://clef.iei.pi.cnr.it/
Language Independent Passage Retrieval for Question Answering
821
0.7 0.6
COVER AGE
0.5 0.4 0.3 0.2 0.1 0 1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19 20 # Passages
N-gram Model; 1 sentence
Vector Space Model; 1 sentence
N-gram Model; 3 sentences
Vector Space Model; 3 sentences
Fig. 2. Comparison against the vector space model
The figure 3 shows the coverage results on Spanish, Italian and French. These results were obtained considering passages of three sentences. It is important to notice that our n-gram PR model is very stable on the three different languages. In all the cases, the coverage was superior to 60% for the first twenty passages. The small differences favoring the Spanish experiment could be produced because of the size, and the possible redundancy, of the collection (see table 1).
0.7 0.6
COVERAGE
0.5 0.4 0.3 0.2 0.1 0 1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 # passages
Spanish
Italian
French
Fig. 3. Coverage on Spanish, Italian and French
Another important characteristic of our model is the high redundancy of the correct answers. The figure 4 indicates that the correct answer occurs in average four times
822
J.M. Gómez-Soriano et al.
among the top twenty passages. This finding is very important since it makes our system suitable for those current answer extraction methods based on statistical approaches [4, 13, 14, 16, 3, 5, 17].
6
REDUNDANCY
5 4 3 2 1 0 1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 # passages
Spanish
Italian
French
Fig. 4. Redundancy on Spanish, Italian and French
4 Conclusions Passage Retrieval (PR) is commonly used as the first step in current QA systems. In this paper, we have proposed a new PR model based on statistical n-gram matching. This model, which allowed us to obtain passages that contain the answer for a given question, outperforms the classic vector space model for passage retrieval, giving a higher coverage with a high redundancy (i.e., the correct answer was found more than once in the returned passages). Moreover, this PR model does not make use of any linguistic information and thus it is almost language independent. The experimental results on Spanish, Italian and French confirm this feature and show that the proposed model is stable for different languages. As a future work we plan to study the influence of the size and redundancy of the document collection on the coverage results. Our intuition is that the proposed model is more adequate for very large document collections. In addition, we consider that this model should allow to tackle the problem of the Multilingual QA since it will be able to distinguish what translations are better looking for their n-gram structure in the corpus, and it will discriminate the bad translations as it is very unlikely that they appear. Our further interest is to proof the above assumption using as input several automatic translations and merging the returned passages. Those passages obtained with bad translations will have less weight than those that correspond to the correct ones.
Language Independent Passage Retrieval for Question Answering
823
Acknowledgements We would like to thank CONACyT for partially supporting this work under the grant 43990A-1 as well as R2D2 CICYT (TIC2003-07158-C04-03) and ICT EU-India (ALA/95/23/2003/077-054) research projects.
References 1. Corrada-Emanuel, A., Croft, B., Murdock, V.: Answer passage retrieval for question answering. Technical Report, Center for Intelligent Information Retrieval (2003). 2. Magnini, B., Negri, M., Prevete, R., Tanev, H.: Multilingual question/answering the DIOGENE system. In: 10th Text Retrieval Conference (2001). 3. Aunimo, L., Kuuskoski, R., Makkonen, J.: Cross-language question answering at the University of Helsinki. In: Workshop of the Cross-Lingual Evaluation Forum (CLEF 2004), Bath, UK (2004). 4. Vicedo, J.L., Izquierdo, R., Llopis, F., Muñoz, R.: Question answering in Spanish. In: Workshop of the Cross-Lingual Evaluation Forum (CLEF 2003), Trondheim, Norway (2003). 5. Neumann, G., Sacaleanu, B.: Experiments on robust nl question interpretation and multilayered document annotation for cross-language question/answering system. In: Workshop of the Cross-Lingual Evaluation Forum (CLEF 2004), Bath, UK (2004). 6. Hovy, E., Gerber, L., Hermjakob, U., Junk, M., Lin, C.: Question answering in webclopedia. In: Ninth Text Retrieval Conference (2000). 7. Roberts, I., Gaizauskas, R.J.: Data-intensive question answering. In: ECIR. Lecture Notes in Computer Science, Vol. 2997, Springer (2004). 8. Gaizauskas, R., Greenwood, M.A., Hepple, M., Roberts, I., Saggion, H., Sargaison, M.: The university of Sheffield´s TREC 2003 Q&A experiments. In: The 12th Text Retrieval Conference (2003). 9. Greenwood, M.A.: Using pertainyms to improve passage retrieval for questions requesting information about a location. In: SIGIR (2004). 10. Ahn, R., Alex, B., Bos, J., Dalmas, T., Leidner, J.L., Smillie, M.B.: Cross-Lingual question answering with QED. In: Workshop of the Cross-Lingual Evaluation Forum (CLEF 2004), Bath, UK (2004). 11. Hess, M.: The 1996 international conference on tools with artificial intelligence (tai´96). In SIGIR (1996). 12. Liu, X., Croft, W.: Passage retrieval based on language models (2002). 13. Del-Castillo-Escobedo, A., Montes-y-Gómez, M., Villaseñor-Pineda, L.: QA on the Web: a preliminary study for spanish language. In: Proceedings of the fifth Mexican International Conference in Computer Science (ENC´04), Colima, Mexico (2004). 14. Brill, E., Lin, J., Banko, M., Dumais, S.T., Ng, A.Y.: Data-intensive question answering. In: 10th Text Retrieval Conference (2001). 15. Buchholz, S.: Using grammatical relations, answer frequencies and the world wild web for trec question answering. In: 10th Text Retrieval Conference (2001). 16. Brill, E., Dumais, S., Banko, M.: An analysis of the askmsr question answering system (2002). 17. Costa, L.: First evaluation of esfinge: a question answering system for Portuguese. In: Workshop of the Cross-Lingual Evaluation Forum (CLEF 2004), Bath, UK (2004).
A New PU Learning Algorithm for Text Classification Hailong Yu, Wanli Zuo, and Tao Peng College of Computer Science and Technology, Jilin University, Key Laboratory of Symbol Computation and Knowledge Engineering of the Ministry of Education, Changchun 130012, China [email protected]
Abstract. This paper studies the problem of building text classifiers using positive and unlabeled examples. The primary challenge of this problem as compared with classical text classification problem is that no labeled negative documents are available in the training example set. We call this problem PUOriented text Classification. Our text classifier adopts traditional two-step approach by making use of both positive and unlabeled examples. In the first step, we improved the 1-DNF algorithm by identifying much more reliable negative documents with very low error rate. In the second step, we build a set of classifiers by iteratively applying SVM algorithm on training data set, which is augmented during iteration. Different from previous PU-oriented text classification works, we adopt the weighted vote of all classifiers generated in the iteration steps to construct the final classifier instead of choosing one of the classifiers as the final classifier. Experimental results on the Reuter data set show that our method increases the performance (F1-measure) of classifier by 1.734 percent compared with PEBL.
1 Introduction Text classification is the process of assigning predefined category labels to new documents based on the classifier learnt from training examples. In traditional classification, training examples are labeled with the same set of pre-defined category or class labels and labeling is often done manually. That is, the training examples set is composed of labeled positive examples set and negative examples set. In recent year, A number of statistical classification and machine learning techniques has been applied to text categorization, including regression models [1], nearest neighbor classifiers [2], decision tree [3], Bayesian classifiers [3], support vector machines [4], rule learning algorithm [5], voted classification [6], neural networks [7], etc. The main problem with traditional approach is that a large number of labeled training examples are needed for accurate learning. Since labeling typically done manually, it is labor intensive and time consuming. Collecting negative training examples is especially delicate and arduous because (1) negative training examples must uniformly represent the universal set excluding the positive class, and (2) manually collected negative training examples could be biased because of human’s unintentional prejudice, which could be detrimental to classification accuracy. In recent years, researchers investigated the idea of using a small-labeled set of positive class and a A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 824 – 832, 2005. © Springer-Verlag Berlin Heidelberg 2005
A New PU Learning Algorithm for Text Classification
825
large unlabeled set to help learning, and this is referred as PU-Oriented text classification. It will reduce the manual labeling effort. PU-oriented classification founds its application in topic-oriented crawling or focused crawling, where a topic-specific classifier is required to automatically identify whether the retrieved web page belongs the specific category during the crawling process. Instead of collecting negative example set for each specific domain, it is more desirable to construct a universal unlabeled example set for building any topicspecific classifiers due to the scale and diversity of negative examples.
2 Related Works A theoretical study of Probably Approximately Correct (PAC) learning from positive and unlabeled examples was done in (Denis, 1998) [8]. The study concentrates on the computational complexity of learning and shows that function classes learnable under the statistical queries model (Kearns, 1998) is also learnable from positive and unlabeled examples. And then Denis does experiments by using k-DNF and decision trees to learn from positive and unlabeled data [9], [10]. (Bing Liu, 2002) presents sample complexity results for learning by maximizing the number of unlabeled examples labeled as negative while constraining the classifier to label all the positive examples correctly, and Bing Liu presents S-EM algorithm [11] (identifying a set of reliable negative documents by using a Spy technique and Building a set of classifiers by iteratively applying Expectation Maximization (EM) algorithm with a NB classifier) and Roc-SVM algorithm [12] (identifying a set of reliable negative documents by using a Rocchio algorithm and Building a set of classifiers by iteratively applying SVM algorithm) to learn from positive and unlabeled examples. (Bing Liu, 2003) summarize the usual method for solving the PU-oriented text classification [13]. Jiawei Han presents an algorithm called PEBL [14] that achieves classification accuracy (with positive and unlabeled data) as high as that of traditional SVM (with positive and negative data). The PEBL algorithm uses the 1-DNF algorithm to identify a set of reliable negative documents and builds a set of classifiers by iteratively applying SVM algorithm. Besides maximizing the number of unlabeled examples labeled as negative, other methods for learning from positive and unlabeled examples are possible. (Denis, 2002) presents a NB based method [15] (called PNB) that tries to statistically remove the effect of positive data in the unlabeled set. The main shortcoming of the method is that it requires the user to give the positive class probability, which is hard for the user to provide in practice. It is also possible to discard the unlabeled data and learn only from the positive data. This was done in the one-class SVM [16], which tries to learn the support of the positive distribution. We implement the one-class SVM. Through experiments, we show that its performance is poorer than learning methods that take advantage of the unlabeled data.
3 Our Methods We constructed the text classifier by adopting the traditional two steps: First, identify a set of reliable negative documents from the unlabeled set by using our improved 1-
826
H. Yu, W. Zuo, and T. Peng
DNF algorithm. Second, build a set of classifiers by iteratively applying the SVM algorithm, and then construct the final text classifier by using the weighted voting method. For identifying the reliable negative documents from the unlabeled examples set, we must identify the characteristics of the negative documents. For example, if the frequency of a feature occurring in the positive examples set is larger than 90% and smaller than 10% in the unlabeled examples set, then this feature can be regarded as positive. By using this method, we can obtain a positive feature set PF. If some documents in the unlabeled examples set do not contain any features in the positive feature set PF, these documents can be regarded as reliable negative examples. For describing expediently, we define the following notation: let P be the positive examples set, and U be the unlabeled examples set, and NEG0 the reliable negative documents set produced by our improved 1-DNF algorithm, and NEGi (i≥1) be the negative documents set produced by the ith iteration of the SVM algorithm, and PON be the training document set used by each SVM algorithm. Now we describe the process of the constructing our classifier. In 1-DNF algorithm [14], positive feature is defined as the feature with occurring frequency in P larger than in U. We found that this definition has obvious shortcoming: it only considers the diversity of feature occurring frequency in P and U, and does not consider the absolute frequency of the feature in P. For example, the appearing rate of some feature is 1% in the positive data set and 0.5 in the unlabeled data set, this feature is obviously not positive feature. But if we use the 1-DNF algorithm to identify negative data, this feature will be regard as positive. The result is that the number of features in the PF may be much larger. So the number of documents in NEG0 identified by 1-DNF algorithm is very less. In the extreme case, set NEG0 may be empty. This is very disadvantageous to the iterative algorithm of the second step (Because the deviation in begin of the iterative algorithm, it will be likely to deviate more and more far). Based on the above observation, we improved the 1-DNF algorithm by considering both the diversity of the feature frequency in P and U and the absolute frequency of the feature in P. Definition 1. A feature is regarded as positive only when it satisfies the following conditions: 1. The frequency of the feature occurring in the positive data set is greater than the frequency of the feature occurring in the unlabeled data set; 2. The absolute frequency of the feature in the positive data set is greater than λ % , where λ % will be fixed through experiments.
Our improved 1-DNF algorithm can be depicted as follows, where |P| is the number of the document in the positive set P, |U| is the number of the documents in the unlabeled set U, and freq (xi, P) is the number of feature xi occurring in the positive set P, freq (xi, U)is the number of feature xi occurring in the unlabeled set U. We use our improved 1-DNF algorithm to identify the reliable negative set NEG0. Through experiments, we prove that the number of reliable negative documents obtained by using the improved algorithm is much lager than that obtained by using the original 1DNF algorithm.
A New PU Learning Algorithm for Text Classification
827
Algorithm for identifying a set of reliable negative documents by using improved 1-DNF
algorithm Improved 1-DNF Assume the word feature set be {x1,x2,...,xn},xi U ∪ P; PF = NULL; for(i=1, ifreq(xi, U)/|U|&&freq(xi, P/|P|)> λ % ){ PF=PF ∪ {xi}; } RN=U; for( each document d U) { if( ∃ xj freq(xj, d) > 0 && xj PF ) { RN=RN – {d}; } }
Another distinction of our approach lies in the second step – constructing the final classifier. Unlike traditional approach where one specific classifier from the classifiers set generated during the iterative algorithm is designated as the final one, we make use of all of them to construct the final classifier based on voting method. Because we know nothing about the negative data in the PU problem, a new voting method is proposed. Through the improved 1-DNF algorithm, we obtain the reliable negative documents set NEG0. Now the training samples set PON = P NEG0, and the unlabeled samples set U = U - NEG0. We use SVM algorithm learnt from the training data set PON to construct the initial classifier SVM0, and use SVM0 to classify PP (let the precision be accuracy1) and U (let the classified negative documents be NEG1). The training example set is then augmented by adding NEG1 to PON, that is PON=P NEG1, and unlabeled sample set U=U-NEG1. We then use the training set PON to construct the second classifier SVM1. SVM1 is then used to classify PP (let the precision be accuracy2) and U (let the classified negative documents be NEG2). The training example set is then augmented by adding NEG2 to PON, that is PON=P NEG2, and the unlabeled set U=U-NEG2. This process iterates until no documents in U are classified as negative. Then we use the precision of each individual classifier to weight its corresponding classifier for constructing the final classifier. Algorithm for constructing the final classifier by using weighted voting method
algorithm voting_final_SVM PP = 10% * PP; P = P – PP; PON = P ∪ NEG0; U=U-NEG0; i = 0; allAccuracy = 0; while(true) { SVMi = SVM(PON); NEGi+1 = SVMi.classify(U); accuracyi = SVMi.predict(PP)’s precision; allAccuracy += accuracyi; if (NEGi+1==ĭ)
828
H. Yu, W. Zuo, and T. Peng
Break; PON = PON ∪ NEGi+1; U = U – NEGi+1; i =i+1; };
finalSVM =
n accuracyi SVMi ¦ i = 0 allAccuracy
4 Experiments and Results In our experiments we used Reuters 21578, which has 21578 documents collected from the Reuters newswire, as our training sample set. Of the 135 categories in Reuters 21578, only the most populous 10 are used. In data pre-processing, we applied stopword removal and tfc feature selection, and no stemming was conducted. Each category is employed as the positive class, and the rest as the negative class. For each dataset, 30% of the documents are randomly selected as test documents, and the rest (70%) are used to create training sets as follows: Ȗ percent of the documents from the positive class is first selected as the positive set P. The rest of the positive documents (1-Ȗ%) and negative documents are used as unlabeled set U. We range Ȗ percent from 10%-50% to create a wide range of scenarios. The experiments results showed in the paper are the average of different Ȗ%s. In our experiment we used LIBSVM (version 2.71), an integrated tool for support vector classification, which can be downloaded at http://www.csie.ntu.edu.tw/~cjlin/ libsvm/. We used the standard parameters of the SVM algorithm in one-class SVM classifier, PEBL classifier and our weighted voting classifier. We used the F1-measure to evaluate the performance of the classifiers, which is based on the effectiveness measure of recall and precision. recall =
Number of items of category identified . Number of category members in test set
precision=
Number of items of category identified . Total items assigned to category
(1)
(2)
Van Rijsbergen(1979) defined the F1-measure as a combination of recall(R) and precision(P) with an equal weight in the following form: F1(R,P) 2RP/(R+P). In the experiments, we implemented the PEBL algorithm, one-class SVM algorithm and our weighted voting classifier and compared their performance. In the step of identifying reliable negative documents from the unlabeled set U by improved 1DNF algorithm, we ranged λ % from 10%-90%, and selected λ which results in best performance as the final value. At first, we compared the improved 1-DNF algorithm with the 1-DNF algorithm in the number of identifying reliable negative data and the error rate. Let SN be the number of the reliable negative data, the ERR(%) is calculated as follows:
A New PU Learning Algorithm for Text Classification
ERR(%) =
829
Number of the positive data in the strong negative data set . Number of all positive data mixed in the unlabeled data set
(3)
Table 1 only gives the result when λ % 20%, for which the performance of the final classifier is best. The increase of the number of strong negative data is significant, as shown in Fig. 1. Table 1. The number of reliable negative documents and error rate
Improved 1-DNF 1-DNF
Improved 1-DNF 1-DNF
SN ERR(%) SN ERR(%) SN ERR(%) SN ERR(%)
Acq 1003.8 2.52 161.0 0.00 Interest 2185.2 2.88 299.0 0.00
Corn 343.0 0.00 203.4 0.00 Money 2087.2 2.67 269.6 0.00
Crude 1189.6 0.63 116.6 0.00 Ship 2128.2 2.28 324.4 0.33
Earn 1200.4 0.66 269.6 0.02 Trade 1034.2 0.44 70.8 0.00
Grain 1570.4 0.91 128.0 0.00 Wheat 1791.0 0.00 200.2 0.00
Reliable negative data
2500 2000 1500 1000 500 0 Acq
Corn
Crude
Earn
Grain
Interest
Money
Ship
Training category
Trade
Wheat
improved 1-DNF 1-DNF
Fig. 1. Number of RN data Gained by Improving 1-DNF
From above, we know that the number of the reliable negative data identified by the improved 1-DNF algorithm is much greater than that identified by the original 1DNF. Computing the average of reliable negative data of the 10 categories, we found that the number of reliable negative data identified by the improved 1-DNF algorithm is 7.6 times greater than that identified by the original 1-DNF. At the same time, the error rate of classifying the positive data as negative is 2%, indicating that the improved 1-DNF algorithm can identify many reliable negative data with low error rate.
830
H. Yu, W. Zuo, and T. Peng
The test results of the performance of the WVC (Weighted Voting Classifier), PEBL, one-class SVM (OCS) are shown in table 2 and Fig. 2, where column ALL denotes the average of the corresponding row. We observed that the performance of our WVC is best and its F1-measure is higher than PEBL by 1.734 percent. The performance of OCS is worst with its F1-measure lower than 22.7% and 20.9% respectively compared with WVC and PEBL. We prove that the performance of the classifier constructed only using the positive set is poorer than that takes advantage of the unlabeled data. Table 2. Average F1 of WVC, PEBL and OCS
WVC PEBL OCS WVC PEBL OCS
Acq 0.9648 0.9538
Corn 0.7346 0.7214
Crude 0.8891 0.8564
Earn 0.9813 0.9799
Grain 0.9416 0.9083
0.7082 Interest 0.8528 0.8390 0.7131
0.4271 Money 0.8856 0.8686 0.7180
0.6766 Ship 0.8067 0.7749 0.422
0.914 Trade 0.8836 0.8633 0.6945
0.6641 Wheat 0.7971 0.7880 0.5210
ALL 0.87372 0.85538 0.64586
1
F1-measure
0.8 0.6 0.4 0.2 0 Acq
Corn
Crude
Earn
Grain
Interest
Money
Training category
Ship
Trade
Wheat
WVC PEBL OCS
Fig. 2. Performance of Different Algorithms
5 Conclusions and Feature Work This paper studied the PU-oriented text classification problem. A new algorithm based on modified 1-DNF and weighted voting method to solve PU classification
A New PU Learning Algorithm for Text Classification
831
problem in the text domain is proposed. Experimental results draw three important conclusions: First, the performance of the classifiers which discard unlabeled data set and learn only from positive data set (one-class SVM algorithm) is much poorer than the classifiers which take advantage of the unlabeled data set. Second, compared with 1-DNF algorithm, the improved 1-DNF can obtain more negative data with lower error rate. Third, applying the weighted voting method to the PU-oriented text classification can increase the performance of the classifier. But, there are several shortcomings in our weighted voting classifier: First, our final classifier is made up of some “small” classifiers, and the weight of these “small” classifiers is only valued by the precision of classifying part of the positive P (because we know nothing about the negative documents). Second, there are not many documents in the training set “Reuters 21578”, so the number of classifiers which constitute the final classifier is not very large, and the speed of the classifying is fast enough. But when used in web page classification where the number of classifiers may be very large, the speed of the classification system could be a problem. So how to select some classifiers of the classifiers set to construct the final classifier deserve further research. Third, it may be possible to improve our approach by using a continuous measure for classification instead of binary labels.
Acknowledgements This work is sponsored by the national Natural Science Foundation of China (NSFC) under grant number 60373099.
References 1. Y. Yang and J. P. Pedersen.: Feature selection in statistical learning of text categorization. In Proceedings of the Fourteenth International Conference on Machine Learning (1997), 412-420 2. E.S. Han, G. Karypis, and V. Kumar.: Text categorization using weight adjusted k-nearest neighbor classification, Computer Science Technical Report TR99-019 (1999) 3. D. Levis and M. Ringuette.: A comparison of two learning algorithms for text classification. In Third Annual Symposium on Document Analysis and Information Retrieval (1994) 81-93 4. C. Cortes and V. Vapnik.: Support vector networks, Machine learning (1995)volume 20, 273-297 5. W. J. Cohen and Y. Singer.: Context-sensitive learning methods for text categorization. In SIGIR’96: Proc. 19th Annual Int. ACM SIGIR Conf. on Research and Development in Information Retrieval (1996) 307-315 6. S. M. Weiss, C. Apte and F. J. Damerau.: Maximizing Text-Mining Performance. IEEE Intelligent Systems (1999) 2-8 7. E. Wiener, J. O. Pedersen and A. S. Weigend.: A neural network approach to topic spotting. In Processing of the Fourth Annual Symposium on Document Analysis and Information Retrieval (SDAIR) (1995) 22-34 8. F. Denis.: PAC learning from positive statistical queries. In Workshop on Algo-
rithmic Learning Theory (ALT) (1998)
832
H. Yu, W. Zuo, and T. Peng
9. F. Letouzey, F. Denis, and R. Gilleron.: Learning from positive and unlabeled examples. In Workshop on Algorithmic Learning Theory (ALT) (2000) 10. F. DeComite, F. Denis, and R. Gilleron.: Positive and unlabeled examples help learning. In Workshop on Algorithmic Learning Theory (ALT) (1999) 11. Bing Liu, Wee Sun Lee, Philip S. Yu, Xiaoli Li.: Partially supervised classification of text documents. The Nineteenth International Conference on Machine Learning (ICML) (2002) 384-397 12. Xiaoli Li, Bing Liu, Learning to classify text using positive and unlabeled data. The International Joint Conference on Artifical Intelligence (IJCAI) (2003) 13. Bing Liu, Yang Dai, Xiaoli Li, Wee Sun Lee, Philip S. Yu, Building Text Classifiers Using Positive and Unlabeled Examples. Proceedings of the Third IEEE International Conference on Data Mining (ICDM) (2003) 179-187 14. Hwanjo Yu, Jiawei Han, Kevin Chen-Chuan Chang, PEBL: Positive example based learning for Web page classification using SVM. The international conference on Knowledge Discovery and Data mining (KDD) (2002) 15. F. Denis, R. Gilleron, and M. Tommasi, Text classification from positive and unlabeled examples. Conference on Information Processing and Management of Uncertainty in Knowledge-Based Systems (IPMU) (2002) 16. Larry M. Manevitz, MalikYousef, One-Class SVMs for document classification. Journal of Machine Learning Research, volume 2 (2001) 139-154
A Domain Independent Natural Language Interface to Databases Capable of Processing Complex Queries Rodolfo A. Pazos Rangel1 , Joaqu´ın P´erez O.1 , Juan Javier Gonz´ alez B.2 , 3 3 Alexander Gelbukh , Grigori Sidorov , and Myriam J. Rodr´ıguez M.2 1
3
National Center for Investigation and Technological Development (CENIDET) {pazos, jperez}@cenidet.edu.mx 2 Technological Institute of Cd. Madero, M´exico {jjgonzalezbarbosa, myriam rdz}@hotmail.com Center for Computing Research(CIC), National Polytechnic Institute(IPN), M´exico {gelbukh, sidorov}@cic.ipn.mx
Abstract. We present a method for creating natural language interfaces to databases (NLIDB) that allow for translating natural language queries into SQL. The method is domain independent, i.e., it avoids the tedious process of configuring the NLIDB for a given domain. We automatically generate the domain dictionary for query translation using semantic metadata of the database. Our semantic representation of a query is a graph including information from database metadata. The query is translated taking into account the parts of speech of its words (obtained with some linguistic processing). Specifically, unlike most existing NLIDBs, we take seriously auxiliary words (prepositions and conjunctions) as set theory operators, which allows for processing more complex queries. Experimental results (conducted on two Spanish databases from different domains) show that treatment of auxiliary words improves correctness of translation by 12.1%. With the developed NLIDB 82of queries were correctly translated (and thus answered). Reconfiguring the NLIDB from one domain to the other took only ten minutes.
1
Introduction
Access to information in a fast and reliable way is very important for modern society. Natural Language Interfaces to Databases (NLIDBs) permit users to formulate queries in natural language, providing access to information without requiring knowledge of programming or database query languages. However, despite the achievements attained in this area, present day NLIDBs do not guarantee correct translation of natural language queries into database languages [1]. Moreover, queries are limited to the database domain configured by the database administrator. A Survey [9] on the importance of natural language processing (NLP) systems, conducted on 33 members of the “Pittsburg
This research was supported in part by COSNET and RITOS2.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 833–842, 2005. c Springer-Verlag Berlin Heidelberg 2005
834
R.A. Pazos Rangel et al.
Large User Group” professional society, mentions that:(1) NLIDBs are the most useful application for organizations among all NLP systems, (2) The five most desirable capacities of NLIDBs are: efficiency, domain independence, pronoun handling, understanding of elliptical entries (i.e., implied words), and processing of sentences with complex nouns, and (3) 50% of the best NLIDBs are those that offer domain independence. This paper describes an approach that uses database semantic metadata to perform the analysis of nouns and auxiliary words (prepositions and conjunctions). This allows for translation of queries expressed in natural language (Spanish in our case) into SQL, with easy adaptation to different domains.
2
Related Work
Most existing NLIDBs do not carryout any real semantic processing of the user’s input. They just look for keywords in the sentence [6] and focus their analysis on nouns and verbs, ignoring any auxiliary words in the query [7, 8]. In some NLIDBs, the semantic analyzer uses syntactic structure (obtained through a syntactic parser) to extract the meaning of the sentences [10]. However, no significant success is achieved yet in this direction. Semantic analysis of sentences is still a very complex task [11]: say, just determining the meaning of words is difficult due to their polysemy; for example, f ile is a tool and also a place for keeping documents. In many NLIDBs that do use semantic analysis of a natural language query, it involves looking for keywords in the input sentence using a predefined pattern through multiple database mappings. Still, this approach is not sufficiently specific to give good results. In other systems, semantic analysis is based on probabilistic models [3, 4, 6]. Such systems rely on a corpus labeled with semantic information; however, there are no sufficiently large semantically marked corpora for use in NLIDBs. Some NLIDBs use semantic graphs. However, the database relationships have to be defined by the user [6]. These approaches are subjective and require considerable manual effort. Such techniques have been applied to specific tasks in restricted semantic domains. They use a semantic representation, usually case frames [5]. Thus, no existing approach achieves good results in semantic analysis. That is why methods for its improvement are very important. In particular, auxiliary words (like prepositions and conjunctions) are not well-studied for tasks of processing natural language queries.
3
Assumptions
We assume that the database satisfies the following conditions, reasonable in well- designed databases: (C1) Relational, entity-relationship or a similar model is used; (C2) Each table has an explicit primary key; (C3) Each table column is
A Domain Independent Natural Language Interface to Databases Capable
835
explicitly associated to a domain (a named set of legitimate values for column values); (C4) Referential relationships between tables are explicitly expressed through foreign keys; (C5) Each table and column has a textual description; (C6) All tables are in second normal form; (C7) Information on conditions (C2) to (C5) can be extracted from the database metadata. Since descriptions of tables and columns are crucial for correct interpretation and translation of queries. Thus we additionally assume the following conditions: (C8) Descriptions of tables and columns are lexically and syntactically correct; (C9) Descriptions of tables and columns are short but meaningful phrases that consist of at least one noun and optionally of several meaningful words (nouns or adjectives; we do not take verbs into account), and optionally several auxiliary words (such as articles, prepositions, and conjunctions); (C10) The most meaningful word in the description of a table or a column is a noun; (C11) The description of each table is different from that of any other table or column; (C12) The description of each column is different from that of any other column of the same table (columns in different tables may have the same description); (C13) The description of each column that participates in a foreign key includes the description of the table referred to by the foreign key; (C14) The description of each column that participates in a primary key includes the description of the table, except for columns participating in a foreign key; (C15) The description of a column that does not participate in a primary or foreign key does not include the description of any table. Though conditions (C8) to (C15) might seem restrictive, most of them would be required by humans to understand a database and correctly formulate SQL queries. Additionally, we make the following assumptions: (A1)Query sentences are lexically and syntactically correct (which can be checked by a syntactic analyzer);(A2)Queries are expressed in interrogative form. We propose automatic creation of a domain dictionary from a synonym dictionary and metadata of the target database, using some linguistic processing. This technique performs the translation process independently of the NLIDB working data, thus avoiding reprogramming the NLIDB to port it to a database of different domain.
4
Generation of the Domain Dictionary
Dictionaries used by existing NLIDBs are created manually or semi-automatically [2]. We suggest automatic generation of the domain dictionary from a synonym dictionary and the database metadata with the help of some linguistic processing. Synonym dictionary. In our case, we extracted a general synonym dictionary from a digital encyclopedia. It currently has 20,000 words with their synonyms and antonyms. This dictionary can be immediately used for most domains; however, it has an interface that permits to add more words. Metadata dictionary. Database metadata can be used as a resource for interpretation of a query in a restricted domain [12]. The metadata dictionary stores
836
R.A. Pazos Rangel et al.
database information such as number of tables, number of columns, and their location; additionally, for each table it stores the name of each column along with its data type and description.
Fig. 1. Generation of the Domain Dictionary
Domain dictionary. For automatic generation of the domain dictionary, the description of each column from the metadata dictionary is processed to obtain the lemma and the part of speech (POS) of each word in the description (a POS tagger or a syntactic analyzer is used to resolve POS ambiguity). Then each noun is associated with columns and tables whose description includes this noun or its synonym. Notice that it is easier to provide meaningful descriptions for columns and tables (so that the interface can be configured automatically using this information) than to manually configure the interface dictionaries and modules for it to recognize and relate each column and table with some word in the domain dictionary.
5
Query Preprocessing
The preprocessing consists of analyzing each word of the natural language query to obtain its lexical, syntactic, and semantic information. Lexical information consists of the lemma of each word; the syntactic information consists of its part of speech (verb, noun, preposition, etc.). Semantic information is obtained from the domain dictionary in such a way that each noun is related to a set of columns and tables to which it may refer. Table 1 shows an example of a tagged query.
A Domain Independent Natural Language Interface to Databases Capable
837
Table 1. Semantic information obtained after preprocesing QUERY: cu´ales son los nombres y las direcciones de los empleados (what are the names and addresses of the employees) Morphosyntactic inWord Lema Columns Tables formation cu´ales(what) cu´al (which) interrogative pronoun son (are) ser (be) verb, indicative, 3rd person, plural los (the) el (the) plural, masculine, determinative nombres nombre plural, masculine, noun Categories.CategoryName, (names) (name) Customers, CompanyName, Employees.FirstName, Orders.ShipName,... y (and) y (and) conjunction direcciones direcci´on plural, femenine, noun Employee.Address, Or(addresses) (address) ders.ShipAddress, Suppliers.Address, Customers.Address de (of) de (of) preposition los (the) el (the) plural, masculine, determinative empleados empleado plural, masculine,noun Employee.EmployeeID, Or- Employee (employees) (employee) ders.EmployeeID
6
Main Algorithm
The translation process is carried out in three phases: (1) identification of the select and where phrases; (2) identification of tables and columns, and (3) construction of the relational graph. Phase 1: Identification of the select and where phrases.The query phrases that define the SQL select and where clauses are identified in order to pinpoint the columns (and tables) referred to by these phrases. Since these clauses always involve table columns, then, according to assumption (C9) above, the phrases are query subphrases that include at least one noun (and possibly prepositions, conjunction, articles, adjectives, etc.). Additionally, from assumption (A2) it follows that the phrase that defines the select clause always precedes the phrase that defines the where clause. In Spanish, the words that separate these phrases are: verbs, cuyo (whose), que (that), con (with) de (from, with), donde (where), en (in, on, at), dentro de (inside), tal que (such that), etc. Phase 2: Identification of tables and columns.Usually each noun in the select/where phrases refers to several database columns or tables (see Table 1), which would yield several translations of the query. Therefore, in order to pinpoint the columns and tables referred to, it is usually necessary to analyze the preposition de (of) and conjunction y (and), since they almost always appear
838
R.A. Pazos Rangel et al.
in select/where phrases expressed in Spanish [8]. Examination of prepositions and conjunctions permits, besides considering the meaning of individual nouns, to determine the precise meaning of a select/where phrase that involves nouns related by prepositions and conjunctions. For this, preposition de (of) and conjunction y (and) are represented by operations using set theory, because of the role they play in queries. Preposition de (of) establishes a close relationship between a word and its complement [14], such that, if there exists a select/where phrase that includes two nouns p and q related by preposition de (of), then the phrase refers to the common elements (columns or tables) referred to by pand q. Formally, S(p prep de q) = S(p) ∩ (q), where S(x) is the set of columns or tables referred to by phrase x. Conjunction y (and) expresses the notion of addition or accumulation [14], such that if there is a select phrase that involves two nouns p and q related by conjunction y (and), then the phrase refers to all the elements referred to by p and q. Formally, S(p conj y q) = S(p) ∪ (q). Conjunction y (and) in a where phrase is treated as a Boolean operation. For example, consider the query: cu´ ales son los nombres y direcciones de los empleados (which are the names and addresses of the employees), see Table 1. Consider the select phrase nombres y direcciones de los empleados (names and addresses of the employees). According to the above explanation, to extract the meaning of the select phrase it is necessary to apply two set operations: a union, corresponding to the conjunction y (and), and an intersection, corresponding to the preposition de (of). A heuristics is applied to determine the order of the two operations. In this case the preposition de (of) applies to the two nouns (names and addresses of the employees = names of the employees and addresses of the employees), therefore, the intersection operation has precedence above the union. The output of Phase 2 is the semantic interpretation of the select and where phrases (i.e. the columns and tables referred to by these phrases), which will be used in Phase 3 to translate them into the select and where clauses of the SQL statement. The process for determining the tables and columns is the following (we rely on conditions (C8) to (C15)): 1. If a major POS word (usually noun) in the select phrase refers only to a table (and not to another table or column) then the table is permanently marked and associated to this word. If it refers to several tables, then distinguishing major POS words are extracted from the table descriptions and looked for in the select phrase in order to find out which table(s) are referred to by the first major POS word. If only one table is found, it is permanently marked and associated with the first word; otherwise the tables found are temporarily marked and associated to the first word. 2. If a major POS word in the select phrase refers only to a column (and not to another table or column), then the column is permanently marked and associated to the word and the corresponding table is also permanently marked and associated to the word. Otherwise, if the major word refers to several columns, then the analysis of preposition de (of) and conjunction y (and) described above is carried out to determine which column(s) are
A Domain Independent Natural Language Interface to Databases Capable
839
referred to by the first major POS word. If only one column is found, it is permanently marked and associated to the first word; otherwise the columns found are temporarily marked and associated to the first word. 3. If a major POS word in the where phrase refers only to a table (and not to another table or column), then the table is permanently marked and associated to this word. Otherwise, if the word refers to several tables, then distinguishing major POS words are extracted from the table descriptions and looked for in the select phrase to determine which table(s) are referred to by the first major POS word. If only one table is found, it is permanently marked and associated to the first word; if several tables are found but one of them has been permanently marked, it is associated to the first word; otherwise the tables found are temporarily marked and associated to the first word. 4. If a major POS word in the where phrase refers only to a column (and not to another table or column), then the column is permanently marked and associated to the word and the corresponding table is also permanently marked and associated to the word. Otherwise, if the word refers to several columns, then the analysis of preposition de (of) and conjunction y (and) described in the previous paragraphs is carried out in order to find out which column(s) are referred to by the first major POS word. If only one column is found, it is permanently marked and associated to the first word; if several columns are found but one of them has been permanently marked, it is associated to the first word; otherwise the columns found are temporarily marked and associated to the first word. At the end of this process, if there are no temporarily marked columns and tables, then we can proceed with the analysis; otherwise the analysis is aborted. Phase 3: Construction of the relational graph. The process for constructing the relational graph is as follows: 1. Considering condition (C1), a non-directed graph is constructed from the relational or entity-relationship model of the database. Each node represents a table and each arc represents a referential relationship between tables (from condition C4). We assume binary relationships (involve two tables); this is not a serious limitation since a relationship involving more than two tables (T1 , T2 , ..., Tn ) can always be substituted by an auxiliary table Ta with binary relationships with tables T1 , T2 , ..., Tn . 2. The nodes corresponding to the tables permanently marked in Phase 2 are marked. Afterwards, for each simple selection condition in the where phrase that involves one column of a table (for instance: con ´ ordenes para el barco Mercury (with orders for Mercury ship)), the node corresponding to the table is labeled with its corresponding simple selection condition. Finally, each marked node is labeled with the columns (of the corresponding table) referred to in the select phrase. 3. For each simple selection condition in the where phrase that involves columns of two tables, the arc incident to the nodes representing the tables is marked;
840
R.A. Pazos Rangel et al.
if no such arc exists, it is added to the graph and marked. Each arc marked at this step is labeled with its corresponding simple selection condition. 4. If all the selection conditions are explicitly stated in the query phrase then the subgraph consisting of all marked nodes and arcs must be a connected graph. From this sub-graph it is easy to obtain the translation into an SQL expression. 5. A disconnected sub-graph means that there exist implicit selection conditions in the query or the query is incorrectly stated. In the first case, the NLIDB has to guess the implicit selection conditions. For this a heuristics is used which based on the following assumption: all the implicit selection conditions refer to natural joins that involve tables and columns participating in a referential relationship. Therefore, a connected sub-graph is constructed by adding unmarked arcs to the disconnected sub-graph so that the number of unmarked arcs added is minimal. From this sub-graph the translation into an SQL expression is straightforward. If no connected sub-graph can be constructed, then the query is reported as incorrect.
7
Experimental Results
There is no standard evaluation method for comparing and assessing NLIDBs. The most used criterion is the translation success; i.e., the semantic equivalence between the natural language query and the SQL statement [13]. Up to now most NLIDBs can satisfactorily translate queries involving several tables if they are explicitly mentioned in the query, or queries involving one table that is not mentioned explicitly. For the experiment, the Northwind and the Pubs databases of SQL Server 7.0 were used, and 50 users were asked to formulate queries in Spanish. The resulting corpus consists of 198 different queries for the Northwind database and 70 different queries for the Pubs database. For formulating their queries the users only were allowed to see the databases schemas (definitions). The queries were classified according to difficulty (which depends on the amount of implicit column and table information in the query and special functions) and were divided into six types: (1) explicit table and column information, (2) explicit table information and implicit column information, (3) implicit table information and explicit column information, (4) implicit table and column information, (5) special functions required, and (6) impossible or difficult to answer. Table 2 shows the results obtained for the Northwind database with all the queries, which involve one, two, or more tables; in this case the success rate was 84%. Similar experiments were conducted on the Pubs database. Table 3 shows the results considering all the queries; in this case the success rate is 80%, which is very similar to that for the Northwind database. It is worth mentionary that most of the queries to the Pubs database involve two or more tables. Additional experiments were conducted in order to assess the impact of the analysis of prepositions and conjunctions (described in Phase 2 in Section 5) on the translation success. When this analysis was excluded from the translation process, the success rate was 72.6% for the Northwind database and 67.1% for the
A Domain Independent Natural Language Interface to Databases Capable
841
Table 2. Results obtained for the Northwind database Query Results
Query Type
1 Answered correctly 31 Answered with additional information 0 Incorrect answer 0 Unanswered 0 Total 31
2 57 0 0 0 57
3 19 5 0 0 24
4 49 5 1 3 58
5 0 0 23 0 23
Total % %
6 0 0 5 0 5
156 79 84 10 5 29 15 16 3 1 198 100 100
Table 3. Results obtained for the Pubs database
Query Results Answered correctly
Query Type 1 23 4 56 7 29 8 12 0 0
Answered with additional information 0 0 Incorrect answer 0 0 Unanswered 0 0 Total 7 29
0 0 0 8
0 1 0 13
0 10 1 11
0 1 2 2
Total %
%
56 80
80 0 0 12 17 20 3 20 70 100 100
Pubs database. When the analysis was enabled, the success rate increased 11.4% for the Northwind database and 12.9% for the Pubs database. Some examples of queries that could not be satisfactorily translated are the following: cu´ al es la fecha del u ´ltimo env´ıo (what is the date of the last shipment) and cu´ ales son los nombres de los empleados que nacieron en febrero (what are the names of the employees born in February). The first query could not be answered because last shipment is not defined in the domain and the second because it needs a special function for extracting the month from a date in the where clause of an SQL statement.
8
Conclusions
The translation approach presented favors domain independence, since the NLIDB does not need to be manually configured with a set of keywords for carrying out specific actions. It is important to point out that configuring the NLIDB for another domain (from Northwind to Pubs) took only ten minutes. The tests conducted so far have shown that the proposed approach permits: (1) avoiding the wearisome process of configuring the NLIDB for a given domain and (2) obtaining good results in translating natural language queries into SQL statements. The databases used for the tests have been used by other NLIDBs [13], which sets the foundation for designing a metric to compare the results of our NLIDB versus others. Prepositions and conjunctions play a key role in
842
R.A. Pazos Rangel et al.
extracting the meaning of a query in Spanish. Taking them into account as set operations (intersection and union) in-creases the success rate by 12.1%.
References 1. Popescu, A.M., Etzioni, O., Kautz, H.: Towards a Theory of Natural Language Interfaces to Databases. In: Proceedings of the 2003 International Conference on Intelligent User Interfaces. ACM Press, 2003. 2. Zarate, A., Pazos, R., Gelbukh, A., Padr´on, I.: A Portable Natural Language Interface for Diverse Databases Using Ontologies. LNCS 2588, 2003. 3. Stallard, M.S., Bobrow, D., Schwartz, R.: A Fully Statistical Approach to Natural Language Interfaces. In: Proc. 34th Annual Meeting of the Association for Computational Linguistics. 1996. http://citeseer.nj.nec.com/miller96fully.html. 4. Minker, W.: Stochastically-Based Natural Language Understanding across Task and Languages. In: Proc of EuroSpeech97, Rodas, Greece. 1997. http://citeseer.nj. nec.com/ minker97stochasticallybased.html. 5. Moreno, L., Molina, A.: Preliminares y Tendencias en el Procesamiento del Lenguaje Natural. Departamento de Sistemas Inform´ aticos y Computaci´ on. Universidad Polit´ecnica de Valencia. http://www3.unileon.es/dp/dfh/Milka/MR99b. pdf. 6. Meng, F., Chu, W.W.: Database Query Formation from Natural Language Using Semantic Modeling and Statistical Keyword Meaning Disambiguation. Computer Science Department. University of California. www.cobase.cs.ucla.edu/techdocs/ucla-990003.ps. 7. InBase-Online. English Queries to Personnel DB. Russian Research Institute of Artificial Intelligence. 2001. http://www.inbase.artint.ru/nl/kadry-eng.asp. 8. Montero, J.M.: Sistemas de Conversi´ on Texto Voz. B.S. thesis. Universidad Polit´ecnica de Madrid. http://lorien.die.upm.es/ juancho. 9. Sethi, V.: Natural Language Interfaces to Databases: MSI Impact, and Survey of their Use and Importance. 1986. University of Pittsburgh. 10. AVENTINUS - Advanced Information System for Multinational Drug Enforcement. http:// www.dcs.shef.ac.uk/nlp/funded/aventinus.html. 11. Sidorov, G.: Problemas Actuales de Ling¨ u´ıstica Computacional. In: Revista Digital Universitaria, Vol. 2, No. 1. 2001. http://www.revista.unam.mx/vol.2/num1/art1. 12. Stratica, N., Kosseim, L., Desai, B.: NLIDB Templates for Semantics Parsing. In: Proceedings of Applications of Natural Language to Data Bases (NLDB 2003). pp 235-241. http//www.cs.concordia.ca/ kosseim/research.html. 13. ELF Software Co.: Results from the Head to Head Competition. 2001. http://elfsoft.com/ns/demos.htm. 14. Real Academia Espa˜ nola: Gram´ atica Descriptiva de la Lengua Espa˜ nola. Espasa Calpe, 1999.
An Efficient Hybrid Approach for Online Recognition of Handwritten Symbols John A. Fitzgerald, Bing Quan Huang, and Tahar Kechadi Department of Computer Science, University College Dublin, Belfield, Dublin 4, Ireland [email protected]
Abstract. This paper presents an innovative hybrid approach for online recognition of handwritten symbols. The approach is composed of two main techniques. Firstly, fuzzy rules are used to extract a meaningful set of features from a handwritten symbol, and secondly a recurrent neural network uses the feature set as input to recognise the symbol. The extracted feature set is a set of basic shapes capturing what is distinctive about each symbol, thus making the network’s classification task easier. We propose a new recurrent neural network architecture, associated with an efficient learning algorithm derived from the gradient descent method. We describe the network and explain the relationship between the network and the Markov chains. The approach has achieved high recognition rates using benchmark datasets from the Unipen database.
1
Introduction
The majority of recognisers for handwritten symbols have been built upon rule based methods or statistical methods, such as motor model [4], elastic matching [5], time-delay neural network [6], and hidden Markov models [11]. The problem with rule based methods is that it is in most cases impossible to design an exhaustive set of rules that model all possible ways of forming all symbols. Generally, a recognizer that employs statistical methods is more flexible and reliable. However, the common static methods - curve/feature matching, Markov Model and Neural Network based approaches, have their own disadvantages. The difficulty with the curve/feature matching approaches is that they are computationally intensive and impractical for large vocabulary handwriting [6]. Hidden Markov Models (HMMs) have been successfully applied firstly to speech recognition and have been used to solve sequence learning problems, including online handwriting recognition [11]. However, to achieve a reliable executable HMM requires a human expert to choose a number of states with initial estimates of the model parameters and transition probability between the states. Time-delay neural network (TDNN) trained with Back-propagation algorithm [7] requires the setting of less parameters. The limitation of TDNN is that the input fixed time window can render it unable to deal with varying length sequence. Another type of network is the recurrent neural network, which successfully deal with temporal sequences such as formal language learning problems. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 843–853, 2005. c Springer-Verlag Berlin Heidelberg 2005
844
J.A. Fitzgerald, B.Q. Huang, and T. Kechadi
This network solves the problems of TDNN, and is easy to use as a recognizer. The two common types of recurrent networks are the Elman network [2] and fully recurrent networks [14]. Elman networks face difficulties due to their own architecture: the network’s memory consists of one relatively small context layer, and there is additional computation cost due to the need for more hidden neurons. The main problem with the fully recurrent network with real time recurrent learning (RTRL) is its computational complexity. Therefore, a new truncated recurrent network with a new dynamic learning algorithm is proposed here, with less computational complexity than RTRL. The recognition process begins with feature extraction. The purpose of feature extraction is to translate the raw symbol data, initially a sequence of points, into something meaningful before using it as input to the network. Also, reducing the input size is beneficial in terms of efficiency. For each symbol, a set of features is generated whereby each feature is one of three types: Line, C-shape or O-shape. We believe that by representing each symbol in this manner, we are capturing the essence of the symbol and what distinguishes it from other symbols, thus making classification easier. The feature extraction result is used as input to the network, which classifies the symbol. The paper is organized as follows. Section 2 gives an overview of the feature extraction phase. In section 3 the network is presented. Section 4 describes the network learning algorithm. Section 5 shows experimental results and section 6 contains conclusions and future work.
2
Feature Extraction
Feature extraction is a process which transforms the input data into a set of features which characterise the input, and which can therefore be used to classify the input. This process has been widely used in automatic handwriting recognition [12]. Due to the nature of handwriting with its high degree of variability and imprecision, obtaining these features is a difficult task. A feature extraction algorithm must be robust enough that for a variety of instances of the same symbol, similar feature sets are generated. Here we present a feature extraction process in which fuzzy logic is used. Fuzzy logic is particularly appropriate for this task, given the amount of imprecision and ambiguity present in handwritten symbols. Our feature extraction technique [9] consists of a pre-processing phase called chording followed by the main feature extraction phase. Chording Phase: Each handwritten symbol is represented by a set of strokes {s0 , . . . , sv }, where each stroke is a sequence of points. Chording transforms → − each stroke s into a chord vector C = c0 , . . . , cn−1 , where each chord ci is a section of s which approximates a sector of a circle. This phase simplifies the input data so that feature extraction rules can be written in terms of chords rather than sequences of points. Furthermore, chording identifies the locations in the stroke where new features may begin, so the number of sections of the stroke which need to be assessed as potential features is drastically reduced.
An Efficient Hybrid Approach
Fig. 1.
845
Feature Extraction process for a handwritten digit
→ − → − Feature Extraction Phase: The chord vectors C 0 , . . . , C v are the input to the feature extraction phase, in which the objective is to identify the feature set which best describes the symbol. This feature set will be the set of substrokes F = {f0 , . . . , fm−1 } encompassing the entire symbol which is of a higher quality than any other possible set of substrokes. Each substroke fj is a sequence of → − consecutive chords {ca , . . . , cb } from a chord vector C i = (c0 , . . . , cn−1 ), where 0 ≤ a ≤ b ≤ n and 0 ≤ i ≤ v. The quality of a set of substrokes, represented by q(F ), is dictated by the membership values of the substrokes in F in sets corresponding to feature types. We distinguish three types of feature: Line, C-shape and O-shape. The membership value of a substroke fj in the set Line, for example, is expressed as μLine (fj ) or Line(fj ), and represents the confidence that fj is a line. In the definition of q(F ) below, T is whichever of the fuzzy sets Line, C-shape or O-shape fj has highest membership in. m−1
μT (fj ) q(F ) =
j=0
m
(1)
Fuzzy Rules: Membership values in fuzzy sets are determined by fuzzy rules. The fuzzy rules in the rule base can be divided into high-level and low-level rules. Membership values in fuzzy sets corresponding to feature types are determined by high-level rules. Each high level fuzzy rule defines the properties required for a particular feature type, and is of the form: T (Z) ← P1 (Z) ∩ . . . ∩ Pk (Z)
(2)
This means that the likelihood of a substroke Z being of feature type T is determined by the extent to which the properties P1 to Pk are present in Z. Typical properties include Straightness and Smoothness. Memberships in fuzzy sets corresponding to properties are determined by low-level fuzzy rules. In each low-level rule the fuzzy value Pi (Z) is defined in terms of values representing various aspects of Z. To express varying degrees of these aspects we use fuzzy membership functions. The strength of our feature extraction technique is therefore dependent on an appropriate choice of requisite properties for each feature type, and low-level
846
J.A. Fitzgerald, B.Q. Huang, and T. Kechadi
fuzzy rules which accurately assess the extent to which these properties are present. These properties and rules were continually updated and improved over time until the memberships being produced for the feature types were deemed accurate. The fuzzy rules form the basis of a feature extraction algorithm which determines the best feature set using numerous efficiency measures. Example: For the symbol shown in Figure 1, the effect of feature extraction is a → − partition of the input C = {c0 , . . . , c4 } into a set of features F = {(c0 , c1 ), (c2 ), (c3 , c4 )}, where μLine (c0 , c1 ) = 0.66, μLine (c2 ) = 0.98, and μCshape (c3 , c4 ) = 0.93. By using the feature extraction method described above rather than feature template matching, there will be more similarity between the feature sets extracted from a variety of instances of the same symbol, thus aiding the network’s classification task. Other feature extraction methods have also extracted a set of shapes [8], but these methods attempted to match sections of the symbol against fixed, predefined versions of each shape, whereas our rule-based definitions are more flexible and allow for the wide variety of e.g. C-shapes which occur in handwriting.
3
The Recurrent Network
A new recurrent neural network has been proposed in [1], based on the Elman network architecture [2]. This network constitutes an improvement of the Elman network, with two additional features. It has a multi context layer (MCL) [15], which can keep more states in memory. The second feature is the feed forward connections from the MCL to the output layer, which can reduce the number of neurons in the hidden layer [10]. The network architecture is shown in Fig. 2. 3.1
Basic Notations and Definitions
– Net inputs and Outputs: Let nin , nout and m denote the number of input, output, and hidden layer units respectively. Let ncon be the number of active context layers, and let the total number of context layers be denoted by q. Let t be the current time step. Ii (t) is the ith neuron input in the input layer, ˜ j (t) is the input neuron j in the hidden layer, and o˜k (t) is the input neuron h k in the output layer. The neuron output of the hidden and output layers are Hj (t) and Ok (t) respectively. The neuron output l of context layer p is denoted by Cl (t − p), and dk (t) is the target of unit k in the output layer. – Connection weights: Let vji be the weight connection from the input layer to the hidden layer and upkl be the weight connection from the pth context layer to the hidden layer. Let wocpkl be the weight connection from the pth context layer to the output layer and wkj be the weight connection from the hidden layer to the output layer.
An Efficient Hybrid Approach
847
Fig. 2. The network architecture
The softmax function and logistic function are selected as the activation functions for the output layer and the hidden layer respectively, written below: fSM (xi ) =
exi N xi i =1 e
f (xi ) =
1 1 + exi
where x represents the ith net input, and N is the total number of net inputs. The derivatives of the activation functions can be written respectively as follows: (xi ) = (1 − fSM (xi ))fSM (xi ) fSM
f (xi ) = (1 − f (xi ))f (xi )
According to the architecture of the network, the output of the hidden layer and the output layer are calculated at every time step, while the outputs of the context layers are obtained by shifting the information from p to p + 1 for (p = 1 to q). The first context layer is updated by the hidden layer, as shown in Fig. 2. This is done in a feed-forward fashion: 1. The net input and output of the hidden layer units are calculated respectively as follows: nin n m con ˜ j (t) = Ii (t)vji (t) + Cl (t − p)upjl (t) (3) h i=1
p=1 l=1
˜ j (t)) Hj (t) = f (h
(4)
where Cl (t − p) are the outputs of the context layers obtained by copying the output of its predecessor. The context layer gets the previous output of the hidden layer. The following equations summarise this operation: Cj (t − p) = Cj (t − p + 1), p = 2, ..., q
(5)
Cj (t − 1) = Hj (t)
(6)
848
J.A. Fitzgerald, B.Q. Huang, and T. Kechadi
2. The net input and output of the output layer are given respectively as follows:
o˜k (t) =
m
Hj (t)wkj (t) +
n m con
Cl (t − p)wocpkl (t)
Ok (t) = fSM (˜ ok (t)) 3.2
(7)
p=1 l=1
j=1
(8)
The Network and Markov Chain
A system based on our network architecture predicts the current state depending on the previous states window [(t − 1) → (t − p)]. However, the Markovian assumption of conditional independence is one of the limitations. The network tries to predict a more accurate current state based on more historical states. Thus, the network expresses an extended probability model based on the Markov chain. In Markov models (MMs), the transition matrix A = {aij }, the observation symbol probability distribution in state j is X(t) = {xj (t)}, that is, X(t) = {x1 (t), x2 (t), · · · , xn (t)}, where 0 ≤ xj (t) ≤ 1. The formulae of the Markov chain can be written as follows.
xj (t + 1) =
m
aji xi (t),
j = 1, · · · , m.
(9)
i=1
X(t + 1) = AX(t), A ≥ 0,
m
aij = 1.
(10) (11)
j
This can be rewritten as: X(t) = At X(0),
(12)
where X(0) = [x1 (0), ..., xm (0)] is the initial probability vector and t represents the time step. Let I(t) = {I1 (t), · · · , Iin (t)}, H(t) = {H1 (t), · · · , Hm (t)}, C(t − p) = {C1 (t − p), · · · , Cm (t − p)}, and O(t) = {O1 (t), · · · , Oout (t)}. We write the state-transition and output functions, defined by (3), (4), (7), and (8), as: H(t) = f (I(t), C(t − 1), · · · , C(t − p)) = f (I(t), H(t − 1), · · · , H(t − p))
(13)
and O(t) = fSM (H(t), C(t−1), · · · , C(t−p)) = fSM (H(t), H(t−1), · · · , H(t−p))(14)
An Efficient Hybrid Approach
849
According to the formulaes (3), (4), (5), (6) and (13), the state-transition map f can be written as a set of maps parameterised by input sequence s as follows: fsp (x) = f (φ1 (s), · · · , φp (s), x)
(15)
Given an input sequence S = {s1 , s2 , · · · , st }, the current state after t step is H(t) = fspp ···st (H(0)) = fSpt (H(0))
(16)
1
4
The Network Learning Algorithm
The training algorithms which are often used for recurrent networks (RNN) are based on the gradient descent method, to minimise the error output. With Backpropagation through time (BPTT) [7] one needs to unfold a discrete-time RNN and then apply the back-propagation algorithm. However, BPTT fails to deal with long sequence tasks due to the large memory required to store all states of all iterations. The RTRL learning algorithm established in [14] for a fully recurrent network computes the derivatives of states and outputs with respect to all weights at each iteration. It can deal with sequences of arbitrary length, and requires less memory storage proportional to sequence length than BPTT. Here we summarise our learning algorithm [1] which is similar to RTRL. As this is a multinomial classification problem, the cross-entropy error for the output layer is expressed by the following: E(t) = −
n out
dk (t) ln Ok (t)
(17)
k=1
The goal is to minimise the total network cross-entropy error. This can be obtained by summing the errors of all the past input patterns: Etotal =
T
E(t)
(18)
t=1
Up to this point we have introduced how the network works and is evaluated. Now, we use the gradient descent algorithm to adjust the network parameters, called the weight matrix W . Firstly, we compute the derivatives of the crossentropy error for each net input of the output layer, the hidden layer, and the context layer. These are called local gradients. The equations for the output layer, hidden layer, and context layer are written respectively as follows: LGk (t) = dk (t) − Ok (t)
LGj (t) =
n out k=1
LGk (t)wkj (t)
(19)
(20)
850
J.A. Fitzgerald, B.Q. Huang, and T. Kechadi
LGpl (t) =
n out
LGk (t)wocpkl (t)
(21)
k=1
The partial derivatives of the cross-entropy error with regard to the weights between the hidden and output layers (wkj (t)) and the weights between output layer and multi-context layer (wocpkl (t)) are as follows: ∂E(t) = LGk (t)Hj (t) ∂wkj (t)
(22)
∂E(t) = LGk (t)Cl (t − p) ∂wocpkl (t)
(23)
The derivation of the cross-entropy error with regards to the weights between the hidden and multi-context layer is ⎡ ncon m m ∂Hj (t − p ) ∂Hj (t) ∂E(t) p ⎣ =− + (24) LGr (t)δrj LGj (t) p ∂upjl (t) ∂ujl (t) ∂upjl (t) r=1 j =1
p =1
where ⎡ ∂Hj (t) ∂up jl (t)
˜ (t)) ⎣ δ = f (h j j j
ncon
δpp Hl (t − p ) +
p =1
ncon
m m
p =1 j =1 l =1
up (t)δl j jl
∂Hj (t − p ) ∂up jl (t)
⎤ ⎦ (25)
where δ is the Kronecker symbol defined by δab = 1 if a = b, and δab = 0 if a = b. The partial derivative of the cross-entropy error for the weights between hidden layer and input layer ∂E(t)/∂vji (t) can be expressed by: ⎡ ncon m m ∂Hj (t) ∂Hj (t − p ) ∂E(t) p ⎣ =− + LGj (t) LGl (t)δlj (26) ∂vji (t) ∂vji (t) ∂vji (t) j =1
and
p =1 l=1
⎤ ⎡ n m m con ∂H (t − p ) ∂Hj (t) j ˜ j (t)) ⎣δj j Ii (t) + ⎦ = f (h upj l δj j ∂vji (t) ∂vji (t)
(27)
p =1 j =1 l=1
5
Experimental Results
In order to evaluate our recurrent neural network’s performance for handwritten symbol recognition, we trained the network with the new dynamic learning algorithm described in the previous section. The feature extraction result F is encoded in order to serve as input to the network. Each feature f ∈ F is represented by five attributes: type (Line, C-shape or O-shape), length (as a fraction of the symbol length), x-center and y-center (indicating f ’s position in the symbol), and orientation. The latter represents the direction in which f was drawn
An Efficient Hybrid Approach
851
Table 1. The recognition rates of all digits from each network configuration
Digit Rec. Rate (%)
Ave. Rec
20 0 92.80 1 90.93 2 88.20 3 92.09 4 91.80 5 89.49 6 94.96 7 93.24 8 88.20 9 87.91 Rate(%) 90.96
Hidden neurons 25 30 35 95.68 94.10 95.54 93.38 93.52 95.10 91.94 91.08 96.40 95.25 97.98 96.12 92.52 93.53 94.53 92.66 94.53 90.94 93.09 94.82 97.41 92.66 94.10 94.10 89.93 93.53 94.10 93.09 91.08 93.52 93.02 93.82 94.77
40 96.26 94.10 96.12 96.98 95.11 92.23 97.12 95.97 91.08 93.52 94.85
if f is a Line, or the direction in which f is facing if f is a C-shape. O-shapes have no orientation. The method was tested on the digits (0, · · · , 9). So for this application the network is composed of five input neurons and ten output neurons. The attribute values were normalised and each attribute is assigned one input neuron. Similarly, each output neuron is assigned to a target symbol, so that the neuron is fired only if its corresponding target is recognised. Therefore the softmax function was chosen (3) as the activation function for the output layer and formula (17) was selected for the cross-entropy error measure. We noticed that 20 hidden neurons are sufficient to reach an accuracy of 91%, while 40 hidden neurons results in an extra 4% accuracy (see Table 1). However, this usually increases the network overhead during the training phase. 6950 isolated digits taken from section 1a of the Unipen Train-R01/V07 dataset [13] were used for the training phase, and 6950 isolated digits from the same section were used for the testing phase. The recognition rates achieved by the approach are high, although higher rates have been achieved for Unipen digits [5]. Our recognition rates will be improved upon through a number of actions. Firstly, the feature extraction rules need to be optimised, as most errors were due to an undesirable feature extraction result. Incidentally, it was often the case that the desired feature extraction result was the second or third most likely feature set; therefore, submitting multiple feature extraction results to the network and taking the most likely result should yield improvements. Another measure which could be taken would be to combine the network classification approach with a rule-based classification approach we have developed [3].
6
Conclusions and Future Work
The disadvantage of using only rule-based methods is that it is impossible to design an exhaustive set of rules that model all possible ways of forming every symbol. The statistical and neural network models have their own disadvantages
852
J.A. Fitzgerald, B.Q. Huang, and T. Kechadi
too. For instance, we have already used a fully recurrent network with RTRL on the same application. The network accuracy was very high, but was only reached with a very large computational overhead on small training datasets. We have used a rule-based approach for feature extraction only, thus avoiding the aforementioned disadvantages of such methods, as fuzzy rules need only be written for a limited number of feature types and properties. The features sets extracted are robust, and capture what is distinctive about each symbol, making classification easier for the network. Also, using these feature sets as input is more efficient than using the raw symbol data. Using the network for classification is a far more extendable approach than using fuzzy classification rules [3]. Recognition of handwritten symbols is a hugely important and challenging problem in computer science, requiring that a variety of approaches be investigated. Here we have presented an innovative new approach to the problem. Although our recognition rates are currently slightly less than the state of the art, making the aforementioned improvements will increase our recognition rates significantly. Furthermore, we will study our system’s scalability with regard to the number of symbols to be recognised, and we will continue to explore and implement more networks with different context layers and study their behaviour.
References 1. B.Q. Huang, T. Rashid, and T. Kechadi, “A New Modified Network based on the Elman Network,” The IASTED Int’l. Conf. on Artificial Intelligence and Applications (AIA 2004), February 2004. 2. J. Elman, “Finding Structure in Time,” Cognitive Science, 14(2):179–211, 1990. 3. J.A. Fitzgerald, F. Geiselbrechtinger, and T. Kechadi, “Application of Fuzzy Logic to Online Recognition of Handwritten Symbols”, The Ninth Int’l. Workshop on Frontiers in Handwriting Recognition (IWFHR 9), Tokyo, Japan, pp. 395-400, 2004. 4. L. Schomaker and H. Teulings, “A handwriting recognition system based on properties of the human motor system,” The Int’l. Workshop on Frontiers in Handwriting Recognition (IWFHR), pp. 195-211, 1990. 5. H. Mitoma, S. Uchida, and H. Sakoe, “Online character recognition using eigendeformations,” The 9th Int’l. Workshop on Frontiers in Handwriting Recognition (IWFHR 9), Tokyo, Japan, pp. 3-8, 2004. 6. M. Schenkel, I. Guyon, and D. Henderson, “On-Line Cursive Script Recognition Using Time Delay Neural Networks and Hidden markov Models,” Int’l. Conf. on Acoustics, Speech, and Signal Processing, Volume 2, pp. 637-640, 1994. 7. R.J. Williams and D. Zipser, “Gradient-based learning algorithms for recurrent networks and their computational complexity,” Backpropagation: theory, architectures, and applications, pp. 433-486, 1995. 8. N. Gomes and L. Ling, “Feature extraction based on fuzzy set theory for handwriting recognition,” 6th Int’l. Conf. on Document Analysis and Recognition, pp. 655-659, 2001. 9. J. A. Fitzgerald, F. Geiselbrechtinger, and T. Kechadi, “Feature Extraction of Handwritten Symbols Using Fuzzy Logic”, The Seventeenth Canadian Conference on Artificial Intelligence (AI 2004), Ontario, Canada, pp. 493-498, 2004.
An Efficient Hybrid Approach
853
10. D.Y. Yeung and K.W. Yeung, “A locally recurrent neural network model for grammatical inference,” Int’l. Conf. on Neural Information Processing, pp. 1468-1473, 1994. 11. J. Hu, M.K. Brown, and W. Turin, “HMM Based On-Line Handwriting Recognition,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume 18, Issue 10, pp. 1039-1045, 1996. 12. O.D. Trier, A.K. Jain, and T. Taxt, “Feature extraction methods for character recognition - A survey,” Pattern Recognition, 29:641-662, 1996. 13. I. Guyon, L. Schomaker, R. Plamondon, M. Liberman, and S. Janet, “Unipen project of on-line data exchange and recognizer benchmarks,” The 12th Int’l. Conf. on Pattern Recognition, pp. 29-33, 1994. 14. R. Williams and D. Zipser, “A learning algorithm for continually running fully recurrent neural networks,” Neural Computation, 1(2):270-280, 1989. 15. W.H. Wilson, “Learning Performance of Networks like Elman’s Simple Recurrent Networks but having Multiple State Vectors,” Cognitive Modelling Workshop of the Seventh Australian Conf. on Neural Networks, 1996.
Environment Compensation Based on Maximum a Posteriori Estimation for Improved Speech Recognition1 Haifeng Shen1, Jun Guo1, Gang Liu1, Pingmu Huang1, and Qunxia Li2 1
Beijing University of Posts and Telecommunications, 100876, Beijing, China [email protected], [email protected], [email protected], [email protected] 2 University of Science and Technology Beijing, 100083, Beijing, China [email protected]
Abstract. In this paper, we describe environment compensation approach based on MAP (maximum a posteriori) estimation assuming that the noise can be modeled as a single Gaussian distribution. It employs the prior information of the noise to deal with environmental variabilities. The acoustic-distorted environment model in the cepstral domain is approximated by the truncated firstorder vector Taylor series(VTS) expansion and the clean speech is trained by using Self-Organizing Map (SOM) neural network with the assumption that the speech can be well represented as the multivariate diagonal Gaussian mixtures model (GMM). With the reasonable environment model approximation and effective clustering for the clean model, the noise is well refined using batch-EM algorithm under MAP criterion. Experiment with large vocabulary speakerindependent continuous speech recognition shows that this approach achieves considerable improvement on recognition performance.
1 Introduction The performance of speech recognition will be drop drastically in the adverse acoustical environment due to the environment mismatch between the training and test conditions. The state-of-the-art recognition systems employ various environment compensation algorithms. These algorithms estimate the pseudo-clean speech from the noisy observation using different environment models in different signal domains (e.g. time domain and spectral domain) or the feature domains (e.g. log spectral domain, cepstral domain) and recognize their corresponding final acoustic feature coefficients with an acoustic model pre-trained in a clean condition to realize possible acoustic match. For instance, the spectral subtraction algorithm firstly introduced by Boll [1] compensates the additive noise corruption environment and attempts to obtain the power spectrum of clean speech from the noisy power spectrum by subtracting the noise spectrum. The drawbacks of this approach are that it introduces the musical noise and “over-subtraction” which significantly influence on the recognition per1
This research was sponsored by NSFC (National Natural Science Foundation of China) under Grant No.60475007, the Foundation of China Education Ministry for Century Spanning Talent and BUPT Education Foundation.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 854 – 862, 2005. © Springer-Verlag Berlin Heidelberg 2005
Environment Compensation Based on Maximum a Posteriori Estimation
855
formance. Cepstral mean normalization (CMN) is a technique used to reduce distortions that are introduced by the transmission channel. Since the cepstrum is the discrete cosine transform (DCT) of the log spectrum, the logarithm turns the multiplication into a summation. The cepstral mean calculated from each utterance is an estimate of the channel. By subtracting the mean cepstral vector, the channel is thus removed from the cepstrum. CMN had applied in most recognition systems with the merits of better recognition performance and low computation load. The model-based approaches play an important role in most recognition systems applied in the real condition and become the most successful technique which attracts many researchers to deeply investigate [2]-[6]. VTS (Vector Taylor Series) [2] [3] and SLA (Statistical Linear Approximation) [4] [5], apply different strategies to approximate the nonlinear environment model, e.g. in the log spectral domain. VTS can be viewed as a particular case of SLA. They make full use of different approximation strategies to approach to the nonlinear environment model in the log spectral domain. Both of them generally use a Gaussian mixture model (GMM) with diagonal covariances pre-trained in the clean conditions for reducing subsequent computation load in noise estimation. Based on the well-trained clean GMM, they iteratively estimate the noise parameters on the whole test sentence using EM algorithm in the framework of ML (maximum likelihood). However, log-filterbank coefficients are highly correlated. Using the GMM with diagonal covariances, the noise estimation in the log domain is not very effective. It is noticeable that the cepstral coefficients are nearly incorrelate which are calculated from the log-filterbank coefficients with discrete cosine transform. Hence, the use of cepstral environment compensation in this case is virtually mandatory if further improve the system performance. In this paper, we investigate the cepstral environment compensation based on MAP criterion. MAP estimation has been studied in recent years [7]-[9] and has been experimentally proven to be effective since the prior information of the noise can be incorporated in the estimation procedure, which is particularly useful to estimate the noise parameters when there is large speech data corrupted by the noise. Assuming that the prior of the noise belongs to a conjugate density, EM algorithm can be applied to the MAP estimation. The prior density parameters can be obtained in the absence of the speech of the test data. Due to the cepstral features are nearly incorrelate, it is more effective to cluster the clean speech in the cepstral domain into Gaussian mixtures model with diagonal covariance matrices. In this paper, the clean model can be trained by using the Self-Organizing Map (SOM) neural network [10]. The whole procedure can be divided into three steps. Firstly, the cepstral environment is modeled as a nonlinear model, and by utilization of the piecewise linear approximation methods, e.g. VTS approximation [2], the environment model can be simplified. Secondly, assuming that the noise is a Gaussian distribution, the noisy speech can be described as a GMM with diagonal covariances obtained by combining the statistical models of the clean speech and the noise according to the above approximated environment model. Lastly, based on the revised EM algorithm under MAP criterion, the noise is well estimated and the compensated cepstral coefficients are sent into the speech recognition system for achieving robust performance. The experiments are conducted on the large vocabulary speakerindependent continuous speech recognition system. The approach described in this paper achieves significant improvement in the system performance.
856
H. Shen et al.
The rest of the paper is organized as follows. The next section briefly describes the MAP decision rule. In section 3, we train the clean speech with SOM neural network and estimate the noise statistics using MAP estimation in detail based on VTS environment approximation. The experimental results are given in section 4 and some conclusions are drawn in section 5.
2 MAP Decision Rule Given the observation feature sequence Y = { y1 , y2 ,L, yT } and the noise parameter λ in the cepstral domain, the Bayes theorem gives the posterior probability of the noise, p (λ | Y ) =
P (Y | λ ) p (λ )
³
Ω
P(Y | λ ) p(λ )d λ
,
(1)
where Ω denotes an admissible region of the parameter space, p(λ ) is a known prior of the noise, P(Y | λ ) is the likelihood of the data Y given the noise parameter λ . In the denominator of Eq.(1), called the evidence, just is a constant that is independent of the values of the parameter λ and can thus be ignored. Hence the noise parameter λ can be estimated in a posterior distribution obtained by the product of the assumed prior distribution and the conditional likelihood. By maximizing the posterior distribution, noise estimate λˆMAP can be obtained as follows λˆMAP = arg max p (λ | Y ) = arg max P(Y | λ ) p (λ ) λ
λ
∝ arg max{log P (Y | λ ) + log p(λ )}.
(2)
λ
As can be seen, ML estimation is a special case of MAP estimation. If the prior of the noise is uniform distribution which is constant, as shown in the above Eq.(2), the noise estimation can be interpreted as the equation with maximum likelihood (ML) estimation which can generally be realized by using the expectation-maximization (EM) algorithm. EM algorithm can also be applied for MAP estimation by resorting to the assumed prior of the noise belongs to conjugate probability family [7]-[9]. However, in the MAP estimation, it is very difficult to define the prior distribution of the noise and specify the parameters for the prior.
3 Cepstral Environment Compensation 3.1 VTS Environment Approximation Due to the noise is additive in the linear spectral domain, the speech corruption in the cepstral domain will be nonlinear. Denote the noisy feature, the clean feature and the noise in the cepstral domain by y , x and n , the nonlinear acoustic-distorted model in the cepstral domain can be represented as y = x + D ⋅ log{1 + exp( D −1 ⋅ (n − x))} = x + f ( x, n) ,
(3)
Environment Compensation Based on Maximum a Posteriori Estimation
857
where D −1 is the inverse of the discrete cosine transformation matrix D and f ( x, n) is a nonlinear function. Given an independent and identical distributed (i.i.d.) sequence X = {x1 , x2 ,L , xT } , we assume that each feature vector x can be represented as a mixture of multivariate Gaussian distributions which is written as M
p ( x) = ¦ p j G ( x; μ xj , Σ xj ) ,
(4)
j =1
where M denotes the total number of mixture components, p j , μ xj and Σ xj denote the mixture gain, the mean vector and the diagonal covariance matrix for the mixture component j , respectively. The Gaussian distribution with mean vector μ and diagonal covariance matrix Σ is represented by G (⋅ | μ , Σ) . We further assume that noise n can be well represented as a single Gaussian distribution G (n; μ n , Σ n ) with mean vector μn and diagonal covariance matrix Σ n and independent from the clean speech x . Unfortunately, the noisy speech is not a Gaussian mixture model (GMM) due to the nonlinear environment characteristics in Eq.(3). In order to effectively estimate the noise parameters from the acoustic-distorted feature sequence Y = { y1 , y2 ,L , yT } using EM algorithm, we utilize the truncated first-order VTS expansion to linearize f ( x, n) in Eq.(3) around the mean vector μ xj in mixture component j of the clean model and the initial mean vector μn0 of the noise model. This gives the linearized acoustic-distorted model in the mixture component j : y = Aj x + B j n + C j ,
(5)
where the coefficients Aj , B j and C j are dependent on the mixture component j , which satisfy 1 −1 ° Aj = D ⋅ 1 + exp D −1 ⋅ ( μ 0 − μ ) ⋅ D { } n xj ° ° . ® B j = 1 − Aj ° 0 0 °C j = f ( μ xj , μn ) − ( Aj − 1) μ xj − B j μn °¯
(6)
With VTS environment approximation, the distribution of the noisy feature is a GMM where the mean vector and the covariance of each mixture component are obtained as follows ° μ yj = Aj μ xj + B j μ n + C j ® ' ' °¯Σ yj = Aj Σ xj Aj + B j Σ n B j
j = 1,2,L, M .
(7)
3.2 Clean GMM Trained with SOM The clean GMM can be trained by using SOM neural network. In Fig.1, SOM developed by Kohonen is an unsupervised clustering network [10], which has two layers
858
H. Shen et al.
structure: the input layer and the competition layer. Each input neuron i is connected with each output neuron j with the synaptic weight wij . In Fig.2, for each representative c , we define three neighborhoods C (k ), k = 0,1, 2 . Each has a different learning rate η k . The value η k will be greater if the neighborhood is closer to the representative c . If output neuron c wins when D dimensional input vector x(l ) = {x1 (l ),L, xD (l )}′ and the weight w j (l ) = {w1 j (l ),L, wDj (l )}′ satisfies [10] x(l ) − wc (l ) = min x(l ) − w j (l ) ,
(8)
then update the synaptic weight vector according to ° w j (l ) + ηk (l )( x (l ) − w j (l )), j ∈ C ( k ) . w j (l + 1) = ® °¯ w j (l ), j ∉ C (k )
(9)
c
Competition layer
j wij
Input layer C2 C1 C0
i Fig. 1. SOM Network Structure
Fig. 2 Topological Neighborhoods
3.3 Noise Estimation Based on the noisy GMM and the assumed Gaussian prior distribution, the noise estimate can be obtained using batch-EM algorithm. The batch-EM algorithm is an iterative procedure, estimating the parameter from the whole utterance. The auxiliary function θ MAP (λˆ | λ ) based on MAP can be defined as follows [11] θ MAP (λˆ | λ ) = E{log P(Y , J | λˆ ) | Y , λ} + log p (λˆ ) .
(10)
where λˆ and λ are respectively the new noise estimate and the old noise estimate. For simplicity, in this paper, we only estimate the noise mean vector using EM algorithm which corresponds to λ = {μ n } in Eq.(10) . The diagonal covariance matrix Σ n of the noise can be directly estimated from the incoming nonspeech frames. It is expected that we assume the prior of the noise mean vector is a diagonal Gaussian distribution G ( μn ; mn , Γ n ) where mn and Γ n respectively are the mean vector and the diagonal covariance matrix. Eq.(10) can be rewritten as:
Environment Compensation Based on Maximum a Posteriori Estimation T
859
M
θ MAP (λˆ | λ ) = ¦¦ p ( jt = j | yt , λ )log {G ( y; μˆ yj , Σ yj )} + log {G ( μˆ n ; mn , Γ n )} , t =1 j =1
(11)
where T is the number of frames in current utterance, J = { j1 , j2 ,L, jT } is the mixture gain sequence, μˆ n is the new mean estimate corresponding to the old estimate μn , the noisy mean vetor μˆ yj is the function of μˆ n described in Eq.(7) , p ( jt = j | yt , λ ) is a posterior probability which can be written as p ( jt = j | yt , λ ) =
p j G ( yt ; μ yj , Σ yj ) M
.
(12)
¦ p jG( yt ; μ yj , Σ yj ) j =1
Taking derivative of the auxiliary function with respect to λˆ = {μˆ n } , the noise mean estimate can be obtained according to T
M
¦¦ p( j
t
μˆ n =
= j | yt , λ ) B j′Σ −yj1 ( yt − Aj μ xj − C j ) + Γ n−1mn
t =1 j =1
T
M
¦¦ p( jt = j | yt , λ ) B j′Σ−yj1B j + Γn−1
.
(13)
t =1 j =1
Eq.(13) is a noise estimation equation based on MAP estimation by taking into account the prior of the noise. With EM algorithm, this estimation procedure can do several iterations until the auxiliary function reaches convergence. Due to the ML estimation is a special case of MAP estimation, hence the noise estimate based on ML estimation can be expressed as a formulation which only omit second items both in the denominator and the numerator of the above Eq.(13).
4 Experiments We use the large vocabulary continuous speaker-independent speech recognition system to evaluate the described approach. And we use 61 sub-syllable units as the monophone units and apply the simple left-to-right structure to obtain the well-trained monophone HMMs. Then the system builds the context-dependent triphone HMMs by connecting the corresponding sub-syllable HMMs. After tying and re-estimation with several steps, the trained models with three emitting states, 16 mixtures per state are achieved. To obtain the acoustic features, 12 MFCCs (Mel-scaled frequency cepstral coefficients) and one log-energy, along with their time derivatives are used, thus creating 39 dimensional feature vector. Then further applying CMN approach and log-energy normalization for removing the distortion in the static feature vector which is introduced by the transmission channel (e.g. microphone), these static coefficients with the preceding computed dynamic coefficients are used for training the acoustic model. The training data includes the 42690 utterances of 82 speakers (41 males and 41 females) taken from the mandarin Chinese corpus which is provided by the 863 plan (China High-Tech Development Plan) [12]. The clean 900 utterances of 9
860
H. Shen et al.
speakers in the corpus are used for artificially contamination. The white and babble noise from NoiseX92 [13] are added to the clean test set according to different SNR from 0dB to 20dB. Then following the aforementioned approach, the static cepstral coefficients are compensated. The log-energy feature is compensated by using improved SS (Spectral Subtraction) approach which can overcome the music noise and “over-subtraction”. Then all of the compensated feature vector plus their corresponding dynamic feature vector are obtained. After the static coefficients are further compensated with CMN and log-energy normalization, the feature vector is sent into the system for recognition. In this paper, we only estimate the mean vector of the noise. Assuming that the prior of the noise is assumed to be a diagonal Gaussian density, the moment method can be used to estimate the prior parameters of the noise in the absence of speech from the test data. In addition, the clean speech in the training set is trained in the cepstral domain to obtain 128 mixture Gaussian components using SOM neural network with 24 input neural nodes. In order to effectively evaluate the described approach, we conduct a number of experiments with different approaches, such as the baseline without any compensation (using 12 MFCCs plus one log-energy feature and their corresponding delta and acceleration coefficients during the acoustic model training and recognition procedures), the CMN approach, the ML-based log environment compensation approach, the MLbased cepstral environment compensation approach and the approach described in this paper, that is, the MAP-based cepstral environment compensation approach. These approaches are respectively titled as “baseline”, “CMN”, “VTS+log+ML”, “VTS+cep+ML” and “VTS+cep+MAP” in Table 1 and Table 2. Firstly, we test this approach in the stationary white noisy environments. From Table 1, the speech recognition performance degrades drastically from 85.61% recognition rate in the clean condition to 0.32% in the 0dB condition. With the traditional CMN approach, the system improvement is averagely achieved with about 7% recognition rate, than that of “baseline”. It demonstrates that CMN is very important approach to reduce the mismatch between the acoustic models and the test data. It can reduce the distortion introduced by the microphone used for recording the utterances. In “VTS+log+ML”, the clean GMM model is trained in the log domain using the SOM neural network with 25 input neuron nodes, respectively representing 25 dimensional feature vector (24 log-filterbank coefficients and one log-energy feature). After ignoring off-diagonal elements in the covariance matrices of the clean model, they are jointly compensated using batch-EM algorithm under ML criterion [5]. It can be seen that environment compensation in the log domain is not better that those in the cepstral domain. There exists averagely about 7% recognition rate gap under ML criterion. Those results are easily explained. The noise parameter will be effectively estimated in the cepstral domain because the noisy speech can be effectively modeled the diagonal GMM after employing VTS approximation. We can further improve the system performance by using MAP criterion. In Table 1, the MAP noise estimation embedded in the cepstral environment compensation shows the effectiveness of its algorithm in all the white noisy conditions besides the clean condition.
Environment Compensation Based on Maximum a Posteriori Estimation
861
Table 1. Recognition rates (%) for the white noise
SNR baseline CMN VTS+log+ML VTS+cep+ML VTS+cep+MAP
0dB 0.32 3.31 5.18 9.05 10.27
5dB 2.54 10.98 16.16 24.42 24.59
10dB 11.14 29.99 36.16 47.37 48.33
15dB 30.00 36.94 61.24 68.33 69.23
20dB 56.04 61.65 71.63 79.60 80.00
clean 85.61 86.61 84.14 86.64 86.88
avg. 30.94 38.26 45.75 52.57 53.22
We also test this approach in the nonstationary babble noisy environments. The babble noise is one of the most representative noises, which is produced in the noisy room where there are a lot of people to chat. It is observed From Table 2 that with the described approach, the system also obtains further improvements at most noisy conditions compared with those compensated by “VTS+cep+ML”. The system under the distortion environment only achieves 52.02% recognition rate without any compensation technique. The described approach, “VTS+cep+MAP” predominately achieves the best performance, averagely with 60.16% recognition rate, averagely outperforms “VTS+cep+ML” with 0.51% recognition improvement. Table 2. Recognition rates (%) for the babble noise
SNR baseline CMN VTS+log+ML VTS+cep+ML VTS+cep+MAP
0dB 3.87 11.16 15.77 15.80 15.80
5dB 24.61 32.38 37.19 35.38 36.79
10dB 54.84 55.95 60.77 60.29 61.44
15dB 62.98 71.04 74.73 76.57 77.26
20dB 80.23 80.31 81.07 83.22 82.80
clean 85.61 86.61 84.14 86.64 86.88
avg. 52.02 56.24 58.95 59.65 60.16
5 Conclusions In this paper, we describe an environment compensation approach in the cepstral domain based on MAP estimation. The environment model in the cepstral domain is linearized by the truncated first-order vector series Taylor expansion. Batch-EM algorithm can be applied to MAP estimation assuming the prior of the noise is a conjugate density. The Gaussian mixtures model of the clean speech is achieved by using SOM neural network. Due to the cepstral features are nearly independence, experiment simulation demonstrates that this approach achieves significant improvement.
References 1. Boll, S. F.: Suppression of Acoustic Noise in Speech Using Spectral Subtraction. IEEE Trans. Acoustics, Speech and Signal Processing, (1979)113-120 2. Moreno, P.J., Raj, B., Stern, R.M.: A Vector Taylor Series Approach for EnvironmentIndependent Speech Recognition. In the Proceedings of IEEE (1995)733-736
862
H. Shen et al.
3. Kim, N.S., Kim, D.Y., Kong, B. G., Kim. S. R.: Application of VTS to Environment Compensation with Noise Statistics. In: ESCA workshop on Robust Speech Recognition, Ponta-Mousson, France (1997) 99-102 4. Kim, N.S.: Statistical Linear Approximation for Environment Compensation. IEEE Signal Processing Letters, 1(1998)8-10 5. Shen, H., Liu, G., Guo, J., Li, Q.: Two-Domain Feature Compensation for Robust Speech Recognition. In: Wang, J., Liao, X., and Yi, Z. (eds.): Advance in Neural Network- ISNN 2005. Lecture Notes in Computer Science 3497, Springer-Verlag, Berlin Heidelberg New York(2005)351–356 6. Shen H., Guo, J., Liu, G., Li, Q.: Non-Stationary Environment Compensation Using Sequential EM Algorithm for Robust Speech Recognition. In: the 9th European Conference on Principles and Practice of Knowledge Discovery in Databases (PKDD 2005), Lecture Notes in Artificial Intelligence 3721, Springer-Verlag, Berlin Heidelberg New York(2005)264-273 7. Gauvain, J.L., Lee, C.H.: Maximum A Posteriori Estimation for Multivariate Gaussian Mixture Observation of Markov Chains. IEEE Transactions on Speech and Audio Processing, 2 (1994) 291-298 8. Huo, Q., Lee, C.H.: On-Line Adaptive Learning of the Continuous Density Hidden Markov Model Based on Approximate Recursive Bayes Estimate. IEEE Transactions on Speech and Audio Processing, 2(1997)161-172 9. Huo, Q., Chan, C., Lee, C.H.: Bayesian Adaptive Learning of the Parameters of Hidden Markov Model for Speech Recognition. IEEE Transactions on Speech and Audio Processing, 5(1995)334-345 10. Kohonen, T.: The self-Organizing Map. In: the Proceedings of the IEEE, Vol.78, (1990)1464-1480 11. Dempster, A.P., Laird, N. M., Rubin, D.B.: Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, (1977)1-38 12. Zu, Y. Q.: Issues in the Scientific Design of the Continuous Speech Database. Available: http://www.cass.net.cn/chinese/s18_yys/yuyin/report/report_1998.htm. 13. Varga, A., Steenneken, H. J. M., Tomilson, M., Jones, D.: The NOISEX–92 Study on the Effect of Additive Noise on Automatic Speech Recognition. Tech. Rep. DRA Speech Research Unit(1992)
ASR Based on the Analasys of the Short-MelFrequencyCepstra Time Transform Juan Arturo Nolazco-Flores Computer Science Department, ITESM, Campus Monterrey, Av. Eugenio Garza Sada 2501 Sur, Col. Tecnol´ ogico, Monterrey, N.L., M´exico, C.P. 64849 [email protected]
Abstract. In this work, we propose to use as source of speech information the Short-MelfrequencyCepstra Time Transform (SMCTT), cτ (t). The SMCTT studies the time properties at quefrency τ . Since the SMCTT signal, cτ (t), comes from a nonlinear transformation of the speech signal, s(t), it makes the STMCTT a potential signal with new properties in time, frequency, quefrency, etc. The goal of this work is to present the performance of the SMCTT signal when the SMCTT is applied to an Automatic Speech Recognition (ASR) task. Our experiment results show that important information is given by this SMCTT waveform, cτ (t).
1
Introduction
In a pattern classification system, a signal is preprocessed to emphasise signal features, reduce noise, etc.; the next step, in order to reduce the data, the feature extraction step is performed; finally, the features are then passed through a classifier that makes a decision. In the speech recognition problem, we usually use the acoustic speech time signal obtained from the sound pressure in the lips, although visual speech information such as lip movement, can also be used; if acoustic speech is used, in the preprocessing step, we preemphasise acoustic speech to convert speech sound pressure, s(t), to velocity of the volume air of the speech [11], enhance the spectrum to remove additive noise, etc.; in the features extraction step, either the MFCC [1], lp-cepstra, plp [2, 3] coefficients are calculated; and in the classification step, hmm based systems are generally used. In this work, we propose to obtain the features from the Short-MelFrequencyCepstra Time Transform (SMCTT), cτ (t), instead of calculating them from the sound pressure in the lips, s(t). The aim of this work is to explore how well the SMCTT performance in an ASR task. In the future, we would also like to analyse the SMCTT signal performances in noisy enviroments. In addition, it can also be usefull to know how well it discriminates different categories; moreover, we also would like to know if the information obtained with the SMCTT signal can be combined with the features obtained from the lips’ sound pressure signal. In the same way that video speech is combined with audio signal to improve ASR, specially in noisy environments [16] [15] [12]. This A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 863–869, 2005. c Springer-Verlag Berlin Heidelberg 2005
864
J.A. Nolazco-Flores
improvement is achieved because it can be shown that acoustic and visual information can interact to improve the perception of speech in noise [13, 14]. This paper is organized as follows. In section 2, we review some time-frequency concepts and definitions. In section 3, we define the Short-MelFrequencyCepstrum Time Transform (SMCTT). In section 4, the speech signal pre-processing is described. The system architecture description is defined. In section 5, the experiments environment as well as the results are given. Finally in section 6, the comments and conlus ions are given.
2
Time-Frequency Speech Analysis
When we speak, we are continuously changing the physical shape of our speech production system (tongue, mouth, lips, etc). It happens that the values of each of the frequencies of the speech at least depend on the shape and the position of each of the elements of the system. Therefore, since features of the speech change with time, we then need a joint time-frequency representation of the speech. A combined time-frequency analysis tell us the contribution of the frequencies in a particular time, t. Short-time Fourier transform has been the time-frequency representation used for speech analysis since the 1940s [5]. Actually, it is the most widely method for studying nonstationary signals1 . The short-time Fourier Transform breaks up the signal into small time segments and calculate the Fourier transform for each of the time segments and it is defined as follows St (ω) =
√1 2π
St (ω) =
√1 2π
G G
e−jωτ st (τ ) dτ e−jωτ s(τ )h(τ − t) dτ
where s(t) is the acoustic speech time signal, h(t) is the time window. Time segments are usually called frames. The frames can overlap adjacent frames, depending on both frames length and frame ratio. For the speech signal obtained from the lips’ sound pressure, the frame length is usually 25ms and the frames ratio is 100ms. The Short-Time Fourier transform (STFT), St (ω), studies the frequency properties at time t. On the other hand, the Short-Frequency Time Transform (SFTT), sω (t), studies the time properties at frequency f . The SFTT is defined as [5]: sω (t) = √ 1
2/pi
sω (t) = √ 1
2/pi
1
G G
e−jω t Sω (ω ) dω
e−jω t S(ω )H(ω − ω ) dω
other methods have also been proposed, for example the Cohen, Wigner, MargenauHill, Kirkwood, Choi-Williams, etc. [5, 7, 8, 9]
ASR Based on the Analasys
865
It can be shown that spectrogram can be used to study the behavior of time properties at a particular frequency, ω [5].
3
Short-MelfrequencyCepstrum Time Transform (SMCTT)
Based on the definitions of the cepstral coefficients [11] and the SFTT, we will define the Short-Cepstrum Time Transform (SCTT) as follows: c(t, τ ) =
1 2π
G 2π w=0
log |S(t, ω)|ejωn dω
where |S(t, ω)| is the magnitude spectrum of the speech signal. In the same way that SFTT study the time properties at frequency ω, the SCTT study the time properties at quefrency τ . In the same way we defined the SCTT, now based on the definitions of the MFCC [1] and the SFTT we will define the Short-MelfrequencyCepstrum Time Transform (SMCTT) as follows: cn (t) =
20 k=1
π Sk (t) cos (n(k − 12 ) 20 ))
where Sk (t) = ln(f bankk ) for k = 0, 1, 2, ...20, f bankk , is the ouput of the mel filter k, mel filter is the weighted sum of the FFT magnitude spectrum values in each band of the filter. Each mel filter in the filterbank is a Triangular, halfoverlapped window. In the same way that SFTT study the time properties at frequency ω,the SMCTT study the time properties at melcepstra n.
4
Digital Speech Signal Processing
Figure 1 shows the calculation needed to obtain a speech database with signal ct (n). An example of the cn (t) for different values of n is shown in Fig. 2. The
Speech Database
Framing
PE logE W FFT MF LOG DCT
PE
W
FFT
MF
pre-emphasis energy measure computation windowing fast Fourier transform (only magnitude components) mel-filtering nonlinear transformation discrete cosine transform
LOG
DCT
Timefrequency speech database Selection of a particular coefficient
Time-frequency Speech Database
Fig. 1. Signal Speech Processing
866
J.A. Nolazco-Flores
Fig. 2. s(t), c3 (t), c4 (t) and c5 (t)
selection of the quefrency can be based on the noise features, for example if a melcepstral coefficient is less corrupted in a noisy environment. The cn (t) signal is the one that will be used to calculate the MFCC for the ASR system.
5
System Architecture Description
Since we are planning to explore how well the SMCTT performs in a ASR tasks, this section explains teh Architecture we used. The CMU SPHINX-III systems
Fig. 3. c5 (t) spectrogram, c5 (Ω)
ASR Based on the Analasys
867
[10] is a HMM-based speech recognition system able to handle a large vocabulary. The architecture of this system is shown in Fig. 4. As can be observed in this figure the MFCC of cn (t) are calculated, then the MFCC’s first and second derivaties are concatenated [11], i.e. if the number of MFCC is 13 then the total dimension of the feature vector would be 39.
Pre-processing
Label Files Training SMCTT
13 MFCC 13 MFCC 13 MFCC
Language Model
Baum-Welch
Acoustic Models
Bigrams
Testing SCMTT
Hypothesis Viterbi
Fig. 4. CMU SPHINX-III ASR architecture
The acoustic models are also obtained using the SPHINX-III tools. These tools use a Baum-and-Welch algorithm to train this acoustic models[?]. The Baum-and-Welch algorithm needs the name of the word units to train as well as the label and feature vectors. The SPHINX-III system allows us to model either discrete, semicontinuous or continuos acoustic models. Furthermore, it allows the selection of acoustic models: either a phone set, a trigram set or a word set.
6
Experiments
In this section the configuration of the SPHINX-III system is described. Thirteen mel-frequency cepstral coefficients (MFCC) were used. First and Second deritatives were calculated, therefore each feature vector is formed by 39 elements. The speech lower frequency was 300 Hz and the speech higher frequency was 3,500 Hz. The frame rate was set to 100 ms and a 30 ms Hamming window was employed. A 512 samples FFT length was used and the number of filterbans was set to 31. Five states continuous HMM was used as acoustic modeling technique and bigrams were used as a language modeling technique. The language models are obtained using the CMU-Cambridge statistical language model toolkit version 2.0. As a discount model Good Turing was used. Using an acoustical model and a language model a Viterbi decoder obtain the best hypothesised text. Table 1 shows the results. As expected the Witten-Bell discount strategy was the one with better results.
868
J.A. Nolazco-Flores
Table 1. WER results over several gaussian distributions and language model configurations Coefficient Accuracy C3 67.699% c4 65% c5 67.324%
7
Conclusions
In this work, we defined Short-MelfrequencyCepstra Time Transform (SMCTT), cτ (t), and we described the experimental results obtained when the SMCTT is used in an ASR task. The results show the important information is in this signal. As next step is to demonstrate how well this signal complements the information of the time signal of the presion flow. A future step in this research is to analyse the robustness of this signal in presence of noisy environments. As in the AVSR systems, we expect that by combining the information obtained by SMCTT signal with the information of the signal based on the lips’ sound pressure, we will obtain better performance in a ASR task. Since the SMCTT generates a signal with unique features, then more studies need to be developed to properly process this signal. We are also planning to define and develop experiments with the ShortFrequency Time Transform (SFTT), the short-lpc time transform (SLPCTT), the short-ReflectionCoefficients time transform (SRCTT), the short-PLP Time Transform (SPLPTT), etc.
Acknowledgements The authors also would like to acknowledge CONACyT, project CONACyT2002-C01-41372, who partially supported this work.
References 1. S. Davis & P. Mermelstain, Comparasion of parametric representations for monosyllabic word recognition in continuously spoken sentences IEEE Trans. ASSP, ASSP-28, 357-366, 1980 2. Hermansky, H., Hanson, B., and Wakita, H. Perceptually based linear predictive analysis of speech,Acoustics, Speech, and Signal Processing, IEEE International Conference on ICASSP ’85. Volume 10, Apr 1985 Page(s): 509-512. 3. Hermansky, H. ”Perceptual Linear Predictive (PLP) Analysis for Speech,” Journal of Acoustic Society of America, 1990, pp: 1738-1752 4. Zbancioc, M., Costin, M., Using neural networks and LPCC to improve speech recognition, Signals, Circuits and Systems, 2003. SCS 2003. International Symposium on Volume 2, 10-11 July 2003 Page(s):445 5. Cohen, L., Time-Frequency analysis, Prentice Hall, 1995
ASR Based on the Analasys
869
6. Tahir, S.M. and Sha ’ameri, A.Z., A comparison between speech signal representation using linear prediction and Gabor transform, Communications, 2003. APCC 2003. The 9th Asia-Pacific Conference on Volume 2, 21-24 Sept. 2003 Page(s):859862 7. W. Martin, & P. Flandrin, Winger-ville Spectral Anaysis of Nonstationary Process, IEEE Proc. ASSP, Vol. ASSP-33, No. 6, Dec., 1985. 8. L.M. Kadra, The smoothed pseduo Wigner Distribution in Speech Processing, Int. J. Electronics, Vol. 65, No. 4, 1988, pp. 743-755. 9. Graudari, Speech Signal Analysis using the Wigner distribution, IEEE Pacific Rim Conference on Communications, Computers and Signal Processing, Conference Proceeding., Volume 1, 13-16 Oct. 1996 Page(s):497-501, 1989. 10. A. V. Oppenheim & R.W. Schafer, Digital Signal Processing, Prentice Hall, 1975. sphinxLee, K., Large Vocabulary Speaker-Independent Continuous Speech Recognition: The SPHINX System. .PhD thesis, Computer Science Department, Carnegie Mellon University, April 1988. 11. Deller, J.R., Proakis, J.G., Hansen, J.H.L., Discrete-Time Processing of Speech Signals, Comparasion of parametric representations for Prentice Hall, Sec. 6.2, 1993. 12. Chu, S.M.; Libal, V.; Marcheret, E.; Neti, C. Multistage information fusion for audio-visual speech recognition Multimedia and Expo, 2004. ICME ’04. 2004 IEEE International Conference on Volume 3, 27-30 June 2004 Page(s):1651 - 1654 Vol.3 13. Rao, R.A.; Mersereau, R.M.; Lip modeling for visual speech recognition Signals, Systems and Computers, 1994. 1994 Conference Record of the Twenty-Eighth Asilomar Conference on Volume 1, 31 Oct.-2 Nov. 1994 Page(s):587 - 590 vol.1 14. Kaynak, M.N.; Qi Zhi; Cheok, A.D., Sengupta, K.; Zhang Jian; Ko Chi Chung; Analysis of lip geometric features for audio-visual speech recognition, Systems, Man and Cybernetics, Part A, IEEE Transactions on Volume 34, Issue 4, July 2004 Page(s):564 - 570. 15. Yuhas, B.P.; Goldstein, M.H., Jr.; Sejnowski, T.J.; Integration of acoustic and visual speech signals using neural networks, IEEE Communications Magazine, Volume 27, Issue 11, Nov. 1989 Page(s):65 - 71 16. Say Wei Foo; Yong Lian; Liang Dong; Recognition of visual speech elements using adaptively boosted hidden Markov models, Circuits and Systems for Video Technology, IEEE Transactions on Volume 14, Issue 5, May 2004 Page(s):693 - 705
Building and Training of a New Mexican Spanish Voice for Festival Humberto P´erez Espinosa and Carlos Alberto Reyes Garc´ıa ´ Instituto Nacional de Astrof´ısica Optica y Electr´ onica Luis Enrique Erro No. 1, Tonantzintla, Puebla, M´exico
Abstract. In this paper we describe the work done to build a new voice based on diphone concatenation in the Spanish spoken in Mexico. This voice is compatible with the Text to Speech Synthesis System Festival. In the development of each module of the system the own features of Spanish were taken into account. In this work we hope to enhance the naturalness of the synthesized voice by including a prosodic model. The prosodic factors taken into consideration by the model are: phrasing, accentuation, duration and F0 contour. Duration and F0 prediction models were trained from natural speech corpora. We found the best prediction models by testing several machine learning methods and two different corpora. The paper describes the building, and training process as well as the results and their respective interpretation.
1
Text to Speech Synthesis Systems
A Text to Speech (TTS) Synthesis System is a computer based system that must be able to read any text aloud [1]. There are two main goals in a text to speech system. The first one is to produce a natural sounding voice, which must sound as similar as possible to human voice. The second one is to provide the synthesized voice with a suitable intonation, to allow the listener to understand the meaning of what is being spoken. If these two goals are not accomplished, the result is a robotic and monotone voice. Such a kind of voice causes that applications of these systems are not so well accepted by users. They even generate certain discomfort or distrust in people who interact with these systems, since listening a robotized voice is not as comfortable as listening to a human voice. Even though TTS systems can use several synthesis approaches they share a common architecture that can be divided in two large modules which are, the natural language processing module and the signal processing module. In Figure 1 are shown these two modules. The natural language processing module produces a phonetic transcription of the input text, along with the desired intonation and rhythm (prosody). The digital signal processing module transforms the received symbolic information into speech.
2
Festival
Festival is a TTS Synthesis System that offers a general framework to build TTS systems in any language. Several voices in different languages are already A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 870–879, 2005. c Springer-Verlag Berlin Heidelberg 2005
Building and Training of a New Mexican Spanish Voice for Festival
871
Fig. 1. Text to Speech System General Architecture
built and available to serve as reference to build new ones. In addition, it is offered the set of tools FestVox which helps in building and training new voices [2]. The philosophy of Festival is that it should not be necessary to build a whole TTS system to test an implementation of some of the modules of a TTS system. Festival offers all the needed tools to make TTS conversion in a flexible environment allowing to modify the existing modules and to add new ones. This makes Festival an excellent tool to test new models for language processing, prosody modelling and signal synthesis in any language. Festival system is made up of the following elements [3]: – System Control: The language for the writing of scripts is Scheme. The Festival control system includes modules in C/C++ to interface with the modules in Scheme. Object oriented representation of utterances, audio input - output, and access to audio devices are also included. – Data Structures: They allow accessing to each one of the useful data in each stage of TTS conversion process, and also allow to model different aspects of speech (see Figure 2). The main data structure in Festival is the utterance. The utterance consists of a set of items, where each of them has one or more relations and a set of features [4].
872
H. P´erez Espinosa and C.A. Reyes Garc´ıa
Fig. 2. Utterances structure
– TTS Modules: These modules process the text before translating it to phonemes, apply a prosodic model to determine pauses between phrases, durations of phonemes and fundamental frequency. And finally, generate the signal.
3
Voice Building
The built voice is based on diphone concatenation. A diphone is the central part of the union of two phonemes. A diphone begins in the middle of the first phone and finishes in the middle of the second phone. Diphone synthesis tries to solve the problem of coarticulation making the assumption that this kind of effects never goes beyond two phones. In order to build a diphone database a list with all the possible combinations phoneme - phoneme is needed. Next, only the diphones used in the studied language are selected. The new voice building process included the following stages [5]: – Corpus Recording: In order to record the diphone corpus, a list of nonsense words is created. Each one of these nonsense words includes a diphone. The list of diphones and words used in this work were taken from [6]. Table 1. Nonsense Word Examples Nonsense Word Diphone ataata a-a ataeta a-e ataita a-i
The corpus of 613 nonsense words was recorded in a professional studio and was read by a Mexican native professional radio presenter. It was recorded
Building and Training of a New Mexican Spanish Voice for Festival
873
at a 44.1 KHz sampling frequency and using 16 bits of representation. The output was mono channel. – Corpus Segmentation: The result of the recording process was a file in wav format. This file was split in 613 files, each one containing a nonsense word. – Nonsense words labelling: This labelling is at phoneme level and consists of specifying the end of each of the phonemes in the word. Festival offers a script to do the labelling automatically, however, it is not perfect and it must be corrected manually. A Index file that identifies what diphone corresponds to what file is then created. – Text processor: Rules to handle punctuation, abbreviations, reading of numbers, spelling, etc. were included. In addition, a lexicon was included. In this lexicon the pronunciation of words that contain phonemes which are exceptions of the text to phoneme rules is specified. The algorithms for Spanish syllabification and accentuation proposed in [6] was implemented.
4
Building of a Prosodic Model
To build a prosodic model we need 4 modules [7]: – Phrasing: It is the grouping of words in a spoken phrase dividing it in one or more prosodic groups [8]. Phrasing in voice synthesis makes the speech more understandable. To build a trained phrasing model it is recommended to use a corpus with 37,000 words. Since the size of our corpora is not enough (less than 2000 words) to train a phrasing model, we use a heuristic model, based on punctuation detection, counting of words before and after punctuation and word classification. – Accents: In this module it is predicted what will be the accent shape of an accented syllable. For training an accent model the size of our corpora could be enough. The problem here is that the corpus must be labelled with several kind of accents, which is a very laborious task. In this work we choose to implement a tree which only differentiate between accented and not accented syllables. – F0: After predicting accents location and their shape a pitch contour is built based on those predictions. Pitch contour, or F0 contour, is defined as the temporary variation in fundamental frequency [9]. We built a trained model for F0 prediction. This model is described in next section. – Duration: Here the durations of phonemes and syllables in words are predicted. The experiments made to built a trained duration model are described in next section.
5
Experiments
In this work, in addition to describing the voice building process for Festival, the training and building of two of the modules of the prosodic model is also presented. These modules predicts phoneme duration and f0 contour. The experiments made using two speech corpora and several learning machine methods. The building of this two modules are described and discussed in this section.
874
5.1
H. P´erez Espinosa and C.A. Reyes Garc´ıa
Description of Corpora
The experiments were made using two different corpora of Mexican Spanish speech recordings. The first corpus is called Fraga and was recorded in 1998 by TLATOA UDLA laboratory in collaboration with the CSLU (for Center Spoken Language Understanding). This corpus consists of 824 recorded utterances sampled at 16 KHz. Only 110 recording were used from this corpus. The second corpus is the Corpus DIMEx100 sampled at 44.1 KHz. This corpus is described in [10]. We use 60 recordings from this corpus. For prediction we used WEKA [11] that include several prediction methods, and the tool for data manipulation WAGON which is supported by Festival and predict using CART trees. 5.2
Machine Learning Methods
Since the predicted attributes in the case of durations and F0 are continuous, the learning algorithms must support numerical prediction. After testing several prediction methods we selected those that gave better results, which are: CART Tree (Classification and Regression Tree), Linear Regression, M5P (based on linear regression) and REPTree (Fast Decision tree learner). The performance measures used in the experiments and shown in results Tables are: RMSE Root Mean Squared Error, MAE Mean Absolute Error and CORR Correlation Coefficient. The best result is the one who has higher Correlation Coefficient, lower Mean Absolute Error, and lower Root Mean Squared Error.
6 6.1
Results Results for Duration Prediction
For the phonemes duration prediction experiments we extracted from utterances the features suggested in [5] which are at segment level and include features such as phoneme name, its preceding phoneme name and its successive phoneme name, among other 91 features. Festival supports two ways of phoneme duration modelling. One way is Zscores, that is the number of standard deviations from the mean. We made experiments predicting Zscores and also experiments predicting phoneme duration directly. In Table 2 we can see some statistics of both corpora used in duration modelling. These instances were used to train and test the duration prediction models. Each instance corresponds to the appearance of a phoneme in the corpus. In Table 3 we can see the results for Zscores prediction. The best model for Zscores prediction was obtained using the Fraga corpus trained with the CART Tree method. In the case of corpus DIMEx100 a significant difference between MAE and RMSE can be appreciated which indicates that in corpus DIMEx100 there are instances whose prediction errors are significantly greater than the mean prediction error of the instance set. The reason of this could be that the corpus DIMEx100 was labelled automatically for these experiments and the manual correction could not be meticulous enough. Better results were obtained using
Building and Training of a New Mexican Spanish Voice for Festival
875
Table 2. Corpora Statistics
Statistic Instances Atributes Maximum Minimum Std. Dev. Mean
DIMEx100 Fraga Zscores Duration Zscores Duration 2567 2567 9887 9887 92 92 92 92 5.452 0.205 5.433 0.220 -4.644 0.001 -2.85 0.01 0.996 0.026 0.998 0.028 0 0.061 0 0.063
corpus Fraga since with all the prediction methods a greater correlation between real and predicted values were obtained. Table 3. Zscores Prediction
Method CartTree Linear Regresion M5’ REPTree
DIMEx100 RMSE MAE CORR 0.914 0.546 0.264 0.952 0.747 0.313 0.948 0.745 0.319 0.987 0.762 0.289
RMSE 0.799 0.921 0.854 0.888
Fraga MAE CORR 0.515 0.550 0.723 0.386 0.652 0.533 0.666 0.493
In phoneme duration prediction, just as in Zscroes prediction, the best model for phoneme duration prediction was obtained using the corpus Fraga trained with the CART Tree method. The results obtained by predicting directly the phonemes durations were better than the obtained ones by predicting Zscores. In Table 4 we can see the results for phoneme duration prediction. In the case of durations prediction the best correlation coefficient obtained was 0.7832, whereas in the case of Zscores prediction the best correlation coefficient was 0.55. The duration prediction model built by the CART Tree using the corpus Fraga, was packed into a Scheme file to be used by our Mexican Spanish voice, since it had the best results. Table 4. Phoneme Duration Prediction
Method CartTree Linear Regresion M5’ REPTree
DIMEx100 RMSE MAE CORR 0.0234 0.0144 0.3307 0.0237 0.0183 0.4269 0.0238 0.0184 0.4207 0.0243 0.0182 0.411
RMSE 0.0177 0.0199 0.0175 0.0181
Fraga MAE 0.0114 0.0153 0.013 0.0134
CORR 0.7832 0.6941 0.7788 0.7615
At the bottom of Figure 3 it is shown a part of the signal amplitude of a phrase from corpus Fraga. The phrase is: La generaci´ on de los sentidos. This phrase
876
H. P´erez Espinosa and C.A. Reyes Garc´ıa
has a total duration of 1.827 seconds. This same phrase synthesized without the prosodic trained models is shown at the top of Figure 3. Its total duration is 1.540. At middle part of Figure 3 is shown the synthesized phrase using the trained model. In this case the total duration is 1.558 segs.
Fig. 3. Recorded and Synthesized Phrases Amplitude
In Table 5 are listed the durations in seconds of the first 9 phonemes of the phrase. We can see that the phonemes durations of the phrase synthesized with the trained duration model is closer to the phonemes duration of the phrase extracted from corpus than the phonemes durations of the phrase synthesized with a duration model based on the Zscores default CART Tree for phoneme duration prediction of Festival and the phoneme duration data proposed in [6]. Table 5. Phoneme Duration in Synthesized and Recorded Phrases Phrase l a j e n e r a s i Synthesized Old 0.044 0.067 0.032 0.059 0.049 0.059 0.058 0.067 0.071 0.060 Synthesized New 0.048 0.071 0.096 0.058 0.053 0.061 0.038 0.064 0.094 0.054 Recorded 0.120 0.090 0.100 0.040 0.050 0.060 0.040 0.060 0.140 0.080
6.2
F0 Results
For F0 prediction we used 21 features at syllable level. Some of the features are: the number of phonemes in the syllable, the number of syllables since the last pause between phrases and the position of the syllable in the word. We obtained three predictions which are: pitch at the beginning, at the middle and at the end of the syllable. We got 4303 instances from corpus Fraga and 1140 from corpus DIMEx100. The results of predictions for start pitch, middle pitch and end pitch are shown in Table 7. In Table 6 are shown the frequency ranks in Hz, means and standard deviations for both corpora. The best Correlation Coefficients for the predictions of f0 were obtained by the CART Tree method with both corpora. All the methods used obtained better results using corpus DIMEx100 to train. We can see that final pitch data are not so consistent since the average of all the RMSE of end pitch predictions for both corpora is 19.12, whereas for initial and middle pitch is 12.304 and 9.506
Building and Training of a New Mexican Spanish Voice for Festival
877
Table 6. Corpora Statistics DIMEx100 Fraga Statistic Start Pitch Mid Pitch End Pitch Start Pitch Mid Pitch End Pitch Minimum 72.072 72.072 36.531 73.056 73.747 36.531 Maximum 173.912 173.908 173.908 173.922 173.936 173.922 Mean 123.29 122.943 86.188 120.537 122.388 101.778 Std. Dev. 17.402 16.568 33.406 19.468 19.593 31.707
respectively. This could be due to the abnormally low end pitches extracted from corpora. In Table 6 we can see that for both corpora the lowest end pitch is 36.531 Hz. Table 7. F0 Prediction
Method CartTree Start CartTree Mid CartTree End Linear Reg Start Linear Reg Mid Linear Reg End M5’ Start M5’ Mid M5’ End REPTree Start REPTree Mid REPTree End
DIMEx100 RMSE MAE CORR 10.0812 8.0681 0.8141 9.0126 7.0536 0.8559 13.9530 9.8464 0.9117 10.397 6.293 0.801 9.133 6.373 0.834 21.273 17.92 0.770 10.406 6.096 0.802 8.034 4.930 0.874 16.156 10.285 0.875 11.130 6.743 0.770 9.229 5.759 0.831 17.008 10.656 0.861
RMSE 13.9406 8.4304 19.8291 14.1129 12.9108 23.9241 13.7564 8.9073 20.2531 14.611 10.3904 20.5879
Fraga MAE 9.4689 5.9788 14.8885 10.5062 9.989 18.7474 10.13 5.7078 13.2607 10.713 6.5693 12.5843
CORR 0.6985 0.9069 0.7758 0.6888 0.6888 0.6562 0.7071 0.8907 0.7694 0.6659 0.8497 0.7679
We compare by subjective means the two best sets of f0 prediction models to determine the best one. Although we obtained a better correlation average coefficients with CART Tree and corpus DIMEx100, we decide to use the f0 prediction models obtained with CART Tree and corpus Fraga since it gives a more natural frequency variation. In Figure 4 are shown the pitch contour of the same phrase used as example in previous section. From top to down we can see: the pitch contour of the natural sentence, the pitch contour of the sentence synthesized with the default intonation model provided by festival, the pitch contour of the sentence synthesized with the model trained with corpus DIMEx100 using CART Tree, the pitch contour of the sentence synthesized with the the model trained with corpus Fraga using CART Tree. The utterances synthesized with the default f0 model have an almost flat contour which decreases along time. These generate a monotone sounding voice. The utterances synthesized with the trained model using corpus DIMEx100 have
878
H. P´erez Espinosa and C.A. Reyes Garc´ıa
more frequency variation, but it has some sharp changes, which generate a trembling sounding voice. Finally, using the model trained with corpus Fraga presents smooth variations of frequency and gives a more natural sounding voice.
Fig. 4. Pitch Contours extracted from Synthesized Phrases and form Natural Phrase
7
Conclusions
A new voice based on diphones concatenation for the Spanish spoken in Mexico was built taking advantage of the general framework offered by Festival. We used two corpora and tested several machine learning methods for the training of a phoneme duration prediction model which predicts durations more accurately than the prediction model used before. Also, a trained model for f0 prediction was built. This model seems to approach the f0 of the synthetic phrases to the one observed in the recorded, nonetheless, it does not modify very well the pitch contour at phrase level. It was observed from the prediction results of both corpora that end pitch prediction is more difficult than start pitch and middle pitch prediction due to data inconsistency. We could appreciate different behaviors of results obtained from corpora. Training Zscores and phoneme duration prediction models we obtained better results using corpus Fraga. We think that it was due to a better phoneme labelling in corpus Fraga and due to its larger number of instances. In the case of F0 predictions, the corpus DIMEx100 gave better results. Since features used in F0 predictions are not at phoneme level, the corpus DIMEx100 results were not so affected by errors in labelling. However, we decided to adopt a model trained with corpus Fraga since it gave the most natural sounding voice. After incorporating the built trained models to the Festival prosody assignation module, we obtained a voice with a more natural intonation. We thought that this improvement could be greater if we enhance the pitch extraction process, since we detected that some instances used in the f0 prediction training
Building and Training of a New Mexican Spanish Voice for Festival
879
seems to be erroneous. We also planned to add more data from Fraga corpus to the training sets. By doing this we hope to improve the veracity and accuracy of our predictions and the quality of our models. Also we plan to improve intonation at phrase level.
References 1. Dutoit T. : An Introduction to Text-to-Speech Synthesis. Dordrecht: Kluwer Academic Publishers (Text, Speech and Language Technology, 3) (1997) 2. The Centre for Speech Technology Research (CSTR): The University of Edimburgh. Internet Page http://www.cstr.ed.ac.uk/projects/festival/ 3. Meza, H. : Modelos Estadsticos de Duraciones de los Fonemas en el Espaol Mexicano. Master Thesis, Universidad de las Amricas - Puebla, Dept. of Computer Systems Engineering.(1999) 4. Black, A., Taylor, P., Macon, M. : Speech Synthesis in Festival A practical course on making computers talk Edition 2.0, for Festival Version 1.4.1 (2000) 5. Black, A., Lenzo, K. : Building Synthetic Voices for FestVox 2.0 Edition. (2003) 6. Barbosa, A. : Desarrollo de una nueva voz en Espaol de Mxico para el Sistema de Texto a Voz Festival, Master Thesis, Universidad de las Amricas - Puebla, Dept. of Computer Systems Engineering. (1997) 7. Black, A., Taylor, P., Macon, M. : The Festival Speech Synthesis System: System documentation. Technical Report HCRC/TR-83, Human Communciation Research Centre, University of Edinburgh, Scotland, UK, (1997) 8. Jun, Sun-Ah. : Prosodic Phrasing and Attachment Preferences, Journal of Psycholinguistic Research 32(2) (2003) 219–249. 9. Schtz, S.: Prosody in Relation to Paralinguistic Phonetics - Earlier and Recent Definitions, Distinctions and Discussions. Term paper for course in Prosody, Lund University, Dept. of Linguistics and Phonetics.(2003) 10. Pineda, L., Villaseor, L., Cuetara, J., Castellanos, H., Lopez, I. : A New Phonetic and Speech Corpus for Mexican Spanish. Lecture Notes in Artificial Intelligence 3315, Springer-Verlag. ISSN: 0302-9743, ISBN 3-540-23806-9. (2004) 974–983. 11. The University of Waikato: Hamilton, New Zealand Web Page http://www.cs.waikato.ac.nz/ ml/ 1999-2004.
A New Approach to Sequence Representation of Proteins in Bioinformatics Angel F. Kuri-Morales1 and Martha R. Ortiz-Posadas2 1
Departamento de Computación, Instituto Tecnológico Autónomo de México 2 Laboratorio de Informática Médica. Departamento de Ingeniería Eléctrica, Universidad Autónoma Metropolitana Iztapalapa [email protected], [email protected]
Abstract. A method to represent arbitrary sequences (strings) is discussed. We emphasize the application of the method to the analysis of the similarity of sets of proteins expressed as sequences of amino acids. We define a pattern of arbitrary structure called a metasymbol. An implementation of a detailed representation is discussed. We show that a protein may be expressed as a collection of metasymbols in a way such that the underlying structural similarities are easier to identify.
1 Introduction Bioinformatics has been defined as “The science of managing and analyzing biological data using advanced computing techniques. Especially important in analyzing genomic research data” [20]. The problem of sequence alignment is one of the most important issues in Bioinformatics. Sequence alignment is the procedure of comparing two (pair wise alignment) or more (multiple sequence alignment) sequences by searching for a series of individual characters or character patterns that are in the same order in the sequence. Sequence alignment is particularly interesting when focused on problems related with molecular biology. Within this realm it is useful for discovering patterns related with functional, structural and/or evolutionary information present in biological data. Sequences that are very similar probably relate to structures having the same cellular function, or a similar biochemical function, or a similar three dimensional structure. However, the methods presently in use imply the adoption of a series of criteria which are typically subjective and a aprioristic. In this article we focus on the representation of proteins (the algorithms discussed may be applied, however, to other fields as well). In this context there are two types of sequence alignment: global and local. In global alignment, an attempt is made to align the entire sequence, using as many characters as possible, up to both ends of each sequence. In local alignment, stretches of sequences with the highest density of matches are aligned, thus generating one or more islands of matches or sub-alignments in the aligned sequence. In either case, however, the mainstream [1–10] has only considered that the elements of the purported sequences are contiguous, i.e. there are no gaps between such elements or symbols. In this paper we will introduce a generalization by considering “sequences” A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 880 – 889, 2005. © Springer-Verlag Berlin Heidelberg 2005
A New Approach to Sequence Representation of Proteins in Bioinformatics
881
with gaps, whose symbols are no necessarily consecutive. This generalization will be called metasymbol in the rest of paper. A similar concept is used in [11] for approximate string matching and is analogous to the concept of motif commonly used in bioinformatics [12]. Our contention is that if a) the proteins under scrutiny may be re-expressed as sequences of metasymbols and b) we are able to find similar metasymbols in sets of proteins, then the similarity to which we alluded above will be simpler to determine. Our efforts will be focused, therefore, on making precise under what conditions the said representation with metasymbols is plausible and how to achieve it. In part 2 we discuss the concept of metasymbol and its representation. In part 3 we illustrate the method by meta representing two hypothetical proteins and stressing the ease of identification of the patterns embedded in proteins thusly expressed. In part 4 we present our conclusions.
2 Metasymbols Metasymbols (Ms), as stated, are sequences of symbols in some alphabet, probably interspersed with don’t-care symbols or gaps of arbitrary length. The symbol used to specify a gap is not in the alphabet and is called the gap symbol. Those symbols in a Ms that are in the alphabet are called solid symbols or defined symbols. Hence, every string of one or more symbols in the alphabet is a Ms, and every string that begins and ends with symbols in the alphabet, and has an arbitrary sequence of gap symbols and alphabet symbols in between, is also a Ms. We can establish the formal definition of Ms as follows: Definition 1. Given a finite alphabet of symbols Ȉ , and a special symbol Ȗ ∉ Ȉ , called gap symbol, a metasymbol (say m) in Ȉ + is any string generated by the regular expression: Ȉ + Ȉ ( Ȉ + Ȗ )* Ȉ There are several features associated with every Ms: – The order of m, denoted o(m), is the number of solid or defined symbols in m. – The Ms size, denoted | m | , is the total length of the Ms considering both, the solid and gap symbols. A Ms can be specified in several ways. One possible representation is made up by two vectors that describe, respectively, the contents, and the structure of the Ms. For example, if we use the underscore as the gap symbol, the following is an order 5 and size 10 Ms: m1 = EL_M_E_ _ _A that appears in the string: S1 = GTELKMIELAMAEPGLARTELVMWEQYYA as shown in Figure 1. Such Ms is specified by: – The contents vector c(m) of the defined symbols in m in the order they appear. In our example c(m1) = [E, L, M, E, A]. The size (number of entries) of this vector is: |c(m) | = o(m).
882
A.F. Kuri-Morales and M.R. Ortiz-Posadas
Fig. 1. Metasymbol m1 appears 3 times in string S1
– The structure vector d of the distances between every consecutive symbol in c. In our example d(m1) = [0, 1, 1, 3]. The size of this vector is: | d(m) | = o(m)-1 . We are interested in the search of Ms’s that occur frequently in longer strings of symbols in Ȉ . We will call sample to any string in Ȉ + where the Ms search takes place. Hence we will require additional features in order to characterize a Ms relatively to the sample. Given a Ms m that appears in a sample S we define: – The Ms occurrence list, denoted L(m), as the increasing ordered list of absolute positions where m appears in S (the first symbol in a sample is at position zero). In our previous example L(m1) = { 2, 7, 19 } . – The Ms frequency, denoted f(m), as the number of times the Ms m appears in sample S. In our example: f(m1) = 3. – The rough coverage, denoted Cov(m), as the formal number of symbols in S, generated (or covered) by all the appearances of Ms in the sample. That is, the product of frequency times the Ms order. In the example Cov(m1) = 5 × 3 = 15. – The effective coverage, denoted Coveff(m), as the actual number of symbols in the sample covered by all the appearances of Ms. This is the rough coverage defined above, minus the number of symbols in sample covered more than once by different Ms occurrences. In our example, since the letter E in position 7 is covered twice by two different occurrences of m1, we have: Coveff(m1) = 14. – The Position of Msi is defined by the i-th offset (the number of symbols intervening between the first symbol of Msi and the first symbol of Msi+1). By convention the offset of the Ms1 is relative to the first symbol found in m. The position of all the symbols in Msi is completely specified by these offsets. Since the structure of the Ms is fixed, when we specify the offset of Ms we implicitly specify the position of all of its symbols. Our goal is to find the combination of Ms’s such that a given protein (call it p) is re-expressed in its most compact way. In order to do so, we must propose a detailed representation of the compressed string. In this regard, the following further definitions are in order: – The Structure of a Ms is the enumeration of its gaps. – The Content of a metasymbol is the enumeration of the values of all the symbols in the Ms. In general, p is not fully covered by all instances of the different Ms, i.e. there are symbols which are not accounted for by a collection of Ms. – The Filler is the enumeration of those symbols not covered by a Ms in p. In general, the steps to express p as a collection of Ms [13] are: 1) Find an adequate set of Ms, 2) Express p as a sequence of Ms, 3)
A New Approach to Sequence Representation of Proteins in Bioinformatics
883
Describe the position, structure and contents of each of the Ms, 4) Describe the contents of the filler. Now: (1) To describe the positions of the instances of the metasymbols we use a binary sequence. Every number in the sequence represents the distance between the i-th and (i+1)-th Ms. (2) To define the structure of all the Ms we use a binary sequence which represents as a collection of gaps: one for every Ms. Since the symbols are unknown, code ‘0’ is reserved to indicate the end of the structure of a particular Ms. The structure of Msi is, thus, a collection of gaps plus a ‘0’. Furthermore, since it is possible to have a gap of size 0, every gap is encoded as its actual size +1. (3) We proceed to define the binary contents of every metasymbol. For instance, the contents of m1 are defined as the ASCII representation of the letters in ‘ELMEA’. Once this is done we will have defined all necessary elements: order, position, structure and contents, for every Ms in p. As stated, there are symbols which are not accounted for by the collection of Ms defined. However, the exact positions of all undefined symbols in p are, at this point, known. (4) We enumerate the binary contents of undefined localities to complete the cover. Under this representation | r | (the size of the metasymbolic representation, in bits) is given by: M M M M | r | = μ(1 + ¦ N i ) + Ȧ ¦ N + (γ + λ ) ¦ S + L - Ȝ ¦ S N i=1 i =1 i i =1 i i i=1 i
Where Ni denotes the number of instances of Msi; M = number of different Ms; = ªlog 2 [max. gap Ms i ]º ; λ = ªlog 2 | Ms i |º ; μ = ªlog 2 (M)º ; Ȧ = ªlog 2 [max. offset Ms i ]º ; Si = ªlog 2 (max. symbols Ms i )º and L = | p | in bits (for a detailed derivation of the expression above, see [19]). In the process outlined above two questions remain: a) Is the set of Ms unique? and, if such is not the case, b) How to select the best cover? The answer to (a) is clearly negative. There may be many combinations of symbols yielding different sets of Ms. The answer to (b) depends on which set of Ms we decide to consider. Each of the two questions gives rise to problems which may be shown to be very complex (in fact, they may be shown to be NP-complete) [15]. In tackling these issues we have followed the simplest path and developed a strategy which looks for the set of Ms which maximizes the algorithmic information [16] of the data. This is equivalent to finding the most compact representation of such data. In other words, we select the combination of Ms which allows the expression of a protein in its most compact form. Furthermore, it can also be formally shown that the similarities between groups of reexpressed (or transformed) proteins are easier to identify. Because of this reason, among others, the effort to compress proteins has been attempted in the past. At least one such attempt led to failure [17]. In that case, traditional data compression techniques were applied and the reported negative results were to be expected. To solve issues (a) and (b) we have developed two algorithms (to which we will refer as A1 and A2, respectively) which rely on AI techniques [18]. A1 (for which see [14]) performs on-line and focuses on directly finding the best Coveff(mi) ∀i in the
884
A.F. Kuri-Morales and M.R. Ortiz-Posadas
sequence. A2 performs off-line by tackling the problem in two steps; first, it produces a set of j plausible metasymbols in p; then, it selects the best Coveff(mj) ∀j in the set. We have shown [21] that algorithms A1 and A2 have an analogous statistical behavior and, furthermore, that the re-expressed data resulting from the application of our method out-performs other alternatives. Thus, the best selection of the set of MS in p is the one minimizing | r |. Our intent is not to discuss the algorithms leading to such selection, but to remark the advantages of re-expressing p as above. We refer the reader interested in the algorithms to [19].
3
Metasymbolic Representation of a Protein
Our method consists of analyzing the protein sequence (p) as a string of symbols (a protein may be canonically expressed as a string of amino acids) and to identify a set of the (possible) underlying Ms’s. The metasymbols, as opposed to the symbols implied in the methods discussed in the introduction, are structurally not restricted. If metasymbolic sets are found, one may pose a similarity measure between different p’s which is based on the Ms’s and, hence, independent of an a priori criterion. Once the protein is re-expressed in its accordance, it will appear simple to envision a similarity measure between metasymbols rather than between symbols. In what follows we illustrate with two examples. 3.1 Illustration of the Method
We apply the method to a hypothetical protein (Hyp1) herein expressed as a string of amino acids (AAs) called AA representation: > Hyp1 MSMQETQVQHFRKDRQARRAERAQAKDNRFQAHQQTIQMRDMEKQVK KQYKDHHDQMKESETHVDNIKKDDKHAIEEDQMDKDNRTSYKSHIIRHL QMHTQQHQQYMQHQDQAKKEKTHGAIKGALKA In order to facilitate the visualization of the metasymbols, the protein was rearranged in a 16 x 8 matrix (see figure 2). In this protein we may identify 5 metasymbols. The first metasymbol (Ms1) consists of 12 symbols (see figure 3), and it appears 3 times. The position of the first symbol (S1) in Ms1’s first instance is (1, 1), in its second instance is (7, 3) and in its third instance is (9, 4). To identify the position of the next instances of the Ms1 refer to the entire amino acids sequence of the protein in the matrix of Figure 2.
Fig. 2. Protein arranged in a 16X8 matrix
Fig. 3. First instance of Ms1
A New Approach to Sequence Representation of Proteins in Bioinformatics
885
Metasymbol Ms2 consists of 8 symbols and it appears 2 times. Figure 4 shows its first instance with its initial position at (1, 3). The second instance appears at position (15, 4). Metasymbol Ms3 consists of 3 symbols and it appears 9 times. Its first instance is shown in figure 5. Observe that its initial position is (15, 1). For instances 2 to 9 the positions are (2, 2), (3, 2), (6, 2), (13, 2), (8, 3), (5, 6), (6, 6), (14, 6) respectively (refer to Figure 2). The fourth metasymbol (Ms4) consists of 2 symbols and it appears 7 times. In Figure 5 is shown its first instance at (4, 1). For instances 2 to 7 its positions are (7, 1), (9, 1), (16, 1), (1, 7), (9, 7), (16, 7) respectively (refer to figure 2). The last metasymbol (Ms5) consists of 3 symbols and it appears 2 times. Figure 5 shows its first instance at (15, 6). The second instance appears at position (3,7).
Fig. 4. First instance of Ms2
Fig. 5. First instances of Ms3, Ms4 and Ms5
The symbols of all instances of Msi, i=1, …, 5 account for 99 of the 128 symbols in Hyp1 (77.34%). The rest of the symbols are not covered by any Ms and make up the filler. It is shown in figure 6. For clarity, we assign the Greek letters α, β, γ, δ, and ε to Ms1, ..., Ms5 respectively. Then we may put protein Hyp1in its Ms representation as follows: >Hyp1: α δ δ δ γ δ γ γ γ γ β α γ α β γ γ γ ε δ ε δ δ Notice the striking difference between the AA and Ms representations of Hyp1. We may re-express each of a set of proteins as a sequence of Ms rather than as a sequence of AAs. Once given a set in which every protein is expressed as above, the similarities between them become more readily apparent and one may replace the subjective similarity measures currently in use (which we mentioned in the introduction) by simpler, more intuitive ones. However, without an explicit definition of the position, structure and contents of the various Ms the metasymbolic expression of the protein is meaningless. Therefore, we proceed as follows. First, we describe the positions of all instances of the different metasymbols. In Hyp1. This corresponds to the following sequence: 0 2 2 1 5 0 1 0 2 6 3 5 0 16 5 21 0 7 0 1 1 5 6. Every number in the sequence represents the distance between the i-th and (i+1)-th Ms. In Hyp1, Ms1 starts on the position of the first symbol (1, 1); then the first instance of Ms4 is two symbols away from Ms1; the second instance of Ms4 appears 2 symbols away from its first instance. Likewise, the first instance of Ms3 is 5 symbols away from the second instance of Ms4, and so on (see Figure 7).
886
A.F. Kuri-Morales and M.R. Ortiz-Posadas
Fig. 6. The filler of protein Hyp1
Fig. 7. Positions of all instances of Msi
Next, we define the structure of all the Ms as a sequence of gaps, one for every Ms. As an example, the structure of Ms1 is specified by the sequence: 4 3 6 7 6 1 9 5 8 3 9. The gap between S1 and S2 is 3 (4-1), the gap between symbols S2 and S3 is 2 (3-1), and so on. Now we proceed to define the contents of every metasymbol. The content of every Ms in Hyp1 is defined by one of the sequences shown in table 1. Table 1. Contents of Msi in Hyp1
Metasymbol Ms1 Ms2 Ms3 Ms4 Ms5
Contents {MEVDEDNIMYHT} {HDQSHDIL} {RQK} {QA} {HQG}
As stated, there are symbols which are not accounted for by the collection of Ms defined. The exact positions of all undefined symbols in Hyp1 are, at this point, known. Therefore, a simple enumeration of the contents of these localities completes the cover. The following sequence is the filler of Hyp1: SMTHFRKAQKFTHDIKKAEDKSKMEKHAK 3.2 Common Patterns in Proteins
The reader is reminded that our goal is to facilitate the identification of patterns common to sets of proteins and that, to this effect, we should compare at least two of these. In what follows we consider two hypothetical proteins denoted as Hyp1 and Hyp2. Hyp1 is the one discussed above; Hyp2 is a new protein. These are shown next as their respective AA representations. > Hyp1 MSMQETQVQHFRKDRQARRAERAQAKDNRFQAHQQTIQMRDMEKQVKKQ YKDHHDQMKESETHVDNIKKDDKHAIEEDQMDKDNRTSYKSHIIRHLQMHT QQHQQYMQHQDQAKKEKTHGAIKGALKA >Hyp2 MNQMQCEENDVQKQFGDHAMALHEKMVQDADKDWTFFMQEPEMAVDNS WSDQYHQIYEVAMTHDNRKAYEDHQIQDNDMTTIYAILYIAHARQQWKYV TCQHKHQGCEAQTQTYWTAPFMAKKILIHA
A New Approach to Sequence Representation of Proteins in Bioinformatics
887
In protein Hyp2 we may identify 3 metasymbols: Ms1, Ms2 and Ms4 which are identical to the corresponding ones from Hyp1. Ms1 appears 2 times; the position of the first symbol (S1) of its first instance is (2, 4); the second instance is at (3, 6). To identify the position of the instances of Ms1 refer to the entire amino acids sequence of the protein in the matrix of figure 8. Metasymbol Ms2 appears just one time at (2,7) (see figure 9). Ms4 appears 8 times; its first instance at (1, 3). Instances 2 to 8 are at (1, 14), (2, 12), (4, 4), (5, 11), (6, 13), (7, 5) and (7, 16) respectively (refer to figure 10). The rest of the symbols follow no pattern and make up the filler. It is shown in Figure 11.
Fig. 8. First instance of Ms1
Fig. 9. Metasymbol Ms2
Fig. 10. Eight instances of Ms4
Fig. 11. The filler of Hyp2
Now we are able to compare the AA sequence representation and the metasymbolic one for Hyp1 and Hyp2. >Hyp1: α δ δ δ γ δ γ γ γ γ β α γ α β γ γ γ ε δ ε δ δ >Hyp2: δ δ α β δ α δ δ δ δ δ It is almost trivial to detect the underlying similarities under this re-expressed form, as opposed to the original one, as the reader may verify. The fillers for Hyp1 and Hyp2 are also exposed: Filler for Hyp1: SMTHFRKAQKFTHDIKKAEDKSKMEKHAK Filler for Hyp2: MNMQCEENDVQKFGDHALKMDKWTFFPMSWHQYVATRKEQDNDYAIIAQ WKYVCHKHGCEQTTYWTPFMAKKILIH Now one more interesting issue arises: Is it possible that the biological behavior of different proteins is related NOT to their similarities but also to their deep
888
A.F. Kuri-Morales and M.R. Ortiz-Posadas
dissimilarities? This matter has not received proper attention and it remains as an open issue whose mere statement would have been impossible without the concepts herein discussed.
4
Conclusions
Protein classification, as discussed above, has been attempted looking for similarities between sequences of, for instance, amino acids. These sequences are assumed to consist of simple one dimensional arrays of consecutive basic symbols. We have abandoned such a naive approach and determined to look for “sequences” of Ms which, by definition, have unspecified structure. The underlying complexity of this kind of search is not to be dismissed. With the algorithms (A1 and A2) which we have developed and tested, large sets of proteins in S. cerevisiae are being scanned. The experiments being conducted seem to prove that protein compression is achievable (on the order of 25%) and metasymbolic structures have emerged. The next step will be to detect sets of similar Ms or sequences of Ms in other known genomes (such as the human genome) which will, hopefully, enlighten the way towards determination of protein similarity, its resulting classification and, ultimately, a reasoned explanation of the proteins’ biological similarities.
References 1. Gibbs AJ and McIntyre GA, The diagram, a method for comparing sequences. Its use with amino acid and nucleotide sequences. Eur. J Biochem. Vol. 16, 1970, pp. 1–11. 2. Needleman SB and Wunsch CD, A general method applicable to the search for the similarities in the amino acid sequence of two proteins. J Mol Biol. Vol. 48, 1970, pp. 443– 453. 3. National Center for Biotechnology Information, www.ncbi.nlm.nih.gov; last access: 30-0405. 4. Mount DW, Bioinformatics. Sequence and genome analysis. Cold Spring Harbor Laboratory Press, New York, 2001. 5. Lipman DJ, Altschul SF and Kececioglu JD, A tool for multiple sequence alignment. Proc. Natl. Acad. Sci. Vol. 86, 1989, pp. 4412-4415. 6. Higgins DG, Thompson JD and Gibson TJ, Using CLUSTAL for multiple sequence alignments. Methods Enzimol. Vol. 266, 1996, pp. 237-244. 7. Corpert F, Multiple sequence alignment with hierarchical clustering. Nucleic. Acids. Res., Vol. 16, 1988, pp. 10881-10890. 8. Morgenstern B, Frech K, Dress A and Werner T, DIALING: finding local similarities by multiple sequence alignment. Bioinformatics, Vol. 14, 1998, pp. 290-294. 9. Notredame C and Higgins DG, SAGA: Sequence alignment by genetic algorithm. Nucleic Acids Res, Vol. 24, 1996, pp. 1515-1524. 10. Gribskov M, Luethy R and Eisenberg D, Profile analysis. Methods Enzimol. Vol. 183, 1990, pp. 146-159. 11. Burkhardt, Stefan and Juha Kärkkäinen, “Better Filtering with Gapped q-Grams”, Proceedings of 12th Annual Symposium on Combinatorial Pattern Matching CPM 2001, Amihood Amir and Gad M. Landau (editors), Lecture Notes in Computer
A New Approach to Sequence Representation of Proteins in Bioinformatics
889
12. Science, No. 2089, 2001, pp. 73-85. 13. Parida, L. Algorithmic Techniques in Computational Genomics, Doctoral Dissertation, Courant Institute of Mathematical Sciences, University of New York, 1998. 14. Kuri A, “Pattern based lossless data compression”, WSEAS Transactions on communications, Issue 1, Vol. 3, 2004, pp. 22–29. 15. Kuri A and Herrera O, “Efficient lossless data compression for nonergodic sources using advanced search operators and genetic algorithms”, Advances in Artificial Intelligence, Computing Science and Computer Engineering, J. Nazuno, A. Gelbukh, C. Yañez, O. Camacho (editors), ISBN: 970-36-0194-4, ISSN: 1665-9899, Vol. 10, 2004, pp. 243–251. 16. Kuri A and Galaviz J, “Pattern-based data compression”, Lecture Notes in Artificial Intelligence LNAI 2972, 2004, pp. 1–10. 17. Li M and Vitányi P, An introduction to Kolmogorov complexity and its applications, Springer Verlag, New York, 2nd Ed, 1997. 18. Nevill-Manning CG and Witten IH, “Protein is incompressible”, Proc. Data Compression Conference, J.A. Storer and M. Cohn (editors), IEEE Press, Los Alamitos, CA, 1999, pp. 257-266. 19. Kuri-Morales A, Herrera O, Galaviz J, Ortiz M, “Practical Estimation of Kolmogorov Complexity using Highly Efficient Compression Algorithms”, cursos.itam.mx/akuri/2005/tempart; last access: 04/30/05. 20. Kuri A, “Lossless Data Compression through Pattern Recognition”, cursos.itam. mx/akuri/2005/tempart; last access: 04/30/05. 21. Definition of Bioinformatics in the Web, www.google.com.mx/search?hl=es&lr=&oi=defmore&q=define:Bioinformatics, last access: 01/02/05. 22. Kuri A, Galaviz J, “Data Compression using a Dictionary of Patterns”, cursos.itam. mx/akuri/2005/tempart; last access: 05/02/05.
Computing Confidence Measures in Stochastic Logic Programs Huma Lodhi and Stephen Muggleton Department of Computing, Imperial College, 180 Queen’s Gate, London, SW7 2AZ, UK {hml, shm}@doc.ic.ac.uk
Abstract. Stochastic logic programs (SLPs) provide an efficient representation for complex tasks such as modelling metabolic pathways. In recent years, methods have been developed to perform parameter and structure learning in SLPs. These techniques have been applied for estimating rates of enzyme-catalyzed reactions with success. However there does not exist any method that can provide statistical inferences and compute confidence in the learned SLP models. We propose a novel approach for drawing such inferences and calculating confidence in the parameters on SLPs. Our methodology is based on the use of a popular technique, the bootstrap. We examine the applicability of the bootstrap for computing the confidence intervals for the estimated SLP parameters. In order to evaluate our methodology we concentrated on computation of confidence in the estimation of enzymatic reaction rates in amino acid pathway of Saccharomyces cerevisiae. Our results show that our bootstrap based methodology is useful in assessing the characteristics of the model and enables one to draw important statistical and biological inferences.
1 Introduction Modelling metabolic pathways is an important and challenging problem in system biology. Stochastic logic programs (SLPs) [1] can provide an efficient representation for enzyme catalyzed reactions in the pathways. The estimation of reaction rates and quantification of the precision and confidence in the estimated rates are key problems. Behaviour of enzymes in metabolic pathways can be studied using the Michaelis-Menten (MM) enzyme kinetic function, however the well-known method, namely LineweaverBurk or double reciprocal method [2] is not free of problems. Dowd and Riggs [3] have reported discouraging and poor results. Ritchie and Pravan [4] have questioned the statistical validity of the results using the method. Moreover it is computationally exhaustive to solve the MM equation using numerical methods [5, 6]. In recent years a number of probabilistic logic learning techniques [7, 8] have been proposed. Such methods have been applied for the estimation of the reaction rates of enzymes successfully [8]. In some applications the interest lies only in the estimation but challenging tasks such as modelling metabolic pathways require the quantification of the accuracy of the estimated unknown variables. The complexity of the metabolic networks establishes a need to evaluate, analyze and present methodologies for the computation of confidence in the learned models. This paper focuses exclusively on computation of confidence in A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 890–899, 2005. c Springer-Verlag Berlin Heidelberg 2005
Computing Confidence Measures in Stochastic Logic Programs
891
the learned SLPs models as there does not exist any method that computes confidence in the parameters on SLPs. We present a methodology based on Efron’s bootstrap [9] to quantify the confidence in the learned parameters on an SLP. Experimental and theoretical results have demonstrated ensemble methods’ (such as bagging [10] and boosting [11]) ability to generate highly effective predictors in propositional learning [12, 13] and also in relational learning[14, 8]. Therefore we apply a bagging [10] type ensemble ranbag [8] for estimating the reaction rates in metabolic pathways. Ranbag uses a base learner such as failure adjusted maximization (FAM) [7] and works by iteratively setting the priors of FAM randomly and obtaining the base models using the original learning set. The intuition for selecting ranbag is its way of construction of an ensemble. SLPs’ parameters learnt by ranbag can be more reliable as it estimates the parameters when we perturb the priors. Once the parameters have been estimated, the key problem is the computation of confidence in estimated parameters. Confidence intervals(CIs) provide a useful way to compute confidence in the estimated parameters on the SLPs. They specify a range of values that comprise the true parameters at given probability. CIs have many properties that make them a suitable choice for confidence computation for complex tasks such as modelling metabolic pathways. They can be easily understood and interpreted. Generally there is uncertainty in the learned parameters due to random noise in the data. Confidence intervals quantify the uncertainty in the learned parameters. They provide a reliable answer to a particular problem. For example in metabolic pathways there are a huge number of enzymes with unknown reaction rates. Our interest lies in calculating the confidence intervals for the estimated reaction rates of such enzymes. A learning algorithm can estimate the enzymatic reaction rates but does not tell the accuracy of the estimation. Confidence intervals provide a solution by giving a range of values and we can be confident that the true enzymatic reaction rates will fall within this range at a given probability. Resampling and Bayesian inferences are two commonly used methods to draw the confidence intervals in learning methods such as neural networks (NN) and Bayesian networks (BN) [15, 16] . In resampling, a set of instances are randomly drawn with replacement from an original dataset. These replicates are then used for confidence estimation. Bayesian techniques to compute confidence intervals are different than the frequentist methods. Initially a prior is set (on the weights of the network in NN or features in BN) and then the Bayesian methods estimate posterior distribution. The variance of each output and standard deviations are computed for confidence estimation. The posterior distribution can be obtained by running a very large number of Markov Chain Monte Carlo simulation that pose computational limitations for Bayesian methods. Hence we will focus on resampling methods for confidence estimation. We consider and present a methodology to quantify our confidence in the learned parameters on an SLP. Our approach is based on the use of Efron’s bootstrap [9] in O
P E
enzyme(E,R,[O],[P ]). z :: R(y, y). 1 − z :: R(y, n).
Fig. 1. Single-substrate-enzyme catalyzed reaction (left). An SLP for the reaction (right)
892
H. Lodhi and S. Muggleton
probabilistic logic based methods. We evaluate the applicability of resampling methods in SLPs to construct confidence intervals. We describe two methods, the parametric bootstrap and the non-parametric bootstrap for the computation of confidence in the learned stochastic logic models. Our results show that the bootstrap based methodology is useful in the analysis of the complex data as it provides an insight into different questions. It quantifies our confidence in the estimation of reaction rates. It measures the power of an induction method. Length of the interval can guide us in the selection of the size of the dataset. Moreover it provides us a way to estimate the accurate reaction rates with confidence at a given probability. The paper is organized as follows. SLPs and learning algorithms (FAM and ranbag) have been summarized in section 2. The bootstrap based methodology for deriving confidence intervals has been presented in section 3. Section 4 explains experimental methodology and results.
2 Stochastic Logic Programs (SLPs) In this section we will briefly review SLPs that extend standard logic programs by combining logic and probability. An SLP is a definite labelled logic program. In an SLP all or some of the clauses are associated with parameters (labels). An SLP can be categorized into pure SLP and impure SLP depending upon the nature of the parameterization of the clauses. In a pure SLP all of the clauses are labelled whereas an impure SLP is a set of both labelled and unlabelled clauses. An SLP is a normalized SLP if labels of the clauses with same predicate symbol in the head sum to one that is any set S of clauses of the form p : K where p ∈ [0, 1] is a probability label or parameter and K is a range-restricted definite clause. In an unnormalized SLP summands, labels of clauses whose head have the same predicate symbols, do not add to one. Examples: SLPs provide an efficient representation for metabolic pathways as they can capture the whole dynamics and can account for enzyme kinetics. For example, in SLPs representation of a pathway, the set of clauses can describe enzymes and probability labels can account for reaction kinetics. Figure 1 shows a simple single-enzyme-substrate reaction and also tells how an SLP models the kinetics of the reaction. Clauses assert that in a reaction R the reactant O is transformed into the product P and the formation is under the control of enzyme E. The product of reaction R is generated with rate z. However the formation of the product can be hindered due to factors such as reducP1 O2 E2
P2
O1 E1 O3
P3 E3
enzyme(E1,R1,[O1],[O2, O3]). 0.75 :: R1(y, y, y). 0.25 :: R1(y, n, n). enzyme(E2,R2,[O2],[P 1, P 2]). 0.65 :: R2(y, y, y). 0.35 :: R2(y, n, n). enzyme(E3,R3,[O3],[P 3]). 0.93 :: R3(y, y). 0.07 :: R3(y, n).
Fig. 2. Hypothetical metabolic pathway (left).SLPs for the pathway (right)
Computing Confidence Measures in Stochastic Logic Programs
893
tion in enzyme and reactant concentration or/and defective enzyme. The clause, 1 − z :: R(y, n), illustrates such scenarios. Figure 2 shows a simple hypothetical metabolic pathway and SLPs for the pathway. O1, P 1, P 2 and P 3 are external metabolites, where pathway starts with O1 and P 1, P 2 and P 3 are end products. R1, R2, R3 are reactions with attached rates directed by enzymes E1, E2 and E3 respectively. Learning Stochastic Logic Programs Learning of SLPs can be carried in parametric estimation tasks or in structure (underlying logic program) induction scenarios. In this work, we focus on computing confidence in the parameters on SLPs assuming that the structure of SLPs is fixed and given. Failure Adjusted Maximization (FAM): In order to learn parameters on SLPs FAM [7] uses a method based on expectation maximization (EM). FAM uses EM [17] algorithm to perform maximum likelihood parameter estimation for the SLPs. Given a logic program and a set of initial (prior) parameters FAM computes the maximum likelihood estimates in a two step (expectation (E) step and maximization (M) step) iterative learning process. In the E-step, FAM computes the expected frequency for the clause given the current estimates of the parameters and the observed data. In the next step (M-step) the contribution of the clause is maximized. The value associated with each clause is normalized and it becomes an input for the next iteration of FAM. This process is repeated till convergence. Random Prior Aggregating (ranbag): Ranbag [8] is a bagging [10] type method that performs statistical parameter learning of SLPs. It is based on the use of ensemble learning in probabilistic logic based methods. Ranbag uses a base learner such as FAM. Ranbag exploits the characteristic of randomness in maximum likelihood estimators such as FAM. It performs parameter learning by perturbing the priors and obtaining the base model using the original learning set in an iterative fashion. The construction of the ensemble using ranbag can be viewed as a two stage learning process. In the first stage the prior parameters of the base predictor are set according to a random distribution. In the second stage ranbag calls the base learner. The base learner is provided with the original learning set L, an underlying logic program LP and a set of prior parameters Pt . The obtained base models, ht = BL(L, LP, Pt ), can be substantially diverse because base learners such as FAM depend on the selection of priors. These two stages are repeated T times. Ranbag perform the parameter estimation task by averaging the diverse predictions produced by the base models. Ranbag’s estimation for ith parameT ter is hranbag (i) = 1/T t=1 ht (i) = pˆi . At the end of learning process ranbag returns a set of estimated parameters on SLPs, Pˆ = {pˆ1 , . . . , pˆN }.
3 The Bootstrap for Confidence Estimation Statistical intervals such as confidence intervals provide a way to specify and quantify the precision and confidence in the estimation produced by an SLPs learning algorithm.
894
H. Lodhi and S. Muggleton
We now present our approach for computing confidence in the parameters on the SLPs. Our methodology is based on the use of the parametric bootstrap and the nonparametric bootstrap [9]. Consider a learning set L of instances of the form, L = {x1 , . . . , xn }, where the instances are coded in a relational way. Let the sample L is generated independently from an SLP S. Let P = {p1 , . . . , pN } be the set of (true) parameters on the SLP and Pˆ = {pˆ1 , . . . , pˆN } be the set of parameters estimated by a learning algorithm. In our setting an SLP represent enzymatic reactions in metabolic pathways and the parameters on the SLP represent rates of the reactions. We now make another assumption that the SLP learner estimates the parameters with very low bias. Our observation about FAM’s and ranbag’s bias is as follows. FAM is not a biased predictor. It computes parameters with low bias and high variance and an ensemble of FAM such as ranbag decreases the variance. The bias component either remains unchanged or there is further reduction in it. For ranbag, our conjecture is that the bias component of the statistical interval is too small to have any significance and variance is the main component of the confidence interval. Hence we can assume that bias is negligible or zero. For biased estimators there exists techniques that performs bias correction. These techniques suffer from some problem. They may not provide reliable confidence calculation for small datasets. Furthermore the number of required bootstrap replicates can be high [9]. In order to evaluate the application of the bootstrap in SLPs we present two algorithms that are based on the non-parametric bootstrap and the parametric bootstrap. The non-parametric bootstrap approach works by iteratively drawing bootstrap samples from the data. The bootstrap sample is constructed by randomly drawing, with replacement, n instances from the learning set of size n. It replaces the distribution D ˆ that is a discrete dis(according to which data is generated) by empirical distribution D tribution and assigns probability of n1 to each instance. The bootstrap replicate may not contain all of the instances from the original learning set and some instances may occur many times. The probability that an instance is not included in the bootstrap sample is (1 − 1/n)n . For large sample sizes the probability is approximately 1/e = 0.368. On average bootstrap replicate contains 63.2% of the distinct instances in the learning set. Since the bootstrap sampling described above is carried out without using any parametric model, therefore it is called nonparametric bootstrap. The non-parametric bootstrap approach for uncertainty estimation is as follows. 1. for r = 1 to b do – Randomly draw with replacement n instances from the learning set L. The r resulting set of instances is the non-parametric bootstrap replicate LB . Br – Apply the SLP learner to bootstrap replicate L and obtain an estimate of parameters Pˆr = {pˆ1 r , . . . , pˆn r } 2. For each parameter i compute the average pˆi m = 1r br=1 pˆi r We now measure the uncertainty in each of the estimated parameter. The variance for each parameter i is defined by, 1 (pˆi − pˆi m )2 . b − 1 r=1 r b
variance = σ 2 =
Computing Confidence Measures in Stochastic Logic Programs
895
Given that the variance in each of the estimated parameter has been computed, the confidence interval (CI) is given by CI = [pˆi m − CV σ, pˆi m + CV σ] where CV is critical value that is derived from the desired confidence level (1 − α). CV can be obtained from a t-distribution table with degrees of freedom equal to the number of bootstrap samples. The nonparametric bootstrap lower limit for a parameter on the SLP is LL = pˆi m − CV σ and the upper limit is given by U L = pˆi m + CV σ. Uncertainty in an SLP learner’s estimation can also be measured by another similar procedure that is based on the parametric bootstrap. In this procedure the samples are generated in a parametric fashion. The instances comprising the bootstrap replicates are sampled from the learned parametric model instead of resampling from the original learning set. The parametric bootstrap procedure is as follows. 1. Learn a stochastic logic model using a learning algorithm such as ranbag. 2. for r = 1 to b do – Generate a sample of size n from the learned SLPs to obtain a parametric bootr strap replicate LB . r – Apply the SLP learner to parametric bootstrap replicate LB and obtain an estimate of parameters Pˆr = {pˆ1 r , . . . , pˆn r } 3. For each parameter i compute the average pˆi m = 1r br=1 pˆi r We now can calculate the variance and define confidence intervals for each parameter i as described in the preceding paragraphs (for the non-parametric bootstrap). Generally the number of bootstrap samples in any of the bootstrap procedure can be between 20 and 200, 20 ≤ b ≤ 200. For complicated methods setting a value of b equal or nearer to the lower limit (20) provide sound results [18]. Both the parametric bootstrap and the non-parametric bootstrap perturbs the data but the method of perturbation is different. In the non-parametric bootstrap data is resampled from the original learning set whereas in the parametric bootstrap data is generated from the learned SLP. Furthermore, there is inherent discreteness in the non-parametric bootstrap and it can converge to uniform distribution asymptotically. There can be an asymptotic convergence to the underlying model for the parametric bootstrap.
4 Experimental Results and Analysis In this section we describe a series of extensive and systematic experiments. We carried out the quantification of our confidence in the estimation of enzymatic reaction rates of amino acid pathway of Saccharomyces cerevisiae (baker’s yeast, brewer’s yeast. Figure 3 shows the aromatic amino acid pathway of yeast. We used the pathway and its stochastic logical encoding given in [19]. In our setting the underlying logic program incorporates information about enzymes, metabolites (reactants and products) and enzyme catalyzed reactions. The stochastic labels represent the reaction rates. The probability labels are assigned in a way so as the reaction rates are consistent with the biological literature. Twenty one enzymatic reactions in the metabolic pathway are represented
896
H. Lodhi and S. Muggleton C00631
C03356
4.2.1.11
4.2.1.20
4.2.1.11
C00078
C00065
C00279
C00661
C00463
C00074
C00661
4.2.1.20 4.2.1.20
4.1.2.15 C00065
C00009
C00082 C04691
C00079
C00009
2.6.1.7
2.6.1.7
4.1.1.48
C00025
C00025
C00944
C03506
C00026
C00026
4.6.1.3
C00166
C01179
C01302
C00005 1.3.1.13
4.2.1.10
4.2.1.51
5.3.1.24
C00006 C00254
C02637
C04302
5.4.99.5
C00013
2.4.2.18
X
C00014 or C00064 C00251
C02652
C00119
4.1.3.27
C00108
C00009
C00005
1.1.1.25
A chemical reaction is represented by a rectangle with its adjacent circles where rectangles represent enzymes and circles represent metabolites. In the figure metabolites are labelled by their KEGG accession numbers and enzymes by the EC number.
C00022
4.6.1.4
C00025
C00006 C00493
C01269
C00074
C00009
C00002
C03175 2.7.1.71
2.5.1.19
C00008
Fig. 3. The aromatic amino acid pathway of yeast
by the stochastic clauses. We used the implementation of FAM available at1 . As our experimental methodology we generated the data from SLPs representing the pathway. We conducted experiment with a range of sample sizes n. Sample sizes considered are n = 100, 250 and 500. For each sample size we generated 5 datasets. For each dataset we used 25 bootstrap samples for both the parametric and the non-parametric method. We report the average results. The coordinates such as convergence criterion for FAM and stopping criterion for ranbag can control the performance of FAM and ranbag. We set FAM’s convergence criterion to the log likelihood of 0.1. For ranbag we specified the number of models T to 100. Table 1. Average coverage probabilities and length for 90% confidence intervals for different sample sizes n 100
Method Average Coverage Probability Average Length parametric 0.810 0.204 non-parametric 0.742 0.214 250 parametric 0.810 0.139 non-parametric 0.791 0.137 500 parametric 0.952 0.108 non-parametric 0.881 0.101
In order to evaluate the applicability of the bootstrap in SLPs and to compare the performance of the parametric bootstrap and non-parametric bootstrap we used the following criteria. We compared the performance of both the methods for constructing 90% two-sided confidence intervals. – We computed the average coverage probability. Coverage probability is given by the relative frequency of the true parameter pi (rates of reactions) when the confidence interval contains the parameter pi . We averaged the coverage probability over the total number of parameters N . 1
http://www-users.cs.york.ac.uk/˜nicos/sware/
Computing Confidence Measures in Stochastic Logic Programs
897
– We measured average length of the intervals. The length of an interval is given by , l = (pˆi m + CV σ) − (pˆi m − CV σ). We also observed the shape of the interval that m m i +CV σ)−pˆi is given by s = p(ˆpiˆm −(pˆi m −CV σ) . – We computed the average number of true parameters that do not fall within the confidence intervals. We measured the number of true parameters with values above the confidence intervals and the average number of true parameters with values below the confidence intervals. We repeated the process for generated datasets for each sample size and then averaged the results. The criteria shows the induction power of the algorithm for estimation of reaction rates in metabolic pathways. The smaller the average number of true parameters that do not fall within the intervals the better the induction method is.
6
6 parametric non−parametric
5
5
4
4
below CI
above CI
parametric non−parametric
3
3
2
2
1
1
100
250
300 n
400
500
100
250
300
400
500
n
Fig. 4. Average number of true parameters (reaction rates) with values above CI (left) and with values below CI (right)
An ideal method will show the average coverage probability of 0.9. The average number of true parameters with values above the confidence intervals should be equal to the average number of true parameters that fall below the confidence intervals. Furthermore the average number of true parameters that do not fall within the confidence intervals should be small. Table 1 shows the results for 90% two-sided confidence intervals for the enzymatic reaction rates in the pathway using the parametric and the non-parametric method. The table also shows the performance of the techniques as a function of sample size. The results show that the coverage probability of the parametric and the non-parametric method is comparable. However the coverage probability of the non-parametric bootstrap is nearer to the desired probability for small datasets (for n = 100,250). It seems that the non-parametric bootstrap performs worse than the parametric bootstrap due to its inherent discreteness that add noise for very small sample sizes. However the effect of discreteness becomes insignificant for reasonable sized dataset. The non-parametric method shows better coverage for reasonable sized dataset. We infer that the parametric bootstrap is the preferable method to compute the enzymatic reaction rates for very small sample sizes. The length of the interval for both the methods is approximately same. The length is small for large n and big for small n. It shows that reasonable sized samples provide
898
H. Lodhi and S. Muggleton
better confidence estimation as compared to small sample sizes. We also observed the shape of the intervals. It appears that the intervals are symmetric. Figure 4 illustrate the average number of true parameters that do not fall within the confidence interval. In figure 4 (left and right) the x-axis show the sample size n. In figure 4 (left) the y-axis shows the average number of true parameters whose values are above the confidence interval whereas figure 4 (right) shows the average number of true parameters having values below the confidence intervals. The figure illustrates the accuracy of our methodology. Large number of true parameter values fall within the confidence intervals and a very small fraction of true parameters values are above/below the confidence intervals. It is worth to be noting that the figures show the number of true parameters with values falling above and below the confidence intervals are almost equal. The results show that our bootstrap’s based methodology has several advantages. The average coverage probability is much nearer to desired coverage probability and a large number of true parameter values fall within the confidence intervals. It can be successfully used to compute confidence in the estimated enzymatic reaction rates.
5 Conclusion We have presented a methodology to compute the confidence in the predictions of an SLP learner. We evaluated the applicability of bootstrapping in probabilistic logic based methods for calculating accurate confidence intervals. We addressed an important problem of estimating confidence in learned enzymatic reaction rates. SLPs provides efficient representation for metabolic pathways where the probability labels on an SLP account for enzyme kinetics. In order to compute confidence in learned rates we applied the parametric bootstrap and the non-parametric bootstrap. Generally, the results of both the methods are comparable but the performance of the parametric bootstrap is better for small datasets and can be a preferable method for limited amount of data. Future work will consider a theoretical analysis of the bootstrap in SLP learning. Also more experimental work is required to evaluate the methodology for a range of related problems.
Acknowledgements The authors would like to acknowledge the support of the DTI Beacon project “Metalog - Integrated Machine Learning of Metabolic Networks Applied to Predictive Toxicology”, Grant Reference QCBB/C/012/00003.
References 1. Muggleton, S.H.: Stochastic logic programs. In de Raedt, L., ed.: Advances in Inductive Logic Programming. IOS Press (1996) 254–264 2. Lineweaver, H., Burk, D.: The determination of enzyme dissocistion constants. J. Am. Chem. Soc. 56 (1934) 658–666 3. Dowd, J.E., Riggs, D.S.: A comparison of estimates of michaelis-menten kinetic constants from various linear transformation. The Journal of Biological Chemistry 240 (1965)
Computing Confidence Measures in Stochastic Logic Programs
899
4. Ritchie, R.J., Prvan, T.: A simulation study on designing experiments to measure the km of michalelis-menten kinetics curves. J. Theor. Biol. 178 (1996) 239–254 5. Duggleby, R.G.: Analysis of enzyme progress curves by nonlinear regression. Methods in Enzymology (1995) 61–90 6. Schnell, S., Mendoaz, C.: A fast method to estimate kinetic constants for enzyme inhibitors. Acta Biotheoretica 49 (2001) 109–113 7. Cussens, J.: Parameter estimation in stochastic logic programs. Machine Learning 44 (2001) 245–271 8. Lodhi, H., Muggleton, S.: Modelling metabolic pathways using stochastic logic programsbased ensemble methods. In Danos, V., Schachter, V., eds.: Second International Conference on Computational Methods in System Biology (CMSB-04). LNCS, Springer-Verlag (2004) 119–133 9. Efron, B., Tibshirani, R.: An introduction to bootstrap. Chapman and Hall (1993) 10. Breiman, L.: Bagging predictors. Machine Learning 24 (1996) 123–140 11. Schapire, R.E.: A brief introduction to boosting. In: Proceedings of the Sixteenth International Conference on Artificial Intelligence. (1999) 1401–1406 12. Bauer, E., Kohavi, R.: An empirical comparison of voting classification algorithm: bagging, boosting and variants. Machine Learning 36 (1999) 105–142 13. Lodhi, H., Karakoulas, G., Shawe-Taylor, J.: Boosting strategy for classification. Intelligent Data Analysis 6 (2002) 149–174 14. Dutra, I.C., Page, D., Shavilk, J.: An emperical evaluation of bagging in inductive logic programming. In: Proceedings of the International Conference on Inductive Logic Programming. (2002) 15. Friedman, N., Goldszmidt, M., Wyner, A.: On the application of the bootstrap for computing confidence measures on features of induced bayesian networks. In: Seventh International Workshop on Artificial Intelligence and Statistics. (1999) 16. Zhang, L., Kasiviswanathan, K.: Energy clearing price prediction and confidence interval estimation with cascaded neural networks. IEEE Transactions on Power Systems 18 (2003) 99–105 17. Dempster, A.P., Laird, N.M., Rubin, D.B.: Maximum likelihood from incomplete data via the em algorithm. J. Royal statistical Society Series B 39 (1977) 1–38 18. Tibshirani, R.: A comparison of some error estimates for neural network models. Neural Computation 8 (1996) 152–163 19. Angelopoulos, N., Muggleton, S.: Machine learning metabolic pathway descriptions using a probabilistic relational representation. Electronic Transactions in Artificial Intelligence 6 (2002)
Using Inductive Rules in Medical Case-Based Reasoning System Wenqi Shi and John A. Barnden School of Computer Science, The University of Birmingham, Edgbaston, Birmingham, B15 2TT, UK [email protected]
Abstract. Multiple disorders are a daily problem in medical diagnosis and treatment, while most expert systems make an implicit assumption that only single disorder occurs in a single patient. In our paper, we show the need for performing multiple disorders diagnosis, and investigate a way of using inductive rules in our Case-based Reasoning System for diagnosing multiple disorder cases. We applied our approach to two medical casebases taken from real world applications demonstrating the promise of the research. The method also has the potential to be applied to other multiple fault domains, e.g. car failure diagnosis.
1
Introduction
Diagnosis problem was one of the first subjects investigated since digital computers became available and the Medical Diagnosis problem has absorbed lots of the attention of AI researchers. Since the middle of the 1970s, many medical expert systems have been investigated. The MYCIN System [4] was possibly one of the first expert systems which used the concepts of AI, i.e. production rules to help diagnosis in the domain of bacteremias and meningitis. However the need to generate rules and the static knowledge structure highlights the knowledge acquisition problem which most expert systems suffered from. Case-based Reasoning (CBR) methodology employs previous cases to support problem solving without necessarily understanding the underlying principles of application domain, and thus reduces the costs of knowledge acquisition and maintenance. It therefore becomes popular in weak theory domains, e.g. medical domain [7]. Multiple disorders are a frequently occurring problem in daily medical diagnosis and treatment. However, due to a common diagnosis assumption (singlefault assumption [9]) in the diagnostic problem-solving domain, majority of the work using CBR for diagnosing has focused on diagnosing single disorder [7]. Moreover, case-based diagnosis handling multiple disorders is still a challenging task. For instance, for a single disorder casebase dealing with 100 disorders, the chance of reusing a case is roughly one in a hundred. But the chance of reusing a case with even 3 independent diagnoses from 100 alternatives is roughly just one in a million. A naive case-based method was only able to solve about 3% of the cases on one real world dataset [1]. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 900–909, 2005. c Springer-Verlag Berlin Heidelberg 2005
Using Inductive Rules in Medical Case-Based Reasoning System
901
In this paper, we present an approach using inductive rules, which include Diagnostic Rules and Interaction Rules, in our case-based reasoning system to target multiple disorder problems. This approach has been evaluated on two medical casebases taken from real world applications and has been demonstrated to be promising.
2 2.1
Multiple Disorder Problem The Need for Performing Multiple Disorder Diagnosis
Most previous medical expert systems follow a single disorder assumption, which stems from the fact that finding minimal sets of disorders that cover all symptoms for a given patient is generally computationally intractable (NP-hard) [15]. But in spite of the difficulty for expert system implementation, reality needs to be faced in the real world application. As medical documentation becomes more and more structured, it is not rare to see more than one disease in a patient record. This is especially true for old people and those with many chronic diseases (e.g. diabetes, high brood pressure) or a syndrome (e.g. Aids). One of the casebases we got from the real world contains an overall number of 221 diagnoses and 556 symptoms, with a mean MD = 6.71 ± 04.4 of diagnoses per case and a mean MF = 48.93 ± 17.9 of relevant symptoms per case. Disorders in this casebase include diseases such as Fat liver/Liver greasing (K76.0), Illness of the Thyroid (E07.9) etc, and in the casebase, the diseases are finely divided. Moreover, multiple disorders occur in psychiatric cases as well: approximately 63.3% of incarcerated adolescents had 2 or more psychiatric disorders [14]. In this context, the observed set of the symptoms for a given patient may be better explained by more than one disorder. 2.2
Previous Work on Multiple Disorder Problem
INTERNIST matches symptoms and diseases based on forward and backward conditional probabilities in general internal medicine [10]. But it does not deal with the interacting disorders properly because it only consider one finding should be explained by one disorder, no matter how this finding could also lead to diagnosis of another disorder. HYDI decomposes knowledge from the causal models of heart diseases into diagnosis units [9]. But the diagnosis units in HYDI largely rely on the causal models built in Heart Failure Program (HF). Only when all the causal models for other disorders are available could HYDI’s method be applied to diagnose other disorders. HEPAR [11] extends the structure of Bayesian network and also [6] uses belief networks to diagnose multiple disorders, but they are both based on the medical literature and conversations with medical domain experts, which highlights the knowledge acquisition problem.
902
W. Shi and J.A. Barnden
In SONOCONSULT, Set-Covering Theory [12] has been combined with CBR, and the partition class method was used to solve a multiple disorder problem [3]. Since these two methods are recent work and use CBR, we will compare our method with them in a later section. 2.3
Multiple Disorder Notation
We define necessary notions concerning our knowledge representation schema as follows: Let ΩD be the set of all possible diagnoses, and d ∈ ΩD be a disease a patient may have. Let ΩA the set of all attributes. To each attribute a ∈ ΩA a range dom(a) of values is assigned. Further we assume ΩF to be the (universal) set of findings, and a finding f ∈ ΩF is (a = v), where a ∈ ΩA is an attribute and v ∈ dom(a) is an assignable value to attribute a (for example, a could be ’Liver,Observableness’, and v could be ’right intercostal;sub to the Xiphoid’). Let CB be the case base containing all available cases that have been solved previously. A case c ∈ CB is defined as a tuple as follows c = (Fc , Dc , Ic )
(1)
Fc ⊆ ΩF is the set of findings observed in the case c. The set Dc ⊆ ΩD is the set of diagnoses for this case. Ic contains additional information, like therapy advices or prognostic hints.
3
Using Inductive Rules in a CBR System Handling the Multiple Disorder Problem
Rules are one of wide spread formalisms for medical decision-making. But for most of expert systems, the rules are difficult to get. In our method, to reduce the knowledge elicitation costs, we use an inductive learning method to generate these inductive rules, which in our approach include Diagnostic Rules and Interaction Rules. They can be refined by applying different types of background knowledge. In this section, we explain in detail how we learn these inductive rules, and how we use Diagnostic Rules in case-abductive adaptation and Interaction Rules in case-interaction adaptation in our case-based reasoning system. 3.1
Similarity Measure
The similarity measure we are applying is the Manhattan distance for continuous or scaled parameters and Value Difference Metric ( VDM ) for discrete parameters[16]. We measure the final similarity between query case and a retrieved case by adding up all the weighted Manhattan Distance for the continuous or scaled
Using Inductive Rules in Medical Case-Based Reasoning System
903
findings, and all the weighted Value Difference Metric for discrete findings. The equation is showed as follows: 1 1 ωi md(xi , xi ) + $j vdm(xj , xj ) m i=1 n j=1 m
Sim(c, c ) =
n
(2)
where c is query case and c is the case retrived, m is the number of continuous or scaled findings, n is the number of discrete findings, ωi is the weight for attribute i, and $j is the weight for attribute j. 3.2
Inductive Learning of Inductive Rules
Inspired by [2], we apply the χ2 test for independence [17]to identify dependencies between finding f and diagnoses d. For small sample sizes, the Yates’ correction has been applied for a more accurate result. For those tuples < f, d > with χ2 (f, d) > th1 (threshold th1 = 3.84 when p = .05, df = 1), we measure the quality of the dependency by using the φ correlation coefficient [17] According to Cohan’s guidelines for effect size, we consider the pairs < f, d > with φf d > 0.25 as a strong relation effect. We then define the diagnostic rules on those tuples < f, d > with a strong relation effect, which means the finding f is significantly important for diagnosing disorder d. Definition 1 (Diagnostic Rule). A diagnostic rule R is defined as follows: φf d
R : f −→ d
(3)
where f ∈ ΩF and d ∈ ΩD . For each rule, the coefficient φf d (defined in equation 6) is marked as the effect of the dependency (φf d > 0.25). Finding f is called a significant finding for disorder d. We outline the inductive learning procedure of Diagnostic Rules as follows: 1. Construct all the finding-disorder pairs < f, d > for those f and d that occur in cases of the casebase CB 2. For each finding-disorder pair, compute χ2 (f, d). 3. If χ2f d > th1, we define f as a significant finding for diagnosis d. 4. For each significant finding f of each diagnosis d, compute the correlation φf d = φ(f, d). 5. For those tuples < f, d > with φf d > 0.25, define corresponding Diagnostic Rules. We noticed that some disorders have more chance to happen together than the others. We believe that there exists interactions between these disorders and the interactions may change the value of some symptoms, or even mask some symptoms, which should be present in single disorder case. This is also one of the main issues that multiple disorder problems differ from single disorder problem. In our research, we do consider this kind of interactions and take these interactions into account during case-interaction adaptation.
904
W. Shi and J.A. Barnden
Definition 2 (Interaction Rule). An Interaction Rule IR is defined as follows: IR : f1 , . . . , fn −→di ∩ dj (4) where f1 , . . . , fn ∈ ΩF and di , dj ∈ ΩD , and for each k ∈ [1 . . . n], there are φf
d
φfk dj
k i Diagnostic Rules fk −→ di and fk −→ dj . Findings f1 , . . . , fn are called Interaction Findings for disorder di , dj .
The inductive learning process of Interaction Rules is as follows: 1. Construct all the disorder pairs < di , dj > for those di and dj that occur in cases of the casebase CB 2. For each disorder pair, compute χ2 (di , dj ) 3. If χ2di dj is greater than th1, then define diagnose di is dependant with diagnose dj and there are some interaction between these two disorders 4. Tracking the diagnostic rules DR, figure out those significant findings which both support disorder di and dj , and construct Interaction Rule IR for disorder pair (di , dj ) 3.3
Using Diagnostic Rules in Case Abductive Adaptation
After case retrieval, we got suggested solutions. To revise the difference between the query case and the similar cases, we need to do some adaptation. In this section, we perform Case Abductive Adaptation by using our diagnostic rules to match observed findings, and calculating the possibilities of each disorder t occurrence in the casebase (P hiSet(d) = i=1 φfi d , where f1 . . . ft are observed significant findings to disorder d). The higher the P hiSet(d) is, the more confidently d should be included into final solution. Those disorders with P hiSet(d) > φ will be suggested as solution as the result of abductive adaptation. Here we set φ be a high threshold, thus only those disorders which abductive adaptation very much recommends will be considered. The Abductive Adaptation procedure is very similar to Rulebased Reasoning, which uses Diagnostic Rules inductively learnt from casebase to match symptoms and infer the final solution. 3.4
Using Interaction Rules in Case Interaction Adaptation
In this section, we introduce another adaptation to revise the result. We learnt the interaction between disorders through inductive learning described before, and then we apply those interactions to adaptation processing to improve accuracy in the following way: 1. Look through the observed symptoms and each Interaction Rule, and check whether there are interaction findings available in query case. 2. If there are interaction findings available, compare the solutions generated after case retrieval, with the interaction disorders of the interaction rules
Using Inductive Rules in Medical Case-Based Reasoning System
905
- if there is no intersection between those solutions and the interaction disorders, then the two disorders proposed by each interaction rule will be added into the system solutions. - if there is one disorder in common between those solutions and the interaction disorders, then we suggest that this disorder has explained the findings somehow, thus we won’t add any more disorder into system solution. - if there are two disorders in common between those solutions and the interaction disorders, then we believe that the solutions generated by the system are confirmed by the interaction rules. 3.5
Using Inductive Rules in Case-Based Reasoning System
In this section, we briefly outline the algorithm we are using to combine Abductive Adaptation and Interaction Adaptation with the previous CompositionalCBR method in our system [13]. Using Inductive Rules in CBR System algorithm { Given a query case Cq and casebase CB, DiagnosticRules = ConstructDRules(CB); InteractionRules = ConstructIRules(CB); SimSet = AllFinding(Cq ); F qc = CompositionalCBR(Cq , CB, SimSet, k); P hiSet = AbductiveAdaption(Cq )); for each disorder d in casebase CB { if ((F qc(d) >= ) || (P hiSet(d) > φ)) { InteractionAdaptation (d, InteractionRules); Add Solution (d, solution);}} return solution;} Given a query case Cq and a casebase CB, we first construct Diagnostic Rules and Interaction Rules as illustrated in section 3.2, for the sake of Abductive and Interaction Adaptation procedure. Then the finding set of query case Cq is abstracted as SimSet for the sake of CompositionalCBR method. Then we apply CompositionalCBR method to generate all those potential diagnosis d by computing the Similarity-Weighted Frequency [13] ,and compute φ value for each d in AbductiveAdaptation process. Only those disorders which satisfy corresponding thresholds and processed by Interactoin Adaptation would be included into the final solution.
4
Evaluation
This section presents the evaluation of our approach. We applied two casebases from the knowledge-based documentation and consultation system for sonography SonoConsult [8]. We are using 10 fold cross validation and Intersection Accuracy to evaluate how the performance changes after using Inductive Rules, and a comparison of the performances of our method and three other approaches. The evaluations have been established for both of the two casebases.
906
4.1
W. Shi and J.A. Barnden
Experimental Setup
Casebase 1 consists of 1370 cases which contains an overall number of 137 diagnoses and 286 symptoms, with a mean Md = 7.60 ± 4.12 of diagnoses per case, a mean Mf = 52.99 ± 15.89 of relevant findings per case and a mean Md/f = 8.80 ± 5.65 of findings per diagnosis per case. The second evaluation casebase (we call Casebase 2 ) consists of 744 cases. The casebase contains an overall number of 221 diagnoses and 556 symptoms, with a mean MD = 6.72 ± 04.40 of diagnoses per case and a mean MF = 71.13 ± 23.11 of relevant findings per case, a mean Md/f = 15.46 ± 12.52 of findings per diagnosis per case. 4.2
Evaluation Metrics
In the usual task of assigning an example to a single category, the accuracy is just the percentage of cases which are correctly classified. But to quantitatively measure the accuracy of multiple disorder diagnosis, the simple accuracy measurement does not fit. We adopt the Intersection Accuracy [5], as a measure for multiple disorder problems. Intersection accuracy is derived by the two standard measures: sensitivity and Specificity. Definition 3 (Intersection Accuracy). The Intersection Accuracy IA(c, c ) is defined as |Dc ∩ Dc | |Dc ∩ Dc | 1 IA(c, c ) = · + (5) 2 |Dc | |Dc | where c is a query case and c is a case from the casebase, Dc ⊆ ΩD is the set of correct diagnoses, and Dc ⊆ ΩD is the set of diagnoses generated by the system. Besides Intersection Accuracy, we also measure Standard Accuracy which is defined as (T + + T − )/N , where T + (True Positives) is the number of disorders in the correct diagnosis that are also in the system diagnosis (|Dc ∩ Dc |), T − (True Negatives) is the number of disorders which are neither in the correct diagnosis nor in the system diagnosis, and N is the total number of disorders. Moreover, Sensitivity is defined by (T + /C + ), where C + is the number of disorders in the correct diagnosis. Sensitivity measure accuracy over the disorders actually present. Specificity is defined as (T − /C − ), where C − is the number of disorders not in the correct diagnosis. Specificity measures the accuracy over disorders which are not present. When our system makes diagnoses for patients, it will estimate the confidence level for the results it generates. To those cases with low confidence level, the system will mark these cases as unsolved cases and seek the doctor’s help. 4.3
Performance After Using Inductive Rules
We compared the performance of using naive Case-based Reasoning [1], CompositionalCBR with the performance after using Inductive Rules in Fig.1:
Using Inductive Rules in Medical Case-Based Reasoning System Solved Case Percentage on 744 Cases
0.8
0.8
0.75
0.7
0.7
0.6
0.65
0.5 Percentage
Intersection Accuracy
Intersction Accuracy on 744 Cases
0.6 0.55
0.4 0.3
Naive CBR Compositional CBR Compositional CBR with Abductive and Interaction Adaptation
0.5 0.45 0.4
907
0
1
2
3
4
5
6
7
8
Naive CBR Compositional CBR Compositional CBR with Abductive and Interaction Adaptation
0.2 0.1 0
9
0
1
2
3
4
Fold
5
6
7
8
9
Fold
Intersction Accuracy on 1370 Cases
Solved Case Percentage on 1370 Cases
0.7
0.9 0.8
0.65
0.6
0.6
Percentage
Intersection Accuracy
0.7
0.55
0.5 0.4 Naive CBR Compositional CBR Compositional CBR with Abductive and Interaction Adaptation
0.3 0.5
0.45
Naive CBR Compositional CBR Compositional CBR with Abductive and Interaction Adaptation
0
1
2
3
4
5
6
7
8
0.2
9
0.1
0
1
2
3
Fold Overall Results on 744 cases
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.1 0
6
7
8
9
Overall Results on 1370 cases 1
0.2
5 Fold
1
0.3
4
0.4 Percentage of Solved Cases Intersection Accuracy Sensitivity Specificity Standard Accuracy
Naive CBR
Comp. CBR
0.3 0.2 0.1
Comp. CBR with Int. Adaptation
0
Percentage of Solved Cases Intersection Accuracy Sensitivity Specificity Standard Accuracy
Naive CBR
Comp. CBR
Comp. CBR with Int. Adaptation
Fig. 1. Results on Two Casebases
– Naive CBR can not cope with multiple disorder problem efficiently: percentage of solved cases stays below 20% on both casebases, and overall percentage of solved case is 3% on 744 cases and 16% on 1370 cases. – Compositional CBR significantly improved the performance, in both 10 fold measure (top four graphs) and the overall results (last two graphs), which demonstrates the relevance of this method in the multiple disorder situation. – After using the inductive rules, the Intersection Accuracy improved for most folds, although the percentage of solved cases keeps the same. This is due to the fact that adaptation process doesn’t involve the selection procedure
908
W. Shi and J.A. Barnden
of solved cases, the Abductive Adaptation and Interaction Adaptation only modify the solution which affects the Intersection Accuracy in the end. 4.4
Ours vs. Set-Covering Strategy
We compared our method with Naive CBR, Set-Covering method [3] and Partition Class method [1] on Casebase 2. The set-covering approach combined case-based reasoning and set-covering models for diagnosis. The partition class method uses partitioning knowledge provided by the expert to help diagnosis. Table 1. Comparison of the approaches on 744 cases 744 Cases from the SonoConsult Case Base Approach solved cases (percentage) mean IA Naive CBR 20 (3%) 0.66 Set-Covering 502 (67%) 0.70 Our CBR System 537 (73%) 0.70 Partition Class 624 (84%) 0.73
As we can see from Table.1, the Naive CBR method performs poorly with multiple disorder cases. Naive CBR utilising no adaptation and no additional background knowledge can only solve 3% of the cases in the case base. Our method solves 537, i.e., 73% of the cases in the case base, which is much better than naive CBR (The IA is also slightly better). This demonstrates the relevance of this method in the multiple disorder situations. Our system was considerabley better than the set-covering approach on percentage of cases solved. This is probably due to the fact that the set-covering approach does not apply a sophisticated adaptation step. The knowledge-intensive method using partition class knowledge performs best. However our system does not need background knowledge, and so can be applied in arbitrary situations when the partitioning knowledge is not available.
5
Conclusion and Future Work
In this paper, we introduce an approach using inductive rules in a case-based reasoning system. We apply Diagnostic Rules in Abductive Adaptation and Interaction Rules in Interaction Adaptation procedures. Using real medical data, this method has been demonstrated to be promising. There are also many opportunities for future work. Firstly, we believe that interactions between disorders can be captured more effectively by investigating how many findings are changed or masked in the interacting circumstance. Secondly, experiments in other domains are desirable. Our work has the potential to be used to diagnose multiple faults in other diagnostic problem areas, such as diagnosis problems concerning machine faults.
Using Inductive Rules in Medical Case-Based Reasoning System
909
References 1. Martin Atzmueller, Joachim Baumeister, and Frank Puppe. Evaluation of two strategies for case-based diagnosis handling multiple faults. In Proceedings of the 2nd German Workshop on Experience Management(GWEM 2003), Luzern, Switzerland, 2003. 2. Martin Atzmueller, Joachim Baumeister, and Frank Puppe. Quality measures for semi-automatic learning of simple diagnostic rule bases. In Proceedings of the 15th International Conference on Applications of Declarative Programming and Knowledge Management (INAP 2004), Potsdam, Germany, 2004. 3. Joachim Baumeister, Martin Atzmueller, and Frank Puppe. Inductive learning for case-based diagnosis with multiple faults. In S.Craw and A.Preece, editors, Advances in Case-based Reasoning (ECCBR2002), pages 28–42. Springer Verlag, 2002. Proceedings of the 6th European Conference on Case-based Reasoning. 4. Bruce G. Buchanan and Edward H. shortliffe, editors. Rule-Based Expert Systems The MYCIN Experiments of the Stanford Heuristic Programming Project. AddisonWesley Publishing Company, 1984. 5. Thompson Cynthia A and Raymond J. Mooney. Inductive learning for abductive diagnosis. In Proc. of the AAAI-94, volume 1, pages 664–669, 1994. 6. Linda Gaag and Maria Wessels. Efficient multiple-disorder diagnosis by strategic focusing. In A Gammerman, editor, Probabilistic Reasoning and Bayesian Belief Networks, pages 187–204, London, 1995. UCL Press. 7. Lothar Gierl, Mathias Bull, and Rainer Schmidt. Cbr in medicine. In Mario Lenz etc., editor, Case-based Reasoning Technology:From Foundations to Applications, pages 273–297. Springer-Verlag, 1998. ISBN 3-540-64572-1. 8. Matthias Huettig, Georg Buscher, Thomas Menzel, Wolfgang Scheppach, Frank Puppe, and Hans-Peter Buscher. A Diagnostic Expert System for Structured Reports, Quality Assessment, and Training of Residents in Sonography. Medizinische Klinik, 99(3):117–122, 2004. 9. Yeona Jang. HYDI: A Hybrid System with Feedback for Diagnosing Multiple Disorders. PhD thesis, Massachusetts Institute of Technology, 1993. 10. R. A. Miller, H. E. Pople, and J. D. Myers. Internist-1:an experimental computerbased diagnostic consultant for general internal medicine. New england Journal of Medicin, 8(307):468–476, 1982. 11. Agnieszka Onisko, Marek J. Druzdzel, and Hanna Wasyluk. Extension of the heparii model to multiple-disorder diagnosis. In M. Klopotek etc., editor, Intelligent Information Systems, pages 303–313. Physica-Verlag, 2000. 12. Yun Peng and James A. Reggia. Abductive Inference Models for Diagnostic Problem-Solving. Springer-Verlag, 1990. 13. Wenqi Shi and John A. Barnden. A compositional case adaptation approach to multiple disorder diagnostic problem solving. In Brian Lee, editor, Proc of the 8th UK Workshop on Case-based Reasoning, UKCBR, 2003. 14. Thaddeus PM Ulzen and Hayley Hamiton. The nature and characteristics of psychiatric comorbidity in incarcerated adolescents. Original Research, 43(1), 1998. 15. Staal Vinterbo and Lucila O. Machado. A genetic algorighm approach to multidisorder diagnosis. Artificial Intelligence in Medicine, 18(2):117–132, 2000. 16. D. Randall Wilson and Tony R. Martinez. Improved heterogeneous distance functions. Journal of Artificial Intelligence Research, 1997. 17. Robert S. Witte and John S. Witte. Statistics. John Wiley & Sons, Inc, 2004.
Prostate Segmentation Using Pixel Classification and Genetic Algorithms Fernando Arámbula Cosío Lab. de Análisis de Imágenes y Visualización, CCADET, UNAM, México, D.F., 04510 [email protected]
Abstract. A Point Distribution Model (PDM) of the prostate has been constructed and used to automatically outline the contour of the gland in transurethral ultrasound images. We developed a new, two stages, method: first the PDM is fitted, using a multi-population genetic algorithm, to a binary image produced from Bayesian pixel classification. This contour is then used during the second stage to seed the initial population of a simple genetic algorithm, which adjusts the PDM to the prostate boundary on a grey level image. The method is able to find good approximations of the prostate boundary in a robust manner. The method and its results on 4 prostate images are reported. Keywords: Boundary segmentation, Genetic algorithms, Point distribution models.
1 Introduction Automatic segmentation of the boundary of an organ, in ultrasound images, constitutes a challenging problem of computer vision. This is mainly due to the low signal to noise ratio typical of ultrasound images, and to the variety of shapes that the same organ can present in different patients. Besides the theoretical importance of the problem, there are potential practical gains from automatic segmentation of ultrasound images, since ultrasound is a portable, low cost, real time imaging modality. It is particularly suitable for intraoperative image guidance of different surgery procedures. In this work is reported the automatic segmentation of the prostate boundary in transurethral ultrasound images. The final objective is to measure the prostate of a patient intraoperatively during a Transurethral Resection of the Prostate (TURP) for image guided surgery purposes. Transurethral images provide the same shape of the prostate during ultrasound scanning as well as during resection of the prostate, since the ultrasound probe is inserted through the same transurethral sheath of the resection instrument [1]. We could then reconstruct the 3D shape of the prostate accurately from a set of annotated transurethral images. Previous work on automatic segmentation of the boundary of the prostate in ultrasound images includes the following. Aarnik et al., [2] reported a scheme based on edge detection using second derivatives, and edge strength information obtained from the gradient at each edge A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 910 – 917, 2005. © Springer-Verlag Berlin Heidelberg 2005
Prostate Segmentation Using Pixel Classification and Genetic Algorithms
911
location. Using the edge location and strength information, an edge intensity image is obtained. A complete boundary of the prostate in transrectal images is constructed from the edge intensity image using rules and a priory knowledge of the prostate shape. The boundary construction algorithm used was not reported. A segmentation scheme based on a variation of a photographic technique has been reported by Liu et al. [3], for prostate edge detection. The scheme does not produce a complete prostate boundary, it produces partial edge information from which the transrectal prostate boundary would need to be constructed. Dinggang et al. [4] report a statistical shape model for segmentation of the prostate boundary in transrectal ultrasound images. A Gabor filter bank is used to characterize the prostate boundaries in multiple scales and multiple orientations. Rotation invariant Gabor features are used as image attributes to guide the segmentation. An energy function with an external energy component made of the real and imaginary parts of the Gabor filtered images, and an internal energy component, based on attribute vectors to capture the geometry of the prostate shape was developed. The energy function is optimized using the greedy algorithm and a hierarchical multiresolution deformation strategy. Validation on 8 images is reported. A semi-automatic method is described by Pathak et al. [5]. Contrast enhancement and speckle reduction is performed using an edge sensitive algorithm called sticks. This is followed by anisotropic diffusion filtering and Canny edge detection. During image annotation a seed is placed inside the prostate by the user. False edges are discarded using rules, the remaining probable edges are overlaid on the original image and the user outlines the contour of the prostate by hand. Another semiautomatic method is reported in Gong et al. [6]. Superellipses are used to model the boundary of the prostate in transrectal images. Fitting is performed through the optimization of a probabilistic function based on Bayes theorem. The shape prior probability is modeled as a multivariate gaussian, and the pose prior as a uniform distribution. Edge strength is used as the likelihood. Manual initialization with more than two points on the prostate boundary, is required from the user. We have previously reported a simple global optimization approach for prostate segmentation on transurethral ultrasound images, based on a statistical shape model and a genetic algorithm, which optimizes a grey level energy function. The method was able to find accurate boundaries on some prostate images however the energy function used showed minimum values outside of the prostate boundary for other images [1]. In this paper we report a two stage method for global optimization of a statistical shape model of the prostate. During the first stage pixel classification is performed on the grey level image, using a Bayes classifier. A point distribution model [7] of the prostate is then fitted to the binary image, using a multipopulation genetic algorithm (MPGA). In this way a rough approximation of the prostate boundary is produced which takes into account the typical shape of the gland and the pixel distribution on the image. During the second stage of the process, the initial population of a simple genetic algorithm (SGA) is seeded with the approximate boundary previously found. The SGA adjusts the PDM of the prostate to the gaussian filtered grey level image. In the following sections are described the method and its results.
912
F. Arámbula Cosío
2 Pixel Classification of Prostate Images Bayes discriminant functions [8] (eq.1) were used to classify prostate from background pixels. yk = lnP(x|Ck )+lnP(Ck )
(1)
where: P(x|Ck) is the class conditional probability of class k, with k={prostate, background}; P (Ck ) is the a priory probability of class k. Two mixture of gaussians models (MGM) of the class conditional probability distributions of the prostate and the background pixels were constructed, using the expectation maximization algorithm [8]. Each pixel sample (x) is a three-component vector (x, y, g) of the pixel coordinates (x, y) and its corresponding grey value (g). The training set consisted of: Np= 403010 prostate pixels; and Nb= 433717 background pixels. From the training sample proportions we can estimate the prior probability of class k as: P(Cprostate)=403010/(403010+433717), and P(Cbackground)=433717/(403010+433717). In figure 1 are shown two (non-training) prostate images and the corresponding pixel classification results, where a pixel is 255 if, for that pixel yprostate >ybackground , otherwise the pixel is zero.
(a)
(b)
Fig. 1. Results of pixel classification a) original images; b) Corresponding binary images
Prostate Segmentation Using Pixel Classification and Genetic Algorithms
913
3 Prostate Model Optimization A Point Distribution Model (PDM) [7] of the shape of the prostate in transurethral images was constructed with a training set of 50 prostate shapes. The pose and shape of the model can be adjusted with 4 pose and 10 shape parameters [1]. The model is first adjusted to the binary image produced by pixel classification, using a multipopulation genetic algorithm (MPGA), with the following parameters: Probability of crossover (Pc = 0.6); Probability of mutation (Pm = 0.001); Number of subpopulations (Nsub =10); Number of individuals per subpopulation (Nind = 10); generation gap (GG = 0.9). The theory of genetic algorithms is presented in [9]. 3.1 Model Fitting to the Binary Image An energy function for model fitting was constructed based on pixel profiles, 61 pixels long, perpendicular to the prostate model and located at regular intervals along the model, as shown in Fig. 2. The energy function ebw (eq.2) is minimum for model instances continuously located around white regions and surrounded by the black background.
ebw =
1 n ¦ Gbwi n 1
(2)
where: Gbwi=255-inside+outside inside =
1 −1 ¦ pi 30 −30
outside =
1 30 ¦ pi 30 1
n is the number of pixel profiles sampled; and pi is the value (0 or 255) of pixel i.
An MPGA showed to be able to find the global minimum of the energy function ebw in a consistent manner, while the single population genetic algorithm (SGA) is more sensitive to local minima. In figure 3 are shown the results of ten experiments using the MPGA and the SGA, to adjust the PDM of the prostate to a binary image produced by pixel classification.
914
F. Arámbula Cosío
Fig. 2. Pixel profile sampling during prostate model fitting
(a)
(b)
Fig. 3. Results of ten experiments of boundary fitting to a binary image, using: a) MPGA; b) SGA
3.2 Model Fitting to the Grey Level Image The boundary obtained during model fitting to the binary image, is then used to seed the initial population of an SGA (Pc=0.6, Pm=0.001, N=50, GG=0.85) which is used to adjust the PDM to a gaussian filtered ( σ = 64 pixels) grey level image of the prostate. A grey level energy function was constructed (as shown in eq.3.) based on short (21 pixels long) grey level profiles sampled as shown in Fig. 2. 2
e grey = where:
1 n OUT
n
¦G i
i
(3)
Prostate Segmentation Using Pixel Classification and Genetic Algorithms
915
n
OUT = ¦ outsidei 1
Gi = 255 − outside + inside inside =
1 −1 ¦ pi 10 −10 10
outside = 101 ¦ pi 1
n is the number of grey level pixel profiles sampled; and pi is the grey level value of pixel i. egrey is designed to produce minimum values when a boundary is placed around a dark (hypoechoic) region which is surrounded by a bright (hyperechoic) halo. In Fig. 1a can be observed that the prostate appears on ultrasound images as a dark region surrounded by a bright halo, however some prostates also show dark regions inside the gland (see Fig. 1a, bottom ), which could produce minimum values of egrey in some cases. Pixel classification and boundary fitting to the binary image help to avoid dark regions inside the prostate as shown in the next section.
4 Results The method described was implemented using MATLAB ( Mathworks Inc.). In Fig. 4 are shown the results obtained, for 4 different ultrasound images, compared to the corresponding expert annotated images.
(a) (b) Fig. 4. Results of automatic boundary segmentation: a) expert annotated images; b) computer annotated images
In the images shown in Fig. 4a, the black circle in the middle corresponds to the position of the transurethral transducer. Around the transducer a dark (hypoechoic) region inside the prostate can be observed. These dark regions inside the prostate could produce minimum values of egrey (eq. 3). However the rough approximation of the prostate contour produced by the MPGA on the binary image produced by pixel
916
F. Arámbula Cosío
classification (section 3.1) helps to avoid these dark regions and helps the SGA to find the correct boundary in the grey level image, as shown in Fig. 4b.
(a)
(b) Fig. 4 (continued)
5 Conclusions A new method for segmentation of the boundary of the prostate on transurethral ultrasound images is being developed. The method is based on a PDM of the prostate boundary, which can only deform into shapes typical of the prostate, in this way reducing significantly the search space during model fitting. A rough approximation of the prostate shape and pose, on a digital image, is produced through pixel classification and model fitting to the resulting binary image. An MPGA showed to be robust during optimization of the binary energy function. During the second stage of the method, the PDM is adjusted using a SGA (which performs faster than the MPGA) on a gaussian filtered grey level image. The initial
Prostate Segmentation Using Pixel Classification and Genetic Algorithms
917
population of the SGA is seeded with the rough boundary previously obtained, this biases the search of the prostate boundary to the neighborhood of the initial estimate. This in turn, helps to avoid minimum values of the grey level energy function (eq. 3), that can produce gross errors in model fitting. Preliminary results showed that the method reported is able to find good approximations of the prostate boundary in different transurethral ultrasound images. It is a fully automatic scheme which does not require any user intervention. Our method constitutes a systematic approach to boundary segmentation in transurethral images, which show characteristic dark regions inside of the prostate that can produce boundary segmentation errors. These dark regions are not characteristic of transrectal prostate images, in which most of the boundary segmentation work has been performed. Further research will include an extensive evaluation of the robustness of our method with different image conditions, and the development of a final boundary refinement stage based on edge detection.
References 1. Arámbula Cosío F., Davies B.L.: Automated prostate recognition: A key process of clinically effective robotic prostatectomy. Med. Biol. Eng. Comput. 37 (1999) 236-243. 2. Aarnik R.G., Pathak S.D., de la Rosette J. J. M. C. H., Debruyne F. M. J., Kim Y., Wijkstra H.: Edge detection in prostatic ultrasound images using integrated edge maps. Ultrasonics 36 (1998) 635-642. 3. Liu Y.J., Ng W.S., Teo M.Y., Lim H.C.: Computerised prostate boundary estimation of ultrasound images using radial bas-relief method. Med. Biol. Eng. Comput. 35 (1997) 445454. 4. Dinggang S., Yiqiang Z., Christos D.: Segmentation of Prostate Boundaries From Ultrasound Images Using Statistical Shape Model. IEEE Trans. Med. Imag. 22 No.4 (2003) 539-551 5. Pathak S.D., Chalana V., Haynor D.R., Kim Y.: Edge-guided boundary delineation in prostate ultrasound images. IEEE Trans. Med. Ima. 19 No.12 (2000) 1211-1219. 6. Gong L., Pathak S.D., Haynor D.R., Cho P.S., Kim Y.: Parametric shape modelling using deformable superellipses for prostate segmentation. IEEE Trans. Med. Imag. 23 No. 3 (2004) 340-349. 7. Cootes T.F., Taylor C.J., Cooper D.H., Graham J.: Active shape models -Their training and application. Comput. Vision Image Understanding. 61 (1995) 38-59. 8. Bishop C.M.: Neural networks for pattern recognition. Oxford University Press (1995). 9. Golberg D. E.: Genetic algorithms in search optimization and machine learning. AddisonWesley (1989).
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images Jun Kong1, Jingdan Zhang1, Yinghua Lu1, 2, Jianzhong Wang1, and Yanjun Zhou1 1
Computer School, Northeast Normal University, Changchun, Jilin Province, China 2 Computer School, Jilin University, Changchun, Jilin Province, China {Kongjun, zhangjd358, luyh, wangjz019}@nenu.edu.cn
Abstract. An integrated method using the adaptive segmentation of brain tissues in Magnetic Resonance Imaging (MRI) images is proposed in this paper. Firstly, we give a template of brain to remove the extra-cranial tissues. Subsequently, watershed algorithm is applied to brain tissues as an initial segmenting method. Normally, result of classical watershed algorithm on gray-scale textured images such as tissue images is over-segmentation. The following procedure is a merging process for the over-segmentation regions using fuzzy clustering algorithm (Fuzzy C-Means). But there are still some regions which are not partitioned completely, particularly in the transitional regions between gray matter and white matter. So we proposed a rule-based re-segmentation processing approach to partition these regions. This integrated scheme yields a robust and precise segmentation. The efficacy of the proposed algorithm is validated using extensive experiments.
1 Introduction In recent years, various imaging modalities are available for acquiring complementary information for different aspects of anatomy. Examples are MRI (Magnetic Resonance Imaging), Ultrasound, and X-ray imaging including CT (Computed Topography). Moreover, with the increasing size and number of medical images, the use of computers in facilitating their processing and analyses has become necessary [1]. Many issues inherent to medical image make segmentation a difficult task. The objects to be segmented from medical image are true (rather than approximate) anatomical structures, which are often non-rigid and complex in shape, and exhibit considerable variability from person to person. Moreover, there are no explicit shape models yet available for capturing fully the deformations in anatomy. MRI produces high contrast between soft tissues, and is therefore useful for detecting anatomy in the brain. Segmentation of brain tissues in MRI images plays a crucial role in threedimensional (3-D) volume visualization, quantitative morphmetric analysis and structure-function mapping for both scientific and clinical investigations. Because of the advantages of MRI over other diagnostic imaging [2], the majority of researches in medical image segmentation pertains to its use for MRI images, and there are a lot of methods available for MRI image segmentation [1-7, 12-20]. Niessen et al. roughly grouped these methods into three main categories: classification methods, region-based methods and boundary-based methods. Just as pointed out in A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 918 – 927, 2005. © Springer-Verlag Berlin Heidelberg 2005
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images
919
[14], the methods in the first two categories are limited by the difficulties due to intensity inhomogeneities, partial volume effects and susceptibility artifacts, while those in the last category suffer from spurious edges. In this paper we address the segmentation problem in the context of isolating the brain tissues in MRI images. An integrated method using an adaptive segmentation of brain tissues in MRI images is proposed in this paper. Firstly, we give a template of brain to remove the extra-cranial tissues. Subsequently, watershed algorithm is applied to the brain tissues as an initial segmenting method. Normally, result of classical watershed algorithm on gray-scale textured images such as tissue images is over segmented. The following procedure is a merging process for the over segmented regions using fuzzy clustering algorithm (here, we take Fuzzy C-Means). But there are still some regions which are not partitioned completely, particularly in the transitional regions between gray matter and white matter. So we proposed a rule-based resegmentation processing approach to partition these regions.
Preprocessing brain MRI images
Watershed Algorithm
Merging using RFCM
Rule–based Re-segmentation
Fig. 1. The diagram of proposed method
The rest of this paper is organized as follows (shown in Fig. 1). Section 2 describes the preprocessing of MRI brain images. Watershed algorithm is briefed in Section 3. In Section 4, we give the merging process using region-based Fuzzy C-Means (RFCM) clustering. Section 5 presents the proposed rule-based re-segmentation processing approach. Experimental results are presented in Section 6 and we conclude this paper in Section 7.
2 Image Preprocessing 2.1 Extra-Cranial Tissue Removing The horizontal and vertical projection information obtained from the binary image of MRI will be used to remove the extra-cranial tissues of brain image. At first, the binary image B(x, y) shown in Fig. 2b is obtained from the gray image I(x, y) in Fig. 2a. Then, the horizontal and vertical projections of the binary image, shown in Fig. 2c and Fig. 2d, are calculated as follows H x ( y ) = ¦ B ( x, y ) .
(1)
.
(2)
M
x =1
H y (x) =
N
¦ B ( x,
y)
y =1
where M is the row number of I(x, y), and N is the column number of I(x, y). The projection curves will have a large number of fine peaks produced by noise (see Fig. 2c and d), so it is difficult to choose the valuable peaks. Under this
920
J. Kong et al.
condition, we use some apriori knowledge to enhance the ability of judging the valuable peaks by computing the horizontal and vertical projections within a certain range to obtain the primary special values. According to values obtained from the image’s horizontal and vertical projections, we can constitute a coarse contour of the brain MRI image shown in Fig. 2e.
(a)
(b)
(e)
(c)
(f)
(d)
(g)
Fig. 2. Preprocessing MRI transverse image. (a) Original image. (b) Binary image. (c) Horizontal projection. (d) Vertical projection. (e) Coarse contour. (f) Binary template. (g) Preprocessed result.
2.2 Removal of Thin Connectors Using Morphological Operations There are some redundant connectors between brain tissues and the cranium in MRI image after using the processing method mentioned above (see Fig. 2e). In this section, we remove the thin connectors using morphological operations and obtain the binary template of brain MRI image shown in Fig. 2f. Using this template, we can get Fig. 2g as the result of preprocessing.
3 Watershed Algorithm The input to watershed algorithm is a gray-scale gradient image. Sobel edge detection is applied to get this gradient magnitude image, denoted by IG. The gradient image is considered as a topographic relief. We apply the Vincent and Soille [9] version of watershed algorithm, which is based on immersion simulation: the topographic surface is immersed from its lowest altitude until water reaches all pixels. The output of watershed algorithm is the segmentation of IG into a set of non-overlapping regions. Fig. 3a demonstrates the watershed result of the source image shown in Fig. 2g. The watershed transformation constitutes one of the most powerful segmentation tools provided by mathematical morphology. But there are two disadvantages in the watershed algorithm. Firstly, result of classical watershed algorithm on gray images
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images
921
such as tissue images is over-segmentation, as shown in Fig. 3a. Secondly, there are some regions which are not partitioned completely particularly in the transitional regions of gray matter and white matter. It is also clearly shown in Fig. 3b obtained from one part of Fig. 3a zoomed in. In Section 4 and Section 5, we will focus our attention on these questions respectively.
(a)
(b)
Fig. 3. (a) Partition result after using watershed algorithm. (b) Some regions that aren’t divided completely.
4 Merging the Over-Segmentation Regions After watershed algorithm being used, there are too many regions because of natural attribute of watershed algorithm -- over segmentation. To overcome this problem, a region-based FCM (RFCM) clustering approach is used to merge these regions over segmented in this section. 4.1 FCM Segmentation The FCM clustering algorithm assigns a fuzzy membership value to each data point based on its proximity to the cluster centroids in the feature space. Let x be the set of pixels in the image I. The FCM algorithm is formulated as the minimization of the objective functional JFCM with respect to the membership values U and cluster centroids v C
J FCM (U , v ) = ¦ ¦ uikm || xi − vk ||2 subject to i∈ I k =1
C
¦u
ik
= 1, ∀ xi ∈ I .
(3)
k =1
where the matrix U = {uik} is a fuzzy c-partition of I, v = {v1, v2, …, vc} is the set of fuzzy cluster centroids, m ∈ (1, ∞ ) is the fuzzy index, C is the total number of clusters, and uik gives the membership of pixel xi in the kth cluster ck . The FCM objective function is minimized when high membership values are assigned to x that are close to the centroid for their particular class, and low membership values are assigned when they are far from the centroid. Let the first derivatives of JFCM with respect to u and v equal to zero, which yields the two necessary conditions for minimizing JFCM. The FCM algorithm is implemented by iterating the two necessary conditions until a solution is reached. After FCM clustering, each data sample will be associated with a membership value for each class. By assigning the data sample to the class with the highest membership value, a segmentation of the data can be obtained [10].
922
J. Kong et al.
4.2 Region-Based FCM (RFCM) Clustering The output of watershed algorithm is the segmentation of IG into a set of nonoverlapping regions denoted by Ri, i = 1, 2, …, n where n is the number of regions. To implement the merging of similar regions, we proposed a region-based FCM (RFCM) clustering method. The mean value, denoted by mi, i = 1, 2, …, n of each region Ri, is needed.
(a)
(b)
(c)
(d)
Fig. 4. (a) Image after using RFCM. (b) A partial image of (a) zoomed in. (c) Watershed lines removed from (a). (d) Watershed lines removed from (b).
The RFCM clustering algorithm in this paper is formulated as C
J RFCM (U , v ) = ¦ ¦ u ikm || mi − vk ||2 subject to i∈Ω k =1
C
¦u
ik
= 1, Ω = {1, ..., n}.
(4)
k =1
where c = 3 (because three brain tissues are of interest: Cerebrospinal Fluid (CSF), Gray Matter (GM), and White Matter (WM) in our work), the matrix U = {uik} is a fuzzy c-partition of IG, v = {v1, v2, v3} is the set of fuzzy cluster centroids, and v1 , v2 , v3 denote the centroids of CSF, GM and WM respectively, the fuzzy index
m=2, and uik gives the membership of region Ri in the k th cluster ck in our study. If the difference of intensity mean value of region Ri and vk is small, region Ri will be assigned to a high membership value for the kth cluster ck. By assigning a region to the class with the highest membership value, a segmentation of the region can be obtained. The result image after using RFCM on Fig. 3a is shown in Fig. 4a. We can see the result of some regions which are not partitioned completely obviously in Fig. 4b obtained from a part of the image after Fig. 4a zoomed in. Fig. 4c and d are images after watershed lines removed form Fig. 4a and b respectively. From these images (see Fig. 4), the disadvantage of watershed algorithm – segmentation incompletely and inaccurately in some regions is shown clearly.
5 The Rule-Based Re-segmentation Processing Though the image is partitioned into too many regions after the operation of watershed algorithm, there are still some regions which have not been separated completely and accurately particularly in the transitional regions of gray matter and white matter.
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images
923
So a rule-based re-segmentation processing method to partition these regions is proposed in this section. (a)0. . . . . . .
¯ Searching for the Re-segmentation Regions
Because the regions needed to be segmented again are almost lying in the transitional regions of GM and WM in MRI images, the characters of these regions are considered. To determine these re-segmented regions, both the mean value and variance of each region are needed in our study. Let σ i , © = 1, 2, …, n denote the variance of region Ri. Three criterions provided to search for the re-segmentation regions as follows: Let m gray , mwhite denote the mean value of GM and WM, and be set to v2 and v3 respectively in our experiments. Let Δ m 0 = ( m w hite − m gray ) / 2 , σ 0 = v3 − v2 and u i max = max( u i1 , u i 2 , u i 3 ) .
Criterion 1: m gray − Δ m0 < mi < m white + Δ m0 Criterion 2: σ i > σ 0 Criterion 3: u i max < 0 .95 If the parameters in region Ri are satisfied with these criterions mentioned above, the partition result in this region after segmentation of watershed algorithm is decided as incomplete and inaccurate segmentation, and this region should be partitioned again. (a)0. . . . . . .
°Ã Re-segmentation Rules
Since the regions needed to be partitioned again are almost lying in the transitional regions of GM and WM, we only separate these regions into two classes: GM and WM. Suppose region Ri denotes one of these regions needed re-segmentation operating. Let p be one of the pixels in region Ri and h(p) denote the intensity of p. We proposed some rules to partition the regions needed re-segmentation as follows: Rule1: In region Ri , if h( p) < mi , p is likely to be GM. Rule2: In region Ri , if h( p) > mi , p is more similar to WM than GM. Rule3: In region Ri , if h( p ) > m gray and h( p ) − mgray < Δm0 , p is possibly belonging to GM. Rule4: In region Ri , if h( p) < mwhite and mwhite − h( p) < Δm0 , p is likely belonging to WM. If rule 1 and rule 3 are satisfied for pixel p in region Ri, p should be partitioned into GM. Otherwise, when rule 2 and rule 4 are satisfied for pixel p in region Ri, p ought to belong to WM. After using the rule-based re-segmentation method processing on Fig. 4a, the resegmentation result is shown in Fig. 5a. Fig. 5b is the finial result image. The GM and WM are shown in Fig. 5c and Fig. 5d respectively.
924
J. Kong et al.
(a)
(b)
(c)
(d)
Fig. 5. (a) Result image after re-segmentation. (b) The finial result. (c) GM. (d) WM.
6 Experimental Results 6.1 Results Analyzing
Fig. 6a is a part of Fig. 3a zoomed in, and it clearly shows that some regions are partitioned incompletely after the operation of watershed algorithm. This disadvantage of watershed algorithm is obviously shown in Fig. 6b obtained from a part of Fig. 4a zoomed in. Fig. 6c is the same part image with watershed lines removed from Fig. 6b. Using our rule-based re-segmentation approach, the regions partitioned incompletely are divided again, and the result image is shown in Fig. 6d. The same part image with watershed lines removed is shown in Fig. 6e. Compared these results (Fig. 6b and d) with watershed segmentation result in Fig. 6a, the precise and veracity of our method is obviously validated.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Fig. 6. (a) A part of the image after Fig. 3a zoomed in. (b) Same part of the image after Fig. 4a zoomed in. (c) Same part of (b) with watershed lines removed. (d) Same part of the image after Fig. 5a zoomed in. (e) Same part of (d) with watershed lines removed. (f) Original image. (g) Result after using RFCM. (h) The finial result.
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
925
Fig. 7. Experimental results. (a) Original Image. (b) Image obtained after preprocessing. (c) Partition result after using watershed algorithm. (d) Image after using RFCM. (e) Resegmentation image. (f) Result image obtained using our method. (g) GM. (h) WM.
In following we compare the segmentation results among original image, image after using RFCM and finial result after re-segmentation in Fig. 6f, g and h. This integrated scheme yields a robust and precise segmentation. 6.2 Executing Our Algorithm Step-by-Step
The efficacy of the proposed algorithm is validated using extensive experiments. Fig. 7 and 8 demonstrate the intermediate results of the segmentation process step-by-step. Different brain MRI images are chosen in order to demonstrate the advantages of our novel integrated method. One of brain MRI images is shown in Fig. 7a. We remove the extra-cranial tissues from the MRI image using the preprocessing method, shown in Fig. 7b. Fig. 7c is over segmented by the application of watershed algorithm. Fig. 7d shows the image after merging regions using RFCM. The result image after re-segmentation processing is shown in Fig. 7e. Fig. 7f, g and h are finial result images. 6.3 Final Results
The proposed algorithm was implemented in Matlab on a Pentium 4 2.40GHz computer. Table 1 shows execution time of the algorithm on different images and the main variables of the algorithm: the image size (N), the number of regions (wn) that is generated by watershed segmentation, the number of re-segmentation regions (sn), the centroids of GM (vGM), WM (vWM) and CSF (vCSF) obtained from RFCM, and the centroids of GM (v’GM) and WM (v’WM) after re-segmentation.
926
J. Kong et al.
(a)
(b)
(e)
(f)
(c)
(d)
(g)
(h)
Fig. 8. Experimental results. (a) Original Image. (b) Image obtained after preprocessing. (c) Partition result after using watershed algorithm. (d) Image after using RFCM. (e) Resegmentation image. (f) Result image obtained using our method. (g) GM. (h) WM. Table 1. Image size (N), the number of regions (wn) generated by the watershed segmentation, the number of re-segmentation regions (sn), the centroids of GM (vGM), WM (vWM) and CSF(vCSF) obtained from RFCM, the centroids of GM(v’GM) and WM (v’WM) after resegmentation, and execution time Image size(N) Fig.2(a) 256*256 Fig.7(a) 256*256 Fig.8(a) 256*256 Image
WN
SN
vGM
vWM
vCSF
' vGM
' vWM
1223 1263 1196
375 366 331
144.53 143.96 136.69
198.99 199.59 197.56
60.83 71.51 60.02
141.00 136.00 133.00
196.00 197.00 194.00
Total time(s) 1.1560 0.9590 0.9220
7 Conclusions We propose a novel approach for segmenting brain tissues in MRI images, which is based on the combination of watershed algorithm, RFCM and a rule-based resegmentation processing approach. As a result, the quality of the segmentation is improved. The algorithm is composed of four stages. In the first stage, we give a template of brain image to remove the extra-cranial tissues. Subsequently, watershed algorithm is applied to brain tissues as an initial segmenting method. Normally, result of classical watershed algorithm on gray-scale textured images such as tissue images is oversegmentation. The following procedure is a merging process for the over segmentation regions using RFCM clustering. But there are still some regions which are not partitioned completely, particularly in the transitional regions between gray matter and white matter. So we proposed a rule-based re-segmentation processing approach to divide these regions. This integrated scheme yields a robust and precise segmentation.
A Novel Approach for Adaptive Unsupervised Segmentation of MRI Brain Images
927
References 1. Pham DL, Xu CY, Prince JL: A survey of current methods in medical image segmentation. Ann. Rev. Biomed. Eng. 2 (2000) 315—37 [Technical report version, JHU/ECE 99—01, Johns Hopkins University]. 2. Wells WM, Grimson WEL, Kikinis R, Arrdrige SR: Adaptive segmentation of MRI data. IEEE Trans Med Imaging, 15 (1996) 429—42. 3. LORENZ C, KRAHNSTOEVER N: 3D statistical shape models for medical image segmentation [J]. Proceedings of the Second International Conference on 3-D Digital Imaging and Modeling (3DIM)'99, (1999)394-404. 4. Tina Kapur, W.Eric L. Grimson, William M.Wells III: Segmentation of brain tissue from magnetic resonance images [J]. Medical Image Analysis, 1996, 1 (2): 109- 127. 5. Bezdek J., Hall L., Clarke L.: Review of MR image segmentation techniques using pattern recognition. Med. Phys. 20 (4), (1993) 1033–1048. 6. Clark M., Hall L., Goldgof D., Clarke L., Velthuizen R., Silbiger M.: MRI segmentation using fuzzy clustering techniques. IEEE Eng. Med. Biol. Mag. 13 (5), (1994)730–742. 7. Clarke L., Velthuizen R., Camacho M., Heine J., Vaidyanathan M., Hall L., Thatcher R., Silbiger M.: MRI segmentation: methods and application. Magn. Reson. Imaging 13 (3), (1994)343–368. 8. Yeon-Sik Ryu, Se-Young Oh: Automatic extraction of eye and mouth edges from a face image using eigenfeatures and multilayer perceptions, Pattern Recognition 34 (2001) 2459 – 2466. 9. Luc Vincent, Pierre Soille: Watersheds in Digital Spaces: An Efficient Algorithm Based on Immersion Simulations, IEEE Transaction on Pattern Analysis And Machine Intelligence, vol 13, No 6, (1991). 10. Alan Wee-Chung Liew, Hong Yan: An Adaptive Spatial Fuzzy Clustering Algorithm for 3-D MR Image Segmentation, IEEE Transaction on Medical Imaging, vol 22, No 9 (2003). 11. Ety Navon, Ofer Miller, Amir Averbuch: Color image segmentation based on adaptive local thresholds, Image and Vision Computing 23 (2005) 69-85. 12. Kollokian V.: Performance analysis of automatic techniques for tissue classification in MRI of the human brain, Master’s thesis, Concordia University, Montreal, Canada (1996). 13. Kwan R.-S., Evans A., Pike G.: MRI simulation-based evaluation of image-processing and classification methods. IEEE Trans. Med. Imaging 18 (11), (1999)1085–1097. 14. Niessen W., Vincken K., Weickert J., Haar Romeny B., Viergever M.: Multiscale segmentation of threedimensional MR brain images. Internat. J. Comput. Vision 31 (2/3), (1999)185–202. 15. Nowak R.: Wavelet-based Rician noise removal for magnetic resonance imaging. IEEE Trans. Image Process. 8(10), (1999) 1408–1419. 16. Otsu N.: A threshold selection method from graylevel histograms: IEEE Trans. SystemsManCybernet. 9 (1), (1979) 62–66. 17. Pal N., Pal S.: A review on image segmentation techniques. Pattern Recognition 26 (9), (1993)1277–1294. 18. Pham D., Xu C., Prince J.: Current methods in medical image segmentation. Annu. Rev. Biomed. Eng. 2, (2000)315–337. 19. Pizurica A.: Image denoising using wavelets and spatial context modeling. Ph.D. thesis, Ghent University, Gent, Belgium (2002). 20. Pizurica A., Philips W., Lemahieu I., Acheroy M.: A versatile wavelet domain noise filtration technique for medical imaging. IEEE Trans. Med. Imaging 22 (3), (2003)323–331.
Towards Formalising Agent Argumentation over the Viability of Human Organs for Transplantation Sanjay Modgil,1 Pancho Tolchinsky2, and Ulises Cort´es2 1
Advanced Computation Lab, Cancer Research UK 2 Universitat Polit`ecnica de Catalunya
Abstract. In this paper we describe a human organ selection process in which agents argue over whether a given donor’s organ is viable for transplantation. This process is framed in the CARREL System; an agent-based organization designed to improve the overall transplant process. We formalize an argumentation based framework that enables CARREL agents to construct and assess arguments for and against the viability of a donor’s organ for a given potential recipient. We believe that the use of argumentation has the potential to increase the number of human organs that current selection processes make available for transplantation.
1 Introduction Human organ transplantation constitutes the only effective therapy for many life-threatening diseases. However, while the increasing success of transplants has led to increase in demand, the lack of a concomitant increase in donor organ availability has led to a growing disparity between supply and demand. Hence, much research has focussed on definition and implementation of policies for increasing donor availability, identification of suitable recipients for organs, and procedures to increase the chances of successful transplantation. Furthermore, the scarcity of donors has led to the creation of national and international coalitions of transplant organizations. This has resulted in requirements for managing and processing vast and complex data, and accommodation of a complex set of, in some cases conflicting, national and international regulations and protocols governing exchange of organs and tissues. Hence, in [17] an agent-based architecture - CARREL - is proposed for managing the data to be processed in carrying out recipient selection, organ and tissue allocation, ensuring adherence to legislation, and following approved protocols and preparing delivery plans. In this paper we focus on CARREL’s support for donor organ (rather than tissue) transplantation. In particular, we formalise a framework for agent argumentation over organ viability for transplantation with the aim of increasing the number of human organs that current selection processes make available for transplantation. In §2 we briefly describe CARREL and the current organ selection and assignation process in which an agent representing the hospital in which the donor is located (the donor agent) initially identifies an organ as viable or non-viable for transplantation. If identified as non-viable, then the organ is discarded (not extracted from the potential donor) rather than being offered to agents representing potential recipients. However, this process does not account for the fact that doctors may disagree as to whether any given set of A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 928–938, 2005. c Springer-Verlag Berlin Heidelberg 2005
Towards Formalising Agent Argumentation over the Viability of Human Organs
929
criteria constitute an acceptable justification for identifying an organ as viable or nonviable. For example, while a donor agent may argue that an organ is non-viable, it may well be that a recipient agent provides a stronger argument for considering the organ as viable. On the other hand, a donor agent may argue that an organ is viable, and this argument may be stronger than a recipient agent’s argument for non-viability. Hence, in §2 we describe an extension to the current CARREL architecture and a new organ selection and assignation process, so as to facilitate agent argumentation over the viability of organs. In this way, organs that ordinarily would be discarded having been deemed non-viable by the donor agent, may now be successfully transplanted to a recipient with a winning argument for viability. Organs that ordinarily would be discarded if deemed non-viable by all recipient agents, may now be successfully transplanted to a recipient whose argument for non-viable is defeated by the donor’s argument for viability. In §3 we formalise a framework for the required agent argumentation over the viability of organs. We formalise a logic programming style approach to argument construction and describe and motivate how our formalism differs from existing logic programming style approaches [12, 6]. We also define conflict based interactions between the constructed arguments and relations that additionally account for some relative valuation of the strength of arguments in order that one argument may defeat its conflicting counterpart. We then describe Dung’s seminal calculus of opposition [4] for determining the preferred (winning) arguments on the basis of the ways in which they interact. Finally, §4 concludes with a discussion and programme for future work.
2 The Carrel Institution and the Organ Selection and Assignation Process CARREL is an electronic institution in which the interactions among a group of agents are governed by a set of norms expressed in the ISLANDER specification language [5]. CARREL is formalized as an electronic institution; a type of dialogical system where all the interactions are compositions of message exchanges, or illocutions, structured through agent group meetings called scenes or rooms. Each agent can be associated with one or more roles, and these roles define the rooms the agent can enter and the protocols it should follow. Figure 1a) shows the CARREL institution and the hospitals U CT1 ...U CTn that are members of CARREL. Each U CT x is modelled as an agency. The roles the different agents play in this agency are described in [3]. Here we focus on donor (DA) and recipient agent (RA) associated with each U CT x, and describe their roles in the organ selection and assignation process. In particular, fig.1a) shows the donor and recipient agents DA1 and RA1 for U CT 1, and only the recipient agents RA2 ...RAn for hospitals U CT2 ...U CTn . Encoded in CARREL are sets of legislation and protocols governing the exchange of organs and tissues. These are based on two physical institutions representing examples of best practice: the OCATT (Organitzaci´o CATalana de Trasplantaments) [8] and ONT (Organizaci´on Nacional de Transplantes) [9] organ transplantation organizations for Catalonia and Spain respectively. A hospital becomes a member of CARREL in order to make use of the services provided. In so doing, it commits to respecting the norms that rule the interactions inside CARREL. The current selection and assignation process begins when DA1 detects a potential
930
S. Modgil, P. Tolchinsky, and U. Cort´es Potential PotentialDonor Donor
Recipient Agent Transplant Unit
Transplant Unit
Transplant Unit
ONT
OCATT
Recipient Agent Recipient RecipientAgent Agent
a)
b)
Fig. 1. a) The CARREL Institution b) Flow of the proposed human organ selection process
donor. DA1 informs OCATT (assuming all U CTi are in Catalonia) only if the donor’s organs are deemed viable for transplantation. Organs deemed as non-viable are discarded. OCATT then offers organs to potential recipients in a prioritised queue. Once an organ is accepted, CARREL agents are then deployed to coordinate extraction of the organ and delivery to the highest prioritised recipient that accepts the organ as viable (an organ accepted by an RA may subsequently be discarded, eg. when a surgeon deems the organ non-viable at the time of operation). However, if no potential recipients are found, then OCATT offers the organ to the ONT, and a similar process takes place, this time embracing the whole of Spain. In case of refusal, the organ is then offered to transplant organizations in Europe. If every organization fails to allocate the organ, then the organ will be discarded. Currently, in Catalonia, between 15 and 20% of livers, 20% of kidneys, 60% of hearts, 85% of lungs and 95% of pancreases are discarded [8]. We now describe a new organ selection and assignation process (illustrated in fig.1b) that aims to decrease the number of discards and therefore reduce the disparity between supply and demand of organs. To facilitate this process, the roles of the DAs and RAs have been extended to include construction, sending and retrieving of arguments. A mediator agent (MA) is also defined with the role of constructing further arguments, assigning strengths to arguments and evaluating the status of interacting arguments. In addition, two new scenes or rooms are defined: a Transplant Organization Room (TOR) and an Evaluation Room (ER). Having identified a potential donor, DA1 enters the TOR (see fig 1a) and communicates basic organ data (such as the organ type) and donor data (such as the donor’s clinical history) to the OA agent representing the transplant organizations (e.g., OCATT or ONT). DA1 also sends its arguments for whether it considers the organ to be viable or non-viable to the M A in the ER. The OA agent
Towards Formalising Agent Argumentation over the Viability of Human Organs
931
contacts each RA identified as a potential recipient on the basis of basic organ and donor data. Each contacted RA then constructs its own arguments for either the viability or non-viability of the organ, and communicates these arguments to the M A. In the case that some RAj and DA1 disagree as to the viability of the organ, MA evaluates RAj and DA1 ’s arguments in order to determine the winning argument, and so decide whether the organ is viable or not for RAj . We now formalise the above described argumentation.
3 Arguing over the Viability of Organs The organ assignment process illustrates the ubiquity of disagreement and conflict of opinion in the medical domain. What may be a sufficient reason for discarding an organ for some qualified professionals may not be for others. Different policies in different hospitals and regions exist, and requiring a consensus among medical professionals is not feasible. Hence, contradictory conclusions may be derived from the same set of facts. For example, suppose a donor with a smoking history of more than 20-30 packs a year and no history of chronic obstructive pulmonary disease (COPD). Some would cite a donor’s smoking history as sufficient reason for labelling a donor’s lung as nonviable [8]. However, there are qualified physicians that reason that the donor’s lung is viable given that there is no history of COPD [7]. We propose the use of argumentation [13] to formalise the required reasoning and arbitration in the presence of conflict. Argumentation involves logic based inference of arguments followed by definition of the status of arguments on the basis of the ways in which they interact. In what follows we define the agents’ inference of arguments, built from a first order logic-programming style language L, and define evaluation of the status of arguments on the basis of conflict based interactions that additionally account for the relative strengths of arguments. 3.1 Inference of Arguments A wff of L is an atomic first order formula or such a formula preceded by strong negation ¬. Let us call such formulae strong literals. An agent’s knowledge base Δ consists of the union of a set K of ground strong literals and a set R of defeasible rules also written in L. The antecedent of such a rule is built from a conjunction of strong literals and/or weak literals of the form ∼ L, where L is a strong literal and ∼ represents weak negation, i.e., L cannot be shown to be true (negation as failure). Definition 1. A defeasible rule is of the form: 1) L1 ∧ . . . ∧ Lm ⇒ Lm+1 , or 2) L1 ∧ . . . ∧ Lm ⇒ ¬R where Li (0 ≤ i ≤ m) is a strong or weak literal and R is a rule of type 1) or 2). An example of a rule of type 1) is p(X)∧ ∼ ¬q(X) ⇒ s(X). Note that a rule of type 2) with consequent ¬R represents a challenge to any inference obtained by application of R. For instance, r(X) ⇒ ¬(p(X)∧ ∼ ¬q(X) ⇒ s(X)) and t(X) ⇒ ¬(r(X) ⇒ ¬(p(X)∧ ∼ ¬q(X) ⇒ s(X))). The rationale for these non-standard rules with (possibly nested) negations of rules as consequents, will be discussed later. In the following
932
S. Modgil, P. Tolchinsky, and U. Cort´es
definition of argument inference we write Θ(α) to denote the application of a substitution Θ = {X1 /t1 , . . . Xn /tn } to a first order formula or rule α, where Xi are the variables in α and ti are terms (constants or variables). Definition 2. Let Δ = (K ∪ R) be an agent knowledge base and α denote a strong literal, or an expression of the form R or ¬R where R is a defeasible rule. Then: – Δ |∼ α iff - α ∈ Δ, or - there exists a rule r = L1 ∧ ... ∧ Ln ⇒ α ∈ R, and a substitution Θ = {X1 /t1 , . . . Xn /tn } on r such that α = Θ(α ), and for i = 1...n, Δ Θ(Li ) where each variable in Θ(Li ) is assumed existentially quantified – Δ |∼ ∼ L iff it is not the case that Δ |∼ L Definition 3. An argument based on Δ = (K ∪ R) is a tuple (H, h) where: – H ⊆Δ – H |∼ h – H is minimal w.r.t set inclusion (¬∃H | H ⊆ H and H |∼ h) The above defines the standard support-claim structuring of an argument [14] in which H is the support and h the claim of argument (H, h). A sub-argument of (H, h) is of the form (H , h ) where H is a subset of H. From hereon we assume R in Δ to be finite, in which case the arguments inferred from Δ will be finite (up to renaming of variables). Also, we use upper case letters to denote variables and lower case letters to denote constants. Note that by definition, each rule R ∈ R is the claim of an argument ({R}, R), and if ¬R is the consequent of a rule R whose antecedent can be inferred from Δ, then R will be in the support of an argument with claim ¬R ({R }, ¬R). Example 1. Let r be a potential recipient for the donor d’s lung. Let d p stand for ‘donor property’, d o for ‘donor organ’ s h for ‘smoking history’, copd for ’chronic obstructive pulmonary disease’, v for ‘viable’ and contra for ‘contraindication’. Suppose DA’s knowledge base Δd containing: d1 = d o(d, lung), d2 = d p(d, s h), d3 = ¬d p(d, copd), d4 = d o(D, lung) ∧ d p(D, s h) ⇒ contra(D, lung), d5 = contra(D, O) ⇒ ¬v(D, O) and the recipient agent’s knowledge base Δr containing: r1 = d o(d, lung), r2 = d p(d, s h), r3 = ¬d p(d1, copd), r4 = match(d, r) r5 = ¬d p(D, copd) ⇒ ¬(d o(D, lung) ∧ d p(D, s h) ⇒ contra(D, lung)), r6 = d o(D, O) ∧ match(D, R)∧ ∼ contra(R, O) ⇒ v(D, O) From Δd one can construct arguments: - A1 = ({d4, d1}, d o(d, lung) ∧ d p(d, s h) ⇒ contra(d, lung)) - A2 = ({d1, d2, d4}, contra(d, lung)) - A3 = ({d1, d2, d4, d5}, ¬v(d, lung)) and from Δr the arguments: - B1 = ({r3, r5},¬(d o(d, lung) ∧ d p(d, s h) ⇒ contra(d, lung))) - B2 = ({r1, r4, r6}, v(d, lung))
Towards Formalising Agent Argumentation over the Viability of Human Organs
933
Fig. 2. The arguments’ defeat relations for the smoking history example
Notice that we do not formulate r5 as d o(D, lung) ∧ d p(D, s h) ∧ ¬d p(D, copd) ⇒ ¬contra(D, lung), as this would result in a RA’s argument for ¬ contra(d, lung) which would challenge any DA’s argument for contra(d, lung), and not just DA’s arguments constructed on the basis of the donor’s smoking history. That is, B1 represents a possible challenge to any argument for contra(d, lung) constructed using d4. 3.2 Defining Defeat among Arguments and Evaluating the Status of Arguments We now define the binary relation of defeat on pairs of conflicting arguments. This relation also accounts for a relative valuation of arguments encoded as a partial ordering. Definition 4. Let Args be the set of arguments {(H1 , h1 ) . . . (Hn , hn )} inferred from a knowledge base Δ, and $ a partial ordering on Args. Then Def eat ⊆ (Args × Args) where ((H, h), (H , h )) ∈ Def eat iff there exists a sub-argument (G, g) of (H, h) and a sub-argument (G , g ) of (H , h ) such that: – there exists a L1 ∧ ... ∧ Ln ⇒ α ∈ G such that for some i, Li = ∼ g. In this case we say that (H, h) undercut defeats (H , h ) – g ≡ ¬g , and it is not the case that (H , h ) 2 (H, h) or that (H , h ) undercut defeats (H, h). In this case we say that (H, h) rebut defeats (H , h ) Note that rebut defeats can be symmetrical in the absence of a partial order on Args, or when the rebutting arguments have equal strength. Note also the special case of rebut defeats between arguments with claims R and ¬R where R is a defeasible rule. These are related to the notion of a Pollock undercut defeat [11]: A1 (with claim ¬R) denies the relation between premises and conclusion of R used in argument A2, and thus undercut defeats A2 if A1 3 A2. However, if A2 2 A1 then neither argument defeats each other and so both can inappropriately co-exist in a conflict free set of arguments. One solution is to say that A1’s undercut defeat on A2 always succeeds (irrespective of their relative strength). This is the approach that is effectively adopted in other logic programming based approaches (e.g. [12]) whereby a Pollock undercut is simulated by an argument A1 with claim ¬applicable R(X) undercut defeating A2 by disproving the non-provability assumption ∼ ¬applicable R(X) in the antecedent of A2’s rule R. Our approach is to change the nature of the attack from an undercut to a rebut, so as to allow for the rule R to ‘repel’ and indeed defeat it’s attacker ¬R. It is partly
934
S. Modgil, P. Tolchinsky, and U. Cort´es
for this reason that rules and negations of rules can be the claims of arguments in our formalism 1 . Example 1 illustrates our motivation. We not only want that the recipient’s argument B1 can defeat a donor argument’s use of d4, but also that an argument using d4 can defeat B1. Hence, we do not include ∼ ¬d p(D, copd) as an exception in the antecedent of d4 as this would preclude construction of the DA’s argument A3 for nonviability and its subsequent possible evaluation as a wining argument over B2. Referring to example 1, fig.2a) shows the defeat relations between the union of Δd and Δr ’s arguments (where no partial ordering on the arguments is given). A unidirectional arrow indicates that the argument at the tail defeats the argument at the head of the arrow. A bidirectional arrow indicates a symmetric defeat. Note that A3 rebut defeats B2, but not vice versa, as A3 also undercut defeats B2 (see [12]). The final stage in defining an argumentation system is to determine which arguments are preferred on the basis of the ways in which they interact. We employ Dung’s seminal ‘calculus of opposition’ [4] to determine the preferred arguments from an argumentation framework (Args, Def eat). Firstly, we give Dung’s definition of a preferred extension: Definition 5. Let AF be an argumentation framework (Args, Defeat). Then for any set S ⊆ Args: - S is conflict free iff no argument in S is defeated by an argument in S. - An argument A is acceptable w.r.t. S iff each argument defeating A is defeated by an argument in S. - A conflict free set of arguments S is admissible iff each argument in S is acceptable with respect to S. - A conflict free set of arguments S is a preferred extension iff it is a maximal (w.r.t. set inclusion) admissible set. Definition n 6. Let S1 , . . . , S1 be the set of all preferred extensions of (Args, Def eat). Then i=1 Si is the set of preferred arguments of AF Referring to e.g.1, the preferred extensions are {A1, A2, A3} and {B1, B2}, and so there are no preferred arguments. It is the role of the mediator agent (MA) to assign a partial ordering on the arguments in order to decide a preferred set of arguments. The MA can valuate (and thus order) arguments on the basis of case based reasoning and agents’ reputations (see [16]). An example of the latter is when the hospital represented by RA has performed several unsuccessful lung transplants from donors with a smoking history who did not have COPD. The mediator can use this information to now prioritise d4 over r5, and hence for i = 1 . . . 3: Ai 2 B1 and defeat(Ai,B1) (see fig.2b). Hence, A1, A2 and A3 will be preferred arguments and the organ will be labelled as non-viable. 3.3 Use of Argument Schemes and the Role of the Mediator Agent The defeasible rules in eg. 1 can be described in terms of argument schemes, and associated critical questions [18] that help identify arguments for attacking these schemes. 1
Also, it seems quite reasonable to us that a rule or its negation is the claim of an argument - “I would argue that if X and Y are the case then Z is the case”.
Towards Formalising Agent Argumentation over the Viability of Human Organs
935
Rules d4 and d5 formalise the non-viability scheme: (1) If D is donor of organ O (2) and D has property C (3) and C is a contraindication for donating organ O (4) Then organ O is non-viable. and a critical question for this scheme - Is it the case that C is a contraindication for donating organ O? - is addressed by formalisation of r5. Conceptualisation of argumentation knowledge in terms of schemes and critical questions provided a useful means for eliciting the required knowledge from doctors. At present we have upwards of thirty schemes and questions [15]. We give another example below. Example 2. Let r be a potential recipient for the donor d’s kidney k. Let sve denote streptococcus viridans endocarditis, svi denote streptococcus iridans infection, r p denote ‘recipient property’, and results r p denote ‘results in recipient property’. Suppose the DA’s knowledge base Δd containing rules formalising the non-viability scheme: (1)If D is donor of organ O (2) and D has property P1 (3) and property P1 will result in a recipient having property P2 which is a contraindication for donating O (4) Then organ O is non-viable. d1 = d o(d, k), d2 = d p(d, sve), d3 = d o(D, k)∧d p(D, sve) ⇒ results r p(R, svi), d4 = d o(D, k) ∧ results r p(R, svi) ⇒ contra(D, k), d5 = contra(D, O) ⇒ ¬v (D, O) The recipient agent’s knowledge base Δr contains r1 = d o(d, k) and r2 = r p(R, svi) ⇒ ¬(d o(D, k) ∧ results r p(R, svi) ⇒ contra(D, k)) r3 = urgency(R, 0) ⇒ ¬(d o(D, k) ∧ results r p(R, svi) ⇒ contra(D, k)) r4 = plan action(R, penicillin) ⇒ ¬results r p(R, svi) r6 = d o(D, O) ∧ match(D, R)∧ ∼ contra(R, O) ⇒ v(D, O) Rules r2 and r3 are used to construct arguments addressing the critical question ‘Is it the case that a transplant resulting in recipient having property P2 is a contraindication for donating O?’. In particular r2 argues that if a recipient already has streptococcus viridans infection then it is not a contraindication, and r3 argues that if a recipient is at maximum urgency level 0 then it is not a contraindication. Rule r4 is used to construct an argument addressing the critical question ‘Can the recipient be prevented from having property P2’, by positing administration of prophylactic penicillin. We conclude with some remarks on the role of the mediator agent (MA). As discussed in eg.1 the MA may assign an ordering to arguments on the basis of an agent’s reputation. As well as assigning an ordering to arguments, an MA can construct new arguments to decide a preference. To illustrate, consider e.g.2 in which the arguments constructed will interact in the same way as in e.g.1. DA can construct an argument A3 for nonviable based on a donor’s medical condition resulting in a recipient being infected, as well as A1 based on rule d4, and A2 based on d3,d4. A1, A2 and A3 rebut defeat and are rebut defeated by an RA argument B1 that the recipient is already infected (based on rule r2). A2 and A3 undercut defeat RA’s argument B2 for viability based on r6. We thus obtain the same framework shown in fig.2a). In certain cases the issue may be more properly resolved not on the basis of whether RA or DA’s arguments are stronger, but rather on the basis of legislation specific to the area of jurisdiction represented by the donor organisation. For example, in the case where a donor has the HIV virus and a recipient is already infected with the HIV virus, legislation may vary as to whether
936
S. Modgil, P. Tolchinsky, and U. Cort´es
a transplant in such circumstances is legal or not. This legislation can be encoded for use by the MA to construct arguments to resolve the issue. For example, an argument C1 that is built from the rule recipient jurisdiction(R, spain) ⇒ ¬(r p(R, hiv) ⇒ ¬(d o(D, O) ∧ results r p(R, hiv) ⇒ contra(D, O))) will be stronger (given that legislative arguments are given highest priority) and so asymmetrically defeat B1. Consequently, C1, A1, A2 and A3 will now be preferred.
4 Conclusions and Future Work In this paper we have described an extension to the CARREL agent-based organization. The extension describes a novel application of argumentation theory in that we have formalised a framework for agent argumentation over the viability of organs for transplantation. We believe that our approach solves complex problems in the transplantation domain through efficient exchange of information and argumentation based reasoning over this information to support decision making. In particular, we believe our work has the potential to increase the number of human organs that current selection and assignation processes make available for transplantation, and thus reduce the growing disparity between supply of, and demand for, organs. Of further benefit is that a record of the agents’ argumentation provides an explanatory audit trail for future reference by medical researchers, as well as a justification (that may be required in a legal context) for what are often potentially life threatening decisions. The argumentation framework described in this paper differs from related formalisms [12, 6] in that it allows for rules and their negations to be the claims of arguments, enabling formulation of Pollock’s style defeats [11] as rebut rather than the standard undercut defeats. Note that future work will allow for use of strict rules in the construction of arguments; complications arising from their use (see [2]) have motivated the restriction to defeasible rules in the work presented here. Evaluation of the preferred status of arguments may require that a mediator agent assign a partial ordering on arguments, or indeed construct further arguments. An immediate goal for future work is to formalise our proposals described in [16] for the mediator agent’s use of Case-Based Reasoning, an ’Acceptability Criteria Knowledge Base’ and agent reputations in the evaluation phase. Note that we have described a process whereby DA and RA arguments are submitted to the mediator without an option for making further counter-arguments in response. For example, suppose the DA and RA having submitted arguments as described in e.g. 1. Assuming that the DA has received information about the location of the potential recipient, it may instantiate and submit another argument for non-viability on the grounds that there are logistical contraindications given the RA’s location and the organ’s ischaemia time. This further ‘round of argumentation’ suggests formalisation in terms of an argumentation based dialogue. Indeed, there is a considerable body of work on formalising multi-agent argumentation based persuasion dialogues (e.g.,[10]) in which one agent attempts to persuade the other of the validity of its claim though multiple exchanges of attacking arguments. Recent work on persuasion dialogues also illustrates persuasion over action (e.g.,[1]) rather than beliefs. In this work, an argument scheme for action and its associated critical questions are used as the basis for definition of a dialogue protocol. An argument for action instantiating
Towards Formalising Agent Argumentation over the Viability of Human Organs
937
the proposed scheme can be attacked by arguments identified by critical questions such as: does the action have an undesirable side-effect? and is there an alternative action that realises the same goal? In future work we will need to consider such argumentation over actions given that donor and recipient agents submit arguments referencing planned actions that result in some world state supporting their claim for viability (as described in e.g. 2) Acknowledgments. This paper was supported in part by the Grant FP6-IST-002307 (ASPIC). Thanks also to H. Prakken for useful discussion on the content of this paper.
References 1. K. M. Atkinson, T. J. M. Bench-Capon, and P. McBurney. A dialogue game protocol for multi-agent argument for proposals over action. In Proc. First International Workshop on Argumentation in Multi-Agent Systems (ArgMAS 2004), 2004. 2. M. Caminada and L. Amgoud. An axiomatic account of formal argumentation. In Proceedings of the AAAI-2005, 2005. 3. U. Cort´es, J. V´azquez-Salceda, A. L´opez-Navidad, and F. Caballero. UCTx: a multi-agent approach to model a transplant coordination unit. In Proceedings of the 3rd. Congr´es Catal`a dIntellig`encia Artificial, 2000. 4. P. M. Dung. On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games. Artificial Intelligence, 77:321–357, 1995. 5. M. Esteva, D. de la Cruz, and C. Sierra. Islander: an electronic institutions editor. In AAMAS. ACM, 2002. 6. A.J. Garc´ıa and G.R. Simari. Defeasible logic programming: an argumentative approach. Theory and Practice of Logic Programming, 4(1):95–138, 2004. 7. A. L´opez-Navidad and F. Caballero. Extended criteria for organ acceptance: Strategies for achieving organ safety and for increasing organ pool. Clin Transplant, Blackwell Munksgaard, 17:308–324, 2003. 8. OCATT. Organitzaci´o Catalana de Transplantaments (OCATT). http://www10.gencat.net/catsalut/ocatt/en/htm/index.htm. 9. ONT. Organizaci´on Nacional de Transplantes. http://www.msc.es/ont. 10. S. Parsons, M. Wooldridge, and L. Amgoud. On the outcomes of formal inter-agent dialogues. In Proceedings of the Second International Joint Conference on Autonomous Agents and Multi-Agent Systems (AAMAS 2003), 2003. 11. J. L. Pollock. Defeasible reasoning. Cognitive Science, 11:481–518, 1987. 12. H. Prakken and G. Sartor. Argument-based extended logic programming with defeasible priorities. Journal of Applied Non-Classical Logics, 7:25–75, 1997. 13. H. Prakken and G. Vreeswijk. Handbook of Philosophical Logic, second edition, chapter Logics for Defeasible Argumentation. Kluwer Academic Publishers, 2002. 14. G.R. Simari and R.P. Loui. A mathematical treatment of defeasible reasoning and its implementation. Artificial Intelligence, 53:125–157, 1992. 15. P. Tolchinsky and U. Cort´es. Argument Schemes and Critical Questions for deciding upon the Viability of a Human Organ for transplantation. Technical report, Technical University Of Catalonia, 2005. http://www.lsi.upc.edu/∼tolchinsky/sch-list.pdf.
938
S. Modgil, P. Tolchinsky, and U. Cort´es
16. P. Tolchinsky, U. Cort´es, J.C. Nieves, F. Caballero, and A. L´opez-Navidad. Using arguing agents to increase the human organ pool for transplantation. In 3rd Workshop on Agents Applied in Health Care (IJCAI-05), 2005. 17. J. V´azquez-Salceda, U. Cort´es, J. Padget, A. L´opez-Navidad, and F. Caballero. The organ allocation process: a natural extension of the CARREL Agent-Mediated Electronic Institution. AiCommunications. The European Journal on Artificial Intelligence, 3(16), 2003. 18. D. N. Walton. Argumentation Schemes for Presumptive Reasoning. Lawrence Erlbaum Associates, Mahwah, NJ, USA, 1996.
A Comparative Study on Machine Learning Techniques for Prediction of Success of Dental Implants Adriano Lorena In´ acio Oliveira1 , Carolina Baldisserotto1, and Julio Baldisserotto2 1
Department of Computing Systems, Polytechnic School of Engineering, Pernambuco State University, Rua Benfica, 455, Madalena, Recife – PE, Brazil, 50.750-410 2 Faculdade de Odontologia, Universidade Federal do Rio Grande do Sul, Rua Ramiro Barcelos, 2492, Porto Alegre – RS, Brazil, 90.040-060 [email protected], carol [email protected], [email protected]
Abstract. The market demand for dental implants is growing at a significant pace. In practice, some dental implants do not succeed. Important questions in this regard concern whether machine learning techniques could be used to predict whether an implant will be successful and which are the best techniques for this problem. This paper presents a comparative study on machine learning techniques for prediction of success of dental implants. The techniques compared here are: (a) constructive RBF neural networks (RBF-DDA), (b) support vector machines (SVM), (c) k nearest neighbors (kNN), and (d) a recently proposed technique, called NNSRM, which is based on kNN and the principle of structural risk minimization. We present a number of simulations using real-world data. The simulations were carried out using 10-fold crossvalidation and the results show that the methods achieve comparable performance, yet NNSRM and RBF-DDA produced smaller classifiers.
1
Introduction
Dental implants have been used successfully to replace lost teeth with very high success rates [3]. Nevertheless, oral rehabilitation through dental implants presents failure risks related to the different phases of the osseointegration process (the integration of the implant to the adjacent bone) [14]. A number of risk factors may be related to the failure of dental implants, such as the general health conditions of the patient, the surgical technique employed, the use of smoke by the patient and the type of implant [11]. In this work, a dental implant is considered successful if it presents characteristics of osseointegration in the different phases of the process, including the prosthetic loading and its preservation. We considered that a failure took place whenever any problem related to the implant motivated its removal. The features of the patients considered in this work were carefully chosen by an oral surgeon specialist in dental implants. The features considered here were: A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 939–948, 2005. c Springer-Verlag Berlin Heidelberg 2005
940
A.L.I. Oliveira, C. Baldisserotto, and J. Baldisserotto
1) age of the patient, 2) gender, 3) implant type, 4) implant position, 5) surgical technique, 6) an indication whether the patient was a smoker of not and 7) an indication whether the patient had a previous illness (diabetes or osteoporosis) or medical treatment (radiotherapy). These features are best described in the remaining of the paper. Some of these features, also referred to as risk factors, were also considered in a recent studied which used statistical techniques to analyze the risk factors associated with dental implants [11]. The data for the present study were collect between the years 1998 and 2004 by a single oral surgeon. The data set consists of 157 patterns which describe dental implants. In the period in which data were collected there were implants carried out less than five years before. Therefore, instead of classifying the outcome of an implant simply as success or failure, we have classified our data into seven classes: (1) success confirmed until one year; (2) success confirmed between 1 and 2 years; (3) success confirmed between 2 and 3 years; (4) success confirmed between 3 and 4 years; (5) success confirmed between 4 and 5 years; (6) success confirmed for more than 5 years; and (7) failure. In general, the longer the number of years of confirmed success, the greater is the likelihood of definitive success of an implant. Nowadays the prediction of success of failure of a dental implant is almost always carried out by the oral surgeons through clinical and radiological evaluation. Therefore, the accuracy of such predictions is heavily dependent on the experience of the oral surgeon. This works aims to help predicting the success or failure of a dental implant via machine learning techniques, thereby hoping to improve the accuracy of the predictions. We have considered four machine learning techniques for our comparison, namely, (a) RBF-DDA with θ− selection [18], (b) support vector machines (SVMs) [7, 8, 1], (c) k-nearest neighbors (kNN) [2], and (d) NNSRM (nearest neighbors with structural risk minimization) [12, 13]. kNN is a classical classifier and was chosen because it is often used as a basis for comparison with more recent classifiers. SVMs are a more recent powerful class of machine learning techniques based on the principle of structural risk minimization (SRM). SVMs have been applied successfully to a wide range of problems such as text classification and optical character recognition [8, 19]. The two remaining classifiers have been proposed recently in the literature. DDA (dynamic decay adjustment) is a fast training method for RBF and PNN neural networks [5, 4]. RBF-DDA with θ− selection uses cross-validation to select the value of parameter θ− thus improving performance in some classification problems [18]. NNSRM uses the principle of SRM in order to build nearest neighbors (NN) classifiers with less training prototypes stored in their reference sets [12, 13]. We decided to use these last two classifiers in order to assess their performance in a task different from those considered in the papers in which they were proposed [18, 12]. Thus this paper also contributes by further exploring these classifiers on different data sets. This paper is organized as follows. Next section reviews the machine learning techniques considered in this work. Section 3 describes the experiments carried
A Comparative Study on Machine Learning Techniques
941
out along with the results and discussion. Finally, section 4 presents our conclusions and suggestions for further research.
2 2.1
The Machine Learning Techniques Compared Constructive RBF Neural Networks
The DDA algorithm is a very fast constructive training algorithm for RBF and probabilistic neural networks (PNNs) [5, 4]. In most problems training is finished in only four to five epochs. The algorithm has obtained good performance in a number of problems, which has motivated a number of extensions to the method recently proposed in the literature [18, 17, 16]. An RBF trained by DDA is referred as RBF-DDA. The number of units in the input layer represents the dimensionality of the input space. The input layer is fully connected to the hidden layer. RBF-DDAs have a single hidden layer. The number of hidden units is automatically determined during training. Hidden units use Gaussian activation functions. RBF-DDA uses 1-of-n coding in the output layer, with each unit of this layer representing a class. Classification uses a winner-takes-all approach, whereby the unit with the highest activation gives the class. Each hidden unit is connected to exactly one output unit. Each of these connections has a weight Ai . Output units uses linear activation functions with values computed by → f (− x)=
m
→ Ai × Ri (− x)
(1)
i=1
where m is the number of RBFs connected to that output. The DDA training algorithm is constructive, starting with an empty hidden → layer, with units being added to it as needed. The centers of RBFs, − ri , and their widths, σi are determined by DDA during training. The values of the weights of connections between hidden and output layers are also given by DDA. The complete DDA algorithm can be found in [5, 18]. The algorithm is executed until no changes in the parameters values (number of hidden units and their respective parameters and weights values) are detected. This usually takes place in only four to five epochs [5]. This natural stopping criterion leads to networks that naturally avoid overfitting training data [5, 4]. The DDA algorithm relies on two parameters in order to decide about the introduction of new prototypes (RBF units) in the networks. One of these parameters is a positive threshold (θ+ ), which must be overtaken by an activation of a prototype of the same class so that no new prototype is added. The other is a negative threshold (θ− ), which is the upper limit for the activation of conflicting classes [5, 4]. Originally, it was assumed that the value of DDA parameters would not influence classification performance and therefore the use of their default values, θ+ = 0.4 and θ− = 0.1 , was recommended for all datasets [5, 4]. In contrast, it was observed more recently that, for some datasets, the value of θ− considerably
942
A.L.I. Oliveira, C. Baldisserotto, and J. Baldisserotto
influences generalization performance in some problems [18]. To take advantage of this observation, a method has been proposed for improving RBF-DDA by carefully selecting the value of θ− [18]. In the RBF-DDA with θ− selection method, the value of the parameter θ− is selected via cross-validation, starting with θ− = 0.1 [18]. Next, θ− is decreased by θ− = θ− × 10−1 . This is done because it was observed that performance does not change significantly for intermediate values of θ− [18]. θ− is decreased until the cross-validation error starts to increase, since smaller values lead to overfitting [18]. The near optimal θ− found by this procedure is subsequently used to train using the complete training set [18]. 2.2
Support Vector Machines
Support vector machine (SVM) is a recent technique for classification and regression which has achieved remarkable accuracy in a number of important problems [7, 19, 8, 1]. SVM is based on the principle of structural risk minimization (SRM), which states that, in order to achieve good generalization performance, a machine learning algorithm should attempt to minimize the structural risk instead of the empirical risk [8, 1]. The empirical risk is the error in the training set, whereas the structural risk considers both the error in the training set and the complexity of the class of functions used to fit the data. Despite its popularity in the machine learning and pattern recognition communities, a recent study has shown that simpler methods, such as kNN and neural networks, can achieve performance comparable to or even better than SVMs in some classification and regression problems [15]. The main idea of support vector machines is to built optimal hyperplanes that is, hyperplanes that maximize the margin of separation of classes - in order to separate training patterns of different classes. An SVM minimizes the first equation below subject to the condition specified in the second equation 1 T w w+C ξi 2 i=1 l
min
w,b,ξ
subject to
yi (wT φ(xi ) + b) ≥ 1 − ξi , ξi ≥ 0.
(2)
The training vectors xi are mapped into a higher (maybe infinite) dimensional space by the function φ. Then SVM finds a linear separating hyperplane with → → the maximal margin in this higher dimensional space. A kernel K(− x,− y ) is an T − → → − → − → − inner product in some feature space, K( x , y ) = φ ( x )φ( y ). A number of kernels have been proposed in the literature [19, 8, 1, 2]. In this work we use the radial basis function (RBF) kernel, which is the kernel used more frequently. The kernel function K(xi , xj ) in an RBF kernel is given by K(xi , xj ) = exp(−γ||xi − xj ||2 ), γ > 0. SVMs with RBF kernels have two parameters, namely, C, the penalty parameter of the error term (C > 0) and γ, the width of the RBF kernels. These
A Comparative Study on Machine Learning Techniques
943
parameters have great influence on performance and therefore their values must be carefully selected for a given problem. In this work, model selection is carried out via 10-fold cross-validation on training data. A grid search procedure on C and γ is performed, whereby pairs of (C, γ) are tried and the one with the best cross-validation accuracy is selected [10]. A practical method for identifying good parameters consists in trying exponentially growing sequences of C and γ. In our experiments, the sequence used was C = 2−5 , 2−3 , · · · , 215 , and γ = 2−15 , 2−13 , · · · , 23 [10]. 2.3
k-Nearest-Neighbors (kNN)
kNN is a classical prototype-based (or memory-based) classifier, which is often used in real-world applications due to its simplicity [2]. Despite its simplicity, it has achieved considerable classification accuracy on a number of tasks and is therefore quite often used as a basis for comparison with novel classifiers. The training phase of kNN consists simply of storing all training patterns. kNN has a parameter k which is the number of neighbors to be considered for classification. For k = 1, kNN is also referred as nearest neighbor (NN). NN classifies a given pattern as belonging to the same class of the nearest pattern of the training set (also called reference set). There are a number of distances used in this process, yet Euclidean distance is by far the most frequently used [2]. We have used this distance in this work. When k > 1, kNN first computes the distances of the novel pattern to be classified to all patterns of the reference set. Subsequently, the algorithm considers the k patterns of the training set with the smallest distances. Finally, the novel pattern is classified as belonging to the class of the majority of the k nearest patterns of the reference set. In this work we have considered kNN with k = 1, k = 3 and k = 5 in our simulations. In spite of its simplicity, kNN has two important disadvantages: 1) it stores all training patterns as prototypes, thereby consuming a great amount of memory and 2) the time to classify a novel pattern may be large, since the distance to all training patterns must be computed. 2.4
NNSRM
The NNSRM algorithm was recently proposed in the literature and was developed by explicitly applying the SRM principle to NN (nearest neighbor) classification [12, 13]. The main motivation was to produce NN classifiers which store much less prototypes in their reference set, thereby addressing one of the main disadvantages of the original NN. Another motivation was to develop an algorithm with comparable classification accuracy to SVMs and smaller training and classification times [12, 13]. The main idea of NNSRM consists in creating the reference set by considering only those training patterns of regions where pairs of data points of opposite classes have the smallest distances, since most classification errors occur in those
944
A.L.I. Oliveira, C. Baldisserotto, and J. Baldisserotto
regions [12, 13]. The original version of the NNSRM uses the original input space [12]. Later, a new version of the algorithm, which considers the mapping of input space via a kernel, was proposed in the literature [13]. In this work we consider only the original version of the NNSRM algorithm [12]. Consider the case of classification problems with only two classes. Suppose the training set is given by {xi , yi } and assume that the class labels are given by yi = −1 or yj = 1. Let J be the reference set and Remp be the empirical risk, that is, the error on the training set. Firstly compute the pairwise distances ρ(xi , xj ) = d(k) , such that yi = −1, yj = 1 and generate a set dk of these distances in descending order. Let d(k) be the kth element of this set. The NNSRM algorithm for two classes is given below [12, 13]. 1) initialize J = ∅, k = 1; 2) while Remp (fJ ) > 0 do a) find xi and xj so that ρ(xi , xj ) = d(k) , yi = −1, yj = 1; b) if {i, j} ⊂ J, update J ← J ∪ {i, j}; c) increment k ← k + 1. Note that the algorithm starts with an empty reference set J and the training patterns are added to it until the training error (Remp ) is null. The idea of the algorithm is to include in the reference set only a number of training patterns necessary to obtain classification error equal to zero in the training set. The first pair of training patterns included in the reference set are those from different classes with the smallest distance. The algorithm proceeds considering pairs of training patterns from different classes in the order given in the set dk . The version of the NNSRM algorithm for N classes follows a similar idea. The detailed description of this algorithm can be found in [12]. Note that the NNSRM algorithm always obtains 100% classification accuracy in the training set. In contrast, SVMs, which are also based on the SRM principle, do not. This can be a problem for NNSRM, since the algorithm can learn noise and outliers which are common in some data sets [13]. This means that SVMs can, in most cases, achieve better generalization performance.
3 3.1
Experiments Data Set
The input variables considered in this work were chosen by an expert (oral surgeon) based on his previous experience. According to the expert, the most important factors which influence the success or failure of a dental implant are those shown in table 1. Some of those factor were also considered in a recent study which used statistical techniques for analyzing dental implant failure [11]. Table 1 shows the input variables together with their possible values in our data set. The distribution of the dependent variable in our problem is shown in table 2. This is a classification problem with seven classes. One of the classes indicates
A Comparative Study on Machine Learning Techniques
945
Table 1. Input variables Name Age (years) Gender Implant position
Possible values from 17 to 74 {male, female} { posterior maxilla, anterior maxilla, posterior mandible, anterior mandible } {conventional, surface treatment} {conventional, complex} {yes, no}
Implant type Surgical technique Smoker? Previous illness or medical treatment? {no, yes (diabetes), yes (osteoporosis), yes (radiotherapy) } Table 2. Distribution of dependent variable Class 1 (success 2 (success 3 (success 4 (success 5 (success 6 (success 7 (failure) Total
up to 1 year) from 1 to 2 years) from 2 to 3 years) from 3 to 4 years) from 4 to 5 years) five years or more)
Frequency Percentage 2 1.27% 24 15.29% 25 15.92% 21 13.38% 16 10.19% 62 39.49% 7 4.46% 157 100%
failure whereas the remaining six classes indicate success, with a variable period of time. 3.2
Experimental Setup
Due to the small number of examples in our data set we have used 10-fold crossvalidation in order to compare the machine learning techniques. This is a well known technique widely used to compare classifiers whenever data is scarce [2]. In 10-fold cross-validation the data set is divided in ten disjoints subsets (folds) [2]. Subsequently, the classifier is trained using a data set composed of nine of these subsets and tested using the remaining one. This is carried ten times, always using a different subset for testing. Finally, the cross-validation error is computed as the mean of the ten test errors thus obtained. In order to improve even more our comparison, we have firstly generated ten versions of our data set by randomly distributing the patterns. Therefore, each data set contains the same patterns yet in different orders. This means that the subsets used in 10-fold cross-validation are different for each random distributed version of our original data set. We have performed 10-fold cross-validation using each of the ten randomly ordered versions of our data set. Hence, for each classifier, one hundred simulations were carried out (including the training and test phases).
946
A.L.I. Oliveira, C. Baldisserotto, and J. Baldisserotto Table 3. Comparison of classifiers: 10-fold cross-validation errors
Random set 1 Random set 2 Random set 3 Random set 4 Random set 5 Random set 6 Random set 7 Random set 8 Random set 9 Random set 10 mean st.dev
RBF-DDA with θ− selection 26.03% 22.09% 23.61% 24.09% 22.73% 24.52% 24.94% 26.97% 26.06% 24.06% 24.51% 1.53%
SVM kNN (k=1) NNSRM 25.64% 24.36% 23.08% 23.08% 24.36% 24.36% 23.72% 24.36% 24.36% 23.08% 24.04% 0.81%
24.20% 25.47% 22.92% 24.84% 22.29% 22.92% 22.92% 26.75% 23.56% 24.84% 24.07% 1.40%
26.75% 27.38% 27.38% 28.02% 26.11% 26.11% 29.93% 27.38% 27.38% 31.84% 27.82% 1.78%
Table 4. Comparison of classifiers: number of prototypes stored (10-fold crossvalidation)
Random set 1 Random set 2 Random set 3 Random set 4 Random set 5 Random set 6 Random set 7 Random set 8 Random set 9 Random set 10 mean st.dev
3.3
RBF-DDA with θ− selection 73.9 73.9 73.2 73.7 73.7 73.7 73.9 73.7 73.2 73.9 73.68 0.27
SVM kNN (k=1) NNSRM 111.6 101.0 108.7 102.5 106.5 101.6 101.6 97.5 107.2 102.3 104.05 4.27
141 141 141 141 141 141 141 142 142 142 141.3 0.48
54 53 54 55 57 57 52 51 54 52 53.9 2.02
Results and Discussion
In this study we are interested in comparing the machine learning techniques in our problem regarding the classification error and the complexity of the classifiers, that is, the number of training prototypes stored by each of them. The simulations using RBF-DDA with parameter selection [18] were carried out using SNNS [20], whereas SVM simulations used LIBSVM [6]. We used our own implementations of kNN and NNSRM to obtain the results presented below. Table 3 compares the classifiers with respect to 10-fold cross-validation errors. Each line of this table shows the 10-fold cross validation error obtained by each classifier using a different version of our data set (with random order of the patterns). The table also presents the mean and standard deviation of the error
A Comparative Study on Machine Learning Techniques
947
over the ten versions of our data set obtained by each classifiers. Table 4 presents a similar comparison of the classifiers, this time, however, regarding the number of training prototypes stored by each classifier. The results of table 3 show that RBF with θ− selection, SVM and kNN with k = 1 achieved equivalent classification performance (around 24% mean error). NNSRM, on the other hand, obtained a larger error (around 28% mean error). The best results obtained by RBF with θ− selection (shown in table 3) used θ− = 0.01. We have carried out simulations using kNN with k = 3 and k = 5 as well, yet the smaller classification error was achieved with k = 1 (24.07%, as shown in table 3). With k = 3, the mean error was 33.04%, whereas, k = 5 obtained 47.44% mean classification error. In spite of the similar accuracies obtained, the three first classifiers of tables 3 and 4 are quite different with respect to complexity, as shown in table 4. The kNN classifier produces the larger classifier, since all training patterns are stored. NNSRM was indeed able to considerably reduce the complexity of the classifier compared to NN, yet at the expense of an important decrease in accuracy. Finally, in this problem RBF-DDA with θ− selection achieved the best trade-off between accuracy and complexity among the classifiers considered.
4
Conclusions
We have presented a comparative study on four machine learning techniques for prediction of success of dental implants. The data set consisted of 157 examples concerning real-world clinical cases. The input variables concerned risk factors for dental implants chosen by an expert (oral surgeon). The simulations were carried out using ten versions of the data set with different random orders of the patterns. For each random data set, the simulations were carried out via 10-fold cross-validation, due to the small size of the data set. The techniques compared were a) RBF-DDA with θ− selection, b) support vector machines (SVMs), c) k-nearest neighbors (kNN) and d) NNSRM, a recently proposed technique based on kNN and the structural risk minimization principle. The RBF-DDA, SVM and kNN classifiers achieved roughly the same classification performance (around 24% of mean cross-validation error). Yet RBF-DDA with θ− selection obtained smaller classifiers (73.68 mean number of prototypes) than SVM (104.05 mean number of prototypes) and kNN (141.3 mean number of prototypes). The NNSRM classifier was outperformed by the other classifiers (its mean error was 27.82%), on the other hand, this method produced the smaller classifiers (with 53.9 mean number of prototypes). For our problem, which has few data, this advantage of NNSRM is not significative since it comes with an important degradation in classification accuracy. Future work includes considering other classifiers for this problem such as the multilayer perceptron (MLP) and SVM with other kernel functions as well as evaluating the classification accuracy per class. Another research direction consists in determining the influence of each risk factor (input) on the classification accuracy, such as was done in [9].
948
A.L.I. Oliveira, C. Baldisserotto, and J. Baldisserotto
References 1. V. David Sanchez A. Advanced support vector machines and kernel methods. Neurocomputing, 55:5–20, 2003. 2. A.Webb. Statistical Pattern Recognition. Wiley, second edition, 2002. 3. M. Barry, D. Kennedy, K. Keating, and Z. Schauperl. Design of dynamic test equipment for the testing of dental implants. Materials & Design, 26(3):209–216, 2005. 4. M. Berthold and J. Diamond. Constructive training of probabilistic neural networks. Neurocomputing, 19:167–183, 1998. 5. Michael R. Berthold and Jay Diamond. Boosting the performance of RBF networks with dynamic decay adjustment. In G. Tesauro, D. Touretzky, and T. Leen, editors, Advances in Neural Information Processing, volume 7, pages 521–528. MIT Press, 1995. 6. Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm. 7. C. Cortes and V. Vapnik. Support-vector network. Machine Learning, pages 273– 297, 1995. 8. N. Cristianini and J. Shawe-Taylor. An Introduction to Support Vector Machines. Cambridge University Press, 2000. 9. Dursun Delen, Glenn Walker, and Amit Kadam. Predicting breast cancer survivability: a comparison of three data mining methods. Artificial Intelligence in Medicine, 34(2):113–127, 2005. 10. C.-W. Hsu, C.-C. Chang, and C.-J. Lin. A Practical Guide to Support Vector Classification, 2004. Available at http://www.csie.ntu.edu.tw/~cjlin/libsvm. 11. Donald Hui, J. Hodges, and N. Sandler. Predicting cumulative risk in endosseous dental implant failure. Journal of Oral and Maxillofacial Surgery, 62:40–41, 2004. 12. B. Kara¸cali and A. Krim. Fast minimization of the structural risk by nearest neighbor rule. IEEE Transactions on Neural Networks, 14(1):127–137, 2003. 13. B. Kara¸cali, R. Ramanath, and W. E. Snyder. A comparative study analysis of structural risk minimization by support vector machines and nearest neighbor rule. Pattern Recognition Letters, 25:63–71, 2004. 14. P. Laine, A. Salo, R. Kontio, S. Ylijoki, and C. Lindqvist. Failed dental implants clinical, radiological and bacteriological findings in 17 patients. Journal of CranioMaxillofacial Surgery, 33:212–217, 2005. 15. D. Meyer, F. Leisch, and K. Hornik. The support vector machine under test. Neurocomputing, 55:169–186, 2003. 16. A. L. I. Oliveira, B. J. M. Melo, and S. R. L. Meira. Improving constructive training of RBF networks through selective pruning and model selection. Neurocomputing, 64:537–541, 2005. 17. A. L. I. Oliveira, B. J. M. Melo, and S. R. L. Meira. Integrated method for constructive training of radial basis functions networks. IEE Electronics Letters, 41(7):429–430, 2005. 18. A. L. I. Oliveira, F. B. L. Neto, and S. R. L. Meira. Improving RBF-DDA performance on optical character recognition through parameter selection. In Proc. of the 17th International Conference on Pattern Recognition (ICPR’2004), volume 4, pages 625–628, Cambridge,UK, 2004. IEEE Computer Society Press. 19. J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, 2004. 20. A. Zell. SNNS - Stuttgart Neural Network Simulator, User Manual, Version 4.2. University of Stuttgart and University of Tubingen, 1998.
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia Comparing an Evolutionary-Neural System with a Neural Network System Orion Fausto Reyes Galaviz1 and Carlos Alberto Reyes García2 1
Universidad Autónoma de Tlaxcala, Calzada Apizaquito S/N, Apizaco, Tlaxcala, 90400, México [email protected] 2 Instituto Nacional de Astrofísica, Óptica Electrónica, Luis E. Erro 1, Tonantzintl, Puebla, 72840, México [email protected]
Abstract. This work presents an infant cry automatic recognizer development, with the objective of classifying three kinds of infant cries, normal, deaf and asphyxia from recently born babies. We use extraction of acoustic features such as LPC (Linear Predictive Coefficients) and MFCC (Mel Frequency Cepstral Coefficients) for the cry’s sound waves, and a genetic feature selection system combined with a feed forward input delay neural network, trained by adaptive learning rate back-propagation. We show a comparison between Principal Component Analysis and the proposed genetic feature selection system, to reduce the feature vectors. In this paper we describe the whole process; in which we include the acoustic features extraction, the hybrid system design, implementation, training and testing. We also show the results from some experiments, in which we improve the infant cry recognition up to 96.79% using our genetic system. We also show different features extractions that result on vectors that go from 145 up to 928 features, from cry segments of 1 and 3 seconds respectively. Keywords: Feature Selection, Evolutionary Strategies, Classification, Infant Cry Analysis, Pattern Recognition, Hybrid System.
1 Introduction The cry sound produced by an infant is the result of his/her physical and psychological condition and/or from internal/external stimulation. It has been proved that crying caused by pain, hunger, fear, stress, etc. shows different cry patterns. An experimented mother can be able of recognizing the difference between different types of cry, and with this, react adequately to her infant’s needs. The experts in neurolinguistics consider the infant cry as the first speech manifestation. It is the first experience on the production of sounds, which is followed by the larynx and oral cavity movements. All of this, combined with the feedback of the hearing capability, will be used for the phonemes production. Children with hearing loss, identified before their first 6 months of life, have a significant improvement in the speech A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 949 – 958, 2005. © Springer-Verlag Berlin Heidelberg 2005
950
O.F. Reyes Galaviz and C.A. Reyes García
development compared to those whose hearing loss was identified after their first 6 months of age. In the case of the infants that have passed through an asphyxiating period at birth, they are exposed to changes at a neurological level, depending on the asphyxiating range they had suffered. According to the American Academy of Pediatrics (AAP), from 2 to 6 out of 1000 recently born babies present asphyxia and 60% of the babies prematurely born and presenting low weight, also suffer an asphyxiating period. From them, 20 to 50% die during their first days of life. From the survivors, 25% develop permanent neurological sequels.
2 State of the Art Recently, some research efforts on infant cry analysis (ICA) had been made; showing promising results, and highlights the importance of exploring this field. In [1], Reyes & Orozco classified samples of deaf and normal babies, obtaining recognition results that go from 79.05% up to 97.43%. Petroni used neural networks to differentiate pain and no-pain cries [2]. Tako Ekkel tried to classify newborn crying sound into two categories normal and abnormal (hypoxia), and reports a correct classification result of 85% based on a radial basis neural network [3]. Also, using self organized maps methodologies, Cano et al, in [4] report some experiments to classify infant cry units from normal and pathological babies.
3 Infant’s Cry Automatic Recognition Process The automatic infant cry recognition process (Fig. 1) is basically a problem of pattern recognition, and it is similar to speech recognition. The goal is to take the baby’s cry sound wave as an input, and at the end obtain the kind of cry or pathology detected. Generally, the Speech or Infant Cry Recognition Process is done in two steps; the first step is the acoustic processing, or features extraction, while the second is known as pattern processing or classification. In the proposed system, we have added an extra step between both of them, called feature selection. For our case, in the acoustic analysis, the infant’s cry signal is processed to extract relevant features in function of time. The feature set obtained from each cry sample is represented by a vector, and each vector is taken as a pattern. Next, all vectors go to an acoustic features selection module, which will help us; to select the best features for the training process, and at the same time to efficiently reduce the input vectors. The selection is done through the Selected Characteristics Vector Iinfant’s Cryt
Digitalization (Transducer) Microphone
Characteristics Extraction (Acoustic Analysis)
Pattern Classifier Trainning
Charactrestics Selection (ES)
Trained Model Pattern Classification
Decision
Kind of Cry or Pathology Detected
Fig. 1. Infant’s Cry Automatic Recognition Process
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia
951
use of evolutionary strategies. As for the pattern recognition methods, four main approaches have been traditionally used: pattern comparison, statistical models, knowledge based systems, and connectionist models. We focus in the use of the last one.
4 Acoustic Processing The acoustic analysis implies the application and selection of filter techniques, feature extraction, signal segmentation, and normalization. With the application of these techniques we try to describe the signal in terms of its fundamental components. One cry signal is complex and codifies more information than the one needed to be analyzed and processed in real time applications. For this reason, in our cry recognition system we use a feature extraction function as a first plane processor. Its input is a cry signal, and its output is a vector of features that characterizes key elements of the cry's sound wave. We have been experimenting with diverse types of acoustic features, emphasizing by their utility Mel Frequency Cepstral Coefficients (MFCC) and Linear Predictive Coefficients (LPC). 4.1 Linear Predictive Coefficients Linear Predictive Coding (LPC) is one of the most powerful techniques used for speech analysis. It provides extremely accurate estimates of speech parameters, and is relatively efficient for computation. Based on these reasons, for some experiments, we are using LPC to represent the crying signals. Linear Prediction is a mathematical operation where future values of a digital signal are estimated as a linear function of previous samples. In digital signal processing, linear prediction is often called linear predictive coding (LPC) and can thus be viewed as a subset of filter theory [1]. 4.2 Mel Frequency Cepstral Coefficients The low order cepstral coefficients are sensitive to overall spectral slope and the highorder cepstral coefficients are susceptible to noise. This property of the speech spectrum is captured by the Mel spectrum. High order frequencies are weighted on a logarithmic scale whereas lower order frequencies are weighted on a linear scale. The Mel scale filter bank is a series of L triangular band pass filters that have been designed to simulate the band pass filtering believed to occur in the auditory system. This corresponds to series of band pass filters with constant bandwidth and spacing on a Mel frequency scale. On a linear frequency scale, this spacing is approximately linear up to 1 KHz and logarithmic at higher frequencies (Fig. 2) [5].
Fig. 2. Mel Filter Bank
952
O.F. Reyes Galaviz and C.A. Reyes García
5 Cry Pattern Classification The acoustic features set obtained in the extraction stage, is generally represented as a vector, and each vector can be taken as a pattern. These vectors are later used to make the acoustic features selection and classification processes. For the present work we are using a classifier corresponding to the type of connectionist models known as neural networks, they are reinforced with evolutionary strategies to select features in order to improve their learning process. Having as a result a Genetic-Neural hybrid system. 5.1 Evolutionary Strategies The evolutionary strategies are proposed to solve continuous problems in an efficient manner. Its name comes from the German “Evolutionstrategien”, so we may frequently see them mentioned as “ES”. Their origin was an stochastic scaled method (in other words, following the gradient) using adaptive steps, but with time it has converted in one of the most powerful evolutionary algorithms, giving good results in some parametric problems on real domains. The Evolutionary Strategies make more exploratory searches than genetic algorithms [6]. The main reproduction operator in evolutionary strategies is the mutation, in which a random value is added to each element from an individual to create a new descendant [7]. The selection of parents to form descendants is less strict than in genetic algorithms and genetic programming. 5.2 Neural Networks In a study from DARPA [8] the neural networks are defined as systems composed of many simple processing elements, that operate in parallel and whose function is determined by the network's structure, the strength of its connections, and the processing carried out by the processing elements or nodes. We can train a neural network to execute a function in particular, adjusting the values of the connections (weights) between the elements. Generally, the neural networks are adjusted or trained so that an input in particular leads to a specified or desired output (Fig.3). Here, the network is adjusted based on a comparison between the actual and the desired output, until the network’s output matches the desired output [9].
Fig. 3. Training of a Neural Network
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia
953
Generally, the training of a neural network can be supervised or not supervised. The methods of supervised training are those used when labeled samples are available. Among the most popular models are the feed-forward networks, trained under supervision with the back-propagation algorithm. For the present work we have used variations of these basic models, which we describe briefly on the next sections. 5.3 Feed-Forward Input Delay Neural Network Cry data are not static, and any cry sample at any instance in time is dependent on crying patterns before and after that instance in time. A common flaw in the traditional Back-Propagation algorithm is that it does not take this into account. Waibel et al. set out to remedy this problem in [12] by proposing a new network architecture called the “Time-Delay-Neural Network” or TDNN. The primary feature of TDNNs is the time-delayed inputs to the nodes. Each time delay is connected to the node via its own weight, and represents input values in past instances in time. TDNNs are also known as Input Delay Neural Networks because the inputs to the neural network are the ones delayed in time. If we delay the input signal by one time unit and let the network receive both the original and the delayed signals, we have a simple time-delay neural network. Of course, we can build a more complex one by delaying the signal at various lengths. If the input signal is n bits and delayed for m different lengths, then there should be nm input units to encode the total input [9]. 5.4 Gradient Descent with Adaptive Learning Rate Back Propagation The training by gradient descent with adaptive learning rate back propagation, proposed for this project, can be applied to any network as long as its weights, net input, and transfer functions have derivative functions. Back-propagation is used to calculate derivatives of performance with respect to the weight and bias variables. Each variable is adjusted according to gradient descent. At each training epoch, if the performance decreases toward the goal, then the learning rate is increased. If the performance increases, the learning rate is adjusted by a decrement factor and the change, which increased the performance, is not made [10]. The training stops when any of these conditions occurs: i) The maximum number of epochs (loops) is reached, ii) The maximum amount of time has been exceeded, or iii) The performance error has been minimized to the goal. 5.4.1 Hybrid System The hybrid system was designed to train the Input Delay Neural Network with the best features selected from the input vectors. To perform this selection, we apply Evolutionary Strategies, which use real numbers for coding the individuals. The system works as follows. Suppose we have an original matrix of size s x q, where s is the number of features that each sample has and q is the number of samples available, and we want to select the best features of that matrix to obtain a smaller matrix. For doing so, a population of n individuals is initialized, each having a length of m; these individuals represent n matrices with m rows, and q columns (Fig. 4). Each row corresponds to m random numbers that go from 1 to s.
954
O.F. Reyes Galaviz and C.A. Reyes García
q
1 2 3 1 2
Ind 1 Ind 2 Ind 3
2 3 6
n=3 m=3
1 3 4 5 5 6
s 3 5 6
1 4 5
2 3 6
Fig. 4. Individuals Initialization
Once the matrices are obtained, n neural networks are initialized, and we train each one with one matrix, at the end of training each network, we measure the efficiency by using confusion matrices. After all the results are obtained, we select the matrices yielding the best results (Fig. 5). 2 3 6
Prec = 90.87
1 4 5
Prec = 93.02
3 5 6
Prec = 91.76
1 4 5 3 5 6
Fig. 5. Selection of the best individuals
Next, the best matrices selected are sorted and ordered from the highest to the lowest efficiency value. Next we apply tournament to them, where we generate n random numbers that go from 0 to the number of selected matrices. In Fig. 6 we show that only two matrices where selected, so we generate n (in this case 3) random numbers from 0 to 2. Since there is no matrix with a 0 index, all 0s randomly generated become 1. As a result the number 1 has twice the probability to be randomly generated than any of the other indexes, which is seen as a reward for best efficiency to the matrix in position 1, getting the highest probabilities to be chosen.
1 1 4 5
2
3 5 6
2 1 1
3 5 6 1 4 5 1 4 5
Fig. 6. Generation of a new population with the best individuals
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia
955
Once the new generation of individual has been obtained, they suffer a random mutation, in each generation. First we choose a mutation factor (we used a mutation rate of 0.2), and when a new descendant is born, we generate a random number that goes from 0 to 1. If it’s smaller than 0.2 the individual is mutated, if it’s larger, we pass the individual as it is. When the individual is selected to be mutated, we generate a random number that goes from 1 to m, this is done to select which chromosome will be mutated. After we have this position, another random number from 1 to s (e.g. 1 – 928) is generated, which represents a new feature to be selected. When the individual is not selected to be mutated, it goes to the next generation to compete with the others as an exact copy of its parent. This process is repeated for a given number of generations stated by the user.
6 System Implementation for the Cry Classification On the first stage, the infant's cries are collected by recordings obtained directly from doctors of the Mexican National Institute of the Human Communication (INCH), and the Mexican Institute of Social Security (IMSS, Puebla). The cry samples are labeled with the kind of cry that the collector states at the end of each cry recording. Later, we divide each cry recording in segments of 1 and 3 seconds; these segments are then labeled with a previously established code, and each one represents one sample. By this way, for the present experiments, we have one corpus made out of 1049 samples from normal babies, 879 from hypo acoustics (deaf), and 340 with asphyxia, all this from 1 second segments samples. We also have another corpus composed by 329 samples of normal babies, 291 samples from hypo acoustics, and 111 from asphyxiating babies, all these from 3 second segment samples. The two corpuses were used for separate experiments, as it is later explained. On the next step the samples are processed one by one extracting its LPC and MFCC acoustic features, this process is done with the freeware program Praat 4.2 [11]. The acoustic features are extracted as follows: for each segment we extract 16 or 21 coefficients for every 50 or 100 milliseconds, generating vectors that go from 145 up to 1218 features for each 1 second or 3 second sample. The evolutionary algorithm was designed and programmed using Matlab 6.5 R13, the neural network and the training algorithm where implemented using the Matlab’s Neural Network Toolbox. In order to compare the behavior of our proposed hybrid system, we made a set of experiments where the original input vectors were reduced to 50 components by means of Principal Component Analysis (PCA). When we use evolutionary strategies for the acoustic features selection, we search for the best 50 features. In this way, the neural network’s architecture consists of a 50 nodes input layer, a 20 nodes hidden layer (60% less nodes than the input layer) and an output layer of 3 nodes. The implemented system is interactively adaptable; no changes have to be made to the source code to experiment with any corpuses. To perform the experiments we first made 16 different experiments, 8 experiments for each kind of segmentation, as follows; for 1 or 3 seconds we extract: • •
16 features for each 50 millisecond window 21 features for each 50 millisecond window
956
O.F. Reyes Galaviz and C.A. Reyes García
• •
16 features for each 100 millisecond window 21 features for each 100 millisecond window
Extracting LPC and MFCC feature vectors; this is 4 different extractions using 2 different feature extractions, and 2 different segment samples, which gives us 16 different kinds of experiments. After doing all these experiments [13] we concluded that the best features, which were the ones we used to test our hybrid system are: • •
For 1 second samples o 16 features for each 100ms, LPC (145 Features) o 16 features for each 100ms, MFCC (145 Features) For 3 second samples o 16 features for each 100ms, LPC (448 Features) o 16 features for each 50ms, MFCC (928 Features)
In all of our experiments, since we only have 340 one second, and 111 three seconds from asphyxiating babies samples, we will only choose 340 one second samples, and 111 three seconds samples from deaf and normal babies. The training is done up to 6000 epochs or until a 1×10-8 error is reached. Once the network is trained, we test it using different samples from each class separated previously for this purpose (we used from each corpus 70% for training and 30% for testing). The recognition precision is shown along with the corresponding confusion matrices.
7 Experimental Results We experimented first with the simple neural network reducing the input vectors to 50 principal components and later with our hybrid system to compare the obtained results. In these experiments we use the same input parameters, in other words, 50 input nodes and 1 time delay unit. In the case of the simple neural network system, we perform three experiments and choose the best result. As for the hybrid system, to search for the best solution in a multi solutions space, only one experiment is done. We do so because we use 20 individuals as the initial population, 20 generations to perform the features search, and the size of the individuals was of 50 chromosomes. With all these input parameters, there are 400 different training processes needed, which takes much more time to perform each experiment. The results are shown in Table 1, where the first column corresponds to the results obtained from vectors reduced with PCA, and the second one with vectors reduced by selecting features with the evolutionary strategy presented. In both cases, the same kind of input delay neural network was utilized. The only difference being that in the first case the reduction of vectors is done before any processing by the neural network. While in the second case, feature selection is made concurrently to the neural network training. On this basis, we are presenting our model as an evolutionary-neural hybrid system.
Infant Cry Classification to Identify Hypo Acoustics and Asphyxia
957
Table 1. Results using different feature extractions, comparing a simple neural network with a hybrid system
1 sec. LPC 16f 100ms 1 sec. MFCC 16f 100ms 3 sec. LPC 16f 50ms 3 sec. MFCC 16f 100ms
Neural System
Hybrid System
55.15%
86.75%
93.33%
96.79%
68.79%
85.72%
92.33%
95.56%
8 Conclusions and Future Works The application of feature selection methods, on different kinds of pattern recognition tasks, has become a viable alternative tool. Particularly for those tasks which have to deal with input vectors of large dimensions. As we have shown, the use of evolutionary strategies for the selection of acoustic features, in the infant cry classification problem, has allowed us, not only to work with reduced vectors without losing classification accuracy, but also to improve the results compared to those obtained when applying PCA. On the other side, from the results shown, we can conclude that the best acoustic features to classify infant cry, with the presented hybrid system, are the MFCC. For future works, in order to improve the performance of the described evolutionary-neural system, we are planning to do more experiments using other neural network configurations, different number of individuals, different number of generations and different individual size. We are also looking for adequate models to dynamically optimize the parameters of the hybrid model, in order to adapt it to any type of pattern recognition application. As for the automatic infant cry recognition problem, we will continue experimenting with some different types of hybrid systems, such as instance and feature selection hybrid models, boosting neural network ensemble and boosting ensemble of support vector machines. And once we can be sure that our system is robust enough to identify the mentioned pathologies, we will try to increment our infant cry corpus with the same kind and some other kinds of pathologies. Particularly with the type of pathologies related to the central nervous system (CNS). This is done firstly because with more cry samples from deaf and asphyxiating babies, we can assure a more reliable learning and recognition of those cry classes. Secondly, by adding cries from infants with other pathologies, we can direct the early diagnosis to identify such pathologies. We want to concentrate on pathologies related to the CNS, because the infant cry, as a primary communication function, is naturally regulated by the CNS. So, any pathology which can be associated to the CNS should have some identifiable particular alterations on the cry signal features.
958
O.F. Reyes Galaviz and C.A. Reyes García
References 1. Orozco Garcia, J., Reyes Garcia, C.A. (2003), Mel-Frequency Cepstrum coefficients Extraction from Infant Cry for Classification of Normal and Pathological Cry with Feedforward Neural Networks, ESANN 2003, Bruges, Belgium. 2. Marco Petroni, Alfred S. Malowany, C. Celeste Johnston, Bonnie J. Stevens, (1995). Identification of pain from infant cry vocalizations using artificial neural networks (ANNs), The International Society for Optical Engineering. Volume 2492. Part two of two. Paper #: 2492-79. 3. Ekkel, T, (2002). "Neural Network-Based Classification of Cries from Infants Suffering from Hypoxia-Related CNS Damage", Master’s Thesis. University of Twente, The Netherlands. 4. Sergio D. Cano, Daniel I. Escobedo y Eddy Coello, “El Uso de los Mapas AutoOrganizados de Kohonen en la Clasificación de Unidades de Llanto Infantil”, Voice Processing Group, 1st Workshop AIRENE, Universidad Católica del Norte, Chile, 1999, pp 24-29. 5. Gold, B., Morgan, N. (2000), Speech and Audio Signal Processing. Processing and perception of speech and music. John Wiley & Sons, Inc. 6. Santo Orcero, David. Estrategias Evolutivas, http://www.orcero.org/irbis/disertacion/node217.html. 2004. 7. Hussain, Talib S., An Introduction to Evolutionary Computation, Department of Computing and Information Science Queens University, Kingston, Ont. K7L 3N6. 1998. 8. DARPA Neural Network Study, AFCEA International Press, 1988, p. 60. 9. Limin Fu., Neural Networks in Computer Intelligence. McGraw-Hill International Editions, Computer Science Series, 1994. 10. Neural Network Toolbox Guide, Matlab V.6.0.8, Developed by MathWoks, Inc. 11. Boersma, P., Weenink, D. Praat v. 4.0.8. A system for doing phonetics by computer. Institute of Phonetic Sciences of the University of Amsterdam. February, 2002. 12. A. Weibel, T. Hanazawa, G. Hinton, K. Shikano, and K.J. Lang, “Phoneme Recognition Using Time Delay Neural Networks,” IEEE Trans. Acoustics, Speech, Signal Proc., ASSP-37: 32’339, 1989. 13. Orion F. Reyes Galaviz. “Clasificación de Llanto de Bebés para Identificación de Hipoacúsia y Asfixia por medio de un Sistema Híbrido (Genético – Neuronal)”
Master’s Thesis on Computer Science, at the Apizaco Institute of Technology (ITA), March, 2005. http://solar6.ingenieria.uatx.mx/~orionfrg/tesis.pdf
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control of a Virtual Robot Jérôme Leboeuf Pasquier Departamento de Ingeniería de Proyectos, Centro Universitario de Ciencias Exactas e Ingenierías, Universidad de Guadalajara, Apdo. Postal 307, CP 45101, Zapopan, Jalisco, México [email protected]
Abstract. A prospective paradigm, named Growing Functional Modules (GFM) has been introduced in a recent publication. Based on the epigenetic approach, the GFM paradigm is conceived to automatically generate "artificial brains" that are able to build, through interaction, their own representation of their environments. The present application consists in designing an artificial brain for a simple virtual mushroom shaped robot named hOnGo. This paper describes this initial implementation and its preliminary results.
1
Introduction
A previous paper [7] introduces a prospective paradigm named "Growing Functional Modules" (GFM) founded on the epigenetic approach. The central postulate of this paradigm states that the architecture of the artificial brain is based on the interconnection of growing functional modules. Such modules' interconnection results from the previous design phase of the robot's brain. In order to illustrate that assertion, this paper presents an initial application consisting in generating the artificial brain of a simple mushroom shaped robot named hOnGo1 that has been introduced in a previous paper [10]. Our purpose is to exhibit the functionality and evaluate the efficiency of the artificial brain that results from the design of a GFM architecture. Historically, hOnGo has been fashioned to give support to the development of the paradigm; the real brain design process was more chaotic than what is described in this paper. Furthermore, all subsequent results are related to a virtual version of the robot.
2
Description of the Application
2.1
The hOnGo Robot
Figure 1 shows a schematic representation of hOnGo consisting of three main parts: a single leg, a body and a hat. An actuator is placed at each of the axis of rotation J2, J3 1
Spanish word for mushroom.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 959 – 969, 2005. © Springer-Verlag Berlin Heidelberg 2005
960
J. Leboeuf Pasquier
and J4. A fourth actuator placed at J1 that is in charge of stabilizing the hat in a horizontal position, is not considered in this version. Besides, to avoid dealing with unstable equilibrium2, the axis J3 is positioned above hOnGo's centre of gravity.
Fig. 1. Schematic representation of the mushroom shaped robot hOnGo
Motion is obtained when the robot leans on the brim of its hat and repositions its leg to take advantage of a new point of contact with the ground, as shown figure 2. Change of direction or orientation of the hat, are achieved by rotating the internal body; both effects are mutually exclusive, and depend on the contact between the hat and the ground as shown figure 3.
Fig. 2. Obtaining motion through leaning on the hat
2.2
The Proposal
At this point, hOnGo may be considered as a minimalist robot easy to program. Nevertheless our proposal consists in leaving out such a programming phase and substituting it with the implementation of the GFM paradigm. According to this paradigm, at least one global goal is required to trigger learning within the growing modules architecture. Therefore, hOnGo will have to permanently focus on 2
A GFM module specialized in real time regulation is under study to take in charge such control tasks.
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control
961
phototaxis3, a single goal that will be implemented at the highest level of the GFM architecture.
Fig. 3. Obtaining change of direction or rotation of the hat, depending of the contact between the hat and the ground
The robot structure and its actuators conform a kind of premise, thus the primary task consists in determining which functional modules should be connected to form the brain's architecture and, also, which sensors should be attached to the structure. Connecting these selected elements characterizes the GFM design phase4 [7]. The resulting design of the brain architecture is compiled and constitutes the control system of the robot. 2.3
The Paradigm
According to Epigenesis [1], to efficiently gain autonomous control, a system must fulfill three essential characteristics: its embodiment, its situatedness in an environment and its involvement in an epigenetic developmental process [2], [3], [4], [5] and [6]. The first two requirements are satisfied by basic robotics and the GFM paradigm fulfills the requirement for the third one. GFM offers an alternative to rigid representations, which usually present a lack of perception and a shortage of learning, prevalent in most computer science paradigms. The major return would be to free the robot realization from a commonly huge programming task, replacing it by learning, which comes from the internal structure of each interconnected growing module. Each GF module is conceived and implemented to achieve a generic task consisting in reaching a specific goal5, generating a sequence of actions. In particular, the adaptation of these sequences is accomplished due to the feedback provided in response to these actions. From this ultimate assertion, the outcome is that, to exhibit the role played by a particular module, its task, input, output and feedback must be supplied. At this stage, the robot's designer has available a reduced library of GF modules to elaborate the architecture of the artificial brain. Optionally, new elements may be appended to this library as long as: firstly, the interconnection scheme common to all modules is observed; and secondly, a permanent learning process is internally implemented. 3
Light seeking. In fact, there is a previous phase named Behavior Prediction Analysis that has been omitted in this paper to simplify the exposition. 5 Mostly a floating point value. 4
962
J. Leboeuf Pasquier
3
The Design Phase
3.1
Methodology
Learning results from an emerging process, which involves all modules concurrently. Nevertheless, the modules whose position in the architecture is closest to the actuators present a faster adaptation, since they receive more requests from others, and more feedback from sensors. As a consequence, the learning process of the brain expands hierarchically from the lowest modules to the upper ones. Currently no methodology has been elaborated to facilitate the design phase; however, considering the nature of the previously mentioned learning process, a bottom-up approach seems convenient. 3.2
The Control of the Leg
According to the previous paragraph, the first step should consider the control of the robot's leg. A convenient solution contemplates the integration of the NAC architecture described in [8], optimized in [9] and implemented as a module in [10]. The NAC module operates building an internal growing and adaptative network of cells designed to memorize stochastic correlations between local input and output spaces. After a while, this module is able to generate the optimum sequence of actions to reach the requests of upper modules. Figure 4 shows the architecture of hOnGo's artificial brain. Two NAC modules A1 and A2 are configured to trigger sequences of elementary actions -δθ, δθ, -δψ, δψ (in output) that alter the angles of joints J2 and J3 of the robot's leg. As feedback, A1 and D
HC [v]
{ s, d, o }
C
SG [e] { h, l }
A2 A1
NAC
[ l, p1, p3 ]
[ h, p2,, p3 ] { -δθ, δθ, -δψ, δψ }
NAC
B2 B1
[o] [d] { -δĮ, δĮ }
Fig. 4. Schematic representation of hOnGo's artificial brain
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control
963
A2 respectively receive the current height h and length l of a step, in addition to p2 and p3, which correspond to the positions of joints J2 and J3. For that reason, concurrent actions on joints J2 and J3, produced simultaneously by modules A1 and A2, would generate chaotic acting and confused feedback, preventing thus respective adaptations. Therefore, these modules A1 and A2 must be implemented as "levels" represented by their superposition in figure 4; such configuration prohibits concurrent activation while it allows simultaneous learning. At this stage, an upper module may request a specific value of height to A1 or length to A2, triggering thus an internal propagation; this propagation produces a sequence of actions that modify the angles of joints J1 and J2 toward reaching the requested input value. When failing in this attempt, an internal learning mechanism is activated to improve the internal representation that produced the sequence. A few parameters must be provided to allow the creation of modules A1 and A2 including: the number of assigned actions, the quantity of steps between the minimum and maximum opening of each angle, a value indicating roughly the expected precision and the initial positions of joints J1 and J2. 3.3
The Control of the Hat and the Body
The control of the orientation o of the hat and of the direction d of the motion is achieved in a similar way: two NAC modules B1 and B2, control the stepper motor placed on joint J4 which monitors their relative positions. For reasons similar to those mentioned in the case of the leg, both modules cannot be solicited simultaneously and thus, are, in a similar manner, organized in levels. Furthermore, the feasibility of such solicitude depends of the position of the leg: the effect of an action on the motor will affect the direction of the motion or the orientation of the hat, depending on whether the hat makes contact with the ground or not (figure 3). To capture this physical property, an inhibition connection, symbolized by the doted arrows, is aggregated to connect module A1 to modules B1 and B2. Thus, the height, provided in input, is correlated through time with the effects observed on modules B1 and B2. Gradually, the module A1 generates inhibition through this connection to evidence the previously described phenomenon. The required initial parameters provided to B1 and B2, are similar to those of A1 and A2, but describe the actuator in charge of joint J4. 3.4
The Control of the Steps
Steps are the result of a sequence of alternative values of heights and lengths requested to modules A1 and A2 and generated by an upper module C. Though, this is apparently not the simplest solution, it is in fact a functional one; otherwise, bypassing modules Ax would produce conflicts between concurrent modules soliciting the same actuators. To generate an efficient sequence of alternative requests on A1 and A2, the SG module C integrates some mechanisms that produce random sequences and gradually refine them to grant the most successful combinations. As feedback, the module C requires a unique value e that reflects the efficiency, calculated as the ratio between the length of a step and the energy spent to produce it.
964
3.5
J. Leboeuf Pasquier
The Control of the Behavior
As mentioned earlier, the unique global goal is positive phototaxis; and so, hOnGo will stay active (in motion) until maximizing the amount of incident light v captured by its (virtual) photocell. Consequently, the task of the higher module D consists in generating requests of steps s, orientation o and direction d to the modules B1, B2 and C respectively. These requests are aimed at increasing the feedback value of incident light v. As the source of light randomly changes in intensity and position over the time, the robot is continuously obliged to update its position. The internal mechanism of this current module emulates a kind of Hill Climbing heuristic and is implemented as a network of cells, similarly to all GFM modules. Presently, this constitutes an inefficient strategy, as it repeatedly obliges the robot to evaluate all possible elementary moves before selecting the optimal one. The unique advantage of implementing such a short-term decision strategy, is to facilitate the evaluation of the robot behavior. Smarter architectures that implement strategies that take advantage of the continuity and predictability of the input space are under study. The aim of these enhancements is to increase the GFM library and thus offer generic solutions to similar optimization problems. 3.6
The Generation of the Brain
At this stage, all required feedback values must be associated to some accurate sensors and transmitted to the brain according to a protocol provided at the issue of the design phase. Then, all characteristics of the resulting architecture, including the selected modules, together with their interconnection, parameters, feedback values and external actions are codified in a C++ file that constitutes the constructor of the artificial brain. Compiling the resultant application and linking it with the GFM library generates the corresponding artificial brain. Finally, connecting it through a serial port to a robot, virtual or not, initiates activity. 3.7
Concerning Sensing
In fact, the previous design is just concerned with the Acting Area of the brain: as the simple task entrusted to hOnGo does not require superior perception, sensors are directly connected to Acting modules. Otherwise, the design of the Sensing Area would be achieved in a similar manner as its counterpart. Then, before being submitted to the Acting Area, more complex external stimuli should be processed by a set of "sensing" growing modules. Such modules would extract specific characteristics among external stimuli and learn the corresponding associations and discriminations to gradually produce significant patterns. The term "significant" may, for example, reflect the specificity or frequency of a pattern occurring concurrently with a positive or negative global goal. 3.8
Concerning Design
In practice, the kind and the combination of treatments, a designer decides to apply, define the types and the interconnections of GF modules forming the architecture.
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control
965
The design phase may be considered as a substitute of the evolutionary process, that is, responsible to set up the appropriate "functions" to perform a coherent behavior. Against appearances, Genetic Programming does not constitute an alternative to this design phase as an accurate fitness evaluation would requires the robot to perform in a real environment, leading thus to an extremely slow process, comparable with the natural one. The design process described in this paper is neither unique nor optimum; in particular, the NAC modules selected present a high computational cost in comparison to their diminutive functionality in regards to this specific application. Nevertheless, their capacity would allow satisfying further potential requests from additional higher modules. Besides, the HC module constitutes a very inefficient choice to head the architecture, as it forces the robot to evaluate almost any alternatives before selecting the optimal one. Better options of modules have been proposed, but not implemented yet as, rather than efficiency of the robot's behavior; the purpose of these tests was to evaluate the viability of the architecture, the skills of the robot and its aptitude at learning. The difficulty of carrying out such design may be compensated by the fact that those dynamic functions or operations are reusable for different robots. So, specific functionalities may be extracted from the global design to form a functional subsystem. Technically, a subsystem holds only three connections with the rest of the architecture to allow input, output and feedback communications. For example, any standard four-legged robot should be roughly operated thanks to the corresponding subsystem whose feedback is given by body balance and foot pressure sensors, while output is applied on actuators placed on each joint. In figure 4, such a subsystem corresponding to hOnGo's leg is outlined with a doted line frame, but has not been transposed yet to another robot. Additionally, this design process may be facilitated thanks to a Graphical User Interface allowing, first, the design of GFM architectures (similar to the illustration of figure 4) and then, the generation of the corresponding C++ file constituting the constructor of the artificial brain (as mentioned in section 3.6) jointly with its header file that contains the description of the communication protocol.
4
The Simulation of the Robot
As mentioned, though a real version of hOnGo is under development, all the descriptions and results published in this paper concern a simulation of the robot that, in particular, ignores the problem of stabilizing the hat. The reason is that no module able to perform this functionality had been programmed at this time. But, excepting this simplification, the simulation reproduces mostly the behavior of the robot, carrying out the commands generated by the brain and providing it with the required feedback. Each input command modifies the angle of a specific joint; randomly and occasionally, some noise is added that causes the command to be ignored or modified. On the other hand, each of the feedback values, introduced from sections 3.2 to 3.5, is obtained by computing the matching equation described below:
966
-
J. Leboeuf Pasquier
Position of joint J2: p2 is incremented or decremented depending the command. Position of joint J3: p3 is incremented or decremented depending the command. Direction of the robot: d incremented or decremented depending the command but required the hat to be in contact with the floor. Orientation of the hat: o incremented or decremented depending the command but required the hat not to be in contact with the floor. Elevation of the body: h = l32 . sin( p3 ) + l 21. sin( p3 + p 2 −
) 2 where l32 and l21 represents the length of the segments [J3,J2] and [J2,J1]. Length of a step: this value is obtained by calculating the difference between the final position xf of the foot (relatively to its zero-position) and the initial position xi. The initial position is set when the hat looses contact with the floor; reciprocally, the final position is set when the hat enters in contact with the floor. Both values are calculated as follows: l = x f − xi
-
-
π
and x = l 32 . cos( p 3 ) + l 21 . cos( p3 + p 2 −
π
) 2 Efficiency e: is calculated as the ratio between the length of a step and the energy spent to produce it. The energy is the number of elemental commands applied on joints J2 and J3 between the initial and final positions. Incident light v is calculated proportionally to: first, the distance between the source of light and the photocell, second, to the angle between the perpendicular of the photocell and the direction of the light. In practice, the sensitivity of the photocell is not linearly proportional to the distance but exponentially; nonetheless this facilitates the interpretation of results without affecting their quality.
The simulation of the robot may be run either on the same computer as the artificial brain or, on another computer connected to the first one through its serial port. The "two computers" alternative, though more in accordance with the concept of a remote application, has been discarded for the tests. The reason is that the RS-232 connection, even when configured at 115,200 bauds, reduces almost by a factor four the processing time of the application and so, masked the performance of the artificial brain. In the case of a real robot, this limitation, caused by the serial communication, does not affect the velocity, as the response of a servomotor is much slower than those of the simulation.
5
The Evaluation of the Application
For both following tests, the whole application has been run on a single computer equipped with a 1000 MHz Pentium III processor and 512 MB random access memory. 5.1
First Test
The first test consists in running the application with all the characteristics described in the previous sections; additionally, each time the robot cannot increase the amount of incident light, the position of this source of light is randomly modified. The
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control
967
purpose of this test is to exhibit the functionality of the artificial brain and thus the plausibility of the GFM approach. At the beginning the robot's conduct is confused and chaotic, however after roughly half an hour, efficient actions are performed and, soon, a coherent behavior is obtained. At this moment, learning or adaptation becomes scarce since hOnGo is able to efficiently fulfill its single global goal, phototaxis. 5.2
Second Test
The second test consists in monitoring the growing structures of the modules. The HC module is replaced by a process that emits random but balanced requests to all modules. Figure 5 shows the evolution of the growing structures of modules Ax, Bx and C. The vertical axis represents the percentage of its final size, attained by the structure, throughout the emission of a total of three hundred requests. Each request may trigger numerous learning phases as reflected by the “steps” that present the associated curves.
Structure %
100 90 A1 & A2
80
B1 & B2
C
70 60 50 40 30 20 10 0 0
100
200
Requests #
300
Fig. 5. Each curve represents the growing percentage of a module's structure in function of the number of requests received
The first two curves associated to modules Ax and Bx show that the structures of these modules quickly reached their optimum size: more than nine hundred cells are created in less than fifteen minutes. The last curve shows that the SG module does not perform optimally as its learning rate presents some endless growing, creating a large amount of cells; and this, despite of the stability of the environment. This almost certainly results from an error in the implementation that currently remains unresolved; however, this module complies with its task.
968
J. Leboeuf Pasquier
To stock the structures of all NAC modules, 674 Kbytes of memory are required; the SG module is not taken into account due to the lack of convergence of its structure. In the case of a real robot, the corresponding learning time to carry out the actual number of triggered actions is evaluated to roughly four and a half hours. Yet, the servo-motors of the corresponding robot have been programmed to perform a complete rotation of Pi within thirty steps. Increasing this number of steps rises the learning precision but also the learning time. When setting the number of steps to 60, the estimated learning time exceeds seven hours.
5
Conclusions
The purpose of this paper was first of all to illustrate the GFM prospective paradigm providing an initial example of the design phase. As a result, the current experiment shows the feasibility of generating an artificial brain capable of managing a minimalist robot by applying the Growing Functional Modules paradigm. Moreover, some basic results concerning the growing structure of each module are provided to illustrate the development of the architecture and, in particular, to show its reasonable computational cost. At this stage, the main contribution of this prospective paradigm is the possibility to set up an autonomous and adaptative controller eluding its traditional programming task. Furthermore, in this paper, some additional considerations have been exposed to make explicit the expectations of the GFM project, these include: first, the development of a real version of hOnGo; second, the necessity of combining the Acting Area with its counter part, the Sensing one; third, the potential reusability of specific subsystems; fourth, the development of adequate tools to facilitate the design phase and fifth, the expectation of expanding the low-level acquired abilities to form a high-level behavior. All these points except the second one constitute the actual axes of research of the GFM project; to fulfill this sketch, six real robots and two virtual applications are under development with the aim of testing and expanding the proposed paradigm.
References 1. Piaget, J.: Genetic Epistemology (Series of Lectures). Columbia University Press, Columbia, New York (1970) 2. Prince, G. and Demiris, Y.: Introduction to the Special Issue on Epigenetic Robotics, International Society for Adaptative Behavior (2003) Vol. 11(2) 75-77 3. Brooks, R.: Intelligence without Representation, Artificial Intelligence No. 47 (1991) 139159 4. Grupen, A.: A Developmental Organization for Robot Behavior, Proceedings of the third International Workshop on Epigenetic Robotics IEEE, Massachusetts USA (2003) 5. Berthouze, L. and Prince G.: Introduction: the Third International Workshop on Epigenetic Robotics. In Prince, Berthouze, Kozima, Bullock, Stojanov and Balkenius (Eds.). Proceedings of the Third International Workshop on Epigenetic Robotics: Modeling Cognitive Development in Robotic Systems. Lund University Cognitive Studies Vol. 101. Lund Sweden (2003)
Applying the GFM Prospective Paradigm to the Autonomous and Adaptative Control
969
6. Lindblom, J. and Ziemke, T.: Social Situatedness: Vygotsky and Beyond. In Prince, Christopher G. and Demiris, Yiannis and Marom, Yuval and Kozima, Hideki and Balkenius, Christian Eds, Proceedings of the Second International Workshop on Epigenetic Robotics, Modeling Cognitive Development in Robotic Systems 94, Edinburgh, Scotland (2002) 71-78 7. Leboeuf, J.: Growing Functional Modules, a Prospective Paradigm for Epigenetic Artificial Intelligence. Lecture Notes in Computer Science 3563. Larios, Ramos and Unger eds. Springer (2005) 465-471 8. Leboeuf, J.: A Self-Developing Neural Network Designed for Discrete Event System Autonomous Control. Mastorakis, N. (eds.): Advances in Systems Engineering, Signal Processing and Communications, Wseas Press (2002) 30-34 9. Leboeuf, J.: Facing Combinatory Explosion in NAC Networks. Advanced Distributed Systems, Lecture Notes in Computer Science 3061. Larios, Ramos and Unger eds. Springer (2004) 252-260 10. Leboeuf, J.: NAC, an Artificial Brain for Epigenetic Robotics. Robotics: trends, principles and applications Vol. 15. Jamshidi, Ollero, Martinez de Dios eds. TSI Press Series (2004) 535-540
Maximizing Future Options: An On-Line Real-Time Planning Method Ramon F. Brena and Emmanuel Martinez Center for Intelligent Systemsm, Monterrey Institute of Technology [email protected], [email protected]
Abstract. In highly dynamic environments with uncertainty the elaboration of long or rigid plans is useless because the constructed plans are frequently dismissed by the arrival or new unexpected situations; in these cases, a “second-best” plan could rescue the situation. We present a new real-time planning method where we take into consideration the number and quality of future options of the next action to choose, in contrast to most planning methods that just take into account the intrinsic value of the chosen plan or the maximum valued future option. We apply our method to the Robocup simulated soccer competition, which is indeed highly dynamic and involves uncertainty. We propose a specific architecture for implementing this method in the context of a player agent in the Robocup competition, and we present experimental evidence showing the potential of our method.
1
Introduction
Real-time soccer is a complex game, involving a great deal of coordination between team members, and the development of strategies leading to marking as many goals as possible and receiving as few goals as possible. Robocup simulated soccer represents that complexity to a certain degree, meaning that many interesting soccer complexities are present in the simulated soccer as provided by the soccerserver system [3], like limited vision and hearing, noise, etc. Thus, simulated soccer is a challenging problem from the standpoint of coordination, communication, uncertainty handling, learning, planning, and so on [9]. Many Robocup teams have applied techniques issued from the Artificial Intelligence (AI) field [16] to develop sophisticated skills. Among those AI-related techniques we find Neural Nets, Reinforcement Learning and Probabilistic Reasoning for low-level skills [17], and decision trees [18], Reinforcement Learning [19] and Multiagent Coordination methods like Coordination Graphs [11], for high-level skills. One area that perhaps has not reached a high degree of development in Robocup is planning [1]. Due to the very dynamic nature of simulated soccer, long-term planning is pointless, as almost any long plan will fail when facing unexpected conditions. Thus, most teams are highly reactive and rely on very A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 970–979, 2005. c Springer-Verlag Berlin Heidelberg 2005
Maximizing Future Options: An On-Line Real-Time Planning Method
971
polished low-level skills like ball interception and shooting more than on clever playing ideas. Very few teams have applied a planning method to Robocup; in [15], a planning method using opponent modelling is applied for the Coach league team from Carnegie Mellon University. Using bayesian networks, the coach models the opponent’s behavior and generates a plan. Finally, the coach communicates the plan to the players. In [5] players have different plans in their memory and they search for one plan to arrive to the opponent goal; their plans consist of dribbles and passes. The cited works use traditional planning methods where the starting point and the ending point of the plan are defined before its execution starts. In most planning methods [20], when a plan is interrupted at execution time due to unexpected events, players have to start over from scratch a new plan -which will be most probably interrupted as well.
PASS
DRIBBLE PASS
Fig. 1. Example of the problem of decision making in Robocup
Let us examine an example. Fig.1 shows a game situation where the agent with the ball must take a decision between giving the ball to a well-positioned, but lonely partner, or filtering a long pass to the right, or even to continue dribbling, as indicated by the arrows in the figure. We can see that after passing to the left, the lonely player will have almost no options other than advance and shoot, but could be blocked by many enemies in that part of the field. If instead it dribbles to the right, it still has the other options. The point here is not that dribbling is better that passing, but that under uncertainty it is good to have options for cases where what seemed to be the best option just fails and has to be dropped. In our method we stress the importance of having as many open options as possible. The basic idea in our planning method is to take into consideration, when evaluating a particular possible move, how many and how good options the
972
R.F. Brena and E. Martinez
action keeps open after executing it. The advantage of doing this, instead of just selecting the best possible plan or action at a given moment according to some metric, is that in a highly dynamic environment like Robocup, plans often get stuck due to unexpected events, so the agent has to replan from scratch. In our system, for the contrary, when a plan gets stuck, it is more probable that there is another remaining option -precisely because the planning method has been fostering good options all the time. Our planning method belongs to the class of on-line planning [8]. On-line planning interleave planning and execution whereas in traditional planning a plan is made and then executed. Agent-centered search [10] is a technique that implements on-line planning, restricting planning to the part of the domain where the current state of the agent is found. Agent-centered search decide on the local search space, search an action, and execute it. This process is repeated until the goal state is reached. In the next section we will detail our planning method. In section 3 we will describe the Robocup application of our method in our Robocup team, then we present some experiments supporting our claims, and finally in section 5 we will discuss pros and cons of our planning method, list some results of the team, and draw some future work lines.
2
Method Description
Our planning method considers a collection of current possible actions and the next cycle future actions. 1 Let a specific play (like pass, clearball, etc.) be a triple (p, π, τ ), where p is a play identifier, and π and τ are lists of parameters, π for player identifiers and τ for numeric parameters. Each τi has either a numerical value or the “undefined” value ⊥. A parameter with value ⊥ is said to be “uninstantiated”. A similar convention is used for π. For instance, a pass is a triple (pass, [passer, receiver], [direction, f orce]). Partial instantiation is possible, for example, the parameters passer and receiver could have a value, but not direction nor f orce. A “playbook” [2] P is just a set of all uninstantiated plays. The collection of current possible actions (CPA) is a subset of the playbook P where the π parameters are instantiated to team members identifiers. This represents the plays that are supposed to be applicable to the current situation. Of course the CPA could have every possible instantiation of every play in P , but we use heuristics to reduce its size. This is equivalent to assign to each play in P a precondition that should be satisfied in order to appear in the CPA. Plays satisfying these heuristics are called “plausible”. Preconditions are of two kinds: – Static preconditions, which refer to the situation in the playing field, like the proximity of enemies and teammates; for instance, we can avoid passes to teammates not in the neighborhood. 1
We decided not to consider more than one future cycle, so our planning trees are just two levels deep, see section 5.
Maximizing Future Options: An On-Line Real-Time Planning Method
973
– Sequencing preconditions, which refer to the possibility of executing two given plays in sequence. We say that two plays p1 and p2 are compatible if p2 can “reasonably” follow p1 , which is determined by heuristics. For instance, after a “clearball” it is not reasonable to play a dribble, as the ball will be very far from the given player. The playbook have the following offensive plays: 2 Pass, Filtered Pass, Dribble, Outplay (a very long dribble), Clearball (a kick to certain position), and Shoot to goal. 3 We use a search tree for evaluating the playing options, defined as follows: – The root R represents the current situation. – For each plausible partially instantiated play pi from the playbook P , create a brach leading to a son labeled with the action pi . We denote by si (p) the i-th successor of play p in the tree. – The preceding step is repeated for the sons, giving a two-level tree. 4 Of course the search tree defined above is classical of AI methods, but we use an original way of evaluating the tree’s nodes. Each action pi of the tree will be associated to a numeric value E(pi ), as described in the following. Our evaluation of possible plays is based on their expected utilities, i.e. the product of their benefit (in case they are successful) by their probability of success; this is why we call it combined evaluation: e(p) = bf (p) ∗ pf (p)
(1)
where bf is the evaluation of benefit function (basically a heuristic taking into account the position of ball and players, see [13]), and pf the feasibility function, which returns a number between 0 and 1. The feasibility function is supposed to correspond to the fraction of times a given play could be successful in the given situation. Next, the original idea we are presenting consists of using for action evaluation not only the best-evaluated son, like in minimax procedures, but a combination taking into consideration the accumulated benefit of all the future actions that will be possible to execute after the current one. The result of this is to give some weight to the quantity and quality of future options generated by a given action. The formula used to calculate the combined evaluation E(p) of a first-level play p is as follows: E(p) = pf (p)(k1 bf (p) + k2 max{e(si (p))} + k3
{e(si (p))} ) N
(2)
where N is the total number of successors of action p, e(si (p)) are the evaluations with respect to the feasibility and utility of the future actions si (p) of the current 2 3 4
So far we have limited our attention to the options of the player with the ball. This is not a limitation of our method, but of our current experimentation. Parameter details for each play are described in [13]. See the discussion section for justification of the two-level tree.
974
R.F. Brena and E. Martinez
R
A1
A2 25
f 12
f11 25
25
45
f 13 25
f 21 30
Fig. 2. A simple two-level tree
Fig. 3. Robocup prototype architecture
possible action p, and finally k1 , k2 and k3 are constants for fine-tuning the relative importance of the three terms in the equation’s right-hand side. We illustrate the application of this formula to a simple tree presented in figure 2, where the nodes direct evaluation 5 are written near them. We will assume for this example that k1 = k2 = k3 = 1. In conventional maximum-driven tree evaluation, the branch to the right would be selected, either evaluating just the next move, the following one, or both combined. But applying our formula, the evaluations are different. According to our formula the evaluation of node 5
We are calling “direct evaluation” the assessment of the resulting position itself, without regard to possible future plays.
Maximizing Future Options: An On-Line Real-Time Planning Method
975
A1 is: E(A1 ) = pf (A1 )∗(bf (A1 )+max{e(f11 ), e(f12 ), e(f13 )}+ ) E(A1 ) = 0.9 ∗ (25 + max{25, 25, 25} + {25,25,25} 3 E(A1 ) = 0.9 ∗ (25 + 25 + 25) = 67.5
{e(f11 ),e(f12 ),e(f13 )} ) 3
Whereas the evaluation of the node A2 is: E(A2 ) = pf (A1 ) ∗ (bf (A2 ) + max{e(f21 )} + E(A2 ) = 0.6 ∗ (45 + max{30} + {30}) E(A2 ) = 0.6 ∗ (45 + 30 + 30) = 63
{e(f21 } ) 1
So, applying our method, we select the branch to the left, where the action A1 is chosen to be optimized and then executed.
3
Implementation
Our prototype, the “Borregos” team [12] is based in the UvA Trilearn 2003 team source code [4], on top of which we have implemented some specific skills, like goal-shooting, etc. In the prototype we also introduced an additional optimization step, in which several variations of the action are generated, for instance changing slightly the direction, speed, etc., in order to choose the exact point yielding a maximum utility with respect to its list of future actions. This step is not essential to the general planning method we are presenting, and details of it can be consulted in [13]. Figure 3 illustrates the way the planning method is implemented. The basic steps involved in our prototype are: – First we construct the two-level play tree as described above. – We apply the evaluating procedure described above. – The best evaluated first-level possible action is chosen from the CPA with its list of future actions. – The selected first-level action is refined through the optimization process. This is the final decision of the agent. In the current prototype, our planning method is applied just to the agent with possession of the ball; teammates apply reactive heuristics aiming to help the player with the ball, like to stay far from opponents while attacking, etc. Of course, in principle the planning method could be applied to every single player, and most probably we will do it in future versions (see section 6). The feasibility function has been adjusted in such a way that it corresponds to the average success rate of plays. Taking a particular play, say “Pass”, the prototype calculates the average success of passes throughout an entire game, let it be μreal . Then, we compare it with the average success μpred predicted by
976
R.F. Brena and E. Martinez
the feasibility evaluation for passes, also during the complete game. They should be equal if predictions are accurate, but of course in practice this is not the case. So, we make an adjustment in the feasibility evaluation for passes, as follows: pfnew (pass) = pfold (pass) ∗ μreal /μpred In this way we ensure that at least the average success estimation for passes correspond to the “real” probability, considered as the average success rate. This could be considered as a form of learning. Another component links our decision mechanisms to a soccerserver command through the use of the UvA Trilearn code [4].
4
Experiments
We validated our strategy by playing games against our team disabling the use of future plays consideration. With the use of the proxyserver package [6] we generated statistics to compare the performance of the team with the simultaneous tactics. Methodologically it is important to isolate the variable we want to measure -which is our planning method’s performance- from other possible sources of difference. This is why we ran matches between two versions of the same team, because if we, for instance, compare our team with other teams, the difference in performance could be attributed to other factors, like low-level skills, etc. So, we ran games between the following two versions of our team: – The “Planning” version, which implements the planning method we are proposing, that is, it chooses the action with best combined evaluation according to formula 2. – The “Control” version, which takes into consideration just the next possible moves, and not the possible following ones; this accounts as reducing the right-hand side of formula 2 to the term pf (a)(k1 bf (a). For these experiments we eliminated one source of uncertainty by giving to players complete information about their current environment; this is achieved by putting “on” the “fullstate” soccerserver parameter (see discussion). Accumulated results in 40 matches are presented in table 1. The statistical parameters are the following: – – – –
Total goals scored (GS in the table) Earned Points (Points) Average points (AP) Average Goal Difference (AGD)
As we can see in table 1, the goals scored by “Planning” team was clearly greater than the received ones (scored by “Control”). Other parameters show a great obtained points percentage (“Planning” obtained 98 percent of the points played), and also a great average goal difference.
Maximizing Future Options: An On-Line Real-Time Planning Method
977
Table 1. Statistical parameters TEAM GS Points AP AGD Planning 172 118 2.95 3.93 Control 15 1 0.25 -3.93
5
Discussion
We are aware that our construction of the play tree with just our moves, and not the opponent ones, assuming the opponent is doing nothing relevant in the meantime, could sound like a huge simplification. Our point is that in some situations it could be too difficult to consider explicitly the opponent moves in the tree, either because there are too many or because we have too little information about the opponent’s behavior. We indeed think this is partially the case in Robocup simulation, though it is sometimes possible to apply adversarial modeling techniques [14, 7]. Some evidence about our claim is shown in the experimental results presented above. One critical aspect of our method is the accuracy of evaluation functions. Indeed, bad estimations of either utility or probability would lead to completely erroneous play evaluations. Actually we had to work a lot on these functions before the planning method delivered acceptable results, and yet we have much work to do refining those functions. Also critical is the information about the players and the ball’s position, and this is why for running the experiments we left the soccerserver parameter “fullstate” on, which means that complete information about the current situation is given to players by the soccerserver. We did so, at least for basic experimentation purposes, because inaccuracy in modeling the current situation would affect as “noise” the plays’ evaluation by formula 2. We plan to investigate the application of the planning method with more uncertainty involved (see section 6) Formula 2 itself could need some adjustments for a specific application; for instance we started with a version where the third term in the right-hand side was k3 {e(si (p))}, that is, taking the sum instead of the average, but experimental results were much weaker. The explanation could be that in Robocup to have too many weak options is not convenient, so dividing by the number of options made the correction. We think similar adjustments could be necessary for other applications. One potential disadvantage or our method is its high computational cost, because we need to perform many evaluations and then one optimization –involving even more evaluations. We relied on heuristics to reduce the search space for making the complexity manageable.
6
Conclusions and Future Work
We have presented a novel real-time planning method for highly dynamic domains. In our method, possible actions evaluation is based not on the maximum
978
R.F. Brena and E. Martinez
in the search tree, but on a metric considering the quantity and quality of the future options left available by the actions being considered. An implementation of our method in the domain of the Robocup competition has been presented, which is at the heart of our Robocup team. Preliminary experimental results are presented. We have shown that our planning method outperformed traditional (maximum immediate evaluation) planning. Current research is focused on carefully refining utility and feasibility functions, as well as investigating the effect of varying the constants ki in the evaluation formula. We plan also to provide better field modeling for keeping track of the current situation without needing the “fullstate” parameter on. Future research will include adapting our planning method to applications outside the Robocup competition, like electronic auctions, client-driven dynamic manufacturing, and aerial combat real-time decisions.
Acknowledgements This work was supported by the Monterrey Tech’s Research Grant CAT011. We would like to thank the anonymous reviewers for their insightful comments.
References 1. James Allen, James Hendler, and Austin Tate. Readings in Planning. Representation and Reasoning Series. Morgan Kaufmann, San Mateo, California, 1990. 2. Michael Bowling, Brett Browning, and Manuela Veloso. Plays as effective multiagent plans enabling opponent-adaptive play selection. In Proceedings of International Conference on Automated Planning and Scheduling (ICAPS’04), 2004. 3. Mao Chen, Klaus Dorer, Ehsan Foroughi, Fredrik Heintz, ZhanXiang Huang, Spiros Kapetanakis, Kostas Kostiadis, Johan Kummeneje, Jan Murray, Itsuki Noda, Oliver Obst, Patrick Riley, Timo Steffens, Yi Wang, and Xiang Yin. Users manual: Robocup soccer server (for soccerserver version 7.07 and later). 4. R. de Boer and J. Kok. The incremental development of a synthetic multi-agent system: The uva trilearn, 2001. 5. Ahmad Farahany, Mostafa Rokooey, Mohammad Salehe, and Meisam Vosoughpour. Mersad 2004 team description, 2004. 6. Ian Frank, Kumiko Tanaka-Ishii, Katsuto Arai, , and Hitoshi Matsubara. The statistics proxy server. In Peter Stone, Tucker Balch, and Gerhard Kraetszchmar, editors, RoboCup-2000: Robot Soccer World Cup IV, pages 303–308. Springer Verlag, Berlin, 2001. 7. L. Garrido, R. Brena, and K. Sycara. Towards modeling other agents: A simulationbased study. In Jaime S. Sichman, Rosaria Conte, and Nigel Gilbert, editors, Proceedings of the 1st International Workshop on Multi-Agent Systems and AgentBased Simulation (MABS-98), volume 1534 of LNAI, pages 210–225, Berlin, July 4–6 1998. Springer. 8. Lise Getoor, Greger Ottosson, Markus Fromherz, and Bjoern Carlson. Effective redundant constraints for online scheduling. In Proceedings of the 14th National Conference on Artificial Intelligence (AAAI-97), pages 302–307, Providence, Rhode Island, July 1997. AAAI Press / MIT Press.
Maximizing Future Options: An On-Line Real-Time Planning Method
979
9. Frans Groen, Matthijs Spaan, and Nikos Vlassis. Robot soccer: Game or science. In Proceedings CNR-2002. Editura Universitaria Craiova, October 2002. 10. Sven Koenig. Agent-centered search. AI Magazine, 22(4):109–131, 2001. 11. J. Kok, M. Spaan, and N. Vlassis. Non-communicative multi-robot coordination in dynamic environments. Robotics and Autonomous Systems, 50(2-3):99–114, 2005. 12. E. Martinez and R. Brena. Simultaneous planning: A real-time planning method. Research on Computer Science, 13:3–11, 2005. 13. Emmanuel Martinez. A real-time planning method for Robocup (in spanish). Master’s thesis, Tecnologico de Monterrey, Mexico, 2005. 14. Patrick Riley and Manuela Veloso. On behavior classification in adversarial environments. In Lynne E. Parker, George Bekey, and Jacob Barhen, editors, Distributed Autonomous Robotic Systems 4, pages 371–380. Springer-Verlag, 2000. 15. Patrick Riley and Manuela Veloso. Planning for distributed execution through use of probabilistic opponent models. In IJCAI-2001 Workshop PRO-2: Planning under Uncertainty and Incomplete Information, 2001. 16. Stuart Russell and Peter Norvig. Artificial Intelligence: A Modern Approach. Prentice-Hall, Englewood Cliffs, NJ, 2nd edition edition, 2003. 17. Peter Stone. Layered learning in multiagent systems. In AAAI/IAAI, page 819, 1997. 18. Peter Stone and Manuela Veloso. Using decision tree confidence factors for multiagent control. In Katia P. Sycara and Michael Wooldridge, editors, Proceedings of the 2nd International Conference on Autonomous Agents (Agents’98), pages 86–91, New York, 9–13, 1998. ACM Press. 19. Peter Stone and Manuela M. Veloso. Multiagent systems: A survey from a machine learning perspective. Autonomous Robots, 8(3):345–383, 2000. 20. M. Zweben and M. S. Fox. Intelligent Scheduling. Morgan Kaufmann, 1994.
On the Use of Randomized Low-Discrepancy Sequences in Sampling-Based Motion Planning Abraham S´ anchez and Maria A. Osorio Facultad de Ciencias de la Computaci´ on, BUAP, 14 Sur esq. San Claudio, CP 72550, Puebla, Pue., M´exico asanchez, [email protected]
Abstract. This paper shows the performance of randomized low-discrepancy sequences compared with others low-discrepancy sequences. We used two motion planning algorithms to test this performance: the expansive planner proposed in [1], [2] and SBL [3]. Previous research already showed that the use of deterministic sampling outperformed PRM approaches [4], [5], [6]. Experimental results show performance advantages when we use randomized Halton and Sobol sequences over MersenneTwister and the linear congruential generators used in random sampling. Keywords: Sampling-based motion planning, deterministic sampling, randomized Halton sequence.
1
Introduction
Robot motion planning refers to the ability of a robot to automatically plan its own motions to avoid collision with the physical objects in its environment. Such a capability is crucial, since a robot accomplishes tasks by physical motion in the real world. This capability would be a major step toward the goal of creating autonomous robots. The most popular paradigm for sampling-based motion planning is the Probabilistic Roadmap Method (PRM) [7]. Recent research has focused on designing efficient sampling and connection strategies [7], [8], [9], [10], [2]. Many of these strategies require complex geometric operations, which are difficult to implement in high-dimensional configuration space (C). Deterministic sampling sequences or low-discrepancy sequences have the advantages of classical grid search approaches, i.e. a lattice structure (that allows to easily determine the neighborhood relations) and a good uniform coverage of the C. Deterministic sampling sequences applied to PRM-like planners are demonstrated in [4], [5] to achieve the best asymptotic convergence rate and experimental results showed that they outperformed random sampling in nearly all motion planning problems. The work presented in [6] for nonholonomic motion planning proposes the use of different low-discrepancy sequences: Sobol, Faure, Niederreiter. Deterministic sampling ideas have improved computational methods in many areas [11]. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 980–989, 2005. c Springer-Verlag Berlin Heidelberg 2005
On the Use of Randomized Low-Discrepancy Sequences
981
Section II briefly describes deterministic sampling theory and presents the randomized Halton sequence. Section III explains expansive and SBL planners. Section IV presents our experimental results and finally in Section V the conclusions.
2
Deterministic Sampling
From a theoretical point of view a lot of effort has been spent by mathematicians to construct well-distributed sequences in multidimensional spaces. The classical approach to generate random numbers, which should be uniformly distributed on the unit interval, is the linear congruential generator. This type of algorithm is the standard way to produce random numbers on a computer and most of the internal subroutine packages work with this kind of generator. The use of linear congruential methods may occur in the construction of multidimensional sequences. The uniformity of those sequences may be very poor. Low-discrepancy sequences (LDS) generation is based in the successive (spread) generation of points located as far as possible of the previous points. This principle precludes the formation of clusters. LDS have been successfully applied to diverse fields such as physics, computational graphics, finances, and more recently to motion planning [5], [12] among others [11]. Their advantages in lower dimension problems has been well established, nevertheless S´anchez [12] pointed out that precision and efficiency diminish as the dimensionality increases (this study was made in the field of motion planning, other studies present the same observation in other fields [13]). This deterioration occurs due to the dependence of the points locations in higher dimensions. Next subsections present the construction of Sobol sequence and randomized Halton sequences; they are easily implemented and fast to be computed in practice. 2.1
Sobol Sequence
In order to describe the construction, let us fix the dimension d ≥ 2; we will and construct points x0 , x1 , x2 , ... in the unit cube I d , and for every k ∈ i ∈ {1, ..., d} let xik denote the i-th coordinate of xk , i.e., xk = (x1k , ..., xdk ). We first need d different irreducible polynomials pi ∈ [x], where is the finite field with two elements (such polynomials can be found in lists). For convenience we set an a priori upper bound 2m for the length of the computed part of the sequence (this bound is absolutely not necessary, but it makes the construction easier to be implemented). Now we construct for every i ∈ {1, ..., d} the sequence xi0 , xi1 , xi2 , ..., xik , ... for k < 2m in the same way: Let be i fixed and pi (x) = xr + a1 xr−1 + · · · + ar−1 x + 1 the i-th of the given vj polynomials, then we choose arbitrary v1 , ..., vr with 1 ≤ 2m−j ≤ 2j − 1 and odd m−j j integer, e.g. vj = 2 · (2 − 1). After this we compute for j = r + 1, ..., m (in this order) vj−r vj = a1 vj−1 ⊕ a2 vj−2 ⊕ · · · ar−1 vj−r+1 ⊕ vj−r ⊕ r , 2
982
A. S´ anchez and M.A. Osorio v
j where ⊕ is the bitwise xor-operation (remark: for every j is 2m−j an odd integer). Having once computed v1 , ..., vm , we can compute xik in two ways, m vm , where gj = bj ⊕ bj+1 and bj ∈ {0, 1} – either directly by xik = g1 v1 ⊕···⊕g 2m the coefficients in the binary representation of k = j≥1 bj 2j−1 ,
(xi
·2m )⊕vc
, where c = min{j|bj = 1} and – or, when xik−1 is given, by xik = k−12m bj ∈ {0, 1} the coefficients in the binary representation of k = j≥1 bj 2j−1 . 2.2
Randomized Low-Discrepancy Sequences
Theoretical as well as empirical research has shown that Quasi-Monte Carlo methods (QMC) can significantly increase the uniformity over random draws. Randomized QMC methods combine the benefits of deterministic sampling methods, which achieve a more uniform exploration of the sample space, with the statistical advantages of random draws. We present the Halton sequences proposed by Halton (1960) and its randomization developed by Wang and Hickernell (2000) [14]. Halton sequences are similar to (t, s)-sequences in that they manipulate the digits of numbers in certain base representations. Halton Sequences. First, we show how Halton sequences are defined in one dimension and then extend it to several dimensions. For any nonnegative integer n we write n in base b as m φk bk , (1) n = φm . . . φ0 = k=0
where φk ∈ {0, 1, . . . , b − 1} for k = 0, 1, . . . , m. The n-th member of the base b Halton sequence is defined by Hb (n) = 0.φ0 . . . φm (in base b) =
m
φk b−k−1 .
(2)
k=0
That is, we write the base b representation of the number n, reverse the order of its digits and put a decimal point in front of them. The result is a number between 0 and 1 that is by definition the n-th member of the one-dimensional, base b, Halton sequence. The multi-dimensional Halton sequence can be obtained by generating several one-dimensional Halton sequences corresponding to bases that are prime numbers. More precisely, we take the first d prime numbers p1 , . . . , pd , generate the corresponding one-dimensional Halton sequence and use these to form the d-dimensional Halton sequences: xn = (Hp1 (n), . . . , Hpd (n)), n = 0, 1, . . .
(3)
As noted by Niederreiter [11], all the one-dimensional components of this sequence are (0, 1)-sequences in the corresponding bases. Since the one-dimensional Halton sequences are generated taking bases that are prime numbers, and hence mutually relative primes, the Halton sequence is expected to have lower correlations between its one-dimensional components.
On the Use of Randomized Low-Discrepancy Sequences
983
Randomization of Halton Sequences. The randomization of Halton sequences as introduced by Wang and Hickernell [14] is based on a recursive relation that holds for the Halton sequence. This recursive relation translates the recursion from n to n + 1 into Hb (n) and Hb (n + 1) in a natural way. ∞ Formally, let x0 ∈ [0, 1) with the base b representation x0 = k=0 φk b−k−1 . Define the expression that is the sum of 1/b and x0 in base b Tb (x0 ) = (1 + φh )b−h−1 + φk b−k−1 , (4) k≥h
where h = min{k : uk = b − 1}. Then we can define the sequence (Tbn (x0 )) by Tbn (x0 ) ≡ Tb (Tbn−1 (x0 )) for n ≥ 1 and Tb0 (x0 ) ≡ x0 .
(5)
Note that with x0 = 0 the above sequence is exactly the one-dimensional Halton sequence in base b. Further, if the starting term can be written as a finite m −k−1 sum x0 = yielding x0 = 0.φ0 . . . φm (in base b) and denoting k=0 φk b the corresponding integer n0 = φm . . . φ0 (in base b) then x0 = hb (n0 ) and Tbn (x0 ) = hb (n0 + n) for n ≥ 1. That is, if the starting term of the sequence (Tbn (x0 )) can be written as a finite sum, then the sequence is the same as the Halton sequence in which first n0 elements are skipped. Randomized Halton sequences are defined as the above sequences having their starting point randomly generated. More precisely, let x0 ∈ [0, 1)d have the uniform distribution. The randomized Halton sequence is defined by xn = (Tpn1 (x01 ), . . . , Tpnd (x0d ) for n = 1, 2, . . .
(6)
Note that according to the previous paragraph randomized Halton sequences can also be defined as the deterministic Halton sequences described above by randomly skipping a number of initial terms. Wang and Hickernell showed that the elements of a randomized Halton sequence with a uniform random starting point are uniform. Proposition 1. If x0 ∈ [0, 1)d is a uniform random vector then xn defined by 6 has the uniform distribution on [0, 1)d for any n ≥ 1. In practice one cannot use a uniformly distributed starting point since its base representation b generally has infinite number of digits. However, if bm is sufficiently large, where m is the number of digits used in base representation b, to truncate each starting uniform random number by omitting its digits from m + 1 on, we obtain numbers that approximate uniform numbers fairly well.
3
Expansive and SBL Planners
While multi-query planners use a sampling strategy to cover the whole freespace, a single-query planner applies a strategy to explore the smallest portion
984
A. S´ anchez and M.A. Osorio
of free-space (F ) needed to find a solution path. For example, see the planners presented in [2], [1] and [3]. Hsu et al. introduced a planner for “expansive” C in [1]. The notion of expansiveness is related to how much of F is visible from a single free configuration or connected set of free configurations. The expansive-space planner grows a tree from the initial configuration. Each node q in the tree has an associated weight, which is defined to be the number of nodes inside Nr (q), the ball of radius r centered at q. At each iteration, it picks a node to extend; the probability that a give node q will be selected is 1/w(q), in which w is the weight function. Then N points are sampled from Nr (q) for the selected node q, and the weight function value for each is calculated. Each new point q is retained with probability 1/w(q ), and the planner attempts to connect each retained point to the node q. The current implementation of the algorithm uses a fixed-size neighborhood around an existing node to sample new configurations. The neighborhoods size has a big impact on the nodes distribution. If the size is too small, the nodes tend to cluster around the initial and the goal configuration and leave large portions of the free space with no samples. If the size is very large, the samples will tend to distribute more evenly in the free space, but the rejection rate also increases significantly. The main drawback of the approach is that the required r and N parameters may vary dramatically across problems, and they are difficult to estimate for a given problem. The planner in [3] searches F by building a roadmap made of two trees of nodes, Ti and Tg . The root of Ti is the initial configuration qi , and the root of Tg is the goal configuration qg (bi-directional search). Every new node generated during the planning is installed in either one of the two trees as the child of an already existing node. The link between the two nodes is the straight-line segment joining them in CS. This segment will be tested for collision only when it becomes necessary to perform this test to prove that a candidate path is collision-free (lazy collision checking).
4
Experimental Results
Algorithms were written in Java. The running times given below were gathered on a 2.6 GHz Pentium IV processor with a 512 Mb of main memory running Windows. The environments in Figures 1 and 2 are among those we used to test both algorithms. These algorithms were tested with planar articulated robots and implemented with the same parameters (the distance threshold ρ was set to 0.15 and the collision checking resolution ε to 0.001). Fifty tests were performed with every algorithm. We used the Sobol’s deterministic sequence, the randomized Halton’s sequence, and the random linear congruential and Mersenne-Twister [15] generators. Tables 1, 2 and 3 show the results of experiments performed on two difficult scenes for planar articulated robots.
On the Use of Randomized Low-Discrepancy Sequences
985
Fig. 1. A first motion planning environment and a path found for a planar manipulator
Fig. 2. Another motion planning environment and a path found for a planar manipulator
Table 1 reports results obtained with the random linear congruential generator. Results obtained with the random Mersenne-Twister generator are not reported because of its bad quality. As we can see in these Tables, the randomized Halton and Sobol sequences outperform the random option. Improvement relative percentages in the number of collisions go from 41.27% to 77.67% while the improvement relative percentages in running times goes from 20.75% to 43.99%. The results obtained point out that an adequate utilization of the Sobol sequence outperforms over classical Halton, Faure and Niederreiter’s sequences due to the impact of dimension. The results obtained with Faure and Niederreiter’s sequences are not reported in this paper because of the extremely bad quality of the results obtained. We believe that randomization is useful in many contexts. Its value, nevertheless, depends greatly on the paradigm within it is used. Randomization does not appear to be advantageous in the PRM context, according to our experiments and the theoretical analysis presented by the authors in [5]. Deterministic sampling enables the expansive planner (Hsu/Sobol) and SBL/Sobol to be resolution complete [5]: if it possible to solve the query, they eventually solve it. According to our obtained results, randomized Halton sequences can be used
986
A. S´ anchez and M.A. Osorio Table 1. Statistics for the two environments, using random sampling First environment
Hsu/Random SBL/Random
Nodes in roadmap 3568 8178 Nodes in path 59 107 Running time (secs) 114.97 2.12 Collision checks 598,342,368 4,774,440 Second environment Hsu/Random SBL/Random Nodes in roadmap Nodes in path Running time (secs) Collision checks
3190 47 126.82 484,234,889
10030 70 4.66 7,553,080
Table 2. Statistics for the two environments, using deterministic sampling (Sobol sequence) First environment
Hsu/Sobol SBL/Sobol
Nodes in roadmap 2286 6268 Nodes in path 67 97 Running time (secs) 40.22 1.84 Collision checks 143,258,754 3,552,236 Second environment Hsu/Sobol SBL/Sobol Nodes in roadmap 1603 Nodes in path 45 Running time (secs) 30.94 Collision checks 118,624,858
5764 65 2.45 5,050,913
Table 3. Statistics for the two environments, using randomized Halton First environment
Hsu/RH
SBL/RH
Nodes in roadmap 2222 4292 Nodes in path 59 81 Running time (secs) 76.69 1.68 Collision checks 133,611,588 2,581,166 Second environment Hsu/RH SBL/RH Nodes in roadmap 2158 5299 Nodes in path 40 74 Running time (secs) 97.01 2.61 Collision checks 192,104,457 4,435,292
On the Use of Randomized Low-Discrepancy Sequences
987
Table 4. Sequences Performance respect to running time, collision checks, path and roadmap number of nodes Random Deterministic Deterministic + Random sampling sampling sampling Linear congruential Sobol Randomized Mersenne Twister Halton → → →
Table 5. Relative increment percentages respect to random sampling First environment.
Hsu
SBL
Running time (secs) 33.30 20.75 Collision checks 77.67 45.94 Second environment. Hsu SBL Running time (secs) 23.51 43.99 Collision checks 60.63 41.27
in motion planning to obtain both probabilistic analysis and the deterministic guarantees proposed in [5].
5
Conclusions
Sampling-based motion planners have proven to the best current alternative to solve difficult motion planning problems with many degrees of freedom. A crucial factor in the performance of those planners is how samples are generated. Sampling sequences should satisfy the following requirements: an uniform coverage that can be incrementally improved as the number of samples increases, a lattice structure that reduces the cost of computing neighborhood relationships, and a locally controllable degree of resolution that allows to generate more samples at the critical regions. Discrepancy is interesting in many respects, but its computation is known to be very difficult. The complexity of the well-known algorithms is exponential. One might have hoped that these difficulties are partially counterbalanced by the existence of upper bounds for some especial types of low-discrepancy sequences. Unfortunately , the minimum number of points for which these classical bounds become meaningful grows exponentially with the dimension. We claim that deterministic sampling is suitable to capture the connectivity of configuration spaces with narrow passages [12]. Numerous low-discrepancy point sets and sequences have been proposed. They can be generated easily and quickly. For practical use, there are three different types of low-discrepancy sequences or point sets: Halton sequences,
988
A. S´ anchez and M.A. Osorio
lattice rules, and (t, k)−sequences. The last one includes almost all important sequences such as Sobol sequence, Faure sequence, Niederreiter-Xing sequence, etc. Low-discrepancy samples were developed to perform better than random samples for numerical integration (using an inequality due to Koksma-Hlawka). Low-dispersion samples were developed to perform better than random samples in numerical optimization (using an inequality due to Niederreiter). Based in our comparative analysis we can observe that Sobol sequence is independent on the problem dimension while the classical Halton, Faure and Niederreiter’s sequences are impacted by the number of dimensions confirming the analysis presented in [12]. Besides, the best results were always obtained with the randomized Halton sequences. This fact open a new research topic in the sampling-based motion planning field, due to the random and deterministic characteristics of this sequence. The combination of random and deterministic benefits are already an important research field in Quasi-Monte Carlo simulation’s community. As thoroughly argued in [17], the achievements of sampling-based motion planners are mainly due to their sampling-based nature, not due to the randomization (usually) used to generate the samples. Therefore, efforts should better be directed towards the study of deterministic and controllable ways of generating samples, rather than towards the proposal of heuristically guided randomization variants. This work is the first attempt to analyze the performance of the low discrepancy sequences in the single query planners context, our experiments confirm that it is possible to obtain important benefits. The future study of different ways to improve sampling-based motion planners will benefit the solution of many practical problems as multi-robot coordination, nonholonomic planning, manipulation planning, etc.
References 1. Hsu D., Latombe J. C., Motwani R.: “Path planning in expansive configuration spaces”, Int. J. of Computational Geometry and Applications, Vol. 9, (1999), 495512 2. Hsu D.: “Randomized single-query motion planning in expansive spaces”, PhD thesis, Stanford University, (2000) 3. S´ anchez G. and Latombe J. C.: “On delaying colllision checking in PRM planning: Application to multi-robot coordination”, The International Journal of Robotics Research, Vol. 21, No. 1, (2002), 5-26 4. Branicky M., Lavalle S. M., Olson K., Yang L.: “Quasi-randomized path planning”, IEEE Int. Conf. on Robotics and Automation, (2001), 1481-1487 5. Lavalle S. M., Branicky M., Lindemann S. M.: “On the relationship between classical grid search and probabilistic roadmaps”, The International Journal of Robotics Research, Vol. 23, No. 7-8, (2004), 673-692 6. S´ anchez A., Zapata R., Lanzoni C.: “On the use of low-discrepancy sequences in non-holonomic motion planning”, IEEE Int. Conf. on Robotics and Automation, (2003), 3764-3769
On the Use of Randomized Low-Discrepancy Sequences
989
ˇ 7. Kavraki L., Svestka P., Latombe J. C., Overmars M.: “Probabilistic roadmaps for path planning in high-dimensional configuration spaces”, IEEE Transactions on Robotics and Automation. Vol 12, No. 4, (1996), 566-579 8. Amato N. M., Burchan B. O., Dale L. K, Jones C., Vallejo D.: “OBPRM: An obstacle-based PRM for 3D workspaces”, Proc. of the Workshop on Algorithmic Foundations of Robotics, (1998), 155-168 9. Boor v., Overmars m., Van der Steppen F.: “The gaussian sampling strategy for probabilistic roadmap planners”, IEEE Int. Conf. on Robotics and Automation, (1999), 1018-1023 10. Bohlin R. and Kavraki L.: “Path planning using lazy PRM”, IEEE Int. Conf. on Robotics and Automation, (2000) 11. Niederreiter H.: “Random number generation and quasi-Monte Carlo methods”. Society for Industrial and Applied Mathematics, Philadelphia, Pennsylvania, (1992) 12. S´ anchez A.: “Contribution ` a la planification de mouvement en robotique: Approches probabilistes et approches d´eterministes”, PhD thesis, Universit´e Montpellier II (2003) 13. W. J. Morokoff and R. E. Caflisch, “Quasi-Monte Carlo integration”, Journal of Computational Physics, 122, pp. 218-230, 1995. 14. Wang X., and Hickernell F. J.: “Randomized Halton sequences”, Mathematical and Computer Modelling, Elsevier, Vol. 32, Issues 7-8, (2000), 887-899 15. Matsumoto M., and Nishimura T.: “Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator”, ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, (1998), 3-30 16. Kavraki L., Latombe J. C., Motwani R., Raghavan P.: “Randomized query processing in robot motion planning”, Journal of Computer and System Sciences, Vol. 57, No. 1, (1998), 50-60 17. Lindemann S., and LaValle S. M.: “Current issues in sampling-based motion planning”, In P. Dario and R. Chatila, editors, Proc. Eighth International Symposium on Robotics Research, Springer-Verlag, Berlin, (2004)
A Framework for Reactive Motion and Sensing Planning: A Critical Events-Based Approach R. Murrieta-Cid1 , A. Sarmiento2 , T. Muppirala2 , S. Hutchinson2 , noz1 , and R. Swain1 R. Monroy1, M. Alencastre1 , L. Mu˜ 1
Tec de Monterrey Campus Estado de M´exico, {rafael.murrieta, raulm, malencastre, lmunoz, rswain}@itesm.mx 2 University of Illinois at Urbana-Champaign {asarmien, muppiral, seth}@uiuc.edu
Abstract. We propose a framework for reactive motion and sensing planning based on critical events. A critical event amounts to crossing a critical curve, which divides the environment. We have applied our approach to two different problems: i) object finding and ii) pursuit-evasion. We claim that the proposed framework is in general useful for reactive motion planning based on information provided by sensors. We generalize and formalize the approach and suggest other possible applications.
1
Introduction
We propose a framework for reactive motion and sensing planning based on critical events. A critical event amounts to crossing a critical curve, which divides the environment. We work at the frontiers of computational geometry algorithms and control algorithms. The originality and the strength of this project is to bring both issues together. We divide the environment in finitely many parts, using a discretization function which takes as input sensor information. Thus, in our approach, planning corresponds to switching among a finite number of control actions considering sensor input. This approach naturally allows us to deal with obstacles. We have applied our approach to several different problems, here for lack of space we only present two: i) object finding and ii) pursuit-evasion. In object finding, our approach produces a continuous path, which is optimal in that it minimizes the expected time taken to find the object. In pursuit-evasion, we have dealt with computing the motions of a mobile robot pursuer in order to maintain visibility of a moving evader in an environment with obstacles. Our solutions to these two problems have been published elsewhere. In this paper we show that these solutions actually rely on the same general framework. We claim that the proposed framework is in general useful for reactive motion planning based on information provided by sensors. We generalize and formalize the approach and suggest other possible applications. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 990–1000, 2005. c Springer-Verlag Berlin Heidelberg 2005
A Framework for Reactive Motion and Sensing Planning
2
991
A General Framework
The crux of our approach consists of relating critical events with both the controls to be applied on the robot and the robot environment representation. A critical event signals that the robot has crossed a critical curve drawn on the robot workspace, W. It corresponds to changes in the sensors information readings, driving our algorithms. We use C and U to respectively denote the robot configuration space and the robot control space (velocity vectors applied to the robot). P ⊂ C× U , the robot phase space, is the cross product of C and U . Critical curves are projections on the workspace of P . This means that even if a configuration is valid to accomplish a task, it may not be valid due to the velocity related with that configuration. Hence, the critical curves may change their location according to a given robot velocity. Let Y denote the observation space, which corresponds to all possible sensor readings. The robot state space is X ⊂ C × E, in which E is the set of all possible environments where the robot might be [12]. Evidently, there is a relation between the robot state x(t) and the robot observation state y(t) which is a function of time. Thus, y(t) = h(x(t)), where y ∈ Y and x ∈ X. The robot information state is defined as it = (u0 , . . . , ut−1 , yo , . . . , yt ). it is the history of all sensor readings up to time t and all controls that have been applied to the robot up to time t − 1 [2]. The information space I is defined as the set of all possibles information states [12]. We underline that the critical events and the robot objective lie over I. That is, a robot objective amounts to achieving a specific task defined on the information state. Two example robot objectives are maintaining visibility of a moving evader and reaching a robot configuration given in terms of a specific robot sensor reading. Critical events may be of several types. A type of critical event is systematically associated to a type of control. Mainly, to accomplish a robotic task means to answer the following question: what control should be applied on the robot given some it ?. Thus, planning corresponds to a discrete mapping ce : it → u between it and u, triggered by the critical event ce. The output controls correspond to at the very worst case locally optimal polices that solve the robotic task. Note that instead of using the robot state space, X, we use the critical events to make a decision on control should be applied. ce actually encodes the most relevant information on X. In addition, it relates observations with the best control that can be applied. ce is built using local information but, if necessary, it may involve global one. We want to use our framework to generate, whenever possible, optimal controls to accomplish a robotic task. As mentioned earlier, planning corresponds to relate a critical events with a control. However, some problems may be history dependent. That means that the performance of a control to be applied not only depends on the current action and a sensor reading, but it also depends on all previous sensor readings and their associated controls. In history dependent problems, the concatenation of locally optimal controls triggered by independent
992
R. Murrieta-Cid et al.
critical events does not necessarily generate a globally optimal solution. For instance, we have shown that object finding is history dependent and moreover NP-hard. To deal with history dependent problems, we have proposed a two layer approach. The high level, combinatoric layer attempts to find a “suitable” order of reaching critical events. The low level, continuous layer takes an ordering input by the upper one and finds how to best visit the regions defined by critical curves. This decoupling approach makes the problem tractable, but at the expense of missing global optimality. For the combinatorial level, we have proposed to use a utility function based heuristic, given as the ratio of a gain over a cost. This utility function is used to drive a greedy algorithm in a reduced search space that is able to explore several steps ahead but without evaluating all possibles combinations. In no history dependent problems, such as finding a minimal length path in an environment without holes [11], the Bellman’s principle of optimality holds and thus the concatenation of locally optimal paths will result in a globally optimal one. The navigation approach presented in [11] is also based on critical events. But, differently to the ones presented in this paper, it is based on closed loop sensor feed-back.
3
Object Finding
We have used critical events to finding time optimal search paths in known environments. In particular, we have searched a known environment for an object whose unknown location is characterized by a known probability density function (pdf). In this problem, we deal with continuous sensing in a continuous space. We assume that the robot is sensing the environment as it moves. A continuous trajectory is said to cover [9] a polygon P if each point p ∈ P is visible from some point along the trajectory. Any trajectory that covers a simple (without holes) polygon must visit each subset of the polygon that is bounded by the aspect graph lines associated to non-convex vertices of the polygon. We call the area bounded by these aspect graph lines the corner guard regions. A continuous trajectory that covers a simple polygon needs to have at least one point inside the region associated to “outlying” non-convex vertices (non-convex vertices in polygon ears), like A and C in Fig. 1 a). Since these points need to be connected with a continuous path, a covering trajectory will cross all the other corner guard regions, like the one associated to vertex B. Since a continuous trajectory needs to visit all the corner guard regions, it is important to decide in which order they are to be visited. The problem can be abstracted to finding an specific order of visiting nodes in a graph that minimizes the expected value of time to find an object. [6] shows that the discrete version of this problem is NP-hard. For this reason, to generate continuous trajectories we propose an approach with two layers that solve specific parts of the problem. This one is described below (see 3.4).
A Framework for Reactive Motion and Sensing Planning
3.1
993
Continuous Sensing in the Base Case
The simplest case for a continuous sensing robot is that shown in Fig. 1 b). Then, the robot has to move around a non-convex vertex (corner) to explore the unseen area A . For now, we assume that this is the only unseen portion of the environment. As the robot follows any given trajectory S, it will sense new portions of the environment. The rate at which new environment is seen determines the expected value of the time required to find the object along that route. In particular, consider the following definition of expectation for a non-negative random variable [5]: H ∞
E[T |S] =
P (T > t) dt.
(1)
0
3.2
Expected Value of Time Along any Trajectory
In the simple environment shown in Fig. 1 b) the robot’s trajectory is expressed as a function in polar coordinates with the origin on the non-convex vertex. We assume that the robot will have a starting position such that its line of sight will only sweep the horizontal edge E1 . As mentioned before, the expected value of the time to find an object depends on the area A not yet seen by the robot.
a Fig. 1. a) convex corners
b b) base case
Assuming that the probability density function of the object’s location over the environment is constant, the probability of not having seen the object at time t is Qy 2 A (t) = , (2) P (T > t) = A 2A tan (θ(t)) where A is the area of the whole environment (for more details, see [7]) . Note that the reference frame used to define the equation 2 is local. It is defined with
994
R. Murrieta-Cid et al.
respect to the reflex vertex (this with interior angle larger than π). From (1) and (2), H Qy 2 tf dt E[T |S] = . (3) 2A 0 tan (θ(t)) Equation (3) is useful for calculating the expected value of the time to find an object given a robot trajectory S expressed as a parametric function θ(t).
3.3
Minimization Using Calculus of Variations
The Calculus of Variations [3] is a mathematical tool employed to find stationary values (usually a minimum or a maximum) of integrals of the form H
b
I=
F (x, y, y ) dx,
(4)
a
where x and y are the independent and dependent variables respectively. The integral in (4) has a stationary value if and only if the Euler-Lagrange equation is satisfied, d ∂F ∂F − = 0. (5) ∂y dx ∂y It is possible to express the differential of time as a function of a differential of θ. This will allow us to rewrite the parametric equation as a function in which θ and r are the independent and dependent variables respectively, The resulting equation is as follows: Qy 2 E[T |S] = 2A
H
θf θi
12 1 2 r + r2 dθ. tan(θ)
(6)
To find stationary values of (6), we use (5) with x = θ, y = r and F =
12 2 r + r2 . After simplification, this yields the following second order nonlinear differential equation, 1 tan θ
2 2r + r =r+ r sin(2θ)
2
r r + 2 r
3
.
(7)
This equation describes the route to move around a non-convex vertex (corner) to search the area on the other side optimally (according to the expected value of time). We have solved equation (7) numerically using an adaptive step-size Runge-Kutta method. The Runge-Kutta algorithm has been coupled with a globally convergent Newton-Raphson method [7].
A Framework for Reactive Motion and Sensing Planning
3.4
995
Choosing an Ordering of Regions
To cover a simple polygon, it is sufficient that a trajectory visits at least one point inside each corner guard region (as defined in section 3) associated to reflex vertices of the polygon. The high level, combinatoric layer attempts to find an ordering for the robot to visit these corner guard regions such that the expected value of the time to find an object in the environment is reduced. Note that the discretization defined with critical events is needed because the form of the integral that define the expected value of the time may change according to the shape of the region. To find a suitable ordering, we have defined a point guard inside each corner guard region and used the approach of [6] for sensing at specific locations. The algorithm yields an ordering for visiting corner guard regions (associated to non-convex vertices) that attempts to reduce the expected value of the time to find an object.
a) Expected time 136.9
b) Expected time 115.3
Fig. 2. a) concatenation of straight line paths b) concatenation of locally optimal paths
Once an ordering has been established, the lower level, continuous layer uses the sequence of non-convex vertices to perform locally optimal motions around each of them, thus generating a complete trajectory that covers the polygonal environment. We know that any trajectory generated in this fashion will not be globally optimal in the general case. The main reason of lacking global optimality is that any partition of the problem into locally optimal portions does not guarantee global optimality (Bellman’s principle of optimality does not apply). However, through simulation experiments, we have found that the quality of the routes generated by our algorithm is close to the optimal solutions (more details can be found in [6] and [7]). Figure 2 shows two routes for exploring the environment. The first one, 2 a), is composed by straight lines. The second one, 2 b), is based on the concatenation of locally optimal path generated through an appropriate ordering of reaching critical events defined with our approach. The path generated with our approach produces a smaller average time to find the object. Note that a zig-zag motion is not necessarily bad because a good trajectory must find a compromise between advancing to the next guard and sensing a larger portion of the environment as soon as possible.
996
4
R. Murrieta-Cid et al.
Pursuit-Evasion
In this section, we consider the surveillance problem of maintaining visibility at a fixed distance of a mobile evader (the target) using a mobile robot equipped with sensors (the observer). We address the problem of maintaining visibility of the target in the presence of obstacles. We assume that obstacles produce both motion and visibility constraints. We consider that both the observer and the target have bounded velocity. We assume that the pursuer can react instantaneously to evader motion. The visibility between the target and the observer is represented as a line segment and it is called the rod (or bar). This rod is emulating the visual sensor capabilities of the observer. The constant rod length is modeling a fixed sensor range. This problem has at least two important aspects. The first one is to find an optimal motion for the target to escape and symmetrically to determine the optimal strategy for the observer to always maintain visibility of the evader. The second aspect is to determine the necessary and sufficient conditions for the existence of a solution. In this section, we address the first aspect of the problem. That is, to determine the optimal motion strategy, which corresponds to define how the evader and pursuer should move. We have numerically found which are the optimal controls (velocity vectors) that the target has to apply to escape observer surveillance. We have also found which are the optimal controls that the observer must apply to prevent the escape of the target. 4.1
Geometric Modeling
We have expressed the constraints on the observer dynamics (velocity bounds and kinematics constraints) geometrically, as a function of the geometry of the workspace and the surveillance distance. Our approach consists in partitioning the phase space P and the workspace in non-critical regions separated by critical curves. These critical curves define all possible types of contacts of the rod with the obstacles [8]. These curves bound forbidden rod configurations. These rod configurations are forbidden either because they generate a violation of the visibility constraint (corresponding to a collision of the rod with an obstacle in the environment) or because they require the observer to move with speed greater than its maximum. In order to avoid a forbidden rod configuration, the pursuer must change the rod configuration to prevent the target to escape. We call this pursuer motion the rotational motion. If the observer has bounded speed then the rotational motion has to be started far enough for any forbidden rod configuration. The pursuer must have enough time to change the rod configuration before the evader brings the rod to a forbidden one. There are critical events that tell the pursuer to start changing the rod configuration before it is too late. We have defined an escape point as a point on a critical curve bounding forbidden rod configuration sets (escapable cells), or a point in a region bounding an obstacle. This region is bounding either a reflex vertex or a segment of the polygonal workspace. We
A Framework for Reactive Motion and Sensing Planning
997
use D∗ to denote the distance from an escape point such that, if the evader is further than D∗ from the escape point, the observer will have sufficient time to react and prevent escape. Thus, it is only when the evader is nearer than D∗ to an escape point that the observer must take special care. Thus, the critical events are to D∗ distance from the escape points. 4.2
Optimal Target and Observer Motions
Thus, the optimal control problem is to determine D∗ . We solve it using the Pontryagin’s minimum principle with free terminal time [1]. Take the global Cartesian axis to be defined such that the origin is the target’s initial position, and the x-axis is the line connecting the target’s initial position and the escape point. Note that the reference frame is local. It is defined with respect to the escape point. The target and observer velocities are saturated at Vt and Vo respectively, and because the rod length must be fixed at all times, the relative velocity Vot must be perpendicular to the rod. This information yields the following velocity vector diagram (see figure 3 a) ). θ is the angle between the rod and x axis, α represents the direction of the evader velocity vector used to escape. The rate of change of θ can be found to be [4]: ; −Vt sin(α + θ) ± Vo 2 − Vt 2 cos2 (α + θ) V ot dθ = = (8) dt L L Because the boundary conditions of the geometry are defined in terms of x, a more useful derivative would be: : −R sin(α + θ) ± 1 − R2 cos2 (α + θ) dθ dθ dx −1 Vt = ( ) = Where R = 0 then Compute the cost to go from all subsets at t-1 to current subset Apply dynamic programming to get the optimal visual path.
1008
A. Marin-Hernandez, M. Devy, and V. Ayala-Ramirez f(ϕ1 - ϕ0) x0
f(ϕ2 - ϕ1) x1
f(ϕt-1 - ϕt-2) …
Uk-sg
f(ϕt - ϕt-1) xt-1
xt
Uk-sg Uk-sg
Uk-sg
Uk-sg
Uk-sg Uk-sg
Uk-sg
…
Uk-sg
Uk-sg
Uk-sg Uk-sg
Uk-sg
Fig. 5. Generation of the perceptual plan by a dynamic programming algorithm, darkest arrows represent the optimal path
5 Results On Fig 6 is shown an example of visual planning for a virtual environment. On (a) we can see the planned path, and the set of planar landmarks. On next images, robot position and movement are represented by a small vector over the path. The coloured landmarks are the landmarks visible from the current position. The camera modality is represented by a thin vector (orientation = pan/tilt, size=zoom). This example is interesting because as we can notice on (b), only three of the landmarks are visible from the initial point. On this point, landmarks L3 and L5 have the same visibility and utility. However, L3 is chosen because, it will be useful on next points over the path and therefore avoiding saccadic movements. On (c) one more landmark is added to the previous one, because this configuration is more useful for localization. Finally, on (d) only the front face landmark is selected.
(a)
(b)
(c)
(d)
Fig. 6. Visual planning example on a virtual environment
This method was partially applied for indoor navigation. Landmarks were learnt and located with respect to a 2D map built using a SLAM approach from laser data. On Fig.7a, the visibility area of each learnt landmarks are presented; the area are computed off line, what make simpler and faster the visual planning algorithm.
Visual Planning for Autonomous Mobile Robot Navigation
(a)
1009
(b)
Fig. 7. a) Learnt landmarks and their visibility areas, b) aerial view of the virtual environment
On Fig.7b, we show a virtual environment used to test the visual planning. On this environment virtual robot must find and track different posters fixed on the walls. From this virtual model, synthetic images are generated and visual tracking is achieved using the template differences method described in [4]. On Fig. 8, we can see different stages of the simulation, on top synthetic images from the virtual camera, and bottom aerial views with the robot and the camera modalities. The virtual robot must follow a circular path. Wired cone represent virtual camera parameters: orientation = pan/tilt (α and β), and diameter of the base = field of view (γ). Images a) and e) correspond to the initialization step. b) and f) executes the first step of the modality plan; the field of view is reduced to get optimal image size. On images c) and g) a configuration with two landmarks is chosen, and finally on d) and h) due to the camera and movement restrictions only one landmark is conserved.
6 Conclusions and Future Work We have presented in this paper, a strategy for visual plan generation. This strategy fulfills the requirements of a well-posed physical system, maximizing entropy (information in images) while minimizing energy (camera movements). In order to achieve the task, some measurements have been defined: (a) visibility in function of the oriented normal to the object and to the camera position, and (b) utility in function of specific observer parameters as the maximal field of view. A direct computation of optimal modalities has been proposed. Finally, a dynamic programming method has been used to generate the path in the camera configuration space, avoiding saccadic movements. This method has been validated on a virtual robot; then a visual plan has been executed by a real robot, without any execution control. On line planning has been partially applied for indoor navigation, using off line computation of the visibility areas of each landmarks. This work is on the way and a complete decisional system for active visual localization, including visual planning and control, is going to be implemented on the robot. Here only planar landmarks and only geometrical criteria have been considered during the planning task. In fact, all landmarks have not the same utility for visual tracking and visual localization; moreover this utility depends on some environment characteristics (ambient lights, overcrowding…). In [13], we have proposed some
1010
A. Marin-Hernandez, M. Devy, and V. Ayala-Ramirez
measurements on objects and on the environment, in order to automatically select the best tracking algorithm that must be used to track a given object in a given context. Our visual planning method will use this information on the predicted tracking performance, to include in the visual plan, with the landmarks and the camera modalities, the tracker methods to be used.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Fig. 8. Visual planning and tracking simulation: on top images from the virtual image, and on bottom top views, wired cone for the camera
Finally, when a landmark is occluded or removed from the environment, or when the path has been modified (e.g. obstacles) a new visual plan has to be made. A visual plan with an average of 400 sampled points along the path takes less than 1 second on a Sun Blade 100.
References 1. D. Burschka, J. Geiman, and G. Hager, “Optimal landmark configuration for vision-based control of mobile robots”, Proc. of 2003 IEEE ICRA, Taipei, Taiwan, September 14-19, 2003, pp. 3917-3922 2. Madsen C.B., C. S. Andersen, “Optimal landmark selection for triangulation of robot position”, Robotics and Autonomous Systems, vol. 23, No. 4, 1998, pp. 277-292. 3. J.B. Hayet, F.Lerasle, and M.Devy., “Visual Landmarks Detection and Recognition for Mobile Robot Navigation”, in Proc. 2003 IEEE Conf. on Computer Vision and Pattern Recognition (CVPR'2003), Vol.II, pp.313-318, Madison (Wisconsin, USA, June 2003. 4. F.Jurie, M.Dhome, “Hyperplane Approximation for Template Matching”, in IEEE. Trans. on Pattern Analysis and Machine Intelligence, vol. 24, No. 7, pp. 996-1000, July 2002. 5. Ralf Möller, “Perception through Anticipation - An Approach to Behaviour-based Perception”, in Proc. New Trends in Cognitive Science, 184-190, Vienna, 1997 6. K.A. Tarabanis, R.Y. Tsai, and A.Kaul, “Computing occlusion-free view-points”, IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(3), pages 279-292, 1996. 7. K. Klein and V. Sequeira, “View planning for the 3D modelling of Real World Scenes”, 2000 IEEE/RSJ IROS, volume II, pages 943-948, 2000.
Visual Planning for Autonomous Mobile Robot Navigation
1011
8. B.Tovar, R.Murrieta-Cid and C.Esteves, “Robot Motion Planning for Map Building”, in Proc. IEE/RSJ IROS’2002, Lausanne (Switzerland), Nov.2002. 9. H. González-Banos and J.C. Latombe. “A randomized art-gallery algorithm for sensor placement”, ACM Symposium on Computational Geometry, SCG’01, 2001. 10. X. Deng, E. Milios, A. Mirzaian ``Landmark selection strategies for path execution'', Robotics and Autonomous Systems, 17 (1996) pp. 171-185. 11. V. Ayala-Ramirez, M. Devy, “Active selection and tracking of multiple landmarks for visual navigation”, in 2nd Int. Sym. on Robotics and Automation (ISRA'2000), Monterrey (Mexico), 10-12 November 2000, pp.557-562. 12. P. L. Sala, R. Sim, A. Shokoufandeh and S.J. Dickinson “Landmark Selection for VisionBased Navigation”, accepted in IEEE IROS, Sendai, Japan, Sep 28 – Oct 2, 2004. 13. A. Marin Hernandez, M. Devy, “Target and Environments Complexity Characterization for Automatic Visual Tracker Selection in Mobile Robotic Tasks”, in Proc. 4th Int. Sym. on Robotics and Automation (ISRA'2004), Queretaro, Mexico, August 2004
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot Pengfei Liu and Jiuqiang Han School of Electronics and Information Engineering, Xi’an Jiaotong University, Xi’an, 710049, P.R.China [email protected]
Abstract. A new reference walking trajectory for a planar five-link biped, considering both the SSP and the DSP, is presented firstly. A new combined controller to generate walking gaits following the reference trajectory is designed subsequently. The controller of five-link biped is consisted of PD controller and a fuzzy wavelet neural network controller. The scalable and shiftable coefficients of the wavelet function and weights of the network can be acquired by training the network by back-propagation algorithm online. The simulation results of the reference trajectory show that the proposed reference trajectory have good stability, repeatability and continuity during both SSP and the DSP, and when given the different initial conditions, the compatible trajectories can be achieved correspondingly. The simulation results of the trained controller show that the controller can generate the walking gaits to track the reference trajectory as close as possible.
1 Introduction The study of humanoid robot is one of the most difficult and complex embranchment in the field of robot research. A biped robot is a class of walking robots that imitates human locomotion. The design of reference trajectory for gait cycle is a crucial step for biped motion control. However, there is a lack of systematic methods for synthesizing the gait and most of the previous work has been based on trial and error [1]. Vukobratovic [2] have studied locomotion by using human walking data to prescribe the motion of the lower limbs. Hurmuzlu [3] developed a parametric formulation that ties together the objective functions and the resulting gait patterns. Hurmuzlu’s method requires the selection of specific initial conditions to assure to have continuous and repeatable gait. But this selection can be extremely challenging. This problem of selection proper initial conditions to generate repeatable gait can be remedied by using numerical methods by approximating the reference trajectories through time polynomial functions [4] or periodic interpolation [5]. From the prevailing studies on biped walking pattern design, it has been noticed that two important issues need to be regarded. Firstly, most studies have focused on motion generation during the single support phase (SSP), and the double support phase (DSP) has been neglected. But the DSP plays an important role in keeping a A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1012 – 1021, 2005. © Springer-Verlag Berlin Heidelberg 2005
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot
1013
biped walking stably with a wide range of speeds, and thus can’t be neglected. Secondly, impact, occurring at the transition between the SSP and the DSP, makes control task difficult due to the discontinuity of the angular velocity and may have destabilizing effects on biped motion. Many researchers have shown that fuzzy set and neural network theory can solve dynamic biped locomotion problems. Murakami [6] used a set of parameters to decide the static gain of the fuzzy controller. Shin [7] developed a fuzzy variable gain force control system for a biped robot in the DSP. Juang [8] presented a three-layered neural network controller with the back-propagation through time algorithm to generate robotic walking gaits. The drawback of this method is that the number of needed hidden layers and units is uncertain. In his subsequent work [9], Juang used fuzzy neural networks to generate walking gaits successfully, however the DSP was neglected. After the reference trajectories including both the SSP and the DSP are presented, this paper presents a new control scheme by using a fuzzy wavelet neural network and PD as the controller. The presented control scheme can generate the gait that satisfies specified constraints such as the step length, maximum height and walking speed. Simulation results are given for a five-link biped robot.
2 Biped Robot Model and Reference Trajectory In order to demonstrate the proposed control scheme and the reference trajectories, the walking machine BLR-G1 robot [10] is used as the simulation model. As shown in Fig.1, this robot consists of five links, namely, a torso, two lower legs and two upper legs, and its hip and knee joints are driven by four DC servomotors. This robot has no feet (no ankle). A steel pipe at the tip each leg is used to maintain the lateral balance. Thus, the motion of the biped is limited to only the sagittal plane (X-Z plane). The ground condition is assumed to be rigid and nonslip. The contact between the tip and the ground is assumed to be a single point. 2.1 Dynamic Equations The dynamic equations of the motion of the biped model are given in [10] as follows: ••
•
A(θ ) θ + B(θ )h(θ ) + Cg (θ ) = DT
(1) •
•
•
•
•
•
Where θ = [θ1 ,θ 2 ,θ 3 ,θ 4 ,θ 5 ]T , T = [τ 1 ,τ 2 ,τ 3 ,τ 4 ]T , h(θ ) = [θ 12 ,θ 22 ,θ 32 ,θ 42 ,θ 52 ]T ,
g (θ ) = [sin θ 1 , sin θ 2 , sin θ 3 , sin θ 4 , sin θ 5 ]T
,
A(θ ) = {qij cos(θ i − θ j ) + pij }
,
B(θ ) = {qij cos(θ i − θ j )} , C = diag{−hi } , τ i is the torque at the i Th joint, and θ i •
and θ are the position and velocity of link i . The parameters D , qij , pij and hi are constants [10]. Other useful values of the parameter are given in the table 1.
1014
P. Liu and J. Han
Z
m3
_
Double support phase + r2
θ3
t =0
a3
t = Ts
t = Ts + Td
A full gait cycle
Hip trajectory m2
a2
a4
m4
Z
θ2
m1
θ4 r5
m5
θ1
a5
θ5
a1
Swing tip trajectory
X
X
O(0,0) Step length
r1
Fig. 1. Five-link Biped model
Fig. 2. Full gait cycle of a planar five-link biped
Table 1. Values of the parameters
Link
Mass (Kg)
Moment of Inertia (Kg × 10 −2 )
Length (m)
Center of Mass from Lower joint (m)
Torso
14.79
3.30
0.486
0.282
Upper leg Lower leg
5.28 2.23
5.40 4.14
0.302 0.332
0.236 0.189
2.2 Reference Trajectory
A complete step can be divided into a SSP and a DSP [11]. The SSP is characterized by one limb (the swing limb) moving in the forward direction while another limb (the stance limb) is pivoted on the ground. This phase begins with the swing limb tip leaving the ground and terminates with the swing limb touching the ground. Its time period is denoted as T s . In the DSP, both lower limbs are in contact with the ground while the upper body can move forward slightly. The time period of this phase is denoted as Td . In the following step, the roles of swing limb and the stance limb are exchanged. Mu [11] presented a method for gait synthesis of a five-link biped walking on level ground during SSP and DSP, but it can’t keep the continuity when switching the swing limb. The joint angle profiles can be determined when compatible trajectories for hip and the tip of the swing limb can be known. We prescribe that both knees only bend in one direction, thus, the joint angle profiles can be uniquely determined by the given hip and swing limb trajectories. From the viewpoint of the human walking pattern, the torso is kept at the upright position that the trajectory θ 3 (t ) = 0 in both the SSP and the DSP. We design the trajectory for the swing limb firstly. From the definitions of the SSP and DSP, we just need to design the trajectory of the swing limb during the SSP. The trajectory of the tip of the swing limb is denoted by the vector X a : ( xa (t ), z a (t )) , where ( xa (t ), z a (t )) is the coordinate of the swing limb tip position in the coordinate system in Fig.2. We use a third order
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot
1015
polynomial and a fifth order polynomial functions for x a and z a separately. The order of polynomial functions is determined by number of the constraint equations. They are shown below:
°xa (t ) = a0 + a1t + a2t 2 + a3t 3 ® °¯z a (t ) = b0 + b1t + b2t 2 + b3t 3 + b4t 4 + b5t 5
, 0 ≤ t ≤ Ts
(2)
Next we present constraint equations that can be used for solving the coefficients. There are four basic quantities in the SSP: step length S l , step period for the SSP Ts , maximum height of the tip of the swing limb H m and its location S m . The constraint equations are described as follows: (1) Geometrical constraints:
x a (0) = −
Sl S , x a (Ts ) = l , z a (0) = 0 , z a (Ts ) = 0 2 2
(3)
(2) Maximum height of the tip of the swing limb: •
x a (Tm ) = S m , z a (Tm ) = H m , z a (Tm ) = 0
(4)
(3) Repeatability of the gait: The requirement for repeatable gait imposes the initial angle posture and angular velocities to be identical to those at the end of the step. •
•
x a (0) = 0 , z a (0) = 0
(5)
(4) Minimizing the effect of impact: In order to minimize the effect of impact, we should keep the velocities of the swing tip zero before impact. •
•
x a (Ts ) = 0 , z a (Ts ) = 0
(6)
Equations (3-6) can be used to solve the coefficients a i , b j and Tm : a0 = −
Sl 3S 2S 16 H m , a1 = 0 , a 2 = 2l , a 3 = − 3l , b0 = b1 = b5 = 0 , b2 = , 2 Ts Ts Ts2
32 H m 16 H m T , b4 = . If S m = 0 , Tm = s . 3 4 2 Ts Ts Next the trajectory of the hip is designed. The trajectory of the hip should be divided into the SSP and the DSP, which are separately denoted by the coordinate as X hs : ( x hs (t ), z hs (t )) in the SSP and X hd : ( x hd (t ), z hd (t )) in the DSP. Two third order polynomial functions are used to describe x hs (t ) and x hd (t ) . b3 = −
xhs (t ) = c0 + c1t + c2t 2 + c3t 3 , 0 ≤ t ≤ Ts
(7)
xhd (t ) = d 0 + d1t + d 2 t 2 + d 3t 3 , 0 ≤ t ≤ Td
(8)
1016
P. Liu and J. Han
For minimizing the vertical motion of the gravity center, we assume z hs (t ) and z hd (t ) as a constraint Z h during the whole step cycle. Considering the constraints of repeatability, continuity and stability of the gait, we can develop the constraint equations as follows: x hs (0) = − S s 0 , x hd (Td ) =
• • 1 S l − S s 0 , x hs (0) = Vh1 , x hd (Td ) = Vh1 , x hd (0) = S d 0 2 •
•
(9)
, x hs (Ts ) = S d 0 , x hs (Ts ) = Vh 2 , x hd (0) = Vh 2 Where S s 0 and S d 0 are positions of the hip at the beginning of the SSP and DSP, we assume S s 0 as − S l ; Vh1 is the hip velocity at the beginning of the SSP and Vh 2 is the 4
hip velocity at the beginning of the DSP. Vh1 And Vh 2 can be determined by obtaining the largest stability margin through ZMP criterion [11]. Equation (9) can be used to solve the coefficient: 1 3 (Vh1 + Vh2 )Ts − 2Sd 0 − Sl 3Sd 0 + Sl − (Vh1 + 2Vh2 )Ts 1 2 ; d0 = Sd0 , 4 , c3 = c0 = − Sl , c1 = V h1 , c2 = 4 Ts2 Ts3
1 3 (Vh1 + Vh2)Td + 2Sd0 − Sl Sl − 3Sd 0 − (Vh1 + 2Vh2 )Td 2 . 4 d1 = Vh 2 , d2 = , d3 = Td2 Td3 With the designed hip and swing tip trajectories and the biped model, the joint angle profiles can be determined by the following equations: A C − B1 A12 + B12 − C12 °θ 1 (t ) = arcsin( 1 1 ) ° A12 + B12 ° A1C 2 + B1 A12 + B12 − C 22 ° ) °θ 2 (t ) = arcsin( A12 + B12 °° ®θ 3 (t ) = 0 ° 2 2 2 °θ (t ) = arcsin( A4 C 3 − B 4 A4 + B 4 − C 3 ) ° 4 A42 + B 42 ° ° A4 C 4 + B 4 A42 + B 42 − C 42 ) °θ 5 (t ) = arcsin( A42 + B 42 ¯°
(10)
2 2 2 2 2 2 2 2 2 2 2 2 Where C 1 = A1 + B1 + r1 − r2 , C 2 = A1 + B1 + r2 − r1 , C 3 = A 4 + B 4 + r2 − r1 ,
2r1
2 r2
2r2
A 2 + B 42 + r12 − r22 , B4 = Zh . For the SSP: A1 = xhs (t ) − xa (t ) , B1 = Z h − Z a (t ) , C4 = 4 2 r1 A4 = xhs (t ) , and for the DSP: A1 = − 1 S l + x hd ( t ) , B1 = Z h , A4 = xhd (t ) . 2
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot
1017
3 FWN Control System In order to generate the gait in the reference trajectory given above, a control system •
is presented, as shown in Fig.3. θ d and θ d are expected joint angle and angular •
velocities, θ and θ are actual value of joint angle and angular velocities. θ d and •
θ d can be acquired from the reference trajectory. The controller can be separated into 4 sub-controllers for each joint. The subcontrollers have the same architecture, which is consisted of a PD feedback controller and a neural network feed-forward controller. The feedback controller can keep the biped robot stable, and the feed-forward controller can accelerate the control process. The PD feedback controller plays an important role in the beginning step of the control process, but the neural network controller dominates along with the training of the network by using the feedback error. Finally, the feed-forward network controller plays a role of inverse model of the biped robot approximately. θ d1 + • θ d1
−
−
PD1
τ c1
+ NC1
τ n1
•
+ Σ +
θ1
τ1
θ1 •
θ2 θ2 •
Biped robot NC4 •
θ d5 θd 5
+ +
−
−
PD4
τ c4 τ n4
+ Σ +
θ4 θ4 •
τ4
layer1
1
layer 2
layer 3
layer 4 ϖ 11(3)
1
x1
yc1 NC1
θ5 θ5
1
x2
ϖ 33(3)
1
Fig. 3. Control system for five-link biped
Fig. 4. Architecture of FWN controller
The joint torque of biped robot is •
•
•
τ k = τ ck + τ nk = K pk (θ d − θ ) + K vk (θ d − θ ) + Φ k (θ d ,θ d , W ), (k = 1,2,3,4)
(11)
where K p and K v are proportional and differential vector, Φ k (•) is the nonlinear mapping function of the network, W is the weight matrix of the network. The neural network in the designed controller is a fuzzy wavelet neural network. The architecture of FWN controller is shown as Fig.4. The four networks have the same architecture. FWN controller should be trained online in BP algorithm, and the training sets can be given by equations (1) and (10). The whole network consists of four sub- networks, which denotes network controller of one joint respectively. Let k (i ) Ij
be input of the j Th node of layer i in sub-network k . Let k O (ij ) be output of
1018
P. Liu and J. Han
the j Th node of layer i in sub-network k . The FWN is consisted of four layers. The •
inputs of the network are θ d and θ d , which must be normalized. Layer 1 is the input layer, k
Oi(1) =k Ii(1) =k xi ,k xi ∈ [− 1 1], (k = 1,2,3,4; i = 1,2)
(12)
Layer 2 is the fuzzification layer in which each node represents a fuzzy set. There are three fuzzy sets for each component of x , namely, P, Z and N. We choose mother wavelet function as ψ ( x ) = (1 − x 2 ) e k
Oij( 2) = k I ij( 2) = 2
k
mij / 2
ψ (2
k
mij k
−
(13)
x2 2
xi − k nij ), (k = 1,2,3,4; i = 1,2; j = 1,2,3)
(14)
Where k mij are scalable coefficients, and k nij are shiftable coefficients. The third layer deals with the minimum operation, which is replaced by multiplication in the network. k
O ij( 3 ) = k I ij( 3 ) = k O1(i2 ) k O 2( 2j ) , ( k = 1, 2 , i = 1, 2 ,3; j = 1, 2,3)
(15)
The forth layer is defuzzization layer. 3
k
I (4) =
¦
3
( k I ij( 3 ) k ϖ ij( 3 ) ), y k = k O ( 4 ) = k I ( 4 ) /
i , j =1
¦
k
O ij( 3 ) , ( k = 1, 2 ,3 , 4 )
(16)
i , j =1
In this controller, we learn in BP algorithm online. In the network, the parameters k
ϖ ij(3) , k mij and k nij need to be trained in the algorithm. The evaluation function is
chosen as 1 (τ k − τ nk ) 2 , ( k = 1, 2 , 3 , 4 ) 2 The parameters of FWN controller can be trained by Jk =
ϖ ij(3) (t + 1)=k ϖ ij(3) (t ) − η1
∂J k
k
k
∂ ϖ ij(3)
mij (t + 1)= k mij (t ) − η 2 k
nij (t + 1)= k nij (t ) − η 3
k
∂J k ∂ k mij ∂J k ∂ k nij
(17)
, (k = 1,2,3,4; i = 1,2,3; j = 1,2,3) , , (k = 1,2,3,4; i = 1,2; j = 1,2,3) ,
(18)
, (k = 1,2,3,4; i = 1,2; j = 1,2,3)
Where η1 , η 2 and η3 are positive constant which is known as learning rate, and ∂J k ∂ k ϖ ij( 3 )
= − (τ k − τ nk )⋅ k o ij( 3 ) /
¦ i, j
k
o ij( 3 ) , ( k = 1,2,3,4; i = 1,2,3; j = 1,2,3)
(19)
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot ª º k ( 3) « » ϖ ij − y k k ( 2 ) « − (τ k − τ nk ) ⋅ = ⋅ o2 j ⋅ d1 » , k k ( 3) ∂ m1i o ij » j =1 « «¬ »¼ i, j k m1i h2 ª º k − 1 m1i k 1 ⋅ x1 − k n1i , d 1 = k m1i ln 2 « ψ ( h1 ) + 2 2 ( h1 3 − 3h1 )e 2 ⋅ k x1 » , h1 = 2 «4 » «¬ »¼ 3
∂J k
¦
¦
∂ k n1i
ª º k « » ϖ ij( 3 ) − y k k ( 2 ) « − (τ k − τ nk ) ⋅ = ⋅ o 2 j ⋅ v1 » , k ( 3) o ij » j =1 « «¬ »¼ i, j
¦
¦
k
ln 2 k v1 = m 1 iψ ( h1 ) − 2 4
∂ km2 j
d 2 = m2 j k
(20)
3
∂J k
∂J k
1019
3
=
¦ i =1
m1 i 2
3
( h1 − 3 h1
h2 − 1 )e 2
, (k = 1,2,3,4; i = 1,2,3)
ª º k « » ϖ ij( 3 ) − y k k ( 2 ) « − (τ k − τ nk ) ⋅ », o d ⋅ ⋅ 2 i 1 k ( 3) « » o ij «¬ »¼ i, j
¦
k m2 j ª º h 2 k − 2 m2 j k 1 « ⋅ x2 − k n2 j , ln 2 ψ (h2 ) + 2 2 (h2 3 − 3h2 )e 2 ⋅ k x 2 » , h 2 = 2 «4 » ¬« ¼»
∂J k ∂ k n2 j
3
=
¦ i =1
(21)
ª º k ( 3) « » ϖ ij − y k k ( 2) « − (τ k − τ nk ) ⋅ ⋅ o1i ⋅ v 2 » , k ( 3) oij « » «¬ »¼ i, j
¦
k
ln 2 k v2 = m 2 jψ ( h 2 ) − 2 4
m2 j 2
( h2 3 − 3h2 ) e
h 2 − 2 2
, (k = 1,2,3,4; j = 1,2,3)
4 Simulations In this section, the joint profiles for five-link biped walking on level ground during both the SSP and the DSP are simulated based on the reference trajectory given in Section 2. The parameters are given as follows: Sl = 0.72m , Ts = 0.6 s , Td = 0.1s ,
H m = 0.08m , S m = 0m , S d 0 = 0.14m , Vh1 = 1m / s , Vh 2 = 1m / s , Z h = r1 + r2 − H m . Fig.5 shows joints angle profiles in Mu’s method during the SSP and the DSP. It is seen that the joint angles have a little problem with repeatability and continuity when switching the swing limb. Fig.6 shows the joint profiles in our method. The simulation shows that the presented reference trajectory has good continuity and repeatability. Fig.7 (a) is the stick diagram of the biped robot with the prescribed conditions above, Fig.7 (b) is the diagram with the conditions: Sl = 0.72m , H m = 0.05m , Vh1 = 0.5m / s , Vh 2 = 0.5m / s .
1020
P. Liu and J. Han
Let η1 = η2 = η3 = 0.3 , K p = [60,60,60,60] , K v = [50,50,50,50] , the network is trained by the error back-propagation presented above. Fig.8 is the errors of θ1 and θ 2 generated by the trained controller. The results show that the error between the expected angle profile and the actual angle profile is very small, e max ≤ 0 .003 rad . The simulation results show that the designed combined controller can generate the gait according to the reference trajectories well.
Fig. 5. Joint angle profiles in Mu’s method
Fig. 6. Joint angle profiles in our method
Fig. 7. Stick program of the biped robot
Fig. 8. Angle error of θ 1 and θ 2
Gait Synthesis Based on FWN and PD Controller for a Five-Link Biped Robot
1021
5 Conclusion In this paper, systematic reference trajectories are developed for five-link biped walking in the sagittal plane. Unlike the previous work focusing on the SSP, our reference trajectories include both the SSP and the DSP, which gives the biped a wider range of walking speeds and more stable locomotion. Furthermore, a combined controller for gait synthesis, which consisted of a fuzzy wavelet neural network controller and a PD controller, is presented in this paper. The uncertainty of the network size in the conventional neural network learning scheme has been overcome by the use of FWN. The trained controller can generate control sequences and drive the biped along the reference trajectories given In the Section 2, including both the SSP and the DSP. The proposed learning scheme trains the controller to follow reference trajectory as closely as possible.
References 1. 1 Tzafestas, S., Raibert, M., Tzafestas, C.: Robust Sliding-mode Control Applied to a 5Link Biped Robot. Journal of Intelligent and Robotic Systems 15, (1996) 67-133 2. Vukobratovic, M., Borovac, B., Surla, D.: Scientific Fundamentals of Robotics Biped Locomotion: Danamics Stability, Control and Application. Springer-Verlag, New York (1990) 3. Hurmuzlu, Y.: Dynamics of Bipedal Gait: Part 1-objective Functions and the Contact Event of a Planar Five-Link Biped. Journal of Applied Mechanics 60, (1993) 331-336 4. Chevallereau, C., Aoustinm, Y.: Optimal Reference Trajectories for Walking and Running of a Biped Robot. Robotica19, (2001) 557-569 5. Huang, Q., Yokoi, K., Kajita, S.: Planning Walking Patterns for a Biped Robot. IEEE Transactions on Robotics and Automation 17, (2001) 280-289 6. Murakami, S., Yamamoto, E., Fujimoto, K.: Fuzzy Control of Dynamic Biped Walking Robot, Pro.IEEE.Conf.Fuzzy Systems, vol.1, no.4 (1995) 77-82 7. Shih, C.L., Gruver, W.A., Zhu, Y.: Fuzzy Logic Force Control for a Biped Robot. Proc.IEEE.Int.Symp. Intelligent Control, (1991) 269-274 8. Juang, J.G., Lin, C.S.: Gait Synthesis of a Biped Robot Using Backpropagation through Time. Proc. IEEE.Int.Conf.Neural Networks, vol.3 (1996) 1710- 1715 9. Juang, J.G.: Fuzzy Neural Network Approaches for Robotic Gait Synthesis. IEEE Transactions on System, Man, Cybernetics, vol.30 (2000) 594-601 10. Furusho, J., Masubuchi, M.: Control of a Dynamical Biped Locomotion System for Steady Walking. Journal of Dynamic Systems, Measurement, and Control, vol.108 (1986) 111-118 11. Mu Xiuping, Wu Qiong: Sagittal Gait Synthesis for a Five-Link Biped Robot. Pro. Of the 2004 American Control Conference, (2004) 4004-4009
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection Jorge Axel Dom´ınguez-L´opez and Gilberto Marrufo Centro de Investigaci´on en Matem´aticas (CIMAT), Guanajuato CP36240, MEXICO {axel, marrufo}@cimat.mx
Abstract. Robotic end effectors are used over a diverse range of applications where they are required to grip with optimal force to avoid the object be either dropped or crushed. The slipping state can be easily detected by the output of the slip sensor. When the output has a non-zero value, the object is slipping. Conversely, detecting the deformation (crushing) state is more difficult, especially in an unstructured environment. Current proposed methodologies are ad hoc and specialised to the particular object or objects to be handled. Consequently, the gripper can only manipulate prior known objects, constraining the gripper application to a small set of predetermined objects. Accordingly, in this paper, it is proposed a hybrid approach of fuzzy and expert systems that permits to detect when an unknown object is being deformed. To determinate when the gripped object is being deformed, the fuzzy/expert system uses information from three sensors: applied force, slip rate and finger position. Several objects of different characteristics were used to prove the effectiveness of the proposed approach.
1 Introduction Robotic effectors are required to be capable of considerable gripping dexterity, within an unstructured environment. To achieve a satisfactory grip, optimal force control is required to avoid the risk of the object slipping out of the end effector as well as any possible damage to the object. The use of a force sensor together with a slip sensor allows the end effector to grip with minimum fingertip force, reducing the risk of crushing (deforming) the object. During grasping operation, it is possible to identify four main states of the gripped object: not touching, slipping, crushing and OK. The grasped object is at the state OK when the other three states are not activated. The states not touching and slipping are easily detected. The gripper is not touching the object when the output of the force sensor is zero. And the gripped object is slipping when the output of the slip sensor is non-zero. Now, the state crushing is not trivially defined, even with prior knowledge of the object. Reference [1] proposes incorporating electric field sensors on the object in order to measure object deformation, position and orientation. Nonetheless, the manipulator can only grip objects equipped with that sensor. This means that the system will be limited to gripping a small set of predetermined objects. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1022–1031, 2005. c Springer-Verlag Berlin Heidelberg 2005
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection
1023
The use of sensors mounted only on the end effector will allow the manipulator to grip any kind of object. Accordingly, other approaches have been proposed, like infrared (IR) and sonar sensors. However, their effectiveness of deformation detection is poor due to several uncertainties inherent in theses sensors [2]. Other possible to solve the deformation detection is machine vision. Nevertheless, this approach increases considerably the system complexity as it requires a camera and visual perception algorithms. Therefore, it is desirable to detect object deformation using simple sensors (i.e., force, slip and position sensors) fitted on the end effector. Accordingly, the proposed approach uses the information from the applied force, slip rate and finger position sensors to determine when the object is being deformed. Several objects of different characteristics were used to prove the effectiveness of the methodology.
2 Two-Fingered End Effector The experimentation reported in this paper has been undertaken on a simple, low-cost, two-finger end effector (Figure1). This has just one degree of freedom; the fingers work in opposition. Although, this limits the size and shape of the objects that can gripped, this kind of gripper is widely used because the kinematics remain simple [3].
Fig. 1. End effector used for the experiments
The end effector is fitted with a slip, force and position sensors as follows: – The slip sensor is located on one finger and is based on a rolling contact principle. An object slipping induces rotation of a stainless steel roller, which is sensed by an optical shaft encoder. The slip sensor has an operational range of 0 to 110 mm.s−1 and sensitivity of 0.5 mm.s−1 . – The applied force is measured using a strain gauges bridge on the other finger. The force sensor have a range of 0 to 2.5 N, with a sensitivity of 1.0 mN.
1024
J.A. Dom´ınguez-L´opez and G. Marrufo
– The position of the fingers is determined using a linear potentiometer mounted on the end effector’s lead screw actuator. The distance between the fingers is calculated using the information of this sensor.
3 Controller Implementation To perform the control actions of the two-fingered end effector, a fuzzy controller was implemented. Fuzzy controllers are typically preferred over conventional approaches when the system to be controlled is highly non-linear, very complex or its mathematical model is unavailable. Grasping dynamics are frequently considered as their properties give a great influence to the success of grasping. However, fuzzy controllers have shown an excellent performance without the provision of the grasping dynamics [4]. For many complex processes, high levels of precision are unobtainable nor are they required for effective system operation. In fact, the inexactness of the description is not a liability in fuzzy systems; on the contrary, it is useful in that sufficient information can be conveyed with less effort [5]. Using the available knowledge (or experience) about the plant to be controlled, a set of control rules can be developed to express that knowledge [6]. Fuzzy controllers are less sensitive to parameter changes or disturbances compared to conventional controllers [7], as fuzzy controllers have been proved to be commonly more robust than traditional PID controllers [8]. Furthermore, fuzzy control has the advantage that its parameters can be easily updated if the plant operating points change [9]. Figure 2 shows the structure of the implemented fuzzy controller. It has two inputs, the object’s slip and the applied force, and one output, the required motor voltage. The operational range of each of these variables was determined experimentally, allowing thus the database and rule-base to be manually created. The Center of Sums (CoS) was the defuzzification approach used because it has some advantages over the Center of Gravity method. In particular, CoS is faster because it is simpler [10]. The linguistic variables used for the term sets are just value magnitude components. They are Zero (Z), Almost Nil (AN), Small (S), Medium (M) and Large (L) for the fuzzy set slip while for the fuzzy set applied force they are Z, S, M and L. The applied motor voltage term has the set members Negative Very Small (NVS), Z, Very Small (VS), S, M, L, Very Large (VL) and Very Very Large (VVL). The latter has more set members so as to have a smoother output. The rule-base was designed manually considering the following [11]: If the object is not slipping, the end effector should not apply more force; On the other hand, if the object is slipping, the end effector has to apply additional force proportional to the slip rate but bearing in mind the amount of force already applied. Now, if the applied force is high, it is convenient to relax (open) the fingers to reduce both the applied force and the risk of crushing the object. The developed rules are given in Table 1.
4 Deformation Detection The fuzzy controller described earlier is able to perform an optimal grasp (without slip or deformation) for non-fragile objects. However, fragile objects are repeatedly
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection
1025
Slip rate Applied force
Inference machine
Motor voltage
Fig. 2. Structure of the fuzzy controller Table 1. Manually-designed fuzzy rule-base Fingertip force Voltage Z S M L Z S VS Z NVS AN M S VS Z Slip S L M S VS M VL L M S L VVL VL L M
deformed and even broken, as the finger position from optimal grasp to failure is narrow. This uncomplete success is due to the incapability of the controller to detect when the object starts to suffer deformation. Thus, if the fuzzy controller knows when it is about to crush the object, its performance can be considerably improved. Accordingly, to allow the fuzzy controller to detect deformation, an expert system (ES1) is added. This expert system is capable to detect all the states (i.e., OK, slipping, crushing and not touching). A second expert system (ES2) is used to determine if the fuzzy controller output shall be utilised or not. That is, if deformation has been detected, the ES2 allows the gripper only to keep steady or relax the fingers but not to squeeze more. The ES2 decision is based on the information given by ES1. Figure 3 illustrates the proposed architecture. The output of the ES1 is boolean: When deformation is detected, ES1 sends a ’high’ level signal to the ES2, otherwise, ES1 sends a ’low’ level signal to ES2. Now, the Motor voltage is equal to the Suggested motor voltage (i.e., fuzzy controller output) when no deformation exists. On the contrary, when deformation has been detected, ES2 limits the motor voltage to be less or equal to 0 V . Hence, the gripper can only keep steady or relax the fingers, avoiding thus crushing the object. The output of the ES1 is boolean because at the current stage of development we are only considering the ES1 as a deformation detector. However, the ES1 has been designed to be used in a more complex architecture, for instance, in a reinforcement learning scheme [12] as the ES1 can provide the reward and failure signals to tune the fuzzy controller. The rules of the ES1 are developed using several performances of the end effector using only the fuzzy controller. Figure 4 shows a typical performance of the end
1026
J.A. Dom´ınguez-L´opez and G. Marrufo
Slip rate Applied force
Suggested motor Fuzzy voltage Expert Controller System #2
Finger position
Expert System #1
Motor voltage
Deformation detected = {true, false}
Fig. 3. Block diagram of the proposed methodology for deformation detection
effector. From 0 to 0.6 s, the system is at the not touching state (i.e., applied force is null). After the object has been touched but not completely grasped, the object slips. So, the system is at slipping state. At 1.0 s, the object has been correctly grasped and thus the system is at the OK state. From this point, the end effector keeps periodically closing and relaxing the fingers, being at the slipping, OK and crushing states several times. The system was at crushing state at 1.4, 1.9 and 2.9 s. When the object starts to be deformed, the applied force drops despite the fingers close. At 1.7 s the object slipped because the end effector relaxed the fingers too much. And, at 2.3 s slip is induced manually by pulling on the object. The intervention is of sufficient magnitude to cause the force applied to the object to drop suddenly, after which the fuzzy controller increases the applied force to regain stable grasping. Finally, the system is at the OK state the rest of the time. As said previously, slipping and not touching states can be easily detected: When the output of the slip sensor is non-zero the object is slipping, and when the output of the force sensor is zero the gripper is not touching the object. Accordingly, using this knowledge, the rules for the ES1 and ES2 were manually developed. The rule-bases of the ES1 and ES2 are given in Tables 2 and 3, respectively. The set of ‘Situations’ in the ES1 rule base are not used by the proposed approach but they can be used to tune the rule base of the fuzzy system [13], providing information of when the system fails. Finally, it could be argued to include the ES1 rules into the fuzzy controller, eliminating both expert systems. This can indeed be done but the final model would not be as transparent as the reported one. Although the system would not suffer from the curse of dimensionality, having three simple rule bases allows the operator to understand easier the controller than having one complex rule base.
5 Performance of the Methodology To measure the effectiveness of the architecture depicted by Figure 3 and the three rule bases described above, they were tested with several objects of different characteristics. Due to space limitations, only the performance with three objects are explicitly shown here. These objects are: an egg (fragile), a glass of wine (breakable, non-deformable), and a metal can (non-breakable, deformable). The egg tolerates ‘small’ extra force before breaking (failure), the glass tolerates a ‘large’ excess of force before breaking,
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection
1027
1.8 2500 1.6 2000
1.2
Applied force (mN)
Slip rate (mm/s)
1.4
1 0.8 0.6 0.4
1000
500
0.2 0
1500
0
0.5
1
1.5
2
2.5
3
0
0
0.5
1
time (s)
2
2.5
3
(b) Input force
160
4
140
3
Applied motor voltage (V)
Finger distance (mm)
(a) Input slip
120
100
80
60
40
1.5
time (s)
2
1
0
−1
0
0.5
1
1.5
2
2.5
3
−2
0
0.5
1
time (s)
1.5
2
2.5
3
time (s)
(c) Distance between fingertips
(d) End effector motor terminal voltage
Fig. 4. Performance of the end effector using the fuzzy controller
Table 2. Expert system #1 rule base Rule.1
IF applied force=0
THEN system is at not touching state
Rule.2
IF applied force=0 AND slip rate=0
THEN system is at slipping state
Rule.3
IF applied force drops AND slip rate=0
THEN system is at crushing state
Rule.4
IF applied force increases AND finger position change is ‘nil’ or ‘small’
THEN system is at crushing state
Rule.5
IF applied force=0 AND slip has become zero
THEN system is at OK state AND do not squeeze more
Rule.6
IF system is NOT at not touching state AND system is NOT at slipping state AND system is NOT at crushing state
THEN system is at OK state
Situation.1 IF applied force has become zero AND slip is zero
THEN system has failed: object broken
Situation.2 IF applied force has become zero AND slip was =0
THEN system has failed: object dropped
Situation.3 IF distance between fingers reduces considerably THEN system has failed: AND applied force=0 object crushed
1028
J.A. Dom´ınguez-L´opez and G. Marrufo Table 3. Expert system #2 rule base Rule.1 IF system is not at crushing state
THEN ’Motor voltage’= ’Suggested motor voltage’
Rule.2 IF deformation has been detected AND ’Suggested motor voltage’≤0
THEN ’Motor voltage’= ’Suggested motor voltage’
Rule.3 IF deformation has been detected AND ’Suggested motor voltage’>0
THEN ’Motor voltage’=0
2500
1.8 1.6
2000
Applied force (mN)
Slip rate (mm/s)
1.4 1.2 1 0.8 0.6
1500
1000
500
0.4 0.2 0
0 0
0.5
1
1.5
2
2.5
3
0
0.5
1
time (s)
1.5
2
2.5
3
time (s)
(a) Input slip
(b) Input force
160
3
120
Applied motor voltage (V)
Finger distance (mm)
4 140
100 80 60 40 20 0
2
1
0
−1 0
0.5
1
1.5
2
2.5
time (s)
(c) Distance between fingertips
3
−2
0
0.5
1
1.5
2
2.5
3
time (s)
(d) End effector motor terminal voltage
Fig. 5. Comparison of typical results of the hybrid fuzzy/expert system (solid line) and the fuzzy controller (dashed line) when the end effector grasps an egg
and the can tolerates a ‘small’ excess of force before being deformed and a ‘very large’ excess of force before failure. Also, consider the difference in failure mode between the egg and the glass, and the metal can — the egg and glass will break while the can will crumble (i.e., force is still present) after a period of increasing force with no change of gripper position. Their opposed characteristics allow a proficient and proper evaluation of the proposed methodology. Figures 5, 6 and 7 illustrate typical performances of the end effector grasping an egg, a glass of wine and a metal can, respectively. The figures show the performance of the hybrid fuzzy/expert system (solid line) and compare it with the performance of the fuzzy controller (dashed line). Notice, that, especially in the Figures 6(a) and 7(a), the solid line overlaps the dashed line, as both approaches have a similar performance in some regions. After the objects have been grasped, the system operates without external disturbances until 2.5 s when slip is induced manually by applying an external force on the gripped object. Figures 5(a), 6(a) and 7(a) show such
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection 3000
1.8 1.6
2500
Applied force (mN)
1.4
Slip rate (mm/s)
1029
1.2 1 0.8 0.6
2000
1500
1000
0.4
500
0.2 0
0 0
0.5
1
1.5
2
2.5
3
0
0.5
1
time (s)
1.5
2
2.5
3
time (s)
(a) Input slip
(b) Input force
160
4
150 3
Applied motor voltage (V)
Finger distance (mm)
140 130 120 110 100 90 80
2
1
0
−1
70 60
0
0.5
1
1.5
2
2.5
−2
3
0
0.5
1
1.5
time (s)
2
2.5
3
time (s)
(c) Distance between fingertips
(d) End effector motor terminal voltage
Fig. 6. Comparison of typical results of the hybrid fuzzy/expert system (solid line) and the fuzzy controller (dashed line) when the end effector grasps a glass of wine
3000
1.8 1.6
2500
Applied force (mN)
Slip rate (mm/s)
1.4 1.2 1 0.8 0.6
2000
1500
1000
0.4
500
0.2 0
0 0
0.5
1
1.5
2
2.5
3
0
0.5
1
time (s)
2
2.5
3
(b) Input force
160
4
140
3
Applied motor voltage (V)
Finger distance (mm)
(a) Input slip
120
100
80
60
40
1.5
time (s)
2
1
0
−1
0
0.5
1
1.5
2
2.5
time (s)
(c) Distance between fingertips
3
−2
0
0.5
1
1.5
2
2.5
3
time (s)
(d) End effector motor terminal voltage
Fig. 7. Comparison of typical results of the hybrid fuzzy/expert system (solid line) and the fuzzy controller (dashed line) when the end effector grasps a metal can
intervention, which is of sufficient magnitude to cause the system to lose control of the object. Subsequently, the system increases the applied force to regain control. The other occurrences of slippage are because the end effector relaxes too much the
1030
J.A. Dom´ınguez-L´opez and G. Marrufo
fingers in its search for the optimal finger position (i.e., grasping with no slip and minimum applied force). When the system reaches a good finger position, the hybrid fuzzy/expert system keeps its fingers at that position. While the fuzzy controller keeps closing, exceeding the applied force. This leads the system to the crushing state. To reduce the applied force, the fuzzy controller relaxes the fingers but it exceeds and the system is now at the slipping state. Accordingly, the fuzzy controller cycles, going from slipping to crushing and vice versa. This repels in the fuzzy controller failing in two cases: the egg was broken and the metal can was considerably deformed. When the egg was broken, the force drops dramatically and becomes zero — observe Figure 5(b) (dashed line) at 2 s. The mental can suffers its major deformation when the fuzzy controller confuse a force drop due to deformation with a force drop due to a poor grasping at 2.5 s. The hybrid fuzzy/expert system is capable to make this distinction and consequently it success, performing an optimal object grasping.
6 Conclusions In many applications, robotic end effector are required to grasp object optimally, without dropping or crushing them. This has to be achieved even in the presence of disturbance force acting on the object. The variety of objects that can be handled makes impractical to program the system with all the objects it can grasp as well as to fit sensors on the objects. Ideally, the robot should be able to operate in a truly unstructured environment. Therefore, the end effector should be capable to grasp properly any unknown object. A hybrid approach of fuzzy and expert systems has been described. The system uses information from tactile sensors fitted on the end effector to perform the control action. Comparing the performances of the fuzzy controller and the hybrid fuzzy/expert system, the latter is superior in all the tests. The fuzzy block is capable to detect the not touching and slipping states. Now, the expert system #1 detects the crushing state by differentiating between drop in the force due to deformation and poor grasping. This is the key for the success of the hybrid fuzzy/expert system. Although, the proposed approach was tested on a simple 1 DOF gripper, the described approach could be used in more complex mechanisms as the fuzzy/expert system is independent of end effector grasping dynamics. The controller requires only to have the same sensorial information, i.e., it needs information about slip rate, applied force and the distance between fingers. Finally, this system can be expanded to allow the system to improve the fuzzy rule base by learning. The ES1 can provide information of the gripper current state as well as failure situation. Moreover, the ES1 can also be in charge of giving the reward/punishment signal. Thus, the fuzzy controller can be tuned using some kind of learning. Actually, replacing the fuzzy controller for neurofuzzy controller with on-line learning, the system will be more robust and have the capability to adapt to different object shapes.
Hybrid Fuzzy/Expert System to Control Grasping with Deformation Detection
1031
References 1. Thomas G. Zimmerman, Joshua R. Smith, Joseph A. Paradiso, David Allport, and Neil Gershenfeld. Applying electric field sensing to human-computer interfaces. In Proceedings of ACM Conference on Human Factors in Computing Systems (CHI ’95), pages 280–287, Denver, CO, 1995. 2. Ulrich Nehmzow. Mobile Robotics: A Practical Introduction. Springer-Verlag, London, UK, 2000. 3. A. Bicchi. Hands for dexterous manipulation and powerful grasping: A difficult road towards simplicity. IEEE Transactions on Automatic Control, 45(9):652–662, 2000. 4. Venketesh N. Dubey. Sensing and Control Within a Robotic End Effector. PhD thesis, University of Southampton, Southampton, UK, 1997. 5. J. A. Goguen. On fuzzy robot planning. In Lotfi A. Zadeh, King-Sun Fu, Kokichi Tanaka, and Masamichi Shimura, editors, Fuzzy Sets and their Applications to Cognitive and Decision Processes, pages 429–448. Academic Press, New York, NY, 1975. 6. C. W. de Silva. Applications of fuzzy logic in the control of robotic manipulators. Fuzzy Sets and Systems, 70(2-3):223–234, 1995. 7. D. Kim and S. Rhee. Design of a robust fuzzy controller for the arc stability of CO2 welding process using Taguchi method. IEEE Transactions on Systems, Man, and Cybernetics – Part B: Cybernetics, 32(2):157–162, 2002. 8. E. H. Mamdani. Twenty years of fuzzy control: experiences gained and lessons learnt. In Proceedings of IEEE International Conference on Fuzzy Systems, volume 1, pages 339–344, San Francisco, CA, 1993. 9. Jan Jantzen. Design of fuzzy controllers. Technical Report 98-E-864 (design), Technical University of Denmark, Department of Automation, Lyngby, Denmark, 1998. 10. D. Driankov, H. Hellendoorn, and M. Reinfrank. An Introduction to Fuzzy Control. SpringerVerlag, New York, NY, 1993. 11. Venketesh N. Dubey, Richard M. Crowder, and Paul H. Chappell. Optimal object grasp using tactile sensors and fuzzy logic. Robotica, (17):685–693, 1999. 12. Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 2000. 13. C. J. Harris, X. Hong, and Q. Gan. Adaptive Modelling, Estimation and Fusion from Data: A Neurofuzzy Approach. Springer-Verlag, Berlin and Heidelberg, Germany, 2002.
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper Jorge Axel Dom´ınguez-L´opez Centro de Investigaci´on en Matem´aticas (CIMAT), Callejon de Jalisco s/n, Guanajuato CP36240, Mexico [email protected]
Abstract. Advanced robotic systems require an end effector capable of achieving considerable gripping dexterity in unstructured environments. A dexterous end effector has to be able of dynamic adaptation to novel and unforeseen situation. Thus, it is vital that gripper controller is able to learn from its perception and experience of the environment. An attractive approach to solve this problem is intelligent control, which is a collection of complementary ’soft computing’ techniques within a framework of machine learning. Several attempts have been made to combine methodologies to provide a better framework for intelligent control, of which the most successful has probably been that of neurofuzzy modelling. Here, a neurofuzzy controller is trained using the actor-critic method. Further, an expert system is attached to the neurofuzzy system in order to provide the reward signal and failure signal. Results show that the proposed framework permits a transparent-robust control of a robotic end effector.
1 Introduction Robotic end effectors work in a diversity of applications in which they are required to perform dexterous manipulation of various objects under a diverse range of conditions. Ideally, they should be capable of considerable gripping dexterity in a truly unstructured environments, where novel and unforeseen situations frequently arise. Accordingly, the robot gripper should have dynamic adaptation to these situations as well as to environmental changes. In addition, the end effector should be insensitive to external disturbances. To achieve this flexibility is necessary to apply a control strategy based on automatic learning through interaction between the end effector and its environment. Reinforcement learning, a direct adaptive control method for optimal control problems, is the learning approach used here for on-line adaptation. In addition, a neural network, a neurofuzzy control and an expert system are fused into a hybrid framework to combine the advantages of these techniques. The union of neural network methods with fuzzy logic, which is termed neurofuzzy systems, is probably the most successful combination of ’soft computing’ techniques [1, 2]. Neurofuzzy systems embodies the well established modelling and learning capabilities of NNs with the transparent knowledge representation of fuzzy systems. The fuzzy system is defined as a neural A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1032–1041, 2005. c Springer-Verlag Berlin Heidelberg 2005
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper
1033
network type structure keeping its fundamental components. The addition of the expert system to the neurofuzzy controller is proposed in order to provide the reward and failure signals, which are required for reinforcement training.
2 Neurofuzzy Controller Fuzzy systems have a number of advantages over traditional techniques that make them an attractive approach to solve several problems. Some of these general advantages are their ability to model complex and/or non-linear problems, mimic human decisions handling vague concepts, capacity to deal with imprecise information, etc. Nevertheless, they have also several disadvantages including mathematical opaqueness, they are highly abstract and heuristic, they need an expert (or operator) for rule discovery, the set of rules is often very difficult to determine and lack of self-organising and self-tuning mechanisms. To overcome these disadvantages but keeping the advantages, different approaches based on the idea of applying learning algorithms to fuzzy systems have been considered. Probably, the most successful approach is that of neurofuzzy modelling [1, 2], which incorporates a fuzzy system with artificial neural networks. The result is an approach that embodies the well established modelling and learning capabilities of NNs with the transparent knowledge representation of fuzzy systems. The fuzzy system is defined as a neural network type structure keeping its fundamental components. Figure 1 shows the implementation of a neurofuzzy system. Each circle represent a fuzzy neuron, i.e., the neuron activation function is a fuzzy operation (e.g., fuzzification, inference, defuzzification).
Inputs
Fuzzification Layer
Fuzzy Rule Layer
Defuzzification Layer
Output
Rule 1 Z
VS
NVS Rule 2 Z
Force
S
Rule 3 VS
M S
Motor Voltage
L M Z L Slip
S VL
M
L
Rule 20
VVL
Fig. 1. Neurofuzzy network used for the gripper controller problem. Connections between the fuzzification layer and the rule layer have fixed (unity) weight. Connections between the rule layer and the defuzzification layer have their weights adjusted during training.
Once, the neurofuzzy controller has been designed and constructed, the objective of the selected learning algorithm is to determine the appropriate values for the parameters of the membership functions and the linking weights. The weights of the
1034
J.A. Dom´ınguez-L´opez
antecedent and consequent require as many parameters as modifiable parameters of the membership. So, it is common that instead of a weight vector, w, it is a weight matrix, w. For instance, the triangular membership functions have three parameters that can be updated. This leads to have several free parameters to update, slowing the learning process. In addition, the resulted membership distribution may not be as transparent as with the designer’s distribution. For example, in [3], before learning, the membership ‘positive small’ is in the positive region of the universe of discourse but, after learning, it is in the negative region, losing its meaning. This can be corrected if the system is able to correct inappropriate definitions of the labels. Contrarily, if the neurofuzzy system has only one modifiable weight vector (i.e., the rule confidence vector), leaving the other vectors and the fuzzy memberships fixed, it can still describe completely the input-output mapping for a nonlinear arbitrary non-linear function [1]. Moreover, the neurofuzzy system has a faster learning than a neurofuzzy system with several modifiable weight vectors. Now, the use of rule confidences rather than a weight vector allows the model to be represented as a set of transparent fuzzy rules [1]. However, using a rule weight vector reduces considerable the storage requirements and the computational cost [2– p. 92]. Nevertheless, it is possible to alternate between the rule weight vector and the rule confidence without losing any information. The transformation from the weight vector, wi , to the vector of rule confidence, ci , is a one-to-many mapping. The weight vector can be converted into confidences by measuring its grade of membership to the various fuzzy output sets, μB j (·): cij = μB j (wi ) The inverse transformation, from ci to wi , is given by: wi =
cij yjc
j
where yjc is the centre of the jth output set μB j (u) which has bounded and symmetric membership functions.
3 Reinforcement Learning There are occasions when input-output knowledge is hard to obtain or is not available at all. Also, when the environment changes, new training data must be obtained and the system retrained. If training is off-line (stopping the execution of the activity), the system misses the opportunity for self-retuning and reorganisation, so as to adapt to environmental changes. As manipulators and end effector work in unstructured environments where novel and unforeseen situations frequently arise, their controller should be able of dynamic adaptation, that is, learning should be on-line and unsupervised. Reinforcement learning (RL) is the natural framework for the solution of the on-line learning problem. The system trained with RL is capable to automatically learn appropriate behaviour based on continued feedback from the environment. Evaluating whether the previous action was good or not, the system receives a reward
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper
1035
or punishment; this is known as the reinforcement signal [4]. The behaviour can be learned once for all or the learning algorithm can keep on adapting as time goes by. There are many different algorithms that tackle this issue. As a matter of fact, a specific type of problem defines reinforcement learning, and all its solutions are classed as reinforcement learning algorithms. In the problem, a system is supposed to decide the best action to select based on its current state. When this step is repeated, the problem is known as a Markov decision process [5]. In fact, the environment is expressed as a Markov decision process (MDP), i.e., a stochastic environment where the changes are described by transition probabilities. A MDP has a sequence of timestermed decision points. At each decision point, the controller has to choose an action based on the environmental information (i.e., state). After performing the action at , the system receives an immediate reinforcement, rt . The taken action affects the subsequent state st+1 . The probability distribution of the reinforcement rt and the subsequent state st+1 depends only on the starting state st and the taken action at . The objective of the system (controller or agent) is to maximise the sum of discounted rewards [6]. RL has the advantage of being a natural approach to learning because it mimics the way humans and animals learn: optimising the action selection mechanism (task, performance) through trial and error while interacting with the environment. Other advantages of RL strategies are: they minimise the need for human intervention; they converge to an optimal policy, at least under certain assumptions [7].
4 Actor-Citric Method Actor-critic methods are temporal-difference learning techniques that have two separate memories in order to represent the policy independently of the value functions [7]. One is the policy structure, which is the actor, and the other is the estimated value function, which is the critic. The former learns to choose the optimal action in each state while the latter estimates the long-term reward for each state. Figure 2 shows the architecture of the actor-critic method. The critic generates a scalar signal (i.e., TD error) that drives all the learning in both actor and critic. TD error is used to strengthen or weaken the tendency to select action at .
Actor TD error state
Critic reward
Environment Fig. 2. Actor-critic architecture
action
1036
J.A. Dom´ınguez-L´opez
5 Neuro-Fuzzy-Expert Framework The implementation of the actor-critic is based on the well-known GARIC architecture [3]. Figure 3 shows the proposed framework which combines neural methods, fuzzy logic and expert systems in an actor-critic structure. It consists of a neurofuzzy controller (actor) and a neural network that criticises the actions made by the neurofuzzy controller. The neurofuzzy controller is an expansion to the original GARIC architecture. In addition, an expert system augments the conventional GARIC architecture to provide the reward and failure signals needed for reinforcement training both the actor and critic. The output of the actor and critic feed into the Stochastic Action Modified (SAM), which gives a stochastic deviation to the output of the fuzzy controller, so the system can have a better exploration of the state space and a better generalisation ability [3]. The numerical amount of deviation, which is used as a learning factor for the neurofuzzy controller, is given by: y ∗ (t) − y ∗ (t) e−ˆr(t−1) ∗ Instead of using y (t) as output, the control action applied to the system is y ∗ (t), a Gaussian random variable with mean y ∗ (t) and standard deviation e−ˆr(t−1) . This leads to the action having a large deviation when the last taken action was bad, and vice versa. In this way, the SAM solves stochastically the exploration-exploitation dilemma: Neither exploration of the parameter space to learn new capabilities nor exploitation of what has already been learned can be pursued exclusively. s(t) =
f (t)
Actor (neurofuzzy controller)
s(t)
v (t-1)
Critic (neural predictor)
r (t)
^r(t)
Stochastic Action Modifier
failure (t-1) f’(t)
Failure and Reward (expert detector)
state(t-1)
Sample and hold
state(t)
Environment
Fig. 3. Framework of the Neuro-Fuzzy-Expert controller
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper
1037
5.1 Determining Reward and Failure Signals The majority of modern reinforcement learning is based on finite Markov decision processes [7]. A finite MDP is defined by the state and action sets, and by the onestep dynamics of the environment. For the controller of a robotic gripper, the state set is S = {nottouching, slipping, crushing, OK}, and the system decisions are grip, release and keep steady. To determine the current and the next state as well as to provide the reward and failure signals, a expert system is proposed. The expert system utilises the information from three sensors (i.e., slip rate, applied force and finger position) to produce the outputs (i.e., reward and failure signals). The design of the expert system is based on our experience from previous works in fuzzy and neurofuzzy controllers for robotics grippers. The states slipping and not touching are easily detected: When the output of the slip sensor is non-zero the object is slipping, and when the output of the force sensor is zero the gripper is not touching the object. Crushing is considerably more difficult to detect in a truly unstructured environment. Current approaches to detect deformation are ad hoc and limited to a small set of predetermined objects [8]. To allow the expert system to estimate when the grasped object is being crushed, we use the following knowledge from our experimentation: When the object starts to be deformed, the applied force drops despite the fingers close; when slip is induced (either by a external force acting on the object or end effector acceleration) the applied force drops. In this way, the expert
Table 1. Expert system rule base with reward values Rule.1
IF applied force=0
THEN system is at not touching state
Rnot
Rule.2
IF applied force=0 AND slip rate=0
THEN system is at slipping state
Rslip
Rule.3
IF applied force drops AND slip rate=0
THEN system is at crushing state
Rcrush
IF applied force increases AND finger position change is ‘nil’ or ‘small’
THEN system is at crushing state
Rcrush
IF applied force=0 AND slip has become zero
THEN system is at OK state AND do not squeeze more
ROK
IF system is NOT at not touching state AND system is NOT at slipping state AND system is NOT at crushing state
THEN system is at OK state
ROK
Rule.4 Rule.5 Rule.6
Situation.1 IF applied force has become zero AND slip is zero
THEN system has failed: object broken
Rfail
Situation.2 IF applied force has become zero AND slip was =0
THEN system has failed: object dropped
Rfail
Situation.3 IF distance between fingers reduces considerably THEN system has failed: AND applied force=0 object crushed
Rfail
1038
J.A. Dom´ınguez-L´opez
system can identify a drop in the force due to deformation and a drop in the force due to poor grasping. Accordingly, Table 1 shows the manually developed rule-base of the expert system. Rstate is the reward for being at that state. 5.2 Learning in the Critic The critic is implemented as a neural predictor, which has a structure like the one shown in Figure 4. The critic is a predictor that indicates the current state ‘goodness’. The critic maps the input state vector to the external error signal r(t). This mapping gives a scalar score, rˆ(t), which is used to update the actor weight vector: ⎧ start state ⎨0 failure state (1) rˆ(t) = −r(t) − v(t − 1) ⎩ −r(t) + γv(t) − v(t − 1) otherwise where v(t) is the network output, which is used as a prediction of future reinforcement (a measure of state goodness), and γ is a discount rate used to control the balance between long-term and short-term consequences of the system’s actions [9]. The failure state indicates that the system has to be restarted, i.e., the gripper has to grip the object anew because it either crushed it or dropped it. The system detects that it has dropped the object when the force signal changes from a positive value to zero, while for the failure situation of crushing, the operator indicates to the system that it has crushed the object. This network fine-tunes the rule confidence vector. Its input variables are the normalised measurements of the slip rate, the applied force to the object and the applied motor voltage. The hidden layer activation function is a sigmoidal function: yj (t) =
1 1 + exp
3 i=1
aij (t)xi (t)
bi (t) = bi (t − 1) + β1 rˆ(t)xi (t − 1) cj (t) = cj (t − 1) + β1 rˆ(t)zj (t − 1) aij (t) = aij (t − 1) + β2 rˆ(t)Zj (t − 1)xi (t − 1) for i = 1, 2, 3 and j = 1, . . . , 5 where Zj (t − 1) = zj (t − 1)sgn(cj (t − 1))xi (t − 1). In this work β1 and β2 were 0.3 and 0.4, respectively. 5.3 Learning in the Actor The actor is implemented by a neurofuzzy controller that performs all the control operations. Its structure is shown in Figure 1. Its parameters are updated according the signal received from the critic. As said previously, we prefer to learn in the rule weight vector because the learning process is faster, less memory is required, and the meaning of the linguistic tags are not lost. Now, we want to maximise v(t), the output
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper
1039
z1 a11 x1
c1
a12
z2
(Slip)
c2
x2
c3
z3
v(t)
(Force)
c4 z4
x3 (Voltage)
a35
c5
z5
b1 b2 b3
Fig. 4. The critic consists of a neural network predicting future reward, v(t), which is combined with the reward signal, r(t), from the expert system to produce an ‘internal’ reward signal, rˆ(t), as described by Equation 1
∂v(t) of the critic. As the change in the rule weight vector is proportional to ∂w , the i (t) updating of its modifiable parameters (i.e., rule confidence vector) is in the direction which increases v(t):
Δωij (n) = η
n t=0
αn−t rˆ(t)s(t)
∂v ∂ωij (n)
where both η is the learning-rate parameter and α is a momentum constant.
6 Experimental Set-Up The experimentation has been undertaken on a simple, two-fingered end effector. The end effector was fitted with a slip, force and finger position sensors. The slip sensor is located at the left finger and is based on a rolling contact principle. The slip sensor has an operational range of 0 to 80 mm.s−1 and sensitivity of 0.5 mm.s−1 . The applied force is measured using strain gauges on the end effector structure. The force sensors have a range of 0 to 3.0 N, with a resolution of 1 mN. The position of the fingers is determined using a slider potentiometer mounted on the end effector’s lead screw actuator. This sensor has a range of 0 to 154 mm with a resolution of 5 mm. The implemented neurofuzzy control system has two inputs, the object’s slip rate and the applied force, and one output, the required motor voltage. Triangular membership functions were chosen for all signals because of their simplicity and economy. The linguistic variables used for the term sets are simply value magnitude components: Zero (Z), Almost Nil (AN), Small (S), Medium (M) and Large (L) for the fuzzy set slip while for the applied force they are Z, S, M and L. The output fuzzy set, i.e., the applied motor voltage, has the set members Negative Very Small (VS), Z, Very Small (VS), S, M, L, Very Large (VL) and Very Very Large (VVL). This set has more members in order to have a smoother output.
1040
J.A. Dom´ınguez-L´opez
7 Performance of the Learned Solution Since reinforcement learning is on-line, the concept of stopping criterion does not apply, as learning, in principle, carries forever. Nevertheless, to access results, the learning process was stopped when the rule confidence has stabilised. Thus, the rule-base and confidences achieved after (approximately 10 min of) training are given in Table 2.
Table 2. Rule-base and (in brackets) rule confidences found after training
Voltage Z
Z L (0.1) VL (0.6) VVL (0.3) AN L (0.2) VL (0.8)
Slip S
M (0.1) L (0.9) M L (0.2) VL (0.8) L VL (0.3) VVL (0.7)
Fingertip force S M S (0.1) NVS (0.4) M (0.4) Z (0.6) L (0.5) S (0.3) Z (0.2) M (0.5) VS (0.5) L (0.2) S (0.3) M (0.3) S (0.3) L (0.7) M (0.7) L (0.3) M (0.4) VL (0.7) L (0.6) L (0.2) L (0.7) VL (0.8) VL (0.3)
L NVS (0.8) Z (0.2) NVS (0.1) Z (0.7) VS (0.2) VS (0.5) S (0.5) S (0.4) M (0.6) M (1.0)
A typical performance of the gripper controller is shown in Figure 5. After the object has been grasped, slip is induced manually by pulling on it at 2.5 and 3.0 s. Figure 5(a) shows such interventions of various degrees of intensity. When the interventions are of sufficient magnitude, they cause the force applied to the object to drop suddenly. The system recognise that these drops in the force is due to bad grasping and so it increases the applied force to regain control. Now, the system was at crushing state at 1.4 and 1.9 s. When the object starts to be deformed, the force applied to the object drops despite the fingers close. The system responds relaxing (opening) the fingers. Once the applied force has stabilised, the system reaches the OK state and then it keeps the fingers steady. The system remains at OK state until a external disturbance acts on the object. Thus, the system achieves a satisfactory grip, avoiding the risk of the object slipping out of the end effector and any possible damage to the object.
8 Conclusions Many applications required a robotic end effector capable of handling unknown object in an optimal way, without dropping or crushing them. The variety of object and the unpredictable environmental conditions make impossible to foreseen all the possible situations and so to program the end effector controller in advance. Consequently, such robotic systems need to learn on-line from interaction from their environment.
Adaptive Neuro-Fuzzy-Expert Controller of a Robotic Gripper
1041
2500
1.8 1.6
2000 Applied force (mN)
1.4 Slip rate (mm/s)
1.2 1 0.8 0.6
1500
1000
0.4
500
0.2 0
0
0.5
1
1.5
2
2.5
3
0
3.5
0
0.5
1
1.5
Time (s)
2.5
3
3.5
(b) Input force
160
4
140
3 Applied motor voltage (V)
Finger distance (mm)
(a) Input slip
120
100
80
60
40
2 Time (s)
2
1
0
−1
0
0.5
1
1.5
2
2.5
3
3.5
Time (s)
(c) Distance between fingertips
−2
0
0.5
1
1.5
2
2.5
3
3.5
Time (s)
(d) End effector motor terminal voltage
Fig. 5. Performance of the end effector using the fuzzy controller
To achieve robust and transparent control we have described the application of unsupervised reinforcement learning together with a hybrid control system. Results show that the system performs a satisfactory grip with minimum risk of slippage and crushing thanks to the ability of the expert system to detect the difference between drop in the force due to bad grasping and deformation. In addition, the system is able to react to external disturbances. This ability to react to external disturbances was observed in Figure 5 where object suffer induced slippage (see Figure 5(a)) and the gripper was able to regain control by increasing the applied force (see Figure 5(b)).
References 1. Martin Brown and Chris J. Harris. Neurofuzzy Adaptive Modelling and Control. Prentice Hall International, New York, NY, 1994. 2. C. J. Harris, X. Hong, and Q. Gan. Adaptive Modelling, Estimation and Fusion from Data: A Neurofuzzy Approach. Springer-Verlag, Berlin and Heidelberg, Germany, 2002. 3. H. Berenji and P. Khedkar. Learning and tuning fuzzy logic controllers through reinforcements. IEEE Transactions on Neural Networks, 3(5):724–740, 1992. 4. D. De Ridder. Shared Weights Neural Networks in Image Analysis. Master’s thesis, Delft University of Technology, Delft , The Netherlands, 1996. 5. S. Singh, P. Norving, and D. Cohn. A tutorial survey of reinforcement learning. Sadhana, 19(6):851–889, 1994. 6. C. J. C. H. Watkins. Automatic learning of efficient behaviour. In Proceedings of First IEE International Conference on Artificial Neural Networks, pages 395–398, London, UK, 1989. 7. Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 2000. 8. Ulrich Nehmzow. Mobile Robotics: A Practical Introduction. Springer-Verlag, London, UK, 2000. 9. Simon Haykin. Neural Networks A Comprehensive Foundation. Prentice-Hall, Upper Saddle River, NJ, 1999.
A Semantically-Based Software Component Selection Mechanism for Intelligent Service Robots1 Hwayoun Lee, Ho-Jin Choi, and In-Young Ko Information and Communications University, 119 Munjiro, Yuseong-gu, Daejeon, 305-732, Korea {leehy, hjchoi, iko}@icu.ac.kr
Abstract. Intelligent service robots (ISRs) adapt to unpredictable environments by determining how to resolve the problems occurred in a troubled situation. As a way to successfully and continuously provide services, we envisage the software system embedded in a robot to dynamically reconfigure itself using new components selected from component repositories. This paper describes a component selection mechanism, which is an essential function to support such dynamic reconfiguration. We adopt a semantically-based component selection mechanism in which situational information around ISRs is represented as critical semantic information for the service robots to select software components.
1 Introduction Intelligent service robots (ISRs) sense environments, recognize problems in a troubled situation, determine how to resolve the problems and perform relevant behaviors to overcome the difficulty. The real environment around an ISR is highly unstructured and unknown. In order to adapt to such an unpredictable environment, an ISR aims to execute multiple tasks for multiple purposes, thus requires an extremely complex system of diverse software components [1]. For this kind of ISRs, it would be impossible to pre-code all the robot behaviors. In case of single-purpose and fixedarchitecture systems, a robot can perform well a set of specific tasks which are known under a static environment, but may not perform well on some other tasks under different environments. In a dynamic environment, a robot with the ability to reconfigure its software to suit to the environment is more likely to succeed than one having software with fixed architecture [2]. However the software in an ISR cannot have all sorts of functionality for diverse situations since it is impossible to anticipate all unexpected situations. Therefore, an ISR should be able to reconfigure its software dynamically. Here, dynamic reconfiguration means that an ISR reconfigures its software during execution without interruption of its services. This paper describes a component selection mechanism, which is an essential function to support such dynamic reconfiguration. When an ISR recognizes a troublesome 1
This research was performed for the Intelligent Robotics Development Program, one of the 21st Century Frontier R&D Programs funded by the Ministry of Commerce, Industry and Energy of Korea.
A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1042 – 1051, 2005. © Springer-Verlag Berlin Heidelberg 2005
A Semantically-Based Software Component Selection Mechanism for ISRs
1043
situation through its environment recognition part, it searches component repositories for appropriate components to adapt to the situation, and reconfigures its software system. In this paper, a software component represents one specified non-complex robot behavior. We develop the “Component” ontology tree with reference to specifications of real robot software components. Existing component selection mechanisms have limitations of low recall and precision rates because they do not take into account relevant domain information. To improve the inefficiency, semantically-based approaches of component selection are proposed in [6, 9]. For the component selection in the ISR domain, we follow the semantically-based approach which utilizes situational information around ISRs to minimize the inefficiency in the existing mechanisms. However, it was difficult to apply the techniques in these approaches directly to our ISR domain because of the difference of required information for component selection. The remainder of this paper is organized as follows. Section 2 describes related works and limitations of existing component selection mechanisms. Section 3 proposes our semantically-based approach for component selection, and presents the mechanism and an illustrative example. Section 4 concludes the paper.
2 Limitations of Existing Selection Mechanisms There have been many efforts to support search and retrieval mechanisms for component services. The existing approaches can be classified into four types [3]: the simple keyword and string based search [4], faceted classification and retrieval [5, 6], signature matching [7], and behavioral matching [8]. Although these approaches provide models to represent essential properties of component services, and support mechanisms to match services against a set of requirements, they cannot be universally applied to different domains. The main reason is that they need to be customized or extended based on domain knowledge. Application of an existing component selection mechanism to a domain without any extension based on domain-specific knowledge may result in lowering the recall and precision rates of component search [9]. The recall rate means the ratio between the number of relevant components retrieved and the number of relevant components that are available in a library. The precision rate is defined as the ratio between the number of relevant components found and the number of trials of retrieving components. The existing approaches also do not support a query relaxation mechanism (see Section 3.3 for more details), which is one of the key factors to improve the performance of component search. Although there exist semantically-based component selection mechanisms developed in the areas of component based software and Web services [9, 10, 11], it is hard to apply the methodologies to the ISRs domain. It is because, to use the approaches, users must participate in selecting components during the design and development of software systems. The existing approaches mostly focus on representing user requirements and matching them against component descriptions. The work presented in this paper also adopts a semantically-based component selection mechanism. However, we mainly focus on modeling, representing and utilizing situation information around a robot. In the ISRs domain, it is critical to consider situation information
1044
H. Lee, H.-J. Choi, and I.-Y. Ko
(internal status and environmental conditions) in selecting appropriate components to overcome the situation. In this approach, when a robot encounters a problem, the component broker searches for components based on the situation information without user’s intervention. Especially, we use an ontology-based approach to represent semantically enriched situation information for ISRs.
3 A Component Selection Mechanism for Intelligent Service Robots 3.1 A Semantically-Based Approach To enable service robots to recognize a situation that they face, it is essential to extract a set of semantic elements from a sensed environment, and to combine them together to formulate an integrated semantics of the situation. Based on the situational semantics recognized, an ISR can plan for a series of actions to overcome the situation. We use an ontology-based approach to represent the semantics of situations around a service robot and the functionalities of component services. We analyzed possible navigational scenarios of service robots to identify a set of essential properties to characterize the situations that may occur. In addition, we analyzed a set of software components developed for controlling the navigational behaviors of service robots, and produced a model to represent functionalities of the components. Based on these analyses, we have defined the ‘Situation’ and ‘Component’ ontologies to represent the semantics of situations and component functionalities, respectively. We also have defined the ‘Reconfiguration Strategy’ ontology to connect the situational semantics identified to a type of software components that can be used to handle the situation. This makes the component selection mechanism flexible and scalable by loosely coupling component functionalities from situations. The main focus of this paper is in the models that we developed for describing the three ontologies (called the ISRs ontologies), and the semantic relaxation mechanism that we used to improve the recall and precision rates in selecting components. Fig. 1 shows the hierarchies of the ISRs ontologies that we defined. During the process of developing the semantic description models, we analyzed the possible scenarios of using the ontologies to dynamically determine the action of reconfiguring robot software to handle a certain set of situations. For instance, when a robot faces an obstacle while navigating to a destination, the robot needs to consider the distance between the obstacle and the wall to decide an appropriate action to avoid the obstacle. To handle this kind of situation, the Situation ontology need to have a property that represents the distance between objects in consideration. All three ontologies have the ‘name’ property that is for representing the name of an ontology node in the hierarchies. Situation and Reconfiguration Strategy ontologies include generic properties such as ‘geometry’, ‘kinematics’, ‘dynamics’ and ‘task’ that are necessary to characterize the types of situations. The ‘geometry’ property can be used to represent geometrical characteristics such as points, lines, angles, surfaces and solidity of the robot itself and other objects in the environment [12]. The ‘kinematics’ property represents the basic motions of a robot in handling a subject
A Semantically-Based Software Component Selection Mechanism for ISRs
1045
[13]. The ‘dynamics’ property describes the forces and their relations primarily to a motion [12]. The ‘task’ property is for describing a robot task which is a sequence of unit behaviors such as exploration and searching for an object. There are properties that describe relationships between ontologies. The ‘required strategy’ property in the Situation ontology is for specifying an appropriate reconfiguration strategy for a situation, and the ‘support strategy’ property in the Component ontology is for describing the reconfiguration strategies that a component can support. 3.2 The ISRs Ontologies The ISRs ontologies consist of the Situation, Reconfiguration Strategy and Component ontologies (Fig. 1). The ontologies are described in RDF (Resource Description Framework), which is the framework for representing semantic information on the Web [14]. We also used the Protégé tool to edit the ontologies. The Protégé tool provides a set of graphical user interfaces that allow users to construct domain ontologies, to customize data entry forms, and to enter data for ontology definitions [15].
Fig. 1. The ISRs Ontologies
The Situation ontology conceptualizes situations around ISRs in a dynamic environment. There are two types of situations: external and internal situations. An external situation is normally caused by a set of conditions that are monitored from the external environment of a robot, and an internal situation is generated by an exceptional condition occurred in the robot software system. The Reconfiguration Strategy ontology describes the possible solutions to the exceptional situations. A reconfiguration strategy describes an action to switch between tasks to handle a situation. For example, when an ISR meets an obstacle while exploring, the Reconfiguration Strategy ontology suggests changing its task from exploration to manipulation of the obstacle. As we discussed earlier, the indirect connection between Situation and Component ontologies via the Reconfiguration Strategy ontology gives flexibility to the component selection.
1046
H. Lee, H.-J. Choi, and I.-Y. Ko
The Component ontology classifies functionality of unit behaviors of a robot. There are two main branches in the Component ontology: behavioral and processing components. Behavioral components represent the navigational and manipulation actions of a robot. Processing components represent the functionalities to collect and analyze information around an ISR. There are other ontologies that we defined to represent the geometry, kinematics, dynamics, and task properties. We do not explain about them in details in this paper due to the limited space. 3.3 Component Selection Steps When a situation is identified by matching the internal and external conditions monitored against the Situation ontology, a set of reconfiguration strategies are selected based on the predefined connections between the Situation and Reconfiguration Strategy ontologies. A set of candidate components that support the reconfiguration strategies are then collected based on the relationships between the Reconfiguration Strategy and Component ontologies. The following explains the detail steps of component selection, and Fig. 2 illustrates these steps graphically: i. A situation, si is located in the Situation ontology based on the conditions monitored from an environment. ii. A reconfiguration strategy, ri that are directly related to the situation (si) is identified in the Reconfiguration Strategy ontology. iii. The reconfiguration strategy, ri is relaxed to include the most general node, rj, which has the same set of properties as ri. All child nodes of ri, rc (c = 1… n) including ri itself are selected as possible reconfiguration strategies. iv. For all the possible reconfiguration strategies, semantic distances (ISR_SemDist, which will be explained later in this section) are measured. v. A reconfiguration strategy, rk, which has the smallest semantic distance (the ISR_SemDist value), is selected. vi. A component, ck, which is corresponded to the selected reconfiguration strategy, is identified as the most suitable component to solve the situation recognized at the first step. In the information and knowledge management area, it has been an issue that queries given by users often fail to specifically describe their information needs. The query relaxation is the mechanism that was developed to extend users queries such that more relevant results can be gathered even though users’ queries are not specific enough to cover what users really want [17]. We have adopted the query relaxation mechanism to our ontology-based component selection mechanism so that a wider range of components can be retrieved and evaluated even though the situation identified based on the environmental conditions does not represent the exact situation that the robot actually faced. Among the several relaxation techniques, we use the edge relaxation method which relaxes an edge of a query ontology tree to make the query less restrictive. Especially, we modified the method by restricting the relaxation based on shared properties of nodes in an ontology hierarchy. In the modified relaxation method (semantic relaxation), an ontology node is relaxed to a node that has the same set of
A Semantically-Based Software Component Selection Mechanism for ISRs
1047
properties as the node that was originally selected by a query. The following paragraphs define our component selection mechanism (including the semantic relaxation) in a formal way.
Fig. 2. An Example of Component Selection
Let si is a node in the Situation ontology (S), ri is a node in the Reconfiguration Strategy ontology (R), and ci is a node in the Component ontology (C). For all si S, ri R, ci C in the ISRs ontologies, there are relations such as ‘required strategy’ between S and R, and ‘support strategy’ between R and C. In addition, we apply the relaxation technique to the Reconfiguration Strategy ontology, R such that for ri R, rc (c=1, …, n) are selected as candidate reconfiguration strategies. If we do not apply the relaxation method and semantic distance measure (see below for details), si is directly mapped to ri, and ri is mapped to ci. When the semantic relaxation is applied, for ri, rc (c = 1, …, n) are considered as candidate reconfiguration strategies. Then, an element of rc (c = 1, …, n) which has the smallest semanticdistance value (the ISR_SemDist value) is determined as the reconfiguration strategy to be used, and in turn, a component corresponding to rk becomes the component to be selected in the Component ontology. rk can be ri or one of rc (c = 1, …, n). The semantic distance is the topological distance between related concepts in an ontology hierarchy [18]. In this paper, semantic distances are measured between nodes in the Reconfiguration Strategy ontology, and between properties. We use a simple semantic-distance measure that counts the number of edges in the shortest path between two nodes in an ontology hierarchy. The shorter the distance, more semantically similar the nodes are. To formally define the semantic-distance measure, let us assume that ri is a reconfiguration strategy that is corresponded to a situation detected, and rj is one of the nodes in the relaxed reconfiguration strategies. Also, let us assume that n is the number of common properties between the situation node and the relaxed reconfiguration strategies, and Pk is one of the common properties. pks is the value of Pk for the
1048
H. Lee, H.-J. Choi, and I.-Y. Ko
situation, and pkj is the value of Pk for rj. A weight value is assigned to each of the properties, and wk is the weight value for the property Pk. We also define wr as the weight value to be considered when the semantic distance between reconfiguration strategies are measured. We define the functions to calculate semantic distances as follows: SemDist(ri, rj) = the smallest number of edges between ri and rj (1) SemDist(pks, pkj) = the smallest number of edges between pks and pkj (2) ISR_SemDist(rj) = wr
SemDist(ri, rj) + (k=1, …, n) wk
SemDist(pks, pkj)
(3)
During the component selection process, a reconfiguration strategy with the smallest ISR_SemDist value is selected, and a component that supports this strategy is selected as the most appropriate component for the situation. 3.4 An Example of Component Selection We illustrate the component selection mechanism using an example.
Fig. 3. Semantic Distance Measurement in the Reconfiguration Strategy Ontology
Let us consider the case when an ISR hits an obstacle while exploring a place, and recognizes the obstacle as a movable object. The situation perceived in this case is EncounteringMovableObstacle (si in Fig. 2) in the Situation ontology. EncounteringMovableObstacle is then mapped to ExploreToMoveObstacle (ri in Fig. 2) in the Reconfiguration Strategy ontology. ExploreToMoveObstacle has a set of dynamics properties such as weight, size, and velocity, and geometry properties such as distance. ExploreToMoveObstacle is relaxed to SolveObstacle (rj in Fig. 2) and thus all subnodes of SolveObstacle are considered as possible reconfiguration strategies, rc (c = 1… n). However, since the task that the robot was performing before hitting the situation is the Exploration task, only the strategies that can switch this task into other tasks will be selected. Therefore, the children of ExploreToManageObstacle, ExploreToAvoidObstacle (r1 in Fig. 3), ExploreToDestroyObstacle (r2 in Fig. 3) and ExploreToMoveObstacle(r3 in Fig. 3) are selected as candidate reconfiguration strategies. In the next step, to measure ISR_SemDist, we firstly calculate the semantic distances between the candidate strategies as represented in Fig. 3.
A Semantically-Based Software Component Selection Mechanism for ISRs
SemDist(r1, r3) = 1+1=2, SemDist(r2, r3) =1+1=2, SemDist(r3, r3) = 0
1049
(4)
Semantic distances between properties are also calculated. We measure the semantic distance between the value of a property of the situation identified and the value of the same property defined for each of the candidate reconfiguration strategies. Let us assume that there are four properties to compare: weight (p1), size (p2), velocity (p3), and distance (p4). For the situation selected, the property values are defined like: p1s, p2s and p3s. For the reconfiguration strategies, r1, r2 and r3, the property values are defined like: p11, p21, p31 and p41 for r1; p12, p22, p32 and p42 for r2; and p13, p23, p33 and p43 for r3. The semantic distances between property values of the situation and reconfiguration strategies can be calculated as follows (Fig. 4): SemDist(p1s, p11)=2, SemDist(p2s, p21)=0, SemDist(p3s, p31)=1, SemDist(p4s, p41)=0 SemDist(p1s, p12)=2, SemDist(p2s, p22)=2, SemDist(p3s, p32)=4, SemDist(p4s, p42)=3 SemDist(p1s, p13)=2, SemDist(p2s, p23)=4, SemDist(p3s, p33)=4, SemDist(p4s, p43)=4 (5) Finally, the ISR_SemDist values between reconfiguration strategies are measured as follows. In this example we assign weight values intuitively based on the priority of considering the properties in the ISRs domain. ISR_SemDist(r1) = 5 SemDist(r1,r3) + 4 SemDist(p1s,p11) + 3 SemDist(p2s,p21) + 2 SemDist(p3s,p31) + 1 SemDist(p4s,p41) = 20 ISR_SemDist(r2) = 5 SemDist(r2,r3) + 4 SemDist(p1s,p12) + 3 SemDist(p2s,p22) + 2 SemDist(p3s,p32) + 1 SemDist(p4s,p42) = 35 ISR_SemDist(r3) = 5 SemDist(r3,r3) + 4 SemDist(p1s,p13) + 3 SemDist(p2s,p23) + 2 SemDist(p3s,p33) + 1 SemDist(p4s,p43) = 23 (6) Since r1 has the smallest semantic distance among candidate reconfiguration strategies, ExploreToAvoidObstacle is selected as a reconfiguration strategy to be used. Finally, the component, AvoidObstacle, which supports the strategy, is selected as the most suitable component for the situation.
4 Conclusions In this paper, we have presented an approach to a semantically-based component selection mechanism for ISRs. In a dynamically changing environment, a robot needs to adapt to the environment by reconfiguring its software components in order to cope with troublesome situations. We regard the situation information around a robot as a critical factor to consider for the reconfiguration and have proposed to represent the information as semantic information using ontology. The ISR ontologies express situations, reconfiguration strategies, and components. We have also proposed techniques of relaxation and semantic distance measure which provide flexibility of component selection based on the ISR ontologies.
1050
H. Lee, H.-J. Choi, and I.-Y. Ko
Fig. 4. Semantic Distances between the Properties of the Situation and Reconfiguration Strategy Ontologies
A Semantically-Based Software Component Selection Mechanism for ISRs
1051
References 1. Lars P., David A., Danica K., Henrik I. C.: Towards an Intelligent Service Robot System. Accepted for International Conference on Intelligent Autonomous Systems (2000) 2. David J. C.: Morphology and Behavior in Distributed Robotic Systems. Ph.D. Thesis Proposal (2004) 3. Hafedh M., Petko V., Anne-Marie D. S., Philippe G.: Automating the Indexing and Retrieval of Reusable Software Components. Proceedings of the 6th International Workshop NLDB’01 Spain (2001) 75-86 4. Mili, A., Mili, R., Mittermeir, R.: Storing and Retrieving Software Components: A Refinement-Based System. IEEE Transactions on Software Engineering, Vol. 23. No. 7, (1997) 445–460 5. Prieto-Díaz R., Freeman, P.: Classifying Software for Reuse. IEEE Software, Vol. 4. No. 1, (1987) 6-16 6. Ostertag, E., Hendler, J., Prieto-Diaz, R., and Braum, C.: Computing Similarity in a Reuse Library System: An AI-based Approach. ACM Transactions on Software Engineering and Methodology, Vol. 1. No. 3, (1992) 205 – 228 7. Zaremski A. M., Wing, J. M.: Signature Matching: A Key to Reuse. Software Engineering Notes, Vol. 18. No. 5, (1993) 182–190. 8. Hall R.J.: Generalized Behavior-Based Retrieval. Proceedings of the Fifteenth International Conference on Software Engineering, Baltimore (1993) 371–380 9. Vijayan S., Veda C. S.: A Semantic-Based Approach to Component Retrieval. ACM SIGMIS Database, Vol. 34. No. 3, (2003) 8-24 10. Paolucci M., Kawamura T., Payne T., Sycara K.: Semantic Matching of Web Services Capabilities. In I. Horrocks and J. Hendler (eds.), Proceedings of the First International Semantic Web Conference, Sardinia, Springer (2002) 333–347 11. Kaarthik S., Kunal V., Amit S., John M.: Adding Semantics to Web Services Standards. In Proceedings of the 1st International Conference on Web Services (2003) 12. Merriam-Webster Online. http://www.m-w.com/dictionary.htm 13. John J. Craig: Introduction to Robotics Mechanics and Control. 3rd edn. Pearson Prentice Hall (2005) 14. Graham K., Jeremy J. C.: Resource Description Framework Concepts and Abstract Syntax. http://www.w3.org/TR/rdf-concepts 15. What is Protégé?. http://protege.stanford.edu/overview 16. Sihem A., SungRan C., Divesh S.: Tree Pattern Relaxation. International Conference on Extending Database Technology (2002) 17. Yangjun C., Duren C., Karl A.: On the efficient evaluation of relaxed queries in biological databases. Proceedings of the Eleventh International Conference on Information and Knowledge Management (2002) 18. Valerie C.: Fuzzy Semantic Distance Measures between Ontological Concepts. Fuzzy Information Processing NAFIPS '04 IEEE, Vol. 2 (2004) 635-640
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments Jorge Corona-Castuera1, Reyes Rios-Cabrera1, Ismael Lopez-Juarez 1, and Mario Peña-Cabrera2 1
CIATEQ A.C. Advanced Technology Center, Manantiales 23A, Parque Industrial Bernardo Quintana, 76246 El Marques, Queretaro, Mexico {jcorona,reyes.rios,ilopez}@ciateq.mx http://www.ciateq.mx 2 Instituto de Investigaciones en Matematicas Aplicadas y Sistemas IIMAS-UNAM, Circuito Escolar, Cd. Universitaria 76246, DF, Mexico [email protected] http://www.iimas.unam.mx
Abstract. Industrial manufacturing cells involving fixtureless environments require more efficient methods to achieve assembly tasks. This paper introduces an approach for Robotic Fixtureless Assembly (RFA). The approach is based on the Fuzzy ARTMAP neural network and learning strategies to acquire the skill from scratch without knowledge about the assembly system. The vision system provides the necessary information to accomplish the assembly task such as pose, orientation and type of component. Different ad-hoc input vectors were used as input to the assembly and the vision systems through several experiments which are described. The paper also describes the task knowledge acquisition and the followed strategies to solve the problem of automating the peg-inhole assembly using 2D images. The approach is validated through experimental work using an industrial robot.
1 Introduction The main concern in robot programming while dealing with unstructured environments lies in achieving the tasks despite of uncertainty in the robot’s positions relative to external objects. The use of sensing to reduce uncertainty significantly extends the range of possible tasks. One source of error is that the programmer’s model of the environment is incomplete. Shape, location, orientation and contact states have to be associated to movements within the robot’s motion space while it is in constraint motion. A representative method for achieving constrained motion in the presence of position uncertainty is well illustrated by Mason [1] and De Schutter [2]. Compliant motion meets external constraints by specifying how the robot’s motion should be modified in response to the forces generated when the constraints are violated. Generalizations of this principle can be used to accomplish a wide variety of tasks involving constrained motion, e.g., inserting a peg into a hole or following a weld seam under uncertainty. The goal of Robotic Fixtureless Assembly (RFA) is to replace constraining features by sensor-guided robots. The term was introduced by Hoska in 1988 [3] which also encourages the use of sensor-guided robots in unstructured environments A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1052 – 1061, 2005. © Springer-Verlag Berlin Heidelberg 2005
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments
1053
avoiding costly fixtures. In this paper we present an RFA approach that uses vision and force sensing for robotic assembly when assembly components geometry, location and orientation is unknown at all times. The assembly operation resembles the same operation as carried out by a blindfold human operator. The approach is divided in four stages as suggested by Doersam and Munoz [4] and Lopez Juarez [5]: Pre-configuration: From an initial configuration of the hand/arm system, the expected solutions are the required hand/arm collision-free paths in which the object can be reached. To achieve this configuration, it is necessary to recognize invariantly the components and determining their location and orientation. Grasp: Once the hand is in the Pre-configuration stage, switching strategies between position/force control need to be considered at the moment of contact and grasping the object. Delicate objects can be broken without a sophisticated contact strategy even the Force/Torque (F/T) sensor can be damage. Translation: After the object is firmly grasped, it can be translated to the assembly point. The possibility of colliding with obstacles has to be taken into account. Assembly Operation: The assembly task requires robust and reactive positions/force control strategies. Mechanical and geometrical uncertainties make high demands on the controller. Our proposal contains all steps mentioned above using vision and force contact sensing. The following section presents related work and outlines our contribution. In Section 3, the robotic testbed is described followed by the description of the assembly methodology provided in Section 4. The pre-configuration for recognition and location of components and the assembly operation are described. Both of them are based on FuzzyARTMAP neural network architecture. The training for assembly operations is autonomously acquired using fuzzy rules with minimum information from real force contacts. The experimental results and analysis which validate our approach are provided in Section 5. Finally, in Section 6 conclusions and future work is presented.
2 Related Work Some researchers have used neural networks for assembly operations, mapping F/T data to motion direction. Gullapalli, [6] used Reinforcement Learning (RL) to control assembly operations with a Zebra robot, where the fixed component position was known. Cervera, [7] employed Self-Organizing Maps (SOM) and RL for assembling different part geometry with unknown location. Howarth, [8] worked with Backpropagation (BP) and RL to control assembly using a SCARA robot, Lopez Juarez [5] implemented Fuzzy ARTMAP to guide and learn insertions with a PUMA robot. Skubic [9] presented a sensor-based scheme for identifying contact formations (CF) which does not use geometric models of the workpieces. The method uses fuzzy logic to model and recognize the sensory patterns and also resolve the inherent ambiguities. In [10], Skubic focus the problem of teaching robots force-based assembly skills from human demonstration to avoid position dependencies. The learning of an assembly skill involves the learning of three functions: 1) The mapping of sensor signals to Single-Ended Contact Formations (SECFs) acquired using supervised learning;
1054
J. Corona-Castuera et al.
2) The sequences of SECFs; and 3) The transition velocity commands which move the robot from the current SECF to the next desired SEFC. The operator demonstrates each SEFC while force data is collected and used to train a state classifier. The classifier is used to extract the sequence of SECFs and transitions velocities which comprise the rest of the skill. On the other hand, the integration of vision systems to facilitate the assembly operations in uncalibrated workspaces is well illustrated by the work of Jörg [11] and Baeten [12] using eye-in-hand vision for different robotic tasks. 2.1 Original Work The grounding idea for the work reported in this paper was to learn the assembly skill from scratch, without any knowledge just asking to do task i.e. “assembly”. For compliant motion, we present an autonomous system to acquire knowledge for task-level programming. The initial mapping between contact states and corrective motions is based on fuzzy rules. Some of the reviewed work in the previous section has been done in simulations and a few with industrial robots. In our approach the generalisation for assembling different types of components is demonstrated as well as the robustness to perform the task since the assembly has always been successful, which is especially important when dealing with real-world operations under extreme uncertainty. It is important to note that the required knowledge for assembly is embedded into the Neural Network Controller (NNC) from the beginning through the contact states of the mating pairs and no supervision is needed. The generalisation of the NNC has been demonstrated by assembling successfully different part geometry using different mechanical tolerances and offsets using the same acquired knowledge base, which has provided an important foundation towards the creation of truly self-adaptive industrial robots for assembly.
3 Workplace Description The manufacturing cell used for experimentation is integrated by a KUKA KR15/2 industrial robot. It also comprises a visual servo system with a ceiling mounted camera as shown in figure 1. The robot grasps the male component from a conveyor belt and performs the assembly task in a working table where the female component is located. The vision system gets an image to calculate the object’s pose estimation and sends the information to the robot from two defined zones: Zone 1 which is located on the conveyor belt. The vision system searches for the male component and determines the pose information needed by the robot. Zone 2 is located on the working table. Once the vision system locates the female component, it sends the information to the NNC. The NNC for assembly is called SIEM (Sistema Inteligente de Ensamble Mecánico) and is based on a FuzzyARTMAP neural network working in fast learning mode [13]. The vision system, called SIRIO (Sistema Inteligente de Reconocimiento Invariante de Objetos), also uses the same neural network to learn and classify the assembly components. The SIRIO was implemented with a high speed camera CCD/B&W, PULNIX 6710, with 640x480 resolution; movements on the X and Y axis were implemented using a 2D positioning system.
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments
1055
b
a
Fig. 1. a) Manufacturing Cell. b) Real picture.
For experimental purposes three canonical peg shapes were used: circular, square and radiused-square as it is shown in figure 2. Both, chamfered and chamferless female components were employed during the work reported in this paper. Radiused-Square
Circular
Square
25 0
12.5R 15
15
15
a
25
b
Units in mm
Fig. 2. a) Assembly components, b) Top view
4 Assembly Methodology 4.1 Pre-configuration Starting from scratch. Initially, the robot system does not have any the knowledge on how to perform the assembly task. To accomplish the very first assembly the robot has to acquire a Primitive Knowledge Base (PKB) using an interactive method. We propose a behaviour-based approach to learn the initial mapping between contact states to motion commands employing fuzzy rules, as the one shown in expression (1) [14]. By using this mapping an Acquired-PKB (ACQ-PKB) is created and later used and refined on-line by the NNC. IF (Fx is pos)and(Fy is med)and(Fz is pos)and(Mx is med)and(My is pos)and(Mz is med) THEN (Dir is X+)
(1)
There are 12 defined motion directions (X+, X-, Y+, Y-, Z+, Z-, Rz+, Rz-, X+Y+, X+Y-, X-Y+ and X-Y-) and for each one there is a corresponding contact state. An example of these contact states is shown in figure 3. The contact states for linear motion X+, X-, Y+, Y-, and linear combined motions X+Y+, X+Y-, X-Y+, X-Y- are shown in figure 3(a). In figure 3(b), it is shown a squared component having four contact points. Figures 3(c) and 3(d) provide additional patterns for rotation Rz- and Rz+ respectively when the component has only one point of contact. The contact state
1056
J. Corona-Castuera et al.
for mapping Z+ is acquired making vertical contact between component and a horizontal surface, Z- direction is acquired with the component is in free space. Figure 3 shows only contact states in a chamfered female squared component, however this approach applies also for chamfered circular and radius-squared components as well as the chamferless components. XX+Y+
Rz-
X+Y-
Y-
Rz+
Y+
RzX-Y+
a
Rz+
X-YX+
b
c
d
Fig. 3. Contacts between chamfered components while acquiring the primitive knowledge base, a) Linear movements, b) Pure rotation Rz+ and Rz-, c) Rotation Rz-, d) Rotation Rz+
Acquiring location and component type. The SIRIO system employs the following methodology: 1. 2. 3. 4. 5. 6. 7. 8.
Finding the region of interest (ROI). Calculate the histogram of the image. Search for pieces. Centroid calculation. Piece orientation. Calculate Boundary Object Function (BOF), distances between the centroid and the perimeter points. Descriptor vector generation and normalization (CFD&POSE). Information processing in the neural network.
The descriptive vector is called CFD&POSE (Current Frame Descriptor and Pose) and it is conformed by (2): (2) [CDF & POSE ] = [ D1 , D2 , D3 ,..., Dn , X c , Yc , θ , Z , ID]T where: Di are the distances from the centroid to the perimeter of the object. (180 data) XC, YC, are the coordinates of the centroid. φ, is the orientation angle. Z is the height of the object. ID is a code number related to the geometry of the components. With this vector and following the above methodology, the system has been able to classify invariantly 100% of the components presented on-line even if they are not of the same size, orientation or location and for different light conditions. There are several components patterns to train/recognize as it is illustrated in figure 4. The reader is referred to [15] for complete details. The CFD&POSE vector is invariant for each component and it is used for classification. The vector is normalized to 185 data dimension and normalized in the range [0.0 – 1.0]. The normalization of the BOF is accomplished using the maximum divisor value of the vector distance. This method allows to have very similar patterns as input vectors to the neural network, getting a significant improvement in the operation
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments
1057
system. In our experiments, the object recognition method used the above components having 210 patterns as primitive knowledge to train the neural network. It was enough to recognize the assembly components with ȡa = 0.2 (base vigilance), ȡmap = 0.7 (vigilance map) and ȡb = 0.9 parameters, however, the SIRIO system can recognize more complex components as it is shown in figure 5, where several different animal shapes were used for testing. Same results for invariance and object recognition were obtained. 1
1
1
0.9 0.8
0.9 0.8
0.9 0.8
0.7
0.7
0.7
0.6 0.5
0.6 0.5
0.6 0.5
0.4
0.4
0.4
0.3
0.3
0.3
0.2 0.1
0.2 0.1
0.2 0.1
0
0 1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 171 181
0
1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 171 181
1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 171 181
Fig. 4. Several component representation for training/testing. Left, radiused-square; Middle, circular; Right, square. 1.2
1.2
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0 1
12 23 34 45 56 67 78 89 100 111 122 133 144 155 166 177
1
12 23 34 45 56 67 78 89 100 111 122 133 144 155 166 177
Fig. 5. Complex components for testing and their corresponding CFD&POSE vectors
4.2 Grasp At this stage, the PKB has been acquired and the location information sent to the robot. The motion planning from Home position to zone 1 uses the male component given coordinates provided by SIRIO. The robot uses this information and the F/T sensor readings to grasp the piece and to control the motion in Z direction. 4.3 Translation The translation is similar to the translation to grasp the component in zone 1. The path to move the robot from zone 1 to zone 2 (assembly point) is done by using the coordinates given by the SIRIO system. The possibility of collision with obstacles is avoided using bounded movements. 4.4 Assembly Operation The assembly operation is achieved by the SIEM. The system interacts directly with the robot and F/T readings in real-time. It provides the robot the “touch sense”, and works when the robot has to grasp the piece or assembly it. The robot carries out the assemblies with incremental straight and rotational motions of 0.1 mm and 0.1°, respectively. Rotation around the X and Y axes was avoided so that only straight directions were considered which means that only compliant motion in XY plane and
1058
J. Corona-Castuera et al.
rotation around the Z axis was considered. In order to get the next motion direction the forces are read, normalized and classified using the NNC on-line. The F/T pattern obtained from the sensor provides a unique identification. The F/T vector (3), comprises 12 components given by the 6 data values (positive and negative). T (3) [Current F / T ] = [ fx, fx −, fy, fy −, fz , fz −, mx, mx−, my, my−, mz, mz −] The normalized pattern is used as input to the NNC which associates it with the corresponding motion direction. Figure 6 illustrates some patterns for the initial mapping (PKB) for chamfered and chamferless insertions. For simplicity only major directions are shown (X+, X-, Y+, Y-, Z+, Z-, Rz+ and Rz+). The NNC have security software limits from -40 N to 40 N in force and from -20 N·dm to 20 N·dm in torque. The complete PKB consists 24 patterns for chamfered components and 24 for chamferless components as indicated in section 4.1. Having an assembly system which is guided by compliant motion, the criterion to decide whether the motion is good enough to be learnt is based on the heuristic expression (4), where Finitial and Fafter is a merit figure measured before and after the corrective motion is applied and F is computed using equation (5) as in Ahn’s work [16]. This means that if expression (4) is satisfied then the pattern is learnt.
(F
initial
F=
− Fafter ) ≥ 10
fx 2 + fy 2 + fz 2 + mx 2 + my 2 + mz 2
X+ XY+ YZ+ ZRz+ Rz-
0.7 0.6 0.5 0.4 0.3 0.2 0.1 fx+
fx-
fy+
fy-
fz+
fz-
mx+ mx- my+ my- mz+ mz-
Force Component
Norm alized Force
Normalized Force
0.9 0.8
(5)
Chamferless Assembly PKB
Chamfered Assembly PKB 1
0
(4)
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
X+ XY+ YZ+ ZRz+ Rz-
fx+ fx-
fy+ fy-
fz+ fz- mx+ mx- my+ my- mz+ mzForce Component
Fig. 6. ACQ-PKB obtained from chamfered and chamferless components
5 Assembly Cycles and Results Several tests were carried out to asses the performance. The diameter of the male components was 24.8 mm whereas the diameter of female components were 25 mm, the chamfer was set to 45° and 5 mm width. Results are contained in table 1. In zone 2 the SIRIO only provides location (X,Y) because the female component orientation was fixed, however an error occurs and it is related to the component’s tolerance. The error for the chamfered square component is 0.8°, 0.5° for the chamfered radiusedsquare and 0.4° for the chamferless square and 0.6° for the chamferless radiusedsquare. Error recovery is illustrated in figure 8. The assembly operation ends when ¾ of the body of male component is in the hole, this represents 14 mm. The FuzzyARTMAP NNC parameters were: ȡa = 0.2 , ȡmap = 0.9 and ȡb = 0.9.
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments
1059
Table 1. Eighteen diferent assembly cycles, where IN= Insertion, P=piece, Ch=chamfer present, Time=Assembly cycle time, Time A= Insertion time, NC=correct neural classification, S=square, R=radiused-square, C=circle, N=no and Y=yes # IN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
P Ch S Y S Y S Y R Y R Y R Y C Y C Y C Y S N S N S N R N R N R N C N C N C N
Time (min) 1:15 1:15 1:15 1:11 1:14 1:19 1:15 1:13 1:14 1:18 1:19 1:22 1:22 1:22 1:24 1:17 1:15 1:15
ZONE 1 Error zone 1 ZONE 2 Error zone 2 Xmm Ymm RZ° Xmm Ymm RZ° Xmm Ymm Xmm Ymm 62.4 144.1 10 0.2 -1.3 0 84.6 102.1 0.3 -1 62.4 45.7 12 1.8 0.2 2 85.6 101.1 -0.7 0 178.7 47.7 23 0.9 -0.8 3 84.7 100.9 0.2 0.2 181.6 147 29 -0.3 -0.7 -1 84.7 100.6 0.2 0.5 62.4 145.1 36 0.2 -0.3 -4 84.9 100.7 0 0.4 67.3 44.8 48 3.1 -0.7 -2 85.3 101.6 -0.4 -0.5 180.6 49.6 57 1 1.1 -3 84.6 102.4 0.3 -1.3 180.6 148 77 -0.7 0.3 7 84.3 101 0.6 0.1 61.5 146 79 -0.7 0.6 -1 83.9 101.6 1 -0.5 63.4 45.7 83 -0.8 0.2 -7 85.4 100.5 -0.5 0.6 179.6 48.6 104 0 0.1 4 83.2 100.8 1.7 0.3 180.6 147 104 -0.7 -0.7 -6 83.2 101.8 1.7 -0.7 61.5 146 119 -0.7 0.6 -1 84.8 102.8 0.1 -1.7 63.4 43.8 126 -0.8 1.7 -4 83.6 101.8 1.6 -0.7 179.6 47.7 138 0 -0.8 -2 83.2 101.7 1.7 -0.6 182.6 149 150 1.3 1.3 0 83.7 101.2 1.2 -0.1 63.4 146 155 1.2 0.6 -5 84.6 100.7 0.3 0.4 64.4 47.7 174 0.2 2.2 4 83.9 101.1 1 0
Time A (sec) 32.5 30.4 31.8 30.1 29.4 29.6 29.6 30.2 30.2 29.9 30.4 34.6 38.3 36.8 36.6 30.5 28.3 29.7
NC Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Table 1 shows the position errors in zone 2 which is represented in figure 7 as the trajectory followed by the robot. The minimum time of assembly cycle was 1:11 min, the maximum was 1:24 min and the average time was 1.17 min. The system has an average angular error of 3.11° and a maximum linear position error from -1.3 mm to 3.1 mm due to the camera positioning system in Zone 1. We improved the results presented in [15]. The force levels in chamferless assemblies are higher than the chamfered ones. In the first one, the maximum value was in Z+, 39.1 N for the insertion number 16, and in the chamfered the maximum value was 16.9 N for the insertion number 9. In chamfered assembly, in figure 7, it can be seen that some trajectories were optimal like in insertions 2, 5, 7, 8 and 9, which was not the case for chamferless assembly; however, the insertions were correctly completed. CHAMFERED ASSEMBLY TRAJECTORY
CHAMFERLESS ASSEMBLY TRAJECTORY
14
22 20
12
18 10
INSERTION CENTER
16
INSERTION CENTER
8
IN 4
4
IN 3
2
IN 8
IN 2 -14
-12
-10
-8
-6
0 -4
-2
0
2
14 12 10
IN 5
4
6
8
10
12
-2 -4
IN 6
IN 9
-6 -8
IN 1
-10 -12
IN 7 -14 POSITION ERROR X (m m /10)
14
POSITION ERROR Y (mm/10)
POSITION ERROR Y (mm/10
6
8
IN 10
6 4
IN 17
IN 11
2
IN 18
0 -22 -20 -18 -16 -14 -12 -10 -8
-6
-4
-2-2 0
IN 10
-4
IN 11
-6
IN 12
-8
IN 13
-10
IN 14
-12
IN 15
-14
IN 16
-16
IN 17
-18
IN 18
-20
2
4
6
8
10 12 14 16 18 20 22
IN 16
IN 12 IN 15
IN 14
IN 13
-22
POSITION ERROR X (mm/10)
Fig. 7. Assembly trajectory in top view for each insertion in zone 2. The trajectory starts with the labels (INx) and ends at 0,0 origin coordinate.
1060
J. Corona-Castuera et al.
In figure 8, each segment corresponds to alignment motions in other directions different from Z-. The radial lines mean the number of Rz+ motions that the robot performed in order to recover the positional error for female components. The insertion paths show how many rotational steps are performed. The maximum alignment motions were 22 for the chamfered case in comparison with 46 with the chamferless component. ROTATION AXIS Z CHAMFERED ASSEMBLY
ROTATION AXIS Z CHAMFERLESS ASSEMBLY
1 23 22
12
1
2 3
10
21
IN 1
4
8 6
20
5 6
2
IN 3
7
17
8 IN 5 16
9 15
10 13
46 4710
2 3
4
5
8
6 7
IN 10 8
6
9 4
39
IN 4
14
45
38
10 11
2
37
0
18
44
42 41 40
IN 2
4 19
43
12
11
STEPS vs °/10
IN 6
12 0
36
13
35 34
14 15
33
16
32 31
17 18 30
IN 11 IN 12 IN 13 IN 14 IN 15
19 29
28
27 26 25
22 24 23
21
20
STEPS vs °/10
Fig. 8. Compliant rotational motions (only Rz+) for each insertion in zone 2
6 Conclusion An approach for peg-in-hole automated assembly was presented. The proposed methodologies were used to achieve the tasks and tested successfully in the real world operations using an industrial manipulator. The robot is able to perform not only the assembly but also it can start working without initial knowledge about the environment, and it can increase its PKB at every assembly if it is necessary. Accurate recognition of assembly components was successfully carried out by using FuzzyARTMAP neural network model which was initially trained with 210 patterns, and its performance was completely satisfactory for the whole experiments obtaining 100% identification. All assemblies were successful showing the system robustness against different uncertainties and its generalization capability. The generalisation of the NNC has been demonstrated by assembling successfully different component geometry using different mechanical tolerances and offsets employing the same acquired knowledge base. The presented approach using the vision and force sensing system has envisaged further work in the field of multimodal learning in order to fuse information and to increase the prediction capability of the network which contributes towards the creation of truly self-adaptive industrial robots for assembly.
References 1. Lozano-Perez T., Mason, M.T., Taylor R. H.: Automatic synthesis of fine motion strategies. Int. Journal of Robotics Research Vol. 3 No. 1 (1984) 3-24 2. De Schutter, J., Van Brussel, H.: Compliant robot motion I, a formalism for specifying compliant motion tasks. Int. Journal of Robotics Research. Vol. 7 No. 4 (1988) 3-17
An Approach for Intelligent Fixtureless Assembly: Issues and Experiments
1061
3. Hoska, D.R.: Fixturless assembly manufacturing. Manuf Eng. No.100 (1988) 49-54 4. Doersam, T., Munoz Ubando, L.A.: Robotic hands: modelisation, control and grasping strategies. Meeting annuel de L’Institute Fanco-Allemand pour les Application de la recherche IAR (1995). 5. Lopez-Juarez Ismael: On-line learning for robotic assembly using artificial neural networks and contact force sensing. PhD thesis, Nottingham Trent University, (2000). 6. Gullapalli, V., Franklin, J.A., Benbrahim, H.: Control under uncertainty via direct reinforcement learning. Robotics and Autonomous Systems. (1995) 237-246 7. Cervera, E., Del Pobil, A.P.: Programming and learning in real world manipulation tasks. In: Int. Conf. on Intelligent Robot and Systems (IEEE/RSJ). Proc. 1 (1997) 471-476 8. Howarth, M.: An investigation of task level programming for robotic assembly. PhD thesis. The Nottingham Trent University (1998) 9. Skubic, M., Volz, R.A.: Identifying single-ended contact formations from force sensor patterns. IEEE Transactions on Robotics and Automation. Vol. 16 (2000) 597-603 10. Skubic, M., Volz, R.A.: Acquiring robust, force-based assembly skills from human demonstration. IEEE Trans. on Robotics and Automation. Vol. 16 No. 6 (2000) 772-781 11. Jörg, S., Langwald, J., Stelter, J., Natale, C., Hirzinger, G.: Flexible robot assembly using a multi-sensory approach. In: Proc. IEEE Int. Conference on Robotics and Automation. San Francisco, CA (2000) 3687-3694 12. Baeten, J., Bruyninckx, H., De Schutter, J.: Integrated vision/force robotic servoing in the task frame formalism. Int. Journal of Robotics Research. Vol. 22. No. 10-11 (2003) 941-954 13. Carpenter, G.A., Grossberg, J., Markunzon, N., Reynolds, J.H., Rosen, D.B.: Fuzzy ARTMAP: a neural network architecture for incremental learning of analog multidimensional maps. IEEE Trans. Neural Networks Vol. 3 No. 5 (1992) 678-713 14. Driankov, D., Hellendoorn, H., Reinfrank, M.: An introduction to fuzzy control. 2nd ed. Springer Verlag. (1996) 15. M. Peña-Cabrera, I. López-Juárez, R. Ríos-Cabrera, J. Corona-Castuera: Machine vision learning process applied to robotic assembly in manufacturing cells. Journal of Assembly Automation Vol. 25 No. 3 (2005) 16. Ahn, D.S., Cho, H.S., Ide, K.I., Miyazaki, F., Arimoto, S.: Learning task strategies, in robotic assembly systems. Robotic Vol. 10, (1992) 409–418
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning in Industrial Robots Ismael Lopez-Juarez1, Keny Ordaz-Hernández1,2 Mario Peña-Cabrera3, Jorge Corona-Castuera1, and Reyes Rios-Cabrera1 1
CIATEQ A.C. Advanced Technology Centre, Manantiales 23A, Parque Industrial Bernardo Quintana, 76246. El Marques, Queretaro, Mexico {ilopez, kordaz, jcorona, reyes.rios}@ciateq.mx http://www.ciateq.mx 2 Laboratoire en Ingénierie des Processus et des Services Industriels LIPSI-ESTIA, Technopôle Izarbel; 64210 Bidart, France [email protected] http://www.estia.fr 3 Instituto de Investigaciones en Matemáticas Aplicadas y Sistemas IIMAS-UNAM, Circuito Escolar, Cd. Universitaria 76246, DF, Mexico [email protected] http://www.iimas.unam.mx
Abstract. Robots can be greatly benefited from the integration of artificial senses in order to adapt to changing worlds. To be effective in complex unstructured environments robots have to perceive the environment and adapt accordingly. In this paper, it is introduced a biology inspired multimodal architecture called M2ARTMAP which is based on the biological model of sensorial perception and has been designed to be a more versatile alternative to data fusion techniques and non-modular neural architectures. Besides the computational overload compared to FuzzyARTMAP, M2ARTMAP reaches similar performance. This paper reports the results found in simulated environments and also the observed results during assembly operations using an industrial robot provided with vision and force sensing capabilities.
1 Introduction The manufacturing industry requires the development of flexible assembly cells, which in turn require flexible and adaptive industrial robots. Neural network software has proved to provide flexibility and adaptability to a number of robotic systems. Also, recent research in industrial robotics aims at the involvement of additional sensory devices to improve robustness, flexibility and performance of common robot applications [1]. Unfortunately, most industrial robotic systems are designed to perform activities based on a single sensorial modality. Only a few benefit from multisensorial perception, possibly because sensor integration with data fusion techniques tends to be hard-established in the control subsystem. These reasons have motivated the development of a multimodal neural architecture to enhance industrial robots’ sensing abilities. This sort of architecture provides the A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1062 – 1072, 2005. © Springer-Verlag Berlin Heidelberg 2005
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning
1063
ideal mechanism to incorporate multiple sensors into the robotic system. The architecture, called Multimodal ARTMAP (M2ARTMAP), presented in this work is based on the adaptive resonance theory (ART) developed by G.A. Carpenter and S. Grossberg [2] and it accomplishes its goal by means of a modular structure and a prediction fusion technique, as it has been shown in simulations.
2 Related Work The common approach to face multimodality in robotic systems is the employment of data fusion or sensor fusion techniques [3, 4]. Multimodal pattern recognition is presented in [5] using Multi-Layer Perceptron (MLP). The ART family is considered as an adequate option, due to its superior performance found over other neural network architectures [6]. The adaptive resonance theory has provided ARTMAP-FTR [7], MART [8], and Fusion ARTMAP [9] —among others— to solve problems involving inputs from multiple channels. Nowadays, G.A. Carpenter has continued extending ART family to be employed in information fusion and data mining [10], among other applications. The Mechatronics and Intelligent Manufacturing Systems Research Group (MIMSRG) performs applied research in intelligent robotics, concretely in the implementation of machine learning algorithms applied to assembly labors —using contact forces and invariant object recognition. The group has obtained adequate results in both sensorial modalities (tactile and visual) in conjunction with voice recognition, and continues working in their integration within an intelligent manufacturing cell (see [11]). In order to integrate other sensorial modalities into the assembly robotic system, an ART-Based multimodal neural architecture is desired.
3 ART-Based Multimodal Neural Architecture 3.1 ART Architectures Since it is desired to attend at least two sensorial modalities of an industrial robotic system, the architecture is designed with a modular approach as MART [8] and Fusion ARTMAP [9] architectures, in an opposite manner to Martens et al. [3] using a vector concatenation approach with Fuzzy ARTMAP [12, 13] architecture. Neither MART nor Fusion ARTMAP seem to provide the degree of autonomy desired (at the component level) in an industrial environment, as presented in Table 1. 3.2 Biology-Inspired Architecture As Waxman [14] states, multimodality appears in nature as a strategy of great relevance to a variety of applications. It is a mean by which multiple sensing modalities provide complementary evidence supporting or negating a decision (e.g. the recognition of an object). The architecture’s structure is inspired by the biological model of sensorial perception: sensory neurons conducting impulses inwards to the brain or spinal cord,
1064
I. Lopez-Juarez et al.
as shown in Fig. 1a. The architecture achieves this by assigning dedicated Fuzzy ARTMAP modules to each modality (as “sensory neurons”) and conducting the output of each module to an Integrator (as “superior colliculus”1), which makes the prediction fusion of all modules. Table 1. ART-based architectures for multi-channel problems Architecture Fuzzy ARTMAP
Building Block Fuzzy ART
Function Classification, recognition, and prediction
MART
ART 2 [13]
Classification
Fusion ARTMAP
Fuzzy ART
Classification, recognition, and prediction
M2ARTMAP
Fuzzy ARTMAP
Classification, recognition, and prediction
Comments Non-modular. Requires vector concatenation. It is not possible to know the predictive power of each sensor or modality Does not provide recognition (obviously nor prediction) Modular. Identical performance as Fuzzy ARTMAP, Fuzzy ART only provides unsupervised learning, thus autonomy is reduced Similar to Fusion ARTMAP, but the employment of Fuzzy ARTMAP modules permits a higher level of autonomy
Finally, the fused prediction is passed to a superior Fuzzy ARTMAP neural network, called Predictor, (as “multisensory neurons”) to obtain the final prediction (see Fig. 1b). For a description of the participation of the superior colliculus in multimodality, see [14].
FuzzyARTMAP Neural Network (Modality Core)
Visual Neuron
Auditory Neuron
Somatosensory Neuron
Superior Colliculus
Multisensory Neurons (Bimodal and Trimodal)
FuzzyARTMAP Neural Network (Modality Core)
Integrator (Rule-based)
Predictor (FuzzyARTMAP Neural Network)
FuzzyARTMAP Neural Network (Modality Core)
Fig. 1. Schematics of the biological model (a) and the M ARTMAP model (b) of multimodal sensorial perception
1
The superior colliculus (SC) integrates the maps from visual, auditory and somato-sensory neurons. SC appears in mammals such as cats, monkeys, humans, etc.
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning
1065
3.3 M2ARTMAP Architecture The M2ARTMAP architecture is composed of Fuzzy ARTMAP neural networks as hierarchical architecture. M2ARTMAP has a mechanism of multimodal work that is established by prediction fusion; i.e. data fusion is taken to a higher level of abstraction: instead of merging perception data from each modality, the predictions from each corresponding neural network are combined accordingly to the current task. This is also a different approach to voting systems, given that in voting systems all neural networks are receiving exactly the same input. The maximum number of possible combinations of predictions, given n modalities with at least one modality at a time, is:
§n· §n·
n
¦ ¨¨ i ¸¸ − ¨¨ 0 ¸¸ = 2 i =0
n
© ¹ © ¹
−1
(1)
Given this, it is necessary to set in a configuration component the semantic category to which each combination belongs, in order to settle the rules that establish the valid combinations. M2ARTMAP Model. The process modeled in M2ARTMAP is given by the following mappings: Let E, S, P, I, C and η be the environment states space, the perceptions space, the predictions space, the neural networks’ internal states space, the neural networks’ configurations space and the quantity of modalities —respectively. The activities sensing ξ, training η, predicting κand multimodality predicting Κ are given by the mappings:
ζ :E →S η :S×P → I k :I ×S → P Κ : Pn ×C m → P
(2) (3) (4) (5)
Accordingly to the diagram exposed in Fig. 2, the components of M2ARTMAP are: – Predictor is the final prediction component that uses modalities’ predictions. – Modality is the primary prediction component that is composed by an artificial neural network (ANN), an input element (Sensor), a configuration element (CF), and a knowledge base (KB). – Integrator is the component that merges the modalities’ predictions by inhibiting those that are not relevant to the global prediction activity, or stimulating those who are considered of higher reliability —in order to facilitate the Predictor’s process. Process Description. The process, firstly introduced in [15], is easily carried out. Given an instance of the M2ARTMAP system —conformed by three modalities m1, m2, and m3 — the process is stated as follows:
1066
I. Lopez-Juarez et al.
Let us suppose that all modalities are working simultaneously and that their neural networks have already been trained. At time τ, the identifiable states of the environment for each modality are e1, e2, and e3—respectively. The three states produce (by means of sensor1, sensor2, and sensor3) the perceptions s1, s2, and s3; i.e.
∀ e i ∈ E ∃ s i ∈ S : s i = ζ ( e i ), 1 ≤ i ≤ 3
(6)
Predictor (Fuzzy ARTMAP)
Integrator (rule-based)
ANN (Fuzzy ARTMAP)
KB
ANN (Fuzzy ARTMAP)
CF
Sensor
CF
Sensor
Modality i
e i ∈ E ⊆ Enviroment
KB
Modality j
e j ∈ E ⊆ Enviroment
Fig. 2 Multimodal neural architecture, M2ARTMAP, integrated by three main components organized in two layers: Modality (several found at the lower layer), Predictor and Integrator (at the upper layer)
Next, each ANN receives the perception corresponding to its sensorial modality and outputs its prediction; i.e.
∀ s i ∈ S ∃ p i ∈ P : p i = Κ ( τ l i , s i ),
τ
li ∈ I,
1 ≤ i ≤ 3 (7)
Where the internal state τ l iψcorresponds to modality i at time τ. Then, the Integrator gathers all predictions, performs their fusion using the associated configuration of each modality, and provides the Predictor with a pattern (resulting from prediction fusion) in order to yield the final prediction; i.e.
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning
p τ = Κ (( p 1 , p 2 , p 3 ), ( c 1 , c 2 , c 3 )),
ci ∈ C
1067
(8)
4 Results 4.1 Quadruped Mammal Database Simulations Fuzzy ARTMAP and M2ARTMAP systems were simulated using the Quadruped Mammal database [16] which represents four mammals (dog, cat, giraffe, and horse) in terms of eight components (head, tail, four legs, torso, and neck). Each component is described by nine attributes (three location variables, three orientation variables, height, radius, and texture), for a total of 72 attributes. Each attribute is modeled as a Gaussian process with mean and variance dependent on the mammal and component (e.g. the radius of a horse’s neck is modeled by a different Gaussian from that of a dog’s neck or a horse’s tail). At this point, it is important to mention that Quadruped Mammal database is indeed a structured quadruped mammal instances generator that requires the following information to work: animals . For this experiment, the M2ARTMAP system weakly couples the information provided by each component in the global prediction since none of the processing modules (Modality) in the lower layer (see Fig. 2) is affected by other processing module, as stated by Clark and Yuille [17]. In the first set of simulations, both Fuzzy ARTMAP and M2ARTMAP where trained (in one epoch) and tested with the same set of 1000 exemplars produced with seed = 1278. Both architectures achieved 100% prediction rates. In the next set of simulations, Fuzzy ARTMAP and M2ARTMAP where applied to a group of 384 subjects (91 variations of the choice parameter and 4 variations of the base vigilance), both architectures where trained (again in one epoch) using the set of 1000 exemplars produced with seed = 1278 and tested using the set of 1000 exemplars produced with seed = 23941. Once again, both achieved 100% prediction rates. Nevertheless, M2ARTMAP’s recognition rates where slower than expected. Thus, a t-Student paired test was conducted to constraint the difference between both architectures. It was confirmed that M2ARTMAP’s recognition rate was at most 5% slower than Fuzzy ARTMAP’s recognition rate, by rejecting the null hypothesis with a 1-tail p-value less than 0.0001. Considering the latter results, a new set of simulations was conducted. But in this case, the previous group was separated into four groups of 728 subjects, each one conformed of 8 subgroups (having from 1 to 8 modalities) of 91 subjects. The simulations were realized over these 32 subgroups of subjects. Fig. 3 shows that the average performance difference between Fuzzy ARTMAP and M2ARTMAP varies along with the quantity of modalities employed. Evidently, M2ARTMAP outperforms Fuzzy ARTMAP in the training phase when less than 3 modalities are taken (see Fig. 3a), and in the testing when less than 6 modalities are taken (see Fig. 3b).
1068
I. Lopez-Juarez et al. Training phase performance
Testing phase performance 400.0
600.0
350.0
Average time (ms)
Average time (ms)
500.0
400.0
300.0
FuzzyARTMAP
200.0
M2ARTMAP Linear (FuzzyARTMAP)
100.0
300.0 250.0 200.0
FuzzyARTMAP
150.0
M2ARTMAP
100.0
Linear (FuzzyARTMAP)
50.0
Linear (M2ARTMAP) 0.0
Linear (M2ARTMAP)
0.0 1
2
3
4
5
6
7
1
8
2
3
Quantity of Modalities
4
5
6
7
8
Quantity of Modalities
Global performance 900.0 800.0
Average time (ms)
700.0 600.0 500.0 400.0
FuzzyARTMAP
300.0
M2ARTMAP
200.0
Linear (FuzzyARTMAP)
100.0
Linear (M2ARTMAP)
0.0 1
2
3
4
5
6
7
8
Quantity of Modalities
Fig. 3. Performance comparison of Fuzzy ARTMAP vs. M ARTMAP. (a) Training phase. (b) Testing phase. (C) Global performance.
In these simulations’ scenario, M2ARTMAP globally outperforms Fuzzy ARTMAP only when less than 4 modalities are taken (see Fig. 3c). We should take into account that normally in a working neural network the training phase occurs once and the testing or recognition phase occurs indefinitely. Under real-world conditions, in unstructured environments, an industrial robot normally operates in recognition phase. The training occurs only at the beginning and a few more times if on-line learning is allowed [19]. 4.2 On-Line Control The model has been conceived to be used in industrial environments, giving to robots the self-adapting ability. As an early approach, this model has been implemented with Visual C++ 6.0 as part of the KUKA KR15 industrial robot control, whose tactile perception is acquired by a JR3 6 DOF force/torque sensor positioned at the wrist of the robot. The test operation consists in a typical “peg-in-hole” insertion2 (see Fig. 4), in which the exact position of assembly is unknown to the robot. In order to succeed in 2
Peg-in-hole insertion is not only a longstanding problem in robotics but the most common automated mechanical assembly task [18].
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning
1069
the insertion, the robot receives a priori exemplars of tactile perception. It learns such exemplars and forms its Primitive Knowledge Base (PKB) as shown in Fig. 5. Figures 5 and 6 show the initial force/torque patterns and the ones acquired at the end of the task, respectively. The values in the vertical axis correspond to the normalized patterns magnitude (see [19]). At the present time, a unimodal version of the model has been validated, so that its predictions drive to successful insertions. The time to complete them oscillates around 1 minute.
Fig. 4. KUKA KR15 industrial robot with JR3 force/torque sensor
Fig. 5. Tactile perception
During this time, the robot learns the whole operation, improving its dexterity as it performs more insertions. By the end of the task, new knowledge (Fig. 6) is reused by the manipulator so that initial mistakes are not made again, demonstrating its adaptability.
1070
I. Lopez-Juarez et al.
Fig. 6. Acquired tactile knowledge
5 Conclusions and Future Work We have presented a new ART-based neural architecture that enhances and facilitates multi-sensor integration to industrial robotic systems, by providing multimodal pattern recognition and prediction capabilities. The architecture’s main building blocks are Fuzzy ARTMAP modules. M2ARTMAP has a computational overload over Fuzzy ARTMAP, and probably over Fusion ARTMAP too (since the latter uses Fuzzy ART modules and the former uses Fuzzy ARTMAP ones). Despite that, M2ARTMAP reaches similar performance to Fuzzy ARTMAP, as Fusion ARTMAP claims to do [9, p. 158]. As future work, it has been considered to replace the low-layer Fuzzy ARTMAP components by other variants that achieve Fuzzy ARTMAP’s functionality with only one Fuzzy ART module instead of two (Category ART [20] and Fuzzy ARTvar [21] are good candidates). Also, it is desired to combine the Integrator (rule-based) and the Predictor (Fuzzy ARTMAP-based) by using the Cascade ARTMAP [22] architecture (a Fuzzy ARTMAP generalization that permits the insertion of rule-based knowledge explicitly). Results from the unimodal industrial robotic system application show the practical viability of the model, whereas the simulations’ results demonstrate that it has a potential for being employed in real-time applications despite its relative slowness compared to Fuzzy ARTMAP. In real-world robot operations we are expecting M2ARTMAP be robust with its multimodal prediction capability. M2ARTMAP’s training and testing time in comparison with Fuzzy ARTMAP could be unimportant considering its improved confidence. Finding more than three modalities in practical work is unlikely since at most, visual and tactile sensing are found in robotic applications. Other sensors like collision avoidance and presence sensors are just discrete type value sensor not considered as inputs to the M2ARTMAP architecture. The performance of M2ARTMAP has to be tested experimentally using visual and tactile sensing as the principal modalities.
On the Design of a Multimodal Cognitive Architecture for Perceptual Learning
1071
The visual modality has been integrated into the trial robotic system so that we will be in a position to experimentally validate the architecture’s capabilities. A distributed system is being developed which will fusion all sensors in a single workstation computer.
References 1. Jörg, S.M., Langwald, J., Stelter, J., Natale, C., Hirzinger, G.: Flexible robot-assembly using a multi-sensory approach. In: Proc. IEEE Int. Conference on Robotics and Automation. (2000) 3687–3694 2. Carpenter, G.A., Grossberg, S.: Adaptive Resonance Theory. In Arbib, M.A., ed.: The Handbook of Brain Theory and Neural Networks. 2nd edn. MIT Press, Cambridge, Massachusetts (2003) 87–90 3. Martens, S., Gaudiano, P., Carpenter, G.A.: Mobile robot sensor integration with fuzzy ARTMAP. In: IEEE ISIC/CIRA/ISAS Joint Conference, IEEE (1998) 4. Thorpe, J., McEliece, R.: Data fusion algorithms for collaborative robotic exploration. Progress Report 42-149, California Institute of Technology (2002) 5. Yang, S., Chang, K.C.: Multimodal pattern recognition by modular neural network. Optical Engineering 37 (1998) 650–659 6. Carpenter, G.A., Grossberg, S., Iizuka, K.: Comparative performance measures of fuzzy ARTMAP, learned vector quantization, and back propagation for handwritten character recognition. In: International Joint Conference on Neural Networks. Volume 1., IEEE (1992) 794–799 7. Carpenter, G.A., Streilein, W.W.: ARTMAP-FTR: a neural network for fusion target recognition with application to sonar classification. In: AeroSense: Proceedings of SPIE’s 12th Annual Symposium on Aerospace/Defense Sensing, Simulation, and Control. SPIE Proceedings, Society of Photo-Optical Instrumentation Engineers (1998) 8. Fernandez-Delgado, M., Barro Amereiro, S.: MART: A multichannel art-based neural network. IEEE Transactions on Neural Networks 9 (1998) 139–150 9. Asfour, Y.R., Carpenter, G.A., Grossberg, S., Lesher, G.W.: Fusion ARTMAP: An adaptive fuzzy network for multi-channel classification. In: Third International Conference on Industrial Fuzzy Control and Intelligent Systems [IFIS-93], IEEE Press (1993) 155–160 10. Parsons, O., Carpenter, G.A.: Artmap neural networks for information fusion and data mining: Map production and target recognition methodologies. Neural Networks 16 (2003) 11. Lopez-Juarez, I., Peña, M., Corona, J., Ordaz Hernández, K., Aliew, F.: Towards the integration of sensorial perception in industrial robots. In: Fifth International Conference on Application of Fuzzy Systems and Soft Computing [ICAFS], Milan, IT (2002) 218–223 12. Carpenter, G.A., Grossberg, S., Markuzon, N., Reynolds, J.H., Rosen, D.B.: Fuzzy ARTMAP: A neural network architecture for incremental supervised learning of analog multidimensional maps. In: IEEE Transactions on Neural Networks. Volume 3., IEEE (1992) 698–713 13. Carpenter, G.A., Grossberg, S.: ART 2: Selforganisation of stable category recognition codes for analog input patterns. Applied Optics 26 (1987) 4919–4930 14. Waxman, A.M.: Sensor fusion. In Arbib, M.A., ed.: The Handbook of Brain Theory and Neural Networks. 2 edn. MIT Press, Cambridge, Massachusetts (2003) 1014–1016 15. Ordaz Hernández, K., Lopez-Juarez, I.: Hacia M ARTMAP: una arquitectura neuronal multimodal para percepción sensorial en robots industriales. In Sossa Azuela, J.H., Pérez Cortés, E., eds.: Advances on Computer Sciences (IV International Congress Computer Sciences ENC 2003). CIC-IPN/SMCC, Apizaco, Tlax., MX (2003) 319–324
1072
I. Lopez-Juarez et al.
16. Ginnari, J.H., Langley, P., Fisher, D.: Quadruped mammals. Found as Quadraped Animals Data Generator at UCI Machine Learning Repository http://www.ics.uci.edu/~mlearn/MLRepository.html (1992) 17. Clark, J.J., Yuille, A.L.: Data Fusion for Sensory Information Processing Systems. Kluwer Academic, Nowell, Massachusetts (1990) 18. Paulos, E., Canny, J.: Accurate insertions strategies using simple optical sensors. In: Proc. IEEE International Conference on Robotics and Automation. Volume 2. (1994) 1656– 1662. 19. Lopez-Juarez, I., Howard, M.: Knowledge acquisition and learning in unstructured robotic assembly environments. Information Sciences 145 (2002) 89–111 20. Weenink, D.: Category art: A variation on adaptive resonance theory neural networks. In: Proc. of the Institute of Phonetic Sciences. Volume 21., Amsterdam, NL (1997) 117–129 21. Dagher, I., Georgiopoulos, M., Heileman, G.L., Bebis, G.: Fuzzy ARTvar: An improved fuzzy ARTMAP algorithm. In: International Joint Conference on Neural Networks (IJCNN-98). Volume 3., Alaska, IEEE (1998) 1688–1693 22. Tan, A.H.: Cascade ARTMAP: Integrating neural computation and symbolic knowledge processing. IEEE Transactions on Neural Networks 8 (1997) 237–250
CORBA Distributed Robotic System: A Case Study Using a Motoman 6-DOF Arm Manipulator Federico Guedea-Elizalde, Josafat M. Mata-Hern´ andez, and Rub´en Morales-Men´endez ITESM, Campus Monterrey, Center for Innovation in Design and Technology, Eugenio Garza Sada 2501, 64849 Monterrey, Nuevo Le´ on, M´exico [email protected], [email protected], [email protected]
Abstract. We present a remote operated robot application based on a standard CORBA distributed system to control a MOTOMAN 6-DOF arm manipulator. The robot is based on XRC2001 robot controller. Current approach could be extented to other Yaskawa controllers (e.g. ERC, ERCII, MRC, MRCII) without major changes. The main idea is to define a set of generic IDL interfaces that can be used to integrate commercial proprietary libraries hiding the intricate of low level components. The challenge is to create a remote client-server application which facilitates the integration of one or several arm manipulators based on mentioned controllers independently from computer system or different platforms. Keywords: robotic, distributed systems, CORBA.
1
Introduction
CORBA provides the opportunity to use software components that can be implemented by using different programming languages and running in different platforms. ORB technology is both middleware and a component technology. As a middleware technology it supports local/remote transparency to clients. As a component technology, it supports the definition of APIs and run time activation of executable modules [1]. The CORBA programming model allows programmers to extend existing interfaces polymorphically, replace instances of objects, and add new objects to an existing system. Furthermore, CORBA supports implementations that address the performance and footprint issues of scalability [2]. Software for manufacturing systems are often constructed by integrating pre-existing software components. Accurate specification of the component interactions in these systems is needed to ensure testability and maintainability. Moreover, standards for manufacturing systems must specify the interactions to achieve inter-operability and substitutability of components [3]. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1073–1081, 2005. c Springer-Verlag Berlin Heidelberg 2005
1074
F. Guedea-Elizalde, J.M. Mata-Hern´ andez, and R. Morales-Men´endez
Besides, components usage through their explicit interfaces and interoperability between different languages, allows increase reuse, quality of result and outsourcing capabilities [4]. We present a case study to integrate one Motoman industrial robot arm manipulator to a CORBA distributed system, introduced in [5]. It is important to mention that the project arise as a necessity to find new solutions to collaborative work between robot arm manipulators in a manufacturing environment and trying to find new approaches on more complex tasks, such as packaging, dispensing, handling, material removal applications, among others. Although XRC 2001 robot controller offers standard networks for DeviceNet, ControlNet, Profibus-DP, and Interbus-S, these approaches need to acquire several hardware and software modules, which only works under limited specifications and ad-hoc characteristics closely related with the supplier. At the end, this produces high cost solutions to customers and low interoperability across devices. Motoman provides commercially available software to their robot controllers for calibration, off-line programming and communications tasks. Nevertheless, these do not provide enough customization to more specialized applications. As an example, VDE suite (Visual Data Exchange) which provides Ethernet communications on MRC and XRC controllers and standard RS-232C serial communications to run on the three mentioned controllers, works only under Windows platform. The program is limited to copy files between the robot controller and a PC, delete job files, and provide expanded storage area for robots jobs. Probably, the most advanced communications software available for the XRC controller is MotoView. This program provides an interactive web interface to XRC robot controllers which allow the user to remotely monitor robot status, data and I/O. Likewise provides the user with robot file operation and manipulation capability. This approach has good advantages due to java platform usage but do not provide all the capabilities and advantages a distributed system must accomplish. In this work we are using the concept of function encapsulation to create a set of generic objects that facilitate the development and integration of a distributed system using CORBA specification [6]. This goal is achieved using wrapper functions [7] which deal with the specific details of each equipment but give a more simple and powerful functionality to other components over the system. The paper is organized as follows: Section II describes the main components used. In Section III, the architecture and implementation to integrate these modules are presented. Section IV provides an analysis of important issues. Finally, comments on future research is presented in section V.
2
Robotic System Description
We present a brief description of the main components used in this project. The components are as follows (see Fig. 1):
CORBA Distributed Robotic System
1075
1. A Motoman UP6 robot arm manipulator (XRC2001 controller) 2. Two Pentium Computers 3. MotoCom SDK software library
CORBA ORB
We have as final goal to create a remote client-server application which facilitates the integration of one or several arm manipulators based on mentioned controllers independently from computer system or different platforms.
MotoCom Library
S e r v e r
INTERNET C l i e n t
Fig. 1. UP6 CORBA-based system
Arm Manipulator. The arm manipulator is a Motoman UP6 manufactured by Yaskawa. High speed transmission can be achieved using an Ethernet I/F board in the XRC or MRC controller. Table 1 shows the basic operation limits for this robot arm. Table 1. Physical limit and name of axes for UP6 robot arm manipulator Axis
UP6 Maximum Motion Range Maximum Speed S-Axis (Turning/sep) ±170◦ 140◦ /s ◦ ◦ L-Axis (Lower Arm) +155 /-90 160◦ /s U-Axis (Upper Arm) +190◦ /-170◦ 170◦ /s ◦ R-Axis (Wrist Roll) ±180 335◦ /s ◦ ◦ B-Axis(Bend/Pitch/Yaw) +225 , -45 335◦ /s ◦ T-Axis (Wrist Twist) ±360 500◦ /s
Computers. Two computers are used for experimentation, one for GUI client and other one for robot server. First one is a Pentium Centrino at 1400MHz with 512 MB on RAM, the operating system is Windows XP-2002. Second one has similar characteristics. MotoCom library. We are using MotoSoft SDK library. This component provides data transmission between a PC and Motoman controllers. The library is composed in the form of Windows DLL (Dynamic Link Library). It includes several functions for robot communication, file data transmission, status reading, robot
1076
F. Guedea-Elizalde, J.M. Mata-Hern´ andez, and R. Morales-Men´endez
control, read and write of I/O signals and other related characteristics. Below a representative C++ function definition is shown. This function moves the robot a specified motion from a current position to a target position. BscMov (short nCid, char *movtype, char *vtpe, double spd, char *framename, short rconf, short toolno, double *p); nCid *movtype *vtype spd *framename toolno *p
Communication handler ID Motion type (joint, linear or incremental) Move speed selection (control point or angular) Move speed (mm/s or /s) Coordinate name (base, robot or user) Tool number Target position storage pointer
One limitation of this DLL usage is that requires a hardware key supplied with MotoCom SDK which must be installed on the PC parallel port (robot server) in order to work.
3
Integration
The communication between with the PC and the robot controller is made via Ethernet or standard RS-232C. Depending on robot controller evaluation (ERC, MRC or XRC), RS-232C internal port or teach pendant parameters must be first initialized. In case of Ethernet communication being preferred, proper Ethernet board must be installed in the robot controller so the device can communicate using TCP/IP protocol. Controller parameters must be initialized for an IP address, Subnet Mask, Default Gateway and Server Address. After proper setup, robot server only requires the robot IP address to establish a correct communication. In this proposal, using CORBA, there are two main components which communicate each other using the following approaches: a) Naming Services and b) IDL interfaces. The first approach is useful to connect or reconnect the different modules through the network, without being concern with resolving IOR references. The client modules only need the name of the servers and the reference of the Naming Server, which is predefined in the system. The second approach convey the object paradigm, and the client applications use this interface to command or monitor the servers. Robot server. This is a wrapper component [7], which process all calls to the arm manipulator from different clients. Function calls are listed in table 2. The robot server first gets the control of the arm robot to which is connected and based on several internal calls, it sets up the specific axis to be controlled [5]. Robot GUI. This is a client application which communicates with the robot server using the IOR reference provided by the Naming Service. Through this application the user or operator can manipulate the robot with basic movements.
CORBA Distributed Robotic System
Robot Server
1077
Naming Service
Internet Internet
GUI
Fig. 2. Client and server components for UP6 CORBA-based system
3.1
Implementation
Robot Server. The robot server is a software component, which links the Robot GUI interface with the robot controller. Main functions are as follows: 1. connect to the robot controller and get control access of the arm, 2. create its own reference and 3. register on the naming service
Robot +Retract(distance:long, result:boolean):void +Extend(direction:short,distance:long,result:boolean):void +Turn(direction:short,degrees:short,result:boolean):void +MoveH(direction:short,distance:long,result:boolean):void +MoveV(direction:short,distance:long,result:boolean):void +Turn_EF(direction:short,degrees:long,result:boolean):void +Turn_WRIST(direction:short,degrees:long,result:boolean):void +Home(result:boolean):void +Ready(result:booelan):void +Speed(velocity:short, result:boolean):void +Learn(var:long, result:booelan):void +Goto(var:long, result:boolean):void +Gripper(dist:long, result:boolean):void
Fig. 3. Robot IDL Class represented in UML
After this, the robot server gets into an infinite loop waiting for commands to execute from the client side. If several clients want to have access to the
1078
F. Guedea-Elizalde, J.M. Mata-Hern´ andez, and R. Morales-Men´endez Table 2. Main Functions for robot arm manipulators
Functions Arguments Extend Distance Retract Distance Move-H Distance,Direction Move-V Distance,Direction Turn Degrees,Direction Turn-G Degrees,Direction Turn-W Degrees,Direction MoveTo Position Learn Position Ready NA Home NA Gripper Position Speed Velocity
Description Extend the arm a specific distance Retract the arm a specific distance Move the arm over the track a specific distance Move the arm UP or DOWN a specific distance Turn the base of the arm a specific angle Turn the End-Effector a specific angle Turn the Wrist a specific angle Move to a previous defined position Save the current arm position in a variable Move arm to Ready position Move arm to Home position Open/Close Gripper Set the speed for all movements
arm, then a FIFO policy is held to give control only one client a time. The IDL interface represented in UML, is shown below (Fig. 3). Although the number of functions is limited, they can move the End-Effector to different positions. Tables 3 and 4 show all C++ functions available in MotoCom SDK library and the way several of these ones were encapsulated through CORBA wrapper components. This is done in order to implement the previously defined IDL interface. Some of these functions are wrapped in more than one component in order to accomplish the status or movement required. Likewise, there are several approaches to produce a specific movement, which one to use, depends on the specific task to realize. The approach that produces the best and more efficient result is selected.
4
Analysis
From previous information, we found that MotoCom SDK library has 74 functions categorized in 5 areas. From this set of functions, two areas are not managed by our interface; this corresponds to the I/O signals and Data File management. In the other hand our interface has 13 functions, but each function make use of one or more functions of the MotoCom library, in total 32. This gives a 43 % of utilization. One important issue in this information is that our interface does not have an explicit query status of the robot system, but in this case 50 % of them (reading status) is used implicitly in our functions. Furthermore, the way these functions are called requires a specific sequence and data format that could change from one robot system to another. In short, our interface definition frees the client developer from dealing with many kinds of robots. The client developer is focus in a small number of functions which provides the functionality required for most kind of robot systems.
CORBA Distributed Robotic System
1079
Table 3. MotoCom Functions implemented in CORBA Wrapper Functions. Adapted from [8]. Function
MotoCom CORBA Function Name Wrapper Component File data transmission function BscDownload BscUpload Robot Control Function or BscFindFirst Reading Status BscFindFirstMaster BscFindNext BscGetCtrlGroup BscDownLoad BscGetError Used in All BscGetFirstAlarm Used in All BscGetStatus Learn BscGetUFrame BscGetVarData Learn BscIsAlarm Ready BscIsCtrlGroup BscIsCycle BscIsError Used in All BscIsErrorCode Used in All BscIsHold Ready BscIsJobLine BscIsJobName BscIsJobStep BscIsLoc All except Speed BscIsPlaymode Ready BscIsRemoteMode Ready BscIsRobotPos All except Speed BscIsTaskInf BscIsTeachMode Ready BscJobWait -
Another important issue is that many kinds of robots provide an extensive number of functions to manage the robot, and many of them use the same arguments or only vary in a few ones. Our interface is designed to manage with a variable number of similar functions by using flexible parameters. This method is similar to have a list of predefined functions or capacities and only the functions supported by the current robot system are enabled. As an example, some robots can manage a track where the robot can be displaced. This represent another degree of movement, in such case the MoveH() function deal with this movement, using the track if it exists or using a linear movement if this extra axis doesn’t exist. Other typical example, is the exchange between robots of 5 DOF and 6 DOF. In this example, the last DOF corresponds to the wrist axis, and for the client developer is transparent. He doesn’t have to bother which is the number of axis to move.
1080
F. Guedea-Elizalde, J.M. Mata-Hern´ andez, and R. Morales-Men´endez
Table 4. MotoCom Functions implemented in CORBA Wrapper Functions, continuation Function
MotoCom CORBA Function Name Wrapper Component Control of System BscCancel BscChangeTask BscContinueJob BscConvertJobP2R BscConvertJobR2P BscDeleteJob BscHoldOff Ready BscHoldOn BscImov Extend, Retract, Speed BscMDSP BscMov Move H, Move V,Speed BscMovj Home, MoveTo, Move H, Move V, Speed BscMovl Home, MoveTo, Gripper, Speed BscOPLock BscOPUnLock BscPMov Turn, Turn-G, Turn-W, Speed BscPMovj Turn, Turn-G, Turn-W, Speed BscPMovl Turn, Turn-G, Turn-W, Speed BscPutUFrame BscPutVarData Learn BscStartJob BscSelectJob BscSelectMode Ready BscSelLoopCycle BscSelOneCycle BscSelStepCycle Ready BscSetLineNumber BscSetMasterJob BscSetCtrlGroup BscServoOff Ready BscServoOn Ready BscUpload Support of DCI function BscDCILoadSave BscDCILoadSaveOnce BscDCIGetPos MoveTo BscDCIPutPos Learn Read/Write of I/O signals BscReadIO BscWriteIO Other Functions BscClose Ready BscCommand Ready BscConnect Ready BscDisconnect Ready BscDiskFreeSizeGet BscGets BscInBytes BscIsErrorCode Ready BscOpen Ready BscOutBytes BscPuts BscSetBreak Ready BscSetComm Ready BscSetCondBSC Ready BscStatus -
CORBA Distributed Robotic System
5
1081
Conclusions
A commercial MOTOMAN arm manipulator is remotely operated using the Client-Server concept, Object encapsulation and CORBA middleware software. This work shows how with a few number of methods (or functions) but flexible designed interfaces, previous components from other applications can be reused without changes or just minor changes. There is a tradeoff between function encapsulation and robot performance. The first one allows easy integration in the client side but increases the complexity or programming effort in the server side. In the other hand, with a one-to-one mapping of robot functionality to robot interface, the integration effort becomes bigger on the client side. If the client side has the task to command the robot then the complexity of the client program increases according to the number of functions to deal with. In future research we must include in the interface more functions to deal with I/O signals and Data File management, due to these concepts are managed by most of the commercial robots. Acknowledgments. This work was supported by the TEC de Monterrey, Campus Monterrey.
References ¨ 1. L.G. Osterlund, “Component Technology,” in Proceedings of the IEEE Computer Applications in Power., Vol 13, no. 1, pp. 17-25. January 2000. 2. J. N. Pires and J.M.G. S da Costa “Object-Oriented and Distributed Approach for Programming Robotic Manufacturing Cells,” in IFAC Journal Robotics and Computer Integrated Manufacturing, Vol.16 no. 1 pp. 29-42, March 2000. 3. D. Flater, “Specification of Interactions in Integrated Manufacturing Systems,” NISTIR, 6484, March 2000. 4. G. Beneken, U. Hammerschall, M.V. Cengarle, J. J¨ urgens, B. Rumpe, M. Schoenmakers, and M. Broy, “Componentware - State of the Art 2003,” in Understanding Component Workshop of the CUE Initiative at the Univerit´ a Ca’ Foscari di Venezia Venice, October 7-9, 2003. 5. F. Guedea, I. Song., F. Karray, R. Soto, “Enhancing Distributed Robotics Systems using CORBA,” in Proceedings of the First International Conference on Humanoid, Nanotechnologies, Information Technology, Communication and Control, Environment and Management 2003 “ Manila, Philippines, March 27-29, 2003. 6. OMG, “Common Object Request Broker Architecture and specification,” Technical Report, Object Management Group, Fall Church, USA, 2000 Release 2.4. 7. F. Guedea, I. Song., F. Karray, R. Soto, R. Morales, “Wrapper Component for Distributed Robotics Systems,” in Mexican International Conference on Artificial Intelligence 2004“ Mexico City, April 26-30, 2004, pp. 882-891. 8. MOTOMAN, “MotoCom SDK ,” Function Manual, Motoman YASKAWA Electric Manufacturing, USA, 2002.
An Integration of FDI and DX Techniques for Determining the Minimal Diagnosis in an Automatic Way Rafael Ceballos, Sergio Pozo, Carmelo Del Valle, and Rafael M. Gasca Departamento de Lenguajes y Sistemas Informticos, Universidad de Sevilla, Escuela Tcnica Superior de Ingeniera Informtica, Avenida Reina Mercedes s/n 41012 Sevilla, Spain
Abstract. Two communities work in parallel in model-based diagnosis: FDI and DX. In this work an integration of the FDI and the DX communities is proposed. Only relevant information for the identification of the minimal diagnosis is used. In the first step, the system is divided into clusters of components, and each cluster is separated into nodes. The minimal and necessary set of contexts is then obtained for each cluster. These two steps automatically reduce the computational complexity since only the essential contexts are generated. In the last step, a signature matrix and a set of rules are used in order to obtain the minimal diagnosis. The evaluation of the signature matrix is on-line, the rest of the process is totally off-line.
1
Introduction
Diagnosis allows us to determine why a correctly designed system does not work as expected. Diagnosis is based on a set of integrated sensors which obtain a set of observations. The aim of diagnosis is to detect and identify the reason for any unexpected behaviour, and to isolate the parts which fail in a system. The behaviour of components is stored by using constraints. Inputs and outputs of components are represented as variables of the component constraints. These variables can be observable and non-observable depending on the allocation of the sensors. Two communities work in parallel, although separately, in model-based diagnosis: FDI (from Automatic Control) and DX (from Artificial Intelligence). Nevertheless, the integration of FDI with DX theories has been shown in recent work [1],[2]. Within the DX community the work of Reiter [3] and De Kleer and Willians [4] introduce the basic definitions and foundations of diagnosis. A general theory was proposed to explain the discrepancies between the observed and the correct behaviour by using a logical-based diagnosis process. In the FDI community, [5] and [6] presented the formalization of structural analysis, the process to obtain the ARRs (Analytical Redundancy Relation) of the system. In this work an integration of FDI theories with the DX community is proposed, in order to improve the minimal diagnosis determination. This integration has three phases. The structural pre-treatment in the first phase and the A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1082–1092, 2005. c Springer-Verlag Berlin Heidelberg 2005
An Integration of FDI and DX Techniques
1083
reduction of the model in the second phase enables the improvement of the computational complexity. The minimal diagnosis is obtained by applying an observational model to a signature matrix together with a set of compilation rules. The evaluation of the signature matrix is on-line, however the rest of the process is totally off-line. Our paper has been organized as follows. First, definitions and notations are established in order to clarify concepts. Section 3 shows an example of the validation of this approach. Section 4 describes the advantages of the structural pretreatment. After that, in Section 5, the process for the definition of the context network is explained. Section 6 describes the determination of the minimal diagnosis. Finally, conclusions are drawn and future work is outlined.
2
Definitions and Notation
In order to clarify the diagnosis process some definitions must be established. Definition 2.1. System Model : A finite set of polynomial equality constraints (P ) which determine the system behaviour. This is done by means of the relations between non-observable (Vi ) and observable variables (sensors) of the system (Oj ). Definition 2.2. Observational Model : A tuple of values for the observable variables. Definition 2.3. Context : A collection of components of the system, and their associated constraints. The number of possible contexts is 2nComp - 1, where nComp is the number of components of the system. Definition 2.4. Context Network : A graph formed by all the contexts of the system in accordance with the way proposed by ATMS[7]. The context network has a natural structure of a directed graph for set inclusion. Definition 2.5. Diagnosis Problem: A tuple formed by a system model and an observational model. The solution to this problem is a set of possible failed components.
3
Example
Figure 1a shows a polybox system. This polybox system is derived from the standard problem used in the diagnosis community [4]. The system consists of fifteen components: nine multipliers, and six adders. The observable variables are represented by shaded circles in Figure 1a.
4
Structural Pretreatment
The first part of this section shows the way to divide the diagnosis problem into independent diagnosis subproblems. The second part of this section explains the
1084
R. Ceballos et al. k m
a b
M1
c d e
M2
f g
M4
h i j
M5
M3
M6
M7
x07 A5
x01 x02
x03
A1
A2
p
M7 M2 M1 X02
M9
M3
q
N5 M4
x05
A3
x06
A4
n o
M8
N2
x10
X05
M5
x06
M9
A4
x10
x11 A8
M8
x12
a)
x09
x04 A3
M6
r
A2
x03
N1
x11 A6
x08
N3
N4
x09
x04
A5 A1
x08
x07
x01
x12
b)
Fig. 1. a) Polybox example b) Nodes of the polybox example
way of grouping the components into nodes in order to reduce the number of non-observable variables to be considered in the system. 4.1
Identification of the Clusters
The objective of this section is the partition of the system into independent subsets of components. This partition reduces the computational complexity of the diagnosis process since it enables the generation of the diagnosis of the whole system based on the diagnosis of the subsystems. Definition 4.1. Cluster of components: A set of components T is a cluster, if it does not exist a common non-observable variable of any component of the cluster with any component outside the cluster, and if for all T’ ⊂ T, T’ is not a cluster of components. In a cluster, all common non-observable variables among the components belong to the same cluster, therefore all the connections with components which are outside the cluster are monitored. A cluster of components is totally monitored, and for this reason the detection of faults inside the cluster is possible without information from other components which do not belong to the cluster. A more detailed explanation and the cluster detection algorithm appears in [2]. The diagnosis space for a system initially consists of 2nComp diagnoses [4], where nComp is the number of components of the system. Therefore the computational complexity for the diagnosis process is always smaller for an equivalent system divided into clusters, due to the reduced number of possible diagnoses. 4.2
Obtaining Relations Without Non-observable Variables
In the diagnosis process it is necessary to produce new relations without nonobservable variables, in order to monitor the system behaviour by using only the
An Integration of FDI and DX Techniques
1085
observational model. Our approach uses a function named NewRelations (NR) which takes a set of constraints and obtains a set of new constraints without a set of non-observable variables. Example: NR({x-a·c, y-b·d, f-x-y}, {x ,y}) = {a·c + b·d - f = 0}. This function can be implemented using different techniques. The Gr¨ obner Basis algorithm [8] is used here. Gr¨obner basis theory is the origin of many symbolic algorithms used to manipulate equality polynomials. It is a combination of Gaussian elimination (for linear systems) and the Euclidean algorithm (for univariate polynomials over a field). The Gr¨ obner basis can be used to produce an equivalent system which has the same solution as the original, and without having non-observable variables. 4.3
Obtaining the Nodes of Each Cluster
The main assumption in this paper is to suppose that only one constraint is associated to each component. If it is necessary to apply this methodology to components with n constraints (where n > 1), it is then possible decoupling the component x into n virtual components xi with one constraint each. Our approach provides the minimal set of constraints to detect all the possible diagnoses of a system. The introduction of new definitions is necessary in order to efficiently generate this set of constraints: Definition 4.2. Dispensable variable: A non-observable variable vi is dispensable if there exist only two components xi and xj which include this variable in their related constraints. In the polybox example the variable x04 and the variable x08 are dispensable variables. Definition 4.3. Node of components: A single component could be a node of components if none of its non-observable variables is a dispensable variable. Two components, or, a component and a node of components, belong to the same node of components if they have a common dispensable variable. Algorithm: The algorithm for the identification of the nodes of a cluster begins by creating n nodes, where n is the number of components of the cluster. All these nodes have initially one component. When a dispensable variable v is detected, the two nodes, which include v in their constraints, are merged into one node. The process ends when all the dispensable variables are detected. Each node contains a set of constraints and a set of dispensable variables. When all the nodes are identified, new set of constraints, without the dispensable variables is obtained, by applying the NewRelations function to the set of constraints of each node. If the node of components have no dispensable variables it is not necessary to apply the NewRelations function. In the DX community diagnoses are determined by conflicts. Many methodologies try to use the structural description of the system, those methods are known as compilation methods. In [9] the Possible Conflicts (PCs) concept is proposed as a compilation technique. Each PC represents a subsystem within system description containing minimal analytical redundancy and being capable
1086
R. Ceballos et al.
Table 1. Improvements obtained using structural pretreatment in the examples No pretreatment With pretreatment Example Clusters Nodes Vars. Ctxs. Elapsed time Vars. Ctxs. Elapsed time Polybox 1 5 12 215 -1 32 seconds 2 31 31 milliseconds
of becoming a conflict. Computing Analytical Redundancy Relations (ARRs)[5] is the compilation technique of FDI methodology. Our approach provide the minimal set of contexts which include an overdetermined system of constraints that can detect a conflict in a cluster. The contexts are built by using nodes of components instead of components, since it is impossible to generate constraints without non-observable variables by using a subset of a node, because it will be impossible to substitute a dispensable variable of the node, which only appears in one component of the context. Example: Figure 1b shows the partition of the polybox example into nodes. Table 1 shows the results obtained in the proposed example. The column Nodes shows the addition of all the nodes included in the clusters of the system. The column Vars shows the initial number of non-observable variables, and the final number of non-observable variables after the structural pretreatment. The column Ctxs shows the total number of possible contexts of the system, and the final number of possible contexts by using the structural pretreatment. The column elapsed time shows the necessary time to process the set of contexts of the system if the time to process one context is supposed to be 1 millisecond. In the polybox example 1 cluster is obtained. The non-observable variables are reduced from 12 to 2. Table 2 shows the list of nodes of the polybox example, and the constraint obtained in each node by eliminating the dispensable variables.
5
Determination of the Context Network
Our approach provide the minimal set of contexts which can detect a conflict in a cluster. The minimality issue was not guaranteed in the original ARR approach, but its guaranteed in our approach. In [9] approach the PCs are obtained directly by using components, but our approach use nodes instead of components,
Table 2. Nodes for the polybox example Nodes N1 N2 N3 N4 N5
Components M6 M8 A4 A6 M5 M1 M7 A1 A5 M2 M3 M4 M9 A2 A3
Constraints h·j + n·o - r + x05 g·i - x05 a·c + k·m - p + x02 b·d - x02 q - (f·h + x05)·(x02 + c·e)
Dispensable var. {x06, x11, x12} {} {x01, x07, x08} {} {x03, x04, x09, x10}
Non-Obs var. {x05} {x05} {x02} {x02} {x02, x05}
An Integration of FDI and DX Techniques
N1
N5
N1
N1
X02
N5 X05
N1
N5 X05
N4 X02
X05
N2
N2
N5 X05
X05
X05
X05
N5 X02
N5
N3
N5 X05
N3
X05
X05
X02
N2
N1
N2
N3 X02
X02
N2
N5
N3
N4 X02
X05
N5
N4 X02
X02
X05
N3
1087
N4 X02
N4 X02
X02
Fig. 2. Context network of the polybox example
therefore the size of the problem is reduced from 2c , where c is the number of components, to 2n , where n is the number of nodes. A context network, in accordance with the way proposed by ATMS[7], is generated in order to obtain all the relevant contexts for the diagnosis process. In order to establish the smallest set of contexts it is necessary to introduce the following definitions. Definition 5.1. Structural context: This is a context where all the nodes are connected, that is, they compose a connected graph, and all the non-observable variables appear in at least two constraints. The function to determine which are structural contexts is named isAStructural and takes a context C and returns a true value if it is a structural context. Definition 5.2. Minimal completed context: A structural context C is a completed context if the set of constraints of the nodes of the context is an overdetermined system of constraints, and, if it is possible to generate new constraints without non-observable variables by using the set of constraints of the context. A completed context is minimal if no context C’ ⊂ C exists such that C’ is a completed context. If C is a minimal completed context then all the context C’ exists, where C ⊂ C’, can only generate constraints which can be generated with context that contains fewer nodes. Therefore, if a context C is a minimal completed context it Table 3. CARCs obtained in the polybox example Index Context 1 N1 N2 2 N3 N4 3 N1 N3 N5 4 N1 N4 N5 5 N2 N3 N5 6 N2 N4 N5
CARC h·j + n·o - r + g·i a·c + k·m - p + b·d q - (f·h - h·j - n·o + r)·(-a·c - k·m + p + c·e) q - (f·h - h·j - n·o + r)·(b·d + c·e) q - (f·h + g·i)·(-a·c - k·m + p + c·e) q - (f·h + g·i)·(b·d + c·e)
1088
R. Ceballos et al.
is not necessary to process contexts C’ such that C ⊂ C’, since it is not possible to generate new relevant constraints for the diagnosis process. The algorithm which generates the contexts of each cluster has n stages, first the context with 1 node are obtained, then the context with 2 nodes, until it reaches the context with n nodes, where n is the number of nodes. The function NewRelations is only applied to the contexts which are structural contexts. When a minimal completed context C is found, the new constraints without non-observable variables are stored, and no contexts C’, such that C ⊂ C’, are generated. These new constraints are named Context Analytical Redundancy Constraint. Definition 5.3. Context Analytical Redundancy Constraint (CARC): A constraint obtained from a minimal completed context in such a way that only the observed variables are related. Example: In order to clarify this section, Tables 2 and 3 shows the results obtained for the polybox example. This system includes only one cluster with 15 components. The number of possible contexts is reduced from 215 −1 to 25 −1. By applying the rules and the algorithm proposed in this section, 14 contexts of the possible 31 (25 −1) are generated, however only 6 are minimal completed contexts. These 6 contexts generate 6 CARCs. Figure 2 shows the context network of the polybox example. Only the treated contexts are circled. The minimal completed contexts are circled in bold.
6
Determination of the Minimal Diagnoses
The last step is the determination of the minimal diagnoses using the set of CARCs. In order to clarify the methodology, we suppose that the sensor observations are correct. We propose using a signature matrix as in FDI, but in order to obtain the same minimal diagnoses as in DX approach, it is necessary to apply a set of rules which guarantee the no-exoneration case in the solution. Definition 6.1. Fault signature: Given a set of n CARCs, denoted CARC= {CARC1 , CARC2 , ..., CARCn }, and a set of m faults denoted F = {F1 ,...,Fm }, the signature of a fault Fj is given by FSj = [s1j ,..., snj ]T in which sij = 1 if the context which generated the CARCi involves the nodes included in the fault Fj , and sij = 0 otherwise. Definition 6.2. Signature matrix : All the signatures for the set of possible faults constitute the signature matrix. Definition 6.3. Signature of an observation: This is given by OS=[OS1 ,...,OSn ] where OSi =0 if the CARCi is satisfied, and OSi =1 otherwise. Definition 6.4. Diagnosis set : The set of faults whose signatures are consistent with the signature of the observational model. Our approach assumes that an observation signature OS is consistent with another signature FSj if OSi = sij ∀ i.
An Integration of FDI and DX Techniques
1089
Definition 6.5. Minimal diagnosis: A fault Fj is a minimal diagnosis if Fk is not a diagnosis ∀ faults Fk ⊂ Fj . Table 4 shows the signature matrix for the polybox example in order to clarify these definitions and the process to obtain the minimal diagnoses. The signature OK = [0, ..., 0]T represents the no-fault case. The signature matrix is very similar to the corresponding matrix in the FDI methodology. However in our approach, the faults involve nodes instead of components. In this example it is necessary to expand the number of columns of the signature matrix in order to consider multiple faults. Each fault Fj , which involves n nodes, is obtained using a fault Fk , which involves n−1 nodes, and a simple fault Fs which is not involved in Fk . The multiple fault signature Fj is given by FSj = [s1j ,..., snj ]T in which sij = 0 if sik =sis , and sij = 1 otherwise. The multiple fault signature Fj is not added to the signature matrix if ∀ sij : sij = 1 → sij = sik , due to the implication that the new multiple fault is a superset of a previously obtained fault which involves fewer nodes, and therefore cannot be part of a minimal diagnosis. The generation of the signature matrix stops when it is impossible to generate new signatures of faults which involve n nodes, with the faults which involve n−1 nodes. In FDI, the exoneration assumption [1] is implied, that is, given an observational model, each component of the support of a satisfied CARC is considered as functioning correctly, that is, it is exonerated. In the DX approach, the exoneration is not considered by default. In order to obtain the same results as in the DX approach by using a signature matrix, it is necessary to apply a new definition of consistency. In the no-exoneration case an observation signature OS is consistent with another signature FSj if ∀ OSi = 1 then sij = 1. That is, only the non-satisfied CARCs are used, and Fj must have the value 1 in each non-satisfied CARC. When the diagnosis set is obtained by using the new definition of consistency, we propose the application of a set of rules in order to detect which of the faults are minimal diagnoses, since many faults will be consistent with the observational model although they are not a minimal diagnosis. The following algorithm generates the rules to obtain the minimal diagnoses. Algorithm: Let CS(OS,FS) be a function which evaluates whether the signature OS is consistent with signature FS. For each possible fault Fj in the signature matrix, let MDF j be a Boolean variable which holds information on whether a fault Fj is a minimal diagnosis, and let VCF j be a Boolean variable which holds information on whether a fault Fj is a valid candidate for the generation of new faults that could be a minimal diagnosis. For each possible fault Fj it is initially supposed that VCF j = true. The first step is to validate if the OK (no fault case) is a minimal diagnosis: MDOK = CS(OS,OKS), and, for any simple fault Fj , the equality VCF j = ¬ MDOK must be satisfied. If OK is not a minimal diagnosis, the following rules must be evaluated for all the possible faults (except OK) in the same sequential order as they appear in
1090
R. Ceballos et al. Table 4. The signature matrix of the polybox example CARC OK F1 F2 F3 F4 F5 F12 F13 F14 F15 F23 F24 1 0 1 1 0 0 0 1 1 1 1 1 1 2 0 0 0 1 1 0 0 1 1 0 1 1 3 0 1 0 1 0 1 1 1 1 1 1 0 4 0 1 0 0 1 1 1 1 1 1 0 1 5 0 0 1 1 0 1 1 1 0 1 1 1 6 0 0 1 0 1 1 1 0 1 1 1 1 Fxxx ⊂ {F123 , F124 , F134 , F135 , F145 , F234 ,
F25 F34 F35 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F235 , F245 }
OK F1 F2 F3 F4 F5 F12 F13 F14 F15 F23 F24 F25 F34 VC 1 1 1 1 1 1 1 1 1 0 1 1 0 1 MD 0 0 0 0 0 1 1 0 0 0 0 0 0 1 VC and MD values for the observation signature OS = [0,
F45 Fxxx 0 1 1 1 1 1 1 1 1 1 1 1
F35 F45 Fxxx 0 0 0 0 0 0 0, 1, 1, 1, 1]T
Table 5. A subset of the rules for the polybox example
MDOK = CS(OS,OKS)
MDF 1 ⇒ VCF 14 = false
MDF 13 ⇒ VCF 123 = false
VCF 1 = ¬ MDOK
...
MDF 13 ⇒ VCF 134 = false
...
MDF 1 ⇒ VCF 15 = false
MDF 13 ⇒ VCF 135 = false
VCF 5 = ¬ MDOK
MDF 2 = VCF 2 ∧ CS(OS,FS2 )
MDF 14 = VCF 14 ∧ CS(OS,FS14 )
MDF 1 = VCF 1 ∧ CS(OS,FS1 ) ... MDF 1 ⇒ VCF 12 = false
...
MDF 13 = VCF 13 ∧ CS(OS,FS13 ) MDF 245 = VCF 245 ∧ CS(OS,FS245 )
the signature matrix. These rules guarantee the correct detection of the minimal diagnoses for an observational model: – For each fault Fj with the signature FSj , the equality MDF j = VCF j ∧ CS(OS,FSj ) must be satisfied. – For each fault Fk which involves n + 1 nodes, where n ≥ 0, and which can be obtained using the fault Fj (that involves n nodes) and a simple fault Fs (which is not involved in Fj ) then MDF j ⇒ VCF k = false. Example: Table 5 shows a subset of the rules for the polybox example. The generation of the rules for the verification of whether a fault is a minimal diagnosis can be done off-line, because these rules are the same for all the observational models. The bottom of Table 4 shows the VC and MD evaluation results for the observation signature OS = [0, 0, 1, 1, 1, 1]T . Only the evaluation of the rules must be done on-line. This part of the process is a simple propagation of Boolean values. The evaluation of the signature matrix is very similar to the FDI methodology. However in our approach, the faults involve nodes instead of components. Hence, the last step is the substitution of each node with one of its components. In the polybox example, fault F3 is equivalent to the faults in {{M1 }, {M7 },
An Integration of FDI and DX Techniques
1091
{A1 }, {A5 }}; fault F12 is equivalent to faults {{M6 M5 }, {M8 M5 }, {A4 M5 }, {A6 M5 }}; and so on. The information of all the possible minimal diagnoses is stored in a matrix and as a set of rules. Therefore, it is only necessary to calculate this matrix and rules once. As happens in FDI methodology, this work can be done off-line, only the evaluation of the signature matrix and rules is on-line. Our approach provide always the minimal diagnoses set of the system by using an observational model. The minimality issue was not guaranteed in the original FDI approach since only the signature matrix is used, but it is guaranteed in our approach since the compilation rules are added to the diagnosis process.
7
Conclusions and Future Work
This paper proposes a new approach to automation of and improvement in the determination of minimal diagnosis. The approach is based on FDI and DX theories. The structural pre-treatment in the first phase and the reduction of the model in the second phase enable improvement in the computational complexity. All the possible minimal diagnoses are represented as a signature matrix and as a set of rules. It is only necessary to calculate this matrix and rules once. The minimal diagnosis is obtained by using an observational model, the signature matrix and a set of compilation rules. Only the evaluation of the compilation rules and signature matrix is on-line, the rest of the process can be done off-line. The methodology was applied to an standard example, and the results were very promising. As future work we suggest extending the methodology to include dynamic systems and to include more complex and real problems, where the application of the methodology could be more complicated.
Acknowledgment This work has been funded by the M. de Ciencia y Tecnolog´ıa of Spanish (DPI2003-07146-C02-01) and the European Regional Development Fund.
References 1. Cordier, M., L´evy, F., Montmain, J., Trav´e-Massuy´es, L., Dumas, M., Staroswiecki, M., Dague, P.: A comparative analysis of AI and control theory approaches to model-based diagnosis. In: 14th European Conference on Artificial Intelligence. (2000) 136–140 2. Ceballos, R., G´ omez L´ opez, M. T., Gasca, R., Pozo, S.: Determination of Possible Minimal Conflict Sets using Components Clusters and Grobner Bases. In: DX04, 15th International Workshop on Principles of Diagnosis, Carcassonne, France (2004) 21–26 3. Reiter, R.: A theory of diagnosis from first principles. Artificial Intelligence 32 1 (1987) 57–96
1092
R. Ceballos et al.
4. de Kleer, J., Mackworth, A., Reiter, R.: Characterizing diagnoses and systems. Artificial Intelligence 2-3 (1992) 197–222 5. Staroswiecki, M., Declerk, P.: Analytical redundancy in non linear interconnected systems by means of structural analysis. In: IFAC Advanced Information Processing in Automatic Control (AIPAC-89), Nacy, France (1989) 51–55 6. Cassar, J., Staroswiecki, M.: A structural approach for the design of failure detection and identification systems. In: IFAC-IFIP-IMACS Conf. on Control of Industrial Processes, Belfort, France. (1997) 7. de Kleer, J.: An assumption-based truth maintenance system. Artificial Intelligence 2 (1986) 127–161 8. Buchberger, B.: Gr¨ obner bases: An algorithmic method in polynomial ideal theory. Multidimensional Systems Theory, N. K. Bose, ed. (1985) 184–232 9. Pulido, B., Gonz´ alez, C.A.: Possible conflicts: A compilation technique for consistency-based diagnosis. IEEE Transactions on Systems, Man, and Cybernetics 34 (2004) 2192–2206
Evolutionary Dynamic Optimization of a Continuously Variable Transmission for Mechanical Efficiency Maximization Jaime Alvarez-Gallegos1, Carlos Alberto Cruz Villar1 , and Edgar Alfredo Portilla Flores2 1
CINVESTAV-IPN, Electrical Engineering Department, Apdo. Postal 14-740, 07300, Mexico DF, Mexico {jalvarez, cacruz}@cinvestav.mx 2 Universidad Aut´ onoma de Tlaxcala, Engineering and Technology Department, Calz. Apizaquito S/N Km. 15, 90300, Apizaco, Tlax. Mexico [email protected]
Abstract. This paper presents a dynamic optimization approach based on the differential evolution (DE) strategy which is applied to the concurrent optimal design of a continuously variable transmission (CVT). The structure-control integration approach is used to state the concurrent optimal design as a dynamic optimization problem which is solved using the Constraint Handling Differential Evolution (CHDE) algorithm. The DE strategy is compared with the sequential approach. The results presented here demonstrate that the DE strategy is less expensive than the sequential approach from the computational implementation point of view.
1
Introduction
The traditional approach for the design of mechatronic systems, considers the mechanical behavior and the dynamic performance separately. Usually, the design of the mechanical elements involves kinematic and static behaviors while the design of the control system uses only the dynamic behavior; therefore, from a dynamic point of view this approach cannot produce an optimal system behavior [1], [2]. Recent works on mechatronic systems design propose a concurrent design methodology which considers jointly the mechanical and control performances [3]. In this paper an alternative methodology to formulate the system design problem of mechatronic systems is to state it in the dynamic optimization framework. In order to do so, the parametric optimal design and the proportional and integral (PI) controller gains of a pinion-rack continuously variable transmission (CVT) is stated as a dynamic optimization problem (DOP). The kinematic and A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1093–1102, 2005. c Springer-Verlag Berlin Heidelberg 2005
1094
J. Alvarez-Gallegos et al.
dynamic models of the mechanical structure and the dynamic model of the controller are jointly considered, besides a system performance criterion and a set of constraints which states the mechanical structure and the controller specifications. The methodology goal is to obtain a set of optimal mechanical and controller parameters which can produce a simple system reconfiguration. Methods usually employed to solve the resulting DOP belong to the nonlinear programming field. However, these classical methods need a point to initialize the optimization search, then consequently the convergence of the algorithm depends on the chosen point. Moreover, the nonlinear programming approach is able to produce only one possible solution. On the other hand, a recently population-based evolutionary optimization algorithm the so called Differential Evolution (DE) has been successfully applied on mechanical design optimization [4], [5]; however in these papers the mechanical design problem is stated as a static optimization problem. The DE strategy is very similar to standard evolutionary algorithms, the main difference is in the reproduction step. An arithmetic operator is used in this step, which means that the DE algorithm can directly operate on genes (design variables). In this paper the DE algorithm named CHDE (Constraint Handling Differential Evolution) presented in [11] is used, because the standard DE algorithms lack of a mechanism to bias the search towards the feasible region in constrained spaces. The CHDE algorithm proposes a constraint-handling approach, which relies on three simple selection criteria based on feasibility to bias the search towards the feasible region. These constraint-handling approach produces a very powerful search for constrained optimization problems. The paper is organized as follows: In Section 2 the description and the dynamic CVT model are presented. The design variable, performance criteria and constraints to be used in the concurrent optimal CVT design are established in Section 3. A brief description of the algorithms used in this paper is presented in Section 4. Section 5 presents some optimization results and discuss them. Finally, in Section 6 some conclusions and future work are presented.
2
Description and Dynamic CVT Model
Current research efforts in the field of power transmission of rotational propulsion systems, are dedicated to obtain low energy consumption with high mechanical efficiency. An alternative solution to this problem is the so called continuously variable transmission (CVT), whose transmission ratio can be continuously changed in an established range. A pinion-rack CVT which is a tractiondrive mechanism is presented in [7], this CVT is built-in with conventional mechanical elements as a gear pinion, one cam and two pair of racks. The conventional CVT manufacture is an advantage over other existing CVT’s. In order to apply the design methodology proposed in this paper, the pinionrack CVT is used. In [8] a dynamic model of a pinion-rack CVT is developed. Ordinary differential equation system (1) describes the CVT dynamic behavior. There, Tm is the input torque , J1 is the mass moment of inertia of the gear
Evolutionary Dynamic Optimization of a CVT
1095
pinion, b1 is the input shaft coefficient viscous damping, r is the gear pinion pitch circle radius, TL is the CVT load torque, J2 is the mass moment of inertia of the rotor, R is the planetary gear pitch circle radius, b2 is the output shaft coefficient viscous damping and θ is the angular displacement of the rotor. On the other hand, L, Rm , Kb , Kf and n represent the armature circuit inductance, the circuit resistance, the back electro-motive force constant, the motor torque constant and the gearbox gear ratio of the DC motor, respectively. Parameters rp , λ and bc denote the pitch radius, the lead angle and the viscous damping coefficient of the lead screw, respectively. Jeq = Jc2 + M rp2 + n2 Jc1 is the equivalent mass moment of inertia and d = rp tan λ, is a lead screw function. Moreover, θR (t) = 1 π arctan tan 2Ωt − is the rack angle meshing. The combined mass to be 2 2 tan φ cos θR is the loading on the gear translated is denoted by M and P = Trm p ˙ x2 = i, pinion teeth, where φ is the pressure angle. The state variables x1 = θ, x3 = e and x4 = e˙ are the angular speed of the rotor, the input current of the DC motor, the CVT offset and the displacement speed of the offset, respectively. The control signal u (t) is the input voltage to the DC motor. 2 J1 A xr3 sin θR x 1 Tm A + − b2 + b1 A2 + J1 A xr4 cos θR x1 − TL x˙ 1 = J + J1 A2 nKb 2 u (t) − d x4 − Rx2 (1) x˙ 2 = L x˙ 3 = x4
nKf bc Tm x − b + 2 l d rp d x4 − rp tan φ cos θR x˙ 4 = J M + deq2 y = x1 where A=1+
3
x3 cos θR ; r
θR (t) =
7 1 π 8 arctan tan 2x1 t − 2 2
(2)
Concurrent Optimal Design
In order to apply the design methodology proposed in this work, two criteria are considered. The first criterion is the mechanical CVT efficiency which considers the mechanical parameters and the second criterion is the minimal energy consumption which considers the controller gains and the dynamic system behavior. 3.1
Performance Criteria and Objective Functions
The performance of a system is measured by several criteria, one of the most used criterion is the system efficiency because it reflects the energy loss. In this work, the first criterion used in order to apply the design methodology is the
1096
J. Alvarez-Gallegos et al.
mechanical efficiency criterion of the gear system. This is because the racks and the gear pinion are the principal CVT mechanical elements. In a previous work we have stated that in order to maximize the mechanical CVT efficiency, the Φ1 (·) function given by (3) must be minimized. Equation (3) states the design problem objective function, where N1 , e and r represent the gear pinion teeth number, the CVT offset and the pitch pinion radius respectively. 1 Φ1 (·) = N1
2r + e cos θR r + e cos θR
(3)
On the other hand, in order to obtain the minimal controller energy, the design problem objective function given by (4) is used. ⎡ ⎤2 Ht 1⎣ −Kp (xref − x1 ) − KI (xref − x1 )d⎦ Φ2 (·) = 2
(4)
0
In (4), a proportional and integral (PI) controller structure is used, this is because in spite of the development of many control strategies, the proportional, integral and derivative (PID) controller remains as the most popular approach for industrial processes control due to the adequate performance in most of such applications. 3.2
Constraint Functions
The design constraints for the CVT optimization problem are proposed according to geometric and strength conditions for the gear pinion of the CVT. To prevent fracture of the annular portion between the axe bore and the teeth root on the gear pinion, the pitch circle diameter of the pinion gear must be greater than the bore diameter by at least 2.5 times the module [10]. Then, in order to avoid fracture, the constraint g1 must be imposed. To achieve a load uniform distribution on the teeth, the face width must be 6 to 12 times the value of the module [1], this is ensured with constraints g2 and g3 . To maintain the CVT transmission ratio in the range [2r, 5r] constraints g4 , g5 are imposed. Constraint g6 ensures a teeth number of the gear pinion equal or greater than 12 [1]. A practical constraint requires that the gear pinion face width must be equal or greater than 20mm, in order to ensure that, constraint g7 is imposed. To constraint the distance between the corner edge in the rotor and the edge rotor, constraint g8 is imposed. Finally to ensure a practical design for the pinion gear, the pitch circle radius must be equal or greater than 25.4mm, then constraint g9 is imposed. On the other hand, it can be observed that J1 , J2 are parameters which are function of the CVT geometry. For this mechanical elements the mass moments of inertia are defined by (5), where ρ, m, N , h, emax , rc and rs are the material density, the module, the teeth number of the gear pinion, the face width, the highest offset distance between axes, the rotor radius and the bearing radius, respectively.
Evolutionary Dynamic Optimization of a CVT
1 2 ρπm4 (N + 2) N 2 h; J1 = 32
1097
3 16 1 4 (emax + mN ) − πrs4 J2 = ρh πrc4 − 4 6 4
(5)
3.3
Design Variables
In order to propose a vector of design variables for the concurrent optimal CVT design, the standard nomenclature for a gear tooth is used. Equation (6) states a parameter called module m for metric gears, where d is the pitch diameter and N is the teeth number. m=
d 2r = N N
(6)
The face width h, which is the distance measured along the axis of the gear and the highest offset distance between axes emax are parameters which define the CVT size. The above design variables belong to the mechanical structure. On the other hand, the gain controllers belong to the dynamic CVT behavior. Therefore, the vector pi which considers mechanical and dynamic design variables is proposed in order to carry out the concurrent optimal CVT design. pi = [pi1 , pi2 , pi3 , pi4 , pi5 , pi6 ]T = [N, m, h, emax , KP , KI ]T 3.4
(7)
Optimization Problem
In order to obtain the optimal values of the mechanical CVT parameters and the controller gains, we propose a dynamic optimization problem, as follows H10 min6 F (x, p, t) =
Φn dt
p∈R
n = 1, 2
(8)
0
subject to
x˙ 1 =
8 7 3 ATm + J1 A p2x sin θR x21 − TL 1 p2 8 7 4 x1 − b2 + b1 A2 + J1 A p2x cos θ R 1 p2
J2 + J1 A2 b u (t) − ( nK d )x4 − Rx2 x˙ 2 = L x˙ 3 = x4 ( x˙ 4 =
nKf d
)x2 − (bl +
(9)
bc Tm rp d )x4 − rp J M + deq2
tan φ cos θR
Ht u(t) = −p5 (xref − x1 ) − p6
(xref − x1 )dt 0
(10)
1098
J. Alvarez-Gallegos et al.
1 2 ρπp42 (p1 + 2) p21 p3 J1 = 32 ρp3 32 4 (p4 + p1 p2 ) − πrs4 J2 = 3πrc4 − 4 3 2x3 cos θR p1 p2 d = rp tan λ 7 1 π 8 θR = arctan tan 2x1 t − 2 2 A=1+
g1 = 0.01 − p2 (p1 − 2.5) ≤ 0 p3 ≤0 g2 = 6 − p2 p3 g3 = − 12 ≤ 0 p2 g 4 = p1 p2 − p4 ≤ 0 5 g 5 = p4 − p1 p2 ≤ 0 2 g6 = 12 − p1 ≤ 0
(11) (12)
(13) (14) (15)
(16)
g7 = 0.020 − p3 ≤ 0 7 8 √ g8 = 0.020 − rc − 2(p4 + p1 p2 ) ≤ 0 g9 = 0.0254 − p1 p2 ≤ 0
4
Algorithms
In order to apply the design methodology, two solution algorithms to solve the dynamic problem given by (8)–(16) are used. Differential Evolution. The Constraint Handling Differential Evolution (CHDE) algorithm is used in this paper. This algorithm proposes an approach based on the idea of preserving the main DE algorithm and to add only a simple mechanism to handle the constraint. In standard DE algorithms an arithmetic operator is used, this operator depends on the differences between randomly selected pairs of individuals. An initial population of N P individuals is randomly generated, then for each parent (individual) CiG of the generation G, an offspring CiG+1 is created, where the number of the generations on the algorithm are stated by the M axGenerations parameter. The way of generating an offspring is to select randomly three individuals from the current population CrG1 , CrG2 ,CrG3 where r1 = r2 = r3 = i and r1 ,r2 , r3 ∈ [1, ..., N P ]. Select a random number jrand ∈ [1, ..D] where D is the number of genes or design variables of the system to optimize. Then, for each gene j = 1, .., D, if randj < CR or j = i, let
Evolutionary Dynamic Optimization of a CVT
1099
Cij,G+1 = Crj,G + F (Crj,G − Crj,G ) 3 1 2
(17)
Cij,G+1 = Cij,G
(18)
otherwise, let
where CR is the probability of reproduction, F is a scaling factor and Cij,G is the j − th gene of the i − th individual of the G − th generation. In order to select the individual of the next generation between the corresponding parent and offspring, three selection criteria are applied. These criteria guide the population towards a feasible zone, improve the algorithm convergence and bound the design variables. Moreover, they carry out the constraint handling. A more detailed explanation about these criteria is given in [11]. The CHDE approach only use the evaluated function, which is obtained by solving the four differential equations of the dynamic system and the objective function equation. The evaluated constraints and the constraint handling guide the population towards the feasible region, this represents an advantage when additional constraints are added to the original problem because the gradient information is not necessary. Nonlinear Programming Method. A DOP can be solved by converting it into a Nonlinear Programing (NLP) problem, two transcriptions methods exist for the DOP: the sequential and the simultaneous methods [12]. In the sequential method, only the control variables are discretized; this method is also known as a control vector parameterization. The resulting problem can be solved using conventional NLP method. A vector pi which contains the current parameter values is proposed and the NLP problem given in (19) and (20) subject to (9) to (16) is obtained. There Bi is the Broyden-Fletcher-Goldfarb-Shanno (BFGS) updated positive definite approximation of the Hessian matrix, and the gradient calculation ∇F T pi is obtained using sensitivity equations. Hence, if di solves the subproblem (19) and di = 0, then the parameter vector pi is an optimal solution to the original problem. Otherwise, we set pi+1 = pi + di and with this new vector the process is done again. 1 min4 QP (pi ) = F pi + ∇F T pi d + dT Bi d d∈R 2 subject to
gj (pi ) + ∇gjT pi d ≤ 0
j = 1, ..., 9
(19)
(20)
The NLP approach needs the gradient calculation and to solve sensitivity equations to obtain the necessary information to establish a subproblem. The number of sensitivity equations is the product between the number of state variables and the number of parameters, in this case the sensitivity equations are twenty four. Additionally, six gradient equations and one equation in order to obtain the value of the objective function must be solved. Besides, fifty four gradient equations of the constraints must be calculated.
1100
5
J. Alvarez-Gallegos et al.
Optimizations Results
The system parameters used in the optimization procedure were: b1 = 1.1N ms/rad, b2 = 0.05N ms/rad, r = 0.0254m, Tm = 8.789N m, TL = 0N m, λ = 5.4271, φ = 20, M = 10Kg, rp = 4.188E − 03m, Kf = 63.92E − 03N m/A, Kb = 63.92E − 03V s/rad, R = 10Ω, L = 0.01061H, bl = 0.015N s/m, bc = 0.025N ms/rad and n = ((22 ∗ 40 ∗ 33)/(9 ∗ 8 ∗ 9)). The initial conditions vector was [x1 (0), x2 (0), x3 (0), x4 (0)]T = [7.5, 0, 0, 0]T . In order to show the CVT dynamic performance for all simulations, the output reference was considered to be xref = 3.2. The parameters used in the CHDE algorithm are the following: Population number N P = 50, M axGenerations = 250; the parameters F and CR were randomly generated. The parameter F was generated per generation between [0.3, 0.9] and CR was generated per run between [0.8, 1.0]. In table 1 the mean computational time is the average of the time of five runs of the CHDE algorithm. The results obtained with the NLP and the CHDE algorithms are shown in table 1. The values of the mechanical CVT parameter and the controller gains for each objective function with both algorithms are shown in table 2. Table 1. Optimization results F (Φ1 ) F (Φ2 ) NLP CHDE NLP CHDE Optimum 0.4281 0.4282 721.17 555.52 Mean computational time [seg] 1558 18345 1055 17965 Iteration number 6 250 4 250 Item
Table 2. Results for the CVT parameters Parameter p1 p2 p3 p4 p5 p6
5.1
F (Φ1 ) NLP CHDE 38.1838 38.1767 0.0017 0.0017 0.0200 0.0200 0.0636 0.0636 10.0000 9.9933 1.0000 0.9996
F (Φ2 ) NLP CHDE 12.00 13.44 0.0030 0.0019 0.0200 0.0200 0.0909 0.0631 5.0000 5.0000 0.0100 0.0100
Discussion
In table 1, it can be observed that for F (Φ1 ), similar results for both algorithms are obtained. On the case of F (Φ2 ), the CHDE approach obtains a better result than the NLP approach. It can be said that the CHDE algorithm reaches the
Evolutionary Dynamic Optimization of a CVT
1101
best optimum of the function. On both objective functions, despite the low computational time of the NLP approach, the CHDE algorithm presents a higher performance, because in all runs carried out the population presents convergence towards the global optimum. For the NLP approach, the whole system equation was simultaneously solved to establish the subproblem until the stop criteria of the subproblem were satisfied. The initial point to search the optimum is p1 = [13, 0.0019, 0.02, 0.0629, 5, 0.1]T for both functions. However, on the F (Φ2 ) case, that optimum is only reached starting the search from p1 . The results for the CHDE algorithm were achieved with 12500 evaluations of the objective function for each run, approximately. For the NLP approach, evaluations of the objective function were 4 for each run. Despite the computational cost of the CHDE algorithm, it can be observed that the algorithm ensures convergence towards one best solution. In table 2, it can be observed that for F (Φ1 ), the optimal solution presents a more compact CVT size, because the value of the p2 parameter is lower than the value of the initial point. On the other hand, the controller gains p5 and p6 for both algorithm present a similar value. For the F (Φ2 ) function, the optimal solution of the CHDE presents a better result than the optimal solution of the NLP algorithm, because the optimal solution obtained presents a minimal energy controller besides a more CVT size. This can be observed on the same value of the p5 , p6 parameters and the smallest value of the p2 parameter.
6
Conclusions
In this paper a concurrent optimal design of a CVT was carried out. A novel approach based on the Differential Evolution method was used to solve the resulting problem. The performance of the CHDE algorithm was compared versus a NLP approach and the results provided a competitive performance. A CHDE advantage is that the arithmetic operator is applied to the design variables in order to give an easier implementation. On the other hand, because the CHDE presents a suitable handle of the constraints, it can be observed that the algorithm converges towards the feasible zone in each generation. From the optimization results it can be observed that the CHDE algorithm is a very powerful algorithm for solving dynamic optimization problems. Further research includes the statement of the concurrent optimal design as a multiobjective dynamic optimization problem and to apply the CHDE algorithm to obtain the Pareto optimal solutions.
References 1. Norton R.: Machine Design. An integrated approach. Prentice Hall Inc., Upper Saddle River, NJ 07458; 1996. 2. van Brussel H., Sas P., Nemeth I. Fonseca P.D., van den Braembussche P.: Towards a Mechatronic Compiler. IEEE/ASME Transactions on Mechatronics. 6 (2001) 90–104
1102
J. Alvarez-Gallegos et al.
3. Li Q., Zhang W.J., Chen L.: Design for Control–A concurrent Engineering Approach for Mechatronic Systems Design. IEEE/ASME Transactions on Mechatronics. 6 (2001) 161–168 4. Deb K., Jain S.: Multi-Speed Gearbox Design Using Multi-Objective Evolutionary Algorithms KanGal Report No. 2002001 5. Shiakolas P.S., Koladiya D., Kebrle J.: On the Optimum Synthesis of Six-Bar Linkages using Differential Evolution and the Geometric Centroid of Precision Positions Technique. In Mechanism and Machine Theory 40 (2005) 319–335 6. Shafai E., Simons M., Neff U., Geering H.: Model of a Continuously variable transmission. In First IFAC Workshop on Advances in Automotive Control. (1995) 575–593 7. De Silva C., Schultz M., Dolejsi E.: Kinematic analysis and design of a continuously variable transmission. In Mech. Mach. Theory, 29 (1994) 149–167 8. Alvarez Gallegos J., Cruz Villar C.A., Portilla Flores E.A.: Parametric optimal design of a pinion-rack based continuously variable transmission In IEEE/ASME International Conference on Advanced Intelligent Mechatronics. (2005) 899–904 9. Spotts M.: Mechanical design Analysis. Prentice Hall Inc., Englewood Cliffs, NJ; 1964. 10. Papalambros P., Wilde D.: Principles of optimal design. Modelling and computation. Cambridge University Press., The Edinburg Building, Cambridge CB2 2RU, UK; 2000. 11. Mezura-Montes E., Coello Coello C.A., Tun-Morales I.: Simple Feasibility Rules and Differential Evolution for Constrained Optimization. In R Monroy, G. ArroyoFigueroa, L.E. Sucar, and H. Sosa, editors, Proceedings of the Third Mexican International Conference on Artificial Intelligence (MICAI’2004), 707–716, Heidelberg, Germany, April 2004. Mexico City, Mexico, Springer Verlag. Lecture Notes in Artificial Intelligence No. 2972. 12. Betts J.T.: Practical Methods for Optimal Control Using Nonlinear Programming. SIAM, Philadelphia; 2001.
Performance Improvement of Ad-Hoc Networks by Using a Behavior-Based Architecture Horacio Mart´ınez-Alfaro1 and Griselda P. Cervantes-Casillas2 1
Center for Intelligent Systems, Tecnol´ogico de Monterrey, Monterrey, N.L. 64849 M´exico, [email protected] 2 Motorola Nogales IESS Nogales, Son. Mexico [email protected]
Abstract. This paper presents a new approach to improve performance in wireless ad-hoc networks with the DSR protocol using a Behavior-Based Architecture. Four levels of competence based on strategies to improve the cache were implemented for the Behavior-Based Architecture: sort routes, prefer fresher routes, selection, and disperse traffic. A conflict solver was implemented to solve counter level commands. Three different activation criteria for the conflict solver were developed, generating instances of the architecture. Two metrics were used to evaluate the performance of the ad-hoc network: end-to-end delay and dropped packet average for voice and data services, respectively. Six scenarios were analyzed showing the improvement of the network performance with respect to the original DSR protocol.
1 Introduction An ad-hoc network is a collection of wireless mobile host forming a temporary network without the aid of any established infrastructure or centralized administration [1]. In ad-hoc networks all nodes cooperate in order to dynamically establish and maintain routing in the network, forwarding packets for each other to allow communication between nodes which are not directly within the wireless transmission range. Rather than using the periodic or background exchange of routing information, common in most routing protocols, an on-demand routing protocol is one that searches for and attempts to discover a route to some destination node only when a sending node originates a data packet addressed to that node. Several routing protocols with an on-demand mechanism for wireless ad-hoc networks have been used, including DSDV [2], TORA [3, 4], DSR [5, 1], and AODV [6]. The Dynamic Source Routing protocol (DSR) adapts quickly to routing changes when host moves frequently and delivers better performance than other on-demand protocols like AODV, TORA, DSDV, under low mobility conditions. The key characteristic of the DSR [5, 1] is the use of source routing. That is, the sender knows the complete hop-by-hop route to the destination. These routes are stored in a route cache. The data packets carry the source route in the packet header. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1103–1112, 2005. c Springer-Verlag Berlin Heidelberg 2005
1104
H. Mart´ınez-Alfaro and G.P. Cervantes-Casillas
The DSR protocol has a Route Discovery and a Route Maintenance mechanisms; each one operates using entirely an on-demand behavior. When a node in the ad-hoc network attempts to send a packet to some destination, if it does not already know a route to that destination, it uses Route Discovery to dynamically discover one. The route is cached an used as needed for sending subsequent packets, each one using the Route Maintenance mechanism to detect if the route has broken. DSR does not contain any explicit mechanism to expire stale routes in the cache, or prefer fresher routes when faced up with multiple choices [7]. Picking stalled routes causes some problems: consumption of additional network bandwidth, full interface queue slots although the packet is eventually dropped or delayed and possible pollution of caches in other nodes. Our objective is to design a Behavior-Based Architecture (BBA) to improve routing in ad-hoc networks, using the DSR routing protocol; its main goal is to have better global performance network, improving delays and drecreasing dropped packets. The proposed solution scheme is based on BBA implemented in softbots [8], which are software robots working in a simulated environment. In our case each softbot represents one network node. The Behavior-Based architecture was inspired by insects [9, 10, 11]. These organisms own a primitive degree of intelligence, even so they are able to survive in hostile environments. BBA has been only implemented for mobile robots. In BBA, the global performance of the softbot emerges from specific performance of every integrating system, unlike the hierarchical architecture, the sensor data is distributed in parallel to each system. The way in which the system process the sensor data will define a single behavior; every behavior incorporates some degree of competence. This type of architecture provides a very reactive performance in the softbot acquiring a high degree of robustness due the parallel data distribution. In this way if one of the systems is down, the other behaviors still work allowing the softbot to achieve its task [8].
2 Methodology We use a detailed simulation model based on NS-2 Network Simulator, extended with our support for realistic modeling of mobility and wireless communication [12]. We simulated six different scenarios with two types of services: data and voice, since both are the most commonly used services nowadays. The data service was implemented over the TCP transport protocol for all scenarios. The voice service was implemented for scenarios 1, 2, and 3 over TCP and scenarios 4, 5, and 6 over UDP. Two performance metrics were evaluated for each scenario: – Data packets end-to-end delay. This includes all possible delays caused by buffering during route discovery latency, queuing at the interface queue, retransmission delays at the MAC, and propagation and transfer times. – Dropped packet average. The ratio of the data packets delivered to the destinations to those data packets forwarded. Dropped packets key cause is due to queuing at the interface queue and collisions. The end-to-end delay metric was used for the voice service and the dropped packet average for the data service.
Performance Improvement of Ad-Hoc Networks
1105
The main feature of the DSR is the use of source routing [5]; that is, the sender knows completely the route by which the packet will pass in order to arrive to the final destination node. All these routes are stored in the route cache in two different ways, paths and links. This route cache has a primary route cache and a secondary route cache. We worked with the primary route cache and with paths. As mention before, the DSR protocol has a Route Discovery and Route Maintenance mechanisms. The Route Discovery mechanism sends a route request packet to every node inside its transmission range that started the discovery; if none is the destination, those nodes retransmit the route request packet, and the process continues until the route request packet reaches its destination node. This process generates a lot of traffic in the network and uses network bandwidth, which increases the packet delivery delay and dropped packets. One way in which DSR avoids route discovery every time that needs one to a destination node or when sending subsequent packets to the same destination node by checking its cache if it has a saved route to the requeste destination node. This is why route caching is a key part of every on-demand routing protocol. This caching implies a good cache managing strategy selection. By caching and making effective use of this collected network state information, the amortized cost of route discoveries can be reduced and the overall performance of the network can be significantly improved. 2.1 Behavior-Based Architecture A Behavior-Based Architecture (BBA) was designed and implemented to establish good cache managing strategies with four levels of competence (see Figure 1); this has a direct effect on the DSR primary cache managing of every node in the network. First Level of Competence: Sort The first level of competence is to sort every node’s cache yielding a faster route search. As more time takes for a packet to get a route, delay and dropped packets increase. Three different sorting bahaviors are implemented: sort by minimum number of nodes, sort by minimum send time, and no sorting. The standar functionality of the DSR protocol when receiving a route request packet is to search in the route cache a route to that destination and choose the first route with minimum number of nodes scanning the entire route cache. In the first two sorting behaviors, when adding a route, the route cache is sorted by minimum number of nodes or by minimum send time to same destination. Second Level of Competence: Prefer Fresher Routes It is possible to find a route with this behavior in the sorted route cache; however, the sorted route cache could find the freshest route and therefore the route may be broken. These routes do contribute unnecessarily to the load in the routing layer. High routing load usually has a significant performance impact in low bandwidth wireless link. This increases problems with delay and dropped packets. The Prefer Fresher Routes behavior scans all the route cache to find the route with minimum number of nodes or minimum send time to a specific destination and when faced to multiple choices, it selects the fresher route. When the route cache is sorted, the search for fresher route is faster.
1106
H. Mart´ınez-Alfaro and G.P. Cervantes-Casillas Disperse Traffic Route 1 & 2 R3 Multiple Routes
Selection Input
Send Time R2
Conflict Solver
Output
Min # of Nodes
Prefer Fresher Routes
Sort # of Nodes Send Time
R1
No Sorting
Fig. 1. A Behavior-Based Architecture for wireless ad-hoc networks
Third Level of Competence: Selection This behavior is designed for nodes that have both types of traffic: voice and data. Its goal is to have the possibility to choose the route based on the packet to be sent, i.e., it could be chosen to use minimum send time routes for voice packets and minimum number of nodes for data packets. Fourth Level of Competence: Disperse Traffic This behavior disperses traffic in the network by sending different routes every time one is requested unlike the original DSR which always sends the first route with the minimum number of nodes found without caring if there are more routes with the same minimum number of nodes. Two ways to disperse traffic were implemented: multiple routes (same destination node) with one same characteristic and two routes with different characteristics. The first one selects every route that satisfies a selection criteria. If the Prefer Fresher Routes is active, the newest route in the route cache is first selected, then the second newest, and so on until every route has been used. If there is only one route that satisfies the selection criteria (second way of to disperse traffic), the traffic is dispersed with the first route that does not satisfy those criteria, either minimum number of nodes or minimum send time. Conflict Solver Every competence level generates an output command and sometimes these commands could be set opposite; due to this, a Conflict Solver (CS) is implemented. The CS activates the Sort level when adding a route to the route cache and when one is requested, it decides whether or not to activate the other three levels. These two calling types could be in parallel form. There is a global CS and a CS for the first, third, and fourth level of competence. All these CSs establish which behaviors are active and which criteria
Performance Improvement of Ad-Hoc Networks
1107
is used to apply them. By establishing different activation criteria in the CS, different instances of the BBA are generated. 2.2 Architecture Instances Based on the advantages offered by the BBA parallel scheme and behavior activation/deactivation in every level, three instances of the BBA were generated to evaluate the network performance. BBA1 instance is focused to use routes based on the type of service of every node. BBA2 is focused to use routes with minimum number of nodes without caring for the type of application used. BBA3 is focused to use routes with minimum send time without caring for the type of service used. Not every behavior is active in every level of the BBA2 and BBA3 instances. 2.3 Experiments The simulation process is divided in experiments with two transport protocols: TCP and UDP. For every set of experiments, both types of services were evaluated: end-toend delay was evaluated for voice and dropped packets for data. For every TCP scenario, the original DSR and the one modified with the architecture instances BBA1, BBA2, and BBA3 were analyzed. For the UDP scenarios the original DSR and the architecture instances BBA2 and BBA3 were analyzed. 2.4 Delay Performance Metrics We used the following metrics for the performance analysis of the end-to-end delay in ¯)2 , ad-hoc network: (a) Average x ¯ = n1 ni=1 xi , (b) Variance σ 2 = n1 ni=1 (xi − x √ (c) Standard deviation σ = σ 2 , and (d) Burst factor fb = σ 2 /¯ x. The burst factor gives an idea of the traffic type in the network: fb > 1 peak traffic, fb < 1 soft traffic, fb = 1 Poisson traffic. When there is peak traffic, there are traffic bursts very intense, not advisable. Ideally, it is better to have fb closer to 1 since Poisson traffic represents an infinite number of buffers yielding minimum delay [13].
3 Simulation Results The scenarios used to evaluate the ad-hoc network performance included two types of services: data and voice. We implemented two types of transport protocols, TCP and UDP, and two types of mobility, constant node motion and no node motion. The data service was implemented only in the TCP transport protocol, but the voice service was implemented in both transport protocols to see performance differences. The traffic sources used are continuos bit rate (CBR) and voice. The voice source was simulated using an exponential traffic with burst time 1.004s and idle time 1.587s [14]. Only 512byte data packets were used. The number of source-destination pairs and the packet sending rate in each pair is varied to change the offered load in the network. The mobility model uses the random waypoint model [15] for 5 ms and 300 ms in a rectangular field, 400 m × 400 m and 600 s of simulation time. Twenty nodes were used: 4 sourcedestination pairs for voice, 4 source-destination pairs for data, and 2 source-destination
1108
H. Mart´ınez-Alfaro and G.P. Cervantes-Casillas
pairs with voice and data services. The source-destination pairs are spread randomly over the network. The DSR protocol maintain a send buffer of 64 packets. It contains all data packets waiting for a route. Such packets are the ones for which route discovery has started but no reply has arrived yet. To prevent buffering of packets indefinitely, packets are dropped if they wait in the send buffer for more then 30 s. All packets (both data and routing) send by routing layer are queued at the interface queue until the MAC layer can transmit them. The interface queue has a maximum size of 50 packets and it is maintained as a priority queue with two priorities each one served in FIFO order. Routing packets get higher priority than data packets. 3.1 Dropped Packets Results with TCP The three architecture instances shown in Table 1 show a significant improvement in the general dropped packet average compare to the original DSR. This is due to the focus of the architecture to manage the route cache of every node in the network, preferring better and newer routes than the original DSR. Instance BBA3 is the one with the best performance, mainly in the scenarios with mobility. This instance is focused in using routes with minimum send time and newer in the cache, contributing to lower the discovery route time and to decrease the possibility of deleting packets from the send buffer. Table 1. Dropped packet average from all 20 nodes with TCP Original Instance Scenario DSR BBA1 BBA2 BBA3 1 2.56% 2.79% 2.07% 2.55% 2 4.66% 4.08% 4.29% 3.61% 3 3.83% 2.89% 3.38% 2.84%
Figures 2 and 3 show dropped packets for the original DSR and the modified DSR with instance BBA3 of the scenario 2. Figure 2 shows the performance of the scenario 2 for the original DSR. Figure 2(a) shows total packets sent, received, and dropped for every node in the network. Figure 2(b) shows a detail of the total dropped packets. The main problems in networks that generate dropped packets are due to dropped packets in the queue and collisions. Figure 3 shows the performance of the scenario 2 with instance BBA3. Figure 3(a) shows total packets sent, received, and dropped for every node in the network. Figure 3(b) shows total dropped packets. 3.2 End-to-End Delay Results with TCP Table 2 shows the results of the end-to-end delay for the voice service for the three scenarios with TCP. It includes original DSR, and modified DSR with instances BBA1, BBA2, and BBA3. A source-destination pair is denominated a session. Two sessions
Performance Improvement of Ad-Hoc Networks
180000
1109
7000 Sent packets Received packets Dropped packets
160000
6000 140000 5000
100000
Packets
Packets
120000
80000
4000
3000
60000 2000 40000 1000 20000
0
0 0
1
2
3
4
5
6
7
8
9 10 Node
11
12
13
14
15
16
17
18
19
0
1
2
3
(a) Packets sent, received, and dropped
4
5
6
7
8
9 10 Node
11
12
13
14
15
16
17
18
19
15
16
17
18
19
(b) Dropped packets
Fig. 2. Scenario 2 for original DSR with TCP
180000
7000 Sent packets Received packets Dropped packets
160000
6000 140000 5000
100000
Paquetes
Packets
120000
80000
4000
3000
60000 2000 40000 1000 20000
0
0 0
1
2
3
4
5
6
7
8
9 10 Node
11
12
13
14
15
16
17
18
(a) Packets sent, received, and dropped
19
0
1
2
3
4
5
6
7
8
9 10 Nodo
11
12
13
14
(b) Dropped packets
Fig. 3. Scenario 2, instance BBA3 with TCP dropped packets
were analyzed for the TCP experiments but, due to the lack of space, only results for one session are shown. We focused on the average to compare the end-to-end delay in the ad-hoc network. In all scenarios the three architecture instances show a considerable improvement in the end-to-end delay average compared to the original DSR. This is due to the cache managing strategies implemented for every node assuring that fresher routes are used and a more disperse traffic is happening over several routes, making more trustable options to send packets yielding a decrease in packet delivery time. Comparing the improvement in the performance metrics of the network for the two session, instance BBA2 shows a higher improvement than the other two instances, compared to the original DSR. Instance BBA2 is focused on finding routes with the minimum number of nodes and when it finds them, selects the freshest one. In addition to this, it disperses traffic over more than one route generating less crowded routes and decreasing packet delivery time keeping an enhanced performance of the network. Figure 4 shows the scenario 2 performance for a session and it includes the original DSR and instance BBA2. As one can see in Figure 4, instance BBA2 (Figure 4(b)) shows a major improvement in all statistics metrics compared to the original DSR.
1110
H. Mart´ınez-Alfaro and G.P. Cervantes-Casillas Table 2. End-to-end delay metrics for a network session
Metric min x ¯ max σ2 fb min x ¯ max σ2 fb min x ¯ max σ2 fb
Original Instance DSR BBA1 BBA2 BBA3 Scenario 1 0.0102 0.0001 0.0000 0.0001 0.9820 0.9278 0.7592 0.9056 8.0387 46.0931 5.0857 5.9868 0.4814 1.3197 0.2346 0.3409 0.4902 1.4224 0.3090 0.3764 Scenario 2 0.0048 0.0049 0.0048 0.0048 0.6800 0.5112 0.2889 0.3432 16.1109 31.4180 5.5558 24.9125 1.0376 2.1451 0.1947 0.5423 1.5259 4.1940 0.6740 1.5803 Scenario 3 0.0049 0.0049 0.0000 0.0002 0.7810 0.5936 0.6496 0.4038 10.8735 13.9272 12.0237 10.2866 1.4703 1.5242 0.9338 0.8463 1.8824 2.5677 1.4376 2.0961
20
20
18
18
16
16
14
14 12 Delay (s)
Delay (s)
12 10 8
10 8
6
6
4
4
2 0
2
1000
2000
3000
4000 Packets
5000
(a) Original DSR
6000
700
0
1000
2000
3000
4000
5000
6000
700
Packets
(b) Instance BBA2
Fig. 4. Scenario 2 with TCP End-to-end delay
4 Results with UDP After performing the TCP experiments, only instances BBA2 and BBA3, which showed the best performance improvement, were evaluated with UDP. Both architecture instances show an improvement in the general average dropped packets compared to the original DSR for the three scenarios; however, this improvement was not as high as the one shown with the TCP experiments. This is mainly due to the functionality characteristics of each protocol. UDP protocol sends packets continuously without knowing if a packet has been received by the following node; then, if
Performance Improvement of Ad-Hoc Networks
1111
there is no route to the destination in the cache, it will be continuously requesting Route Discovery. While TCP when sending a packet, it waits for the acknowledge packet before sending another, using less Route Discovery. The proposed BBA is focused on managing the cache of every node in the network giving as a result better and fresher routes than the original DSR. However, it is not focused directly on the Route Discovery mechanism, yielding not as good results as the the ones with TCP. Instance BBA3 with UDP had the best performance improvement in dropped packets metric (similar results with TCP). Both architecture instances had a small improvement for all scenarios. The statistics metrics used show that is not a very stable traffic since there is peak traffic in all scenarios. This type of traffic is formed of very intense burst generating more problems in the network, like more packets waiting for a route and more use of Route Discovery.
5 Conclusions Most on-demand routing protocols for wireless ad-hoc networks use route caching to reduce the overload of routing information and the route discovery latency. In wireless ad hoc networks, the routing changes happen frequently due the mobility of the nodes. Unless route caching adapts well to frequent routing changes, it could affect the network performance adversely. This work was motivated by previous studies where it is demonstrated that the DSR performance is degraded due to staled caching routes. The DSR protocol is a good candidate for the study of suitable caching strategies since this makes aggressive use of the route caching. This paper has presented a performance analysis in wireless ad-hoc networks using a Behavior-Based Architecture. The analysis is based on the DSR protocol and is divided in analysis with the TCP transport protocol and analysis with the UDP transport protocol. Based on the experiments performed, it is demonstrated that the proposed and implemented BBA improves the performance in wireless ad-hoc networks up to 50% in end-to-end delay and up to 25% in dropped packets. Up to date, this is the first reported research results that proves that BBA can be adapted and implemented to these type of networks. Three instances of the architecture were implemented and showed better performance than the original DSR. This proves the robustness of the designed architecture. It will also allow that the instances can be chosen according to the required improvement needs. For both TCP and UDP transport protocols analyzed, instance BBA3 produces less dropped packets; whereas instance BBA2 causes less end-to-end delay. These two instances can be interpreted as heuristics, improving the performance in wireless adhoc networks: to use routes with minimum send time to decrease dropped packets and to use routes with minimum number of nodes to decrease delay. Instances BBA2 and BBA3 are implemented by means of better managing cache strategies: Sort routes, Prefer Fresher routes, Selection, and Disperse Traffic; which all of them are small changes in the way cache is managed. This confirms one of the main advantages of BBA, small changes could generate great results. Although the simulator does not report the processing time for each node in the network, we consider that the
1112
H. Mart´ınez-Alfaro and G.P. Cervantes-Casillas
implemented algorithms does not represent a noticeable CPU time increase. Keeping in mind that another basic idea of the BBA is to keep simple and practical the algorithms for each behavior. In addition, although the experiments were performed using the DSR routing protocol, the BBA developed can be adapted to any protocol that handles route caching. Acknowledgment. The first two authors wishes to acknowledge the support for this research work granted by CONACYT, M´exico under the project “Performance optimization in ad-hoc networks”.
References 1. Johnson, D.: Routing in ad-hoc networks of mobile host. Proceedings of Workshop on mobile computing systems and applications 1 (1994) 1–6 2. Perkins, C.E., Bhagwat, P.: Highly dynamic destination sequenced distance-vector routing (DSDV) for mobile computers. ACM SIGCOMM ’94 Conference on Communications Architectures, Protocols and Applications (1994) 234–244 3. Park, V.D., Corson, M.S.: A highly adaptive distributed routing algorithm for mobile wireless networks. Procceedings of INFOCOM’97 (1997) 1405–1413 4. Park, V.D., Corson, M.S.: Temporally-ordered routing algorithm (TORA) version 1: Functional specification. Internet-Draft (1997) 5. Johnson, D.B., Maltz, D.A.: Dynamic source rounting in ad-hoc wireless networks. Mobile Computing (1996) 6. Perkins, C.: Ad-hoc on distance vector (AODV) routing. Internet-Draft (1997) 7. Perkins, C.E., Royer, E.M., Das, S.R., Marina, M.K.: Performance comparison of two ondemand routing protocols for ad-hoc networks. IEEE Personal Communications (2001) 8. Uribe-Guti´errez, S., Mart´ınez-Alfaro, H.: An application of behavior-based architecture for mobile robots design. Proceedings of MICAI 2000: Advances in Artificial Intelligence (2000) 136–147 9. Brooks, R.: A robust layered control system for a mobile robot. Technical Report AI MEMO 864, Massachussetts Institute of Technology, E.U. (1985) 10. Brooks, R.: Achieving artificial intelligence through building robots. Technical Report AI MEMO 899, Massachussetts Institute of Technology, E.U. (1986) 11. Brooks, R.: The behavior language; users guide. Technical Report AI MEMO 1227, Massachussetts Institute of Technology, E.U. (1990) 12. Mart´ınez-Alfaro, H., Vargas, C., Cervantes-Casillas, G., Rosado-Ruiz, A.M.: Contribuciones al simulador NS-2. Congreso de Investigaci=n y Extensi=n del Sistema Tecnol´ogico de Monterrey (2002) 13. Leijon, H.: Overflow from full availability group. Available from http://www.itu.int/itudoc/itu-d/dept/psp/ssb/planitu/plandoc/ovfull.html (1998) 14. Chuah, C., Subramanian, L., Katz, R.: A scalable framework for traffic policing and admission control. Report No. UCB//CSD-1-1144, Computer Science Division (EECS) University of California Berkeley (2001) 1–28 15. Fall, K., Varadhan, K.: Ns notes and documentation. Available from http://www.isi.edu/nsnam/ns/ (1999)
Analysis of the Performance of Different Fuzzy System Controllers Patrick B. Moratori1, Adriano J.O. Cruz1, Laci Mary B. Manhães1,2, Emília B. Ferreira1, Márcia V. Pedro1, Cabral Lima1, and Leila C.V. Andrade1,3 1
Instituto de Matemática / NCE - Universidade Federal do Rio de Janeiro (UFRJ), Caixa Postal 68.530 - 21945-970 - Rio de Janeiro - RJ - Brasil {moratori, mmanhães, emiliabf, marciavp}@posgrad.nce.ufrj.br {adriano, clima}@nce.ufrj.br 2 Faculdade Salesiana Maria Auxiliadora (FSMA), Rua Monte Elísio s/nº - Macaé - RJ - Brasil 3 Escola de Informática Aplicada da Universidade Federal do Estado do Rio de Janeiro (UNIRIO), Avenida Pasteur 458 - Urca – Rio de Janeiro - RJ - Brasil [email protected]
Abstract. The main goal of this work is to study the reliability of fuzzy logic based systems. Three different configurations were compared to support this research. The context used was to guide a simulated robot through a virtual world populated with obstacles. In the first configuration, the system controls only the rotation angle of the robot. In the second one, there is an additional output that controls its step. In the third one, improvements were included in the decision process that controls the step and the rotation angle. In order to compare the performance of these approaches, we studied the controller stability based on the removal of rules. We measured two parameters: processing time and the amount of step necessary to reach the goal. This research shows that simplicity and easiness of the design of fuzzy controllers don’t compromise its efficiency. Our experiments confirm that fuzzy logic based systems can properly perform under adverse conditions.
1 Introduction The design of systems that simulate real conditions is a very complex process, both for hardware and software solutions. Computer Science presents many different possibilities of constructing very reasonable approaches. Fuzzy logic reduces the difficulties of implementation because even when the designer doesn’t have complete knowledge about the problem, it is still possible to write simple and efficient controllers. This characteristic proved to be true after the comparisons of different configurations, in order to define the controller robustness. The results indicate that fuzzy logic based systems can contribute to robotic and industrial automation areas providing simple and efficient solutions. The fuzzy logic based system described in this work guides a simulated robot through a virtual world populated with randomly placed obstacles. This model simulates a real situation where a robot tries to move through a complex environment. A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1113 – 1123, 2005. © Springer-Verlag Berlin Heidelberg 2005
1114
P.B. Moratori et al.
The sensors used to acquire information are simple, so its knowledge of the environment is limited. Three different approaches were simulated in order to test their performance. In the first approach the system controls only the direction in which the robot moves at a constant speed, which was simulated as a constant step. In the second configuration another output controls the robot speed. The variation of speed was simulated as a variable step. In the third configuration, modifications were done in the fuzzy module in order to apply optimizations in the system controls. The entire system is based on a model previously tested [1] [2] [3] [4]. The main goal of this work is to compare the performance of these controllers considering the cost of processing and the quantity of steps necessary to achieve the goal. The tests show that the optimized approach presents an improved performance without an increase on processing time, which will be important when the system is moved to the controller of the real robot. The tests also shown that modifications applied to fuzzy module inference allowed a proper control to a variable step. So, it is possible to incorporate a velocity control to the system, without compromising its general efficiency.
2 Model Description The fuzzy controller has to move the robot from the left sidewall to right sidewall avoiding the fixed obstacles randomly distributed as well as the other sidewalls. Fig. 1 shows the simulated robot and the virtual world. y G
yo φ
yr
O
obstacles
disto
A
robot
xr
L
xo
xf
x
Fig. 1. Diagram of simulated robot and the virtual world
The radius of the robot is equal to 6 units and the radius of each obstacle is equal to 3 units. The virtual world corresponds to the plane [0x200], [0x100]. The robot has to arrive at the right sidewall defined at the position xf=200 at any coordinate y. Three variables xr, yr and φ determine the exact position of the robot. The robot has sensors that detect and measure the distances to the obstacles that lay on its path. Fig. 2 shows the detection of possible collisions and measurements used by the sensors. Should more than one obstacle be detected only the closest one is considered by the algorithm (disto). At each stage of the simulation the robot moves using information from the horizontal angle (φ), the yr coordinate of the robot and the distance to the closest obstacle (disto). In the first approach the system generates as the only output the
Analysis of the Performance of Different Fuzzy System Controllers
1115
rotation angle of the robot (θ) that moves at a fixed step (Δc). In the second approach, the controller outputs are the angle of rotation (θ) and a variable step (Δv). In the third configuration, two outputs were also generated, angle of rotation (θ) and an optimized variable step (Δov). The results of the last approach benefited the task of guiding efficiently the simulated robot through a virtual world. φ disto yr
Fuzzy Module
θ Δc
Configuration 1
φ disto yr
Fuzzy Module
θ Δv
Configuration 2
φ disto yr
Fuzzy Module
θ Δov
Configuration 3
Legend: φ - Horizontal angle disto - Closest obstacle yr - Position y θ - Rotation angle Δc - Constant step Δv - Variable step Δov- Optimized variable step
Fig. 2. The fuzzy controllers
We use simple kinematics equations similar to the ones described by Kosko and Kong [9], and used to solve the problem of backing up a truck. The equations that describe the movement of the robot at every stage of the simulation are: φ' = φ + θ x r' = x r + Δcos (φ' ) y r' = y r + Δsin (φ' )
(1)
Note that Δ represents the value of the distance moved by the robot at every stage of the simulation and it is also a function of φ, yr and disto. The range of the variables, or their universe of discourse, is: 0 ≤ dist o , x r ≤ 200 0 ≤ y r ≤ 100 − 180 o ≤ φ ≤ +180 o − 30 o ≤ θ ≤ +30 o − 0.3 ≤ Δ ≤ 10
(2)
In the first configuration, Δ is a constant equals to 1.3 units while in the second and the third, Δ varies in the interval, shown on equation (2). Negative values defined to Δ allow little backward movements. Positive values of φ and θ represent counter
1116
P.B. Moratori et al.
clockwise rotations and negative values clockwise rotations. Therefore, usual geometric conventions are used. The universes of discourse of the “linguistic variables” associated to the input variables are divided into fuzzy sets that represent the semantic of linguistic terms. Fuzzy sets represent the semantic of their labels using functions that assign a real number between 0 and 1 to every element x in the universe of discourse X. The number μà (x) represents the degree to which a object x belongs to the fuzzy set Ã. Designers of fuzzy logic based systems depending on their preference and experience have used many different fuzzy membership functions [5] [6] [7] [8]. In practice, triangular and trapezoidal functions are the most used because they simplify the computation and give very good results.
Fig. 3. Fuzzy membership functions for each linguistic fuzzy set value
The items (a), (b), (c) and (d) of Fig. 3 show all the functions representing the membership functions used on all configurations of the controller. The item (e) of Fig. 3 shows the membership functions used with variable Δ, which is used on the second and third configuration. The sets ZE, LCW and LCCW (from φ) and the sets
Analysis of the Performance of Different Fuzzy System Controllers
1117
RLR, ZE and RLL (from θ) are narrower than the others. This characteristic allows a finer control around the horizontal direction, avoiding large changes when the robot is heading in the right direction. Wider sets were used at the extremes of the universe of discourse in order to obtain faster changes of direction when the robot is in the wrong direction. The sets VN, N and MD (from disto) are also represented by narrower sets by the same reason. The sets ZE, LAC and NOR (from Δ) are narrower than the others in order to apply refined velocity control in situations of eminent crashes. In the Fig. 3, we highlight the changes implemented in the optimization (third approach) by using shaded sets and the hatched lines show previous configurations. The controller under normal conditions operates based mainly on information from the distance to the nearest obstacle or wall (disto) and the angle to the horizontal (φ). So this part of the rule base is composed of 35 rules that allows the robot to turn to the right or to the left and to move at a fixed step of size equal to 1.3 units (configuration 1) or at a variable speed (configuration 2 and 3) that is simulated by the variable step (Δ). Table 1 shows the optimized rule base, identifying on each cell the output pair (θ , Δ ). The shaded cells show where the modifications occurred. Table 1. Rule base matrix for the robot controller φ disto
VCW
CW
LCW
ZE
LCCW
CCW
VCCW
VN
(RVL, ZE)
(RVL, ZE)
(RVL, ZE)
(RL, ZE)
(RL, ZE)
(RL, ZE)
(RVR, ZE)
N MD
(RVL,LAC) (RVL,NOR)
(RVL,NOR) (RL, AC)
(RVL,NOR) (RLL, AC)
(RL,NOR) (RLL,HAC)
(RL,NOR) (RLR,AC)
(RL,NOR) (RR, AC)
(RVR,LAC) (RVR,NOR)
F
(RVL, AC)
(RL, AC)
(RLL, AC)
(RLR,HAC)
(RLR,AC)
(RR, AC)
(RVR, AC)
VF
(RVL, AC)
(RL, AC)
(RLL, AC)
(RLR,HAC)
(RLR,AC)
(RR, AC)
(RVR, AC)
The following rules were applied in the previous configurations: Table 2. Rules applied in the previous configurations φ
LCCW
CCW
VN
(RLL, ZE)
(RLL, ZE)
N
(RLL, NOR)
(RLL,NOR)
disto
There are particular situations, where the robot is closer to the upper or lower walls in which the rules shown above do not guide the robot correctly. In order to solve this problem, two rules, that take the yr position of the robot into account, were added. These rules, that are independent from the other two input variables, use only two fuzzy sets (variable yr) and are shown in (3): if (yr is VLOW) then (θ is RVL) and (Δ is ZE) if (yr is VHIGH) then (θ is RVR) and (Δ is ZE)
(3)
The controller has finer control rules when near to obstacles or walls, it can move at very slow speed in these situations, therefore it was decided to set a maximum number of simulation cycles (500) in order to avoid longer processing times.
1118
P.B. Moratori et al.
3 Testing Stability and Performance It was necessary to define the context and reference parameters to measure and compare the performance of different configurations. In order to compare the performance of these configurations we studied the robot stability based on the removal of rules [9] [10]. Using this background we measured processing times and quantity of steps done during the trajectory. A smaller quantity of steps means that the robot was able to reach its goal in less time. First the controller was tested in different situations in order to evaluate its ability to guide the robot through the virtual world. This was done in order to define the adequate parameters to the remaining experiments. In this first experiment, the number of obstacles was varied between 1 and 5, randomly distributed over the virtual world. For each of these arrangements, we tested different starting positions (10 positions) and starting angles (5 angles) evenly distributed over the universe of discourse of each variable. Note that the robot always started at the left sidewall. The controller was able to guide the robot correctly to its goal in all of these randomly generated situations. In order to test the stability of the controller we choose to gradually remove rules from the rule base and check the behaviors of the robot. The idea is to verify whether it is possible to obtain a stable and efficient system even when the entire scope of the problem is unknown. To guarantee the validity of the remaining comparisons, we choose from the previous experiment a fixed distribution of the obstacles. The five fixed obstacles are shown in the Fig. 4(a), 5(a), 6(a). Initially we defined 50 initial positions, combining initial values of φ (-90º, -45º, 0º, 45º, 90º) and yr (6, 15, 25, 35, … , 85, 94). However, four of these combinations (-45º, 6), (-90º, 6), (45º, 94), (90º, 94) were not tested because the robot would start at a virtually impossible position. Each one of these remaining 46 initial positions, that we called a sample, was first processed using the complete rule base. At each step of the experiment one rule was removed, according to a predefined criterion, and all of the 46 initial configurations were reprocessed. The Fig. 4(a), 5(a) and 6(a) show for each configuration, one example of a complete trajectory of the robot starting at yr = 45 and φ=50º, as well as the graphics about the behavior of the variables θ (4(b), 5(b), 6(b)) and Δ (4(c), 5(c), 6(c)).
(a)
(b)
(c)
Fig. 4. Constant step configuration represented in (a), (b) and (c), respectively
Analysis of the Performance of Different Fuzzy System Controllers
(a)
(b)
1119
(c)
Fig. 5. Variable step configuration represented in (a), (b) and (c), respectively
(a)
(b)
(c)
Fig. 6. Optimized variable step configuration represented in (a), (b) and (c), respectively
The Fig. 4, 5 and 6 show the model evolutions in which a more adequate information treatment was done. In each new approach, the step quantity to develop the trajectory was decreased, as in 4(b), 5(b) and 6(b). A better trajectory line, Fig. 4(a), 5(a) and 6(a), has been obtained from the different configurations. We defined a total of 24 different ways of removal of rules. Of these ways, 20 used random removal and the other four used the following order of removal: (1) sequential removal using column-wise order; (2) reverse sequential column-wise, meaning that the rules from the last column will be removed first; (3) central rules first (outlined cells in the Table 1) and then peripheral rules; (4) peripheral rules first then central rules. Combining all these different possibilities, in our experiment we have a total of 122544 final samples processed. The resulting figures for processing time and number of steps were stored for all samples and compared. The tests were done on a computer equipped with a processor Intel Pentium© M 710(1.40 GHz) with 512 MB of DDR SDRAM using Matlab© 7.0.
4 Simulations and Results The stability and robustness of the controller was analyzed as the rules were removed counting the number of samples that achieved the right wall. Figure 7 shows these results for all configurations of the controller. These figures are important because they are a direct measurement of the degree of success of the systems as information control was removed. They show that even when the designer does not have entire knowledge about the problem it is still possible to write an efficient controller.
1120
P.B. Moratori et al.
The optimized approach has obtained a better performance in the most part of the removed rule process, when compared with the variable step configuration. We observed in the Fig. 7 that the constant step approach still has a better general stability. Even so it is important to note that the statistical differences are comparatively small.
Fig. 7. Different controllers performance in successive removed rules process
The controller performance was analyzed using the following criteria: processing time and quantity of steps executed during the entire trajectory. In order to obtain a more complete vision, we analyzed not only the behavior of the samples but also the performance of the ones that achieved their goal. In the analysis of all samples, we measured (1) the average of the number of steps done in all the simulations, (2) the average processing time of each sample, (3) the average processing time to simulate all samples on each one of the criteria used to remove the rules, (4) the total time spent in all simulations and (5) quantity of stagnated samples during its trajectory.
Fig. 8. Average number of steps executed
Fig. 9. Processing time of each sample
The Fig. 8 and 9 show the average number of steps executed and processing time of each sample, respectively, for the three model approaches. The obtained results identify the evolution of these parameters in each approach. A relevant improvement
Analysis of the Performance of Different Fuzzy System Controllers
1121
was observed comparing the constant step (hatched line), the variable step (doted line) and the optimized variable step (line). Other details of this analysis can be seen on Table 3. Table 3. Analysis of all samples Characteristics
Time (seconds)
Average processing time to simulate all samples on each one of the criteria used to remove the rules Total time spent in all simulations
Samples (unit)
Quantity of stagnated samples during its trajectory, limited by 500 simulation cycles.
Constant step
Variable step
Optimized variable step
375,8
214,1
171,8
9018,8
5139,5
4124,1
69
53
None
Comparatively, the values related to the time feature show a better performance when the optimized variable step was applied. The quantity of samples that spent long time at obstacles, which we called stagnated samples, indicates that the controller had not wasted much time processing eminent crashes, avoiding compromising its efficiency. In the analysis of the samples that reached the goal we considered the following aspects: (1) the average number of steps to reach the goal, the lowest and the highest values; (2) the average time spent to simulate a single sample, its shortest and widest value. Table 4. Analysis of samples that reached the goal Characteristics
Step done (unit)
Time (seconds)
Average number of steps to reach the goal Lowest quantity of movements done by the controller in simulations of the experiment Highest quantity of movements done by the controller in simulations of the experiment Average time spent to simulate a single sample Shortest time for a sample Longest time for a sample
Constant step
Variable step
Optimized variable step
155
79
65
143
36
35
498
437
298
0,34
0,18
0,15
0,18
0,05
0,05
1,88
0,65
0,67
It is possible to note an improved performance of the system that has an optimized variable step for all analyzed experiments except for the stability analysis (Fig. 6), where it showed more sensitivity to the removal of rules. This approach generates a
1122
P.B. Moratori et al.
low average of number of steps to reach the goal, comparing with the others configurations. Additionally, it spent a reduced time to process all samples. Based on the obtained results in all analyzed aspects, an increased efficiency was observed in the system overall performance. The optimizations were effective, because the stability and efficiency of the controller were not compromised. The comparison among different approaches shows the reliability of the fuzzy logic based systems.
5 Final Considerations This work analyzed the performance of a fuzzy controller used to guide a simulated robot through a virtual world populated with obstacles randomly placed. We tested three different controller configurations. We used a criteria based on the removal of rules to test the stability and sensitivity of the controller at the same time. The measurement of the performance of the controller was based on the following parameters: processing time and quantity of steps to reach the goal. In the majority of the experiments the performance of the optimized variable step controller was better than the other ones. The quantity of stagnated samples indicates that the controller had not wasted much time processing eminent crashes. The properly speed treatment brought improvements in time processing and number of steps to reach the goal, without compromising the simplicity of the system design. The optimizations were effective because the stability and efficiency of the controller were not compromised. The comparison among different approaches indicated the reliability of the fuzzy logic based systems.
References 1. Moratori, P. et al.: Análise de Estabilidade e Robustez de um Sistema de Controle Fuzzy Otimizado desenvolvido para guiar um robô simulado. In: Proceedings of XXXII SEMISH: Brazilian Software and Hardware Seminars, São Leopoldo, RS, Brazil, (2005) pp. 1704-1715. 2. Moratori, P. et al.: Analysis of stability of a Fuzzy Control System developed to control a simulated robot, In: Proceedings of FUZZ-IEEE 2005: The 14th IEEE International Conference on Fuzzy Systems, Reno, Nevada, USA, (2005) pp. 726-730. 3. Moratori, P. et al.: Analysis of the performance of a Fuzzy Controller developed to guide a simulated robot, In: Proceedings of ICCC 2005: The IEEE 3rd International Conference on Computational Cybernetics, Mauritius, (2005). 4. Moratori, P. et al.: Analysis of Sensitivity and Robustness to a Fuzzy System developed to guide a Simulated Robot through a Virtual World with Obstacles, In: Proceedings of ISDA 2004: The IEEE 4th International Conference on Intelligent Systems Design and Applications Conference, Budapest, Hungary, (2004) pp. 283-286. 5. Setnes, M. and Roubos, H.: GA-Fuzzy Modeling and Classification: Complexity and Performance, IEEE Transactions and Fuzzy Systems. v.8, nº 5, October (2000) pp. 509-521.
Analysis of the Performance of Different Fuzzy System Controllers
1123
6. Yen, J. and Langari, R.: Fuzzy Logic: Intelligence, Control and Information, Prentice Hall, Englewod Cliffs (1999). 7. Mamdani E.: Application of Fuzzy Logic to Approximate Reasoning using Linguistic Synthesis, IEEE Transactions on Computers, vol. C-26, nº 12, (1997) pp. 1182- 1191. 8. Kosko, B.: Fuzzy Thinking: The New Science of Fuzzy Logic. London: Flamingo (1993). 9. Kosko, B. and Kong, S.: Comparison of Fuzzy and Neural Truck Backer-Upper Control Systems, In: Neural Networks and Fuzzy Systems: A Dynamical Systems Approach to Machine Intelligence”, Prentice Hall, Englewod Cliffs (1992) p.339. 10. Langari, G. and Tomizuka, M.: Stability of fuzzy linguistic control systems. In: Proceedings of the 1990 29th Conference on Decision and Control (1990) pp. 2185-2190.
Discrete-Time Quasi-Sliding Mode Feedback-ErrorLearning Neurocontrol of a Class of Uncertain Systems Andon Venelinov Topalov1 and Okyay Kaynak2 1
Control Systems Department, Technical University of Sofia, branch Plovdiv, 25, Canko Dustabanov str.,4000, Plovdiv, Bulgaria [email protected] 2 Electrical & Electronic Engineering Department, Mechatronics Research and Application Center, Bogazici University, Bebek, 34342 Istanbul, Turkey [email protected]
Abstract. The features of a novel dynamical discrete-time algorithm for robust adaptive learning in feed-forward neural networks and its application to the neuro-adaptive nonlinear feedback control of systems with uncertain dynamics are presented. The proposed approach makes a direct use of variable structure systems theory. It establishes an inner sliding motion in terms of the neurocontroller parameters, leading the learning error toward zero. The outer sliding motion concerns the controlled nonlinear system, the state tracking error vector of which is simultaneously forced towards the origin of the phase space. It is shown that there exists equivalence between the two sliding motions. The convergence of the proposed algorithm is established and the conditions are given. Results from a simulated neuro-adaptive control of Duffing oscillator are presented. They show that the implemented neurocontroller inherits some of the advantages of the variable structure systems: high speed of learning and robustness.
1 Introduction The applications of neural networks in closed-loop feedback control systems have only recently been rigorously studied. When placed in a feedback system, even a static neural network becomes a dynamical system and takes on new and unexpected behaviors. Hence, such properties of the neural structures as their internal stability, passivity, and robustness must be studied before conclusions about the closed-loop performance can be made. Variable structure systems (VSS) with sliding mode were first proposed in the early 1950s [1]. The best property of the sliding mode control (SMC) scheme is its robustness. Broadly speaking, a system with an SMC is insensitive to parameter changes or external disturbances. Recent studies have emphasized that the convergence properties of the gradient-based training strategies widely used in artificial neural networks can be improved by utilizing the SMC approach. A sliding mode learning approach for analog multilayer feedforward neural networks (FNNs) has been presented in [2], by defining separate sliding surfaces for each network layer. A further contribution to the subject can be found in [3] in which the approach A. Gelbukh, A. de Albornoz, and H. Terashima (Eds.): MICAI 2005, LNAI 3789, pp. 1124 – 1133, 2005. © Springer-Verlag Berlin Heidelberg 2005
Discrete-Time Quasi-Sliding Mode Feedback-Error-Learning Neurocontrol
1125
presented in [4] for Adaline neural networks is extended to allow on-line learning in FNNs with a scalar output. Although from a theoretical point of view the development of VSS-based learning algorithms for analogue (i.e. continuous time) neurons seems easier and straightforward, the discrete-time algorithms are more convenient for practical implementation. The discrete-time sliding mode control (DTSMC) design issues have been addressed in [5, 6]. The stability issues in DTSMC have been presented in [7] and the sufficient conditions for convergence have been determined. The first results on adaptive learning in discrete-time neural networks, for both single and multilayer perceptrons, based on the theory of the quasi-sliding modes in discrete time dynamical systems are presented in [8]. These algorithms constitute the basis of the later proposed identification and control schemes in [9]. Another learning algorithm for FNNs is recently developed in [10]. It may be considered as the discrete time counterpart of the continuous time algorithm earlier proposed in [2]. The feedback-error-learning approach, initially proposed in [11] and applied to control of robot manipulators, has been based on the neural network (NN) realization of the computed torque control, plus a secondary proportional plus derivative (PD) controller. The output of the PD controller has been also used as an error signal to update the weights of a NN trained to become a feedforward controller. Subsequently this approach has been extended for learning schemes where NN has been applied as an adaptive nonlinear feedback controller [12]. In the present paper the feedback-error-learning approach is further investigated by applying a newly developed VSS-based discrete-time on-line learning algorithm to the NN feedback controller (NNFC). An inner quasi-sliding motion in terms of the NNFC parameters is established, leading the output signal of the conventional feedback controller (CFC) toward zero. The outer quasi-sliding motion concerns the nonlinear system under control, the state tracking error vector of which is simultaneously forced towards the origin of the phase space. Section 2 presents the developed discrete-time on-line learning algorithm, the proposed sliding mode feedback-error-learning control scheme and introduces the equivalency constraints on the sliding control performance for the plant and the learning performance for the NNFC. Results from a simulated control of Duffing oscillator by using this neurocontrol strategy are shown in section 3. Finally, section 4 summarizes the findings of the work.
2 The Quasi-Sliding Mode Feedback-Error-Learning Approach 2.1 Initial Assumptions and Definitions The proposed control scheme is depicted on Figure 1. The system under control is considered as nonlinear and nonautonomous, described by Eq. (1).
(
)
θ ( r ) = ψ θ , θ,..., θ ( r −1) , t + τ
(1) T
where ψ ( ⋅) is an unknown function, θ = ªθ , θ,..., θ ( r −1) º is the state vector, τ is ¬ ¼ the control input to the system and t is the time variable.
1126
A.V. Topalov and O. Kaynak
A PD controller (the CFC block on Figure 1) is provided both as an ordinary feedback controller to guarantee global asymptotic stability in compact space and as an inverse reference model of the response of the system under control.
NNFC
τn θd , θd
CFC
τc τ
-
θ, θ
Duffing oscillator
Fig. 1. Block diagram of nonlinear regulator sliding mode feedback-error-learning scheme
Consider a two-layered feedforward NN implemented as NNFC where T
X = ª¬ x1 , x2 ,...x p º¼ ∈ \ p is the augmented by a bias term input vector (input pattern) which
is
assumed
fixed
during
the
learning
iterations,
T
n Τ H ( k ) = ª¬τ Hn 1 ( k ), ... , τ Hn ( k ) º¼ ∈ \ n is the vector of the output signals from the neurons in the hidden layer, where k is the time index or iteration.
netTH ( k ) = ª¬ net τ H1 ( k ) , net τ H 2 ( k ) ,..., net τ H n ( k ) º¼ is the vector of the net input sigT
nals of the hidden neurons. It is computed as netTH ( k ) = W 1( k ) X , where
W1(k ) ∈ \n× p is the matrix of the time-varying weights of the connections between the neurons of the input and the hidden layer. Each element w1i , j ( k ) of this matrix represents the weight of the connection of the corresponding hidden neuron i from its input j. τ n ( k ) ∈ \ is the time varying network output. It can be calculated as follows:
τ n (k ) = W 2 ( k ) Φ ª¬ netTH ( k ) º¼ = W 2 ( k ) TH ( k )
(2)
where W 2(k ) ∈ \1×n is the vector of the weights of the connections between the neurons in the hidden layer and the output node. Both W1( k ) and W 2 ( k ) are considered augmented by including the bias weight components for the corresponding neurons. T n n Φ ª netTH ( k ) º = ª f1 ( net τ H ( k ) ) ,..., f n ( net τ H ( k ) ) º , Φ : \ → \ is an operator ¬
¼
¬
1
n
¼
which elements fi ( ⋅) are the activation functions of the neurons in the hidden layer.
(
)
(
It will be assumed here that f i ( ⋅) : \ → \ is such that f i − net τ H = − f i net τ H i i −x
for i = 1,..., n . The so called tan-sigmoid activation function § tan - sig ( x ) = 1 − e ¨ 1 + e− x ©
)
·, ¸ ¹
Discrete-Time Quasi-Sliding Mode Feedback-Error-Learning Neurocontrol
1127
common to neural networks, has been used in the experiments. The neuron in the output layer is considered with a linear activation function. The output signal of the PD controller τ c ( k ) represents the learning error for the neurocontroller at the time step k. 2.2 The VSC-Based Discrete-Time On-Line Learning Algorithm
A VSC-based discrete-time learning algorithm is applied to the NNFC. The zero adaptive learning error level for the neurocontroller Sc ( k ) and the sliding surface for the nonlinear system under control S p ( k ) are defined as Sc ( k ) = τ c ( k ) = τ n ( k ) + τ
and S p ( k ) = Δe ( k ) + λ e ( k ) respectively with e ( k ) = θ ( k ) − θ d ( k ) , and λ being a constant determining the slope of the sliding surface. In the continuous SMC design the well known stability condition to be satisfied for a sliding mode to occur is [13]:
S (t )S (t ) < 0
(3)
In the discrete-time implementation of the sliding mode methodology a non-ideal sliding (quasi-sliding) regime will inevitably appear, since the control input is computed and applied to the system at discrete instants. It is clear that the condition (3) which assures the sliding motion is no longer applicable in discrete-time systems. Thus, a discrete-time sliding mode condition must be imposed. The simplest approach is to substitute the derivative by the forward difference as in (4)
ª¬ S ( k + 1) − S ( k ) º¼ S ( k ) < 0
(4)
but this represents the necessary, not sufficient condition for the existence of a quasisliding motion, [7]. It does not assure any convergence of the state trajectories onto the sliding manifold and may result in an increasing amplitude chatter of the state trajectories around the hyperplane, which means instability. A necessary and sufficient condition assuring both sliding motion and convergence onto the sliding manifold is given in the following form [7]:
S ( k + 1) < S ( k )
(5)
The above condition can be decomposed into two inequalities as: ª¬ S ( k + 1) − S ( k ) º¼ sign S ( k ) < 0
(6)
ª¬ S ( k + 1) + S ( k ) º¼ sign S ( k ) > 0
(7)
and
where (6) and (7) are known as sliding condition and convergence condition, respectively.
1128
A.V. Topalov and O. Kaynak
The network should be continuously trained in such a way that the sliding mode conditions (6) and (7) will be enforced. To enable Sc = 0 is reached, the following theorem is used: Theorem 1: If the adaptation laws for the weights W 1(t ) and W 2(t ) are chosen respectively as ΔW 1 ( k ) = −
2 netTH ( k ) X T XT X
(8.a)
W 1( k + 1) = W 1( k ) + ΔW 1( k )
(8.b)
and ΔW 2 ( k ) = − 2 W 2 ( k ) +
THT ( k ) T H
T TH
(9.a)
α sign τ c ( k )
W 2 ( k + 1) = W 2 ( k ) + ΔW 2 ( k )
(9.b)
with α ∈ \ being the adaptive reduction factor satisfying 0 < α < 2 τ c ( k ) , then, for any arbitrary initial condition τ c (0) , the learning error τ c ( k ) will converge asymptotically to zero and a quasi-sliding motion will be maintained on τ c = 0 . Proof: One can check that the following string of equations is satisfied. Δτ c ( k + 1) = τ c ( k + 1) − τ c ( k ) = τ n ( k + 1) − τ n ( k ) = = W 2 ( k + 1) TH ( k + 1) − W 2 ( k ) TH ( k ) =
= ª¬W 2 ( k ) + ΔW 2 ( k ) º¼ TH ( k + 1) − W 2 ( k ) TH ( k ) =
{
(10)
= W 2 ( k ) ª¬TH ( k + 1) − TH ( k ) º¼ + ΔW 2 ( k ) TH ( k + 1) =
}
= W 2 ( k ) Φ ª¬netTH ( k + 1) º¼ − Φ ª¬netTH ( k ) º¼ +ΔW 2 ( k ) Φ ª¬ netTH ( k + 1) º¼
Note that netTH ( k + 1) = W1( k + 1) X = ª¬W 1( k ) + ΔW 1( k ) º¼ X = netTH ( k ) + ΔW1( k ) X
(11)
Substituting (11) and (8.a) into (10) yields
{
}
Δτ c ( k + 1) = W 2 ( k ) Φ ª¬ netTH ( k ) + ΔW 1( k ) X º¼ −Φ ª¬ netTH ( k ) º¼ +
{
+ΔW 2 ( k ) Φ ª¬ netTH ( k ) + ΔW 1( k ) X º¼ =
(12)
}
= W 2 ( k ) Φ ª¬ −netTH ( k ) º¼ − Φ ª¬ netTH ( k )º¼ +ΔW 2 ( k ) Φ ª¬ −netTH ( k ) º¼
Since Φ is odd by assumption, the previous error equation becomes
Δτ c ( k + 1) = −2 W 2 ( k ) Φ ª¬ netTH ( k )º¼ −ΔW 2 ( k ) Φ ª¬ netTH ( k ) º¼ = = − ª¬ 2 W 2 ( k ) + ΔW 2 ( k ) º¼ TH ( k )
(13)
Discrete-Time Quasi-Sliding Mode Feedback-Error-Learning Neurocontrol
1129
Substituting (9.a) into the above equation gives THT ( k ) α signτ c ( k ) º » TH ( k ) = THT ( k ) TH ( k ) »¼ = −α signτ c ( k )
Δτ c ( k + 1) = ª¬ −2W 2 ( k ) + 2W 2 ( k ) −
(14)
By multiplying both sides of Eq. (14) by τ c ( k ) it follows that
Δτ c ( k + 1)τ c ( k ) = −α τ c ( k ) < 0
(15)
which means that the sliding condition (4) or (6) is satisfied. Eq. (14) can be also rewritten as follows
τ c ( k + 1) = τ c ( k ) − α signτ c ( k )
(16)
By adding to the both sides of Eq. (16) τ c (k ) and subsequent multiplication with sign τ c ( k ) the following equation can be obtained
ª¬τ c ( k + 1) + τ c ( k ) º¼ sign τ c ( k ) = 2 τ c ( k ) − α
(17)
It follows from Eq. (17) that the convergence condition (7) will be satisfied for all c 0 < α < 2 τ c ( k ) and τ ( k ) ≠ 0 . This proof is a sufficient condition for the quasisliding mode to occur. Remark 2: Note that Eq. (16) describes the neurocontroller error dynamics. In particular if α = β τ c ( k ) with 0 < β < 2 is used it follows that
τ c ( k + 1) = (1 − β )τ c ( k )
(18)
which coincides with the result obtained by Sira-Ramirez and Zak (1991), and shows that the learning error will converge asymptotically to 0 at a rate of 1 − β . 2.3 Relation Between the Discrete-Time VSC-Based Learning of the Controller and the Quasi-Sliding Motion in the Behavior of the Controlled System
The relation between the sliding line S p ( k ) and the zero adaptive learning error level
K Sc ( k ) , when λ is taken as λ = P , is determined by the following equation: KD ª º K Sc ( k ) = τ c ( k ) = K D Δe ( k ) + K P e ( k ) = K D « Δe ( k ) + P e ( k )» = K D S p ( k ) KD ¬ ¼
(19)
where K D and KP are the PD controller gains. For a quasi-sliding regime to occur for the system under control conditions (4)-(7) must be satisfied.
1130
A.V. Topalov and O. Kaynak
Theorem 3. If the adaptation strategy for the adjustable parameters of the NNFC is chosen as in equations (8)-(9) then an outer quasi-sliding motion of the nonlinear system under control will have place and its state tracking error vector will be simultaneously forced towards the origin of the phase space. Proof: One can check that the following two strings of equations are satisfied:
ΔS p ( k + 1) S p ( k ) =
1 ΔSc ( k + 1) Sc ( k ) = K D2
(20)
1 1 = 2 Δτ c ( k + 1)τ c ( k ) = −α 2 τ c ( k ) < 0 KD KD which means that the sliding condition (4) or (6) is satisfied.
1 ¬ª S p ( k + 1) + S p ( k ) ¼º sign S p ( k ) = K ª¬ Sc ( k + 1) + Sc ( k ) º¼ sign Sc ( k ) = D (21)
τ (k ) 1 ª¬τ c ( k + 1) + τ c ( k ) º¼ sign τ c ( k ) = 2 −α KD KD c
=
which means that τ c (k ) . 0