Sztuczna inteligencja Sieci neuronowe i algorytmy ewolucyjne I. Wprowadzenie Jerzy KORCZAK email :jerzy.korczak@ue.wroc.pl http://www.korczak-leliwa.pl http://citi-lab.pl http://kti.ue.wroc.pl Russell S.J., Norvig P., (1995) : Artificial Intelligence : A Modern Approach, Prentice Hall. Winston H.P., Horn, B.K.P. (1992): Artificial Intelligence, Addison-Wesley, 3rd Ed. Artificial Intelligence is the study of the computations that make it possilible to perceive, reason, and act [P.Winston] - the engineering goal of AI is to solve real-world problems - the scientific goal : models of KR, theory of reasoning,... Systemy inteligentne : auto-adaptacja zdolność poprawienia jakości swojego działania poprzez zdobywanie nowych doświadczeń zdolność dobierania parametrów pracy w zależności od efektów umiejętność rozwiązywania zadań zdolność doskonalenia strategii uczenia się 1 2 Test inteligencji programu: czy jest to możliwe? A real-life Turing test: An interviewer (sitting in a separate room) asks a series of questions that are randomly directed to either a computer or a person. Based on the answers, the interviewer must distinguish which of the two has answered the question. If the interviewer is not able to distinguish between them, then the computer is intelligent. Nagroda Loebnera ($100,000) vs M. Minsky Szachy : Deep Blue vs G.Kasparow 3.5 : 2.5-10 120 możliwych gier - 200 M pozycji analizowanych na sekundę - opening book & extended book Od PERCEPTRONU do hybrydowych systemów inteligentnych Systemy auto-adaptacyjne Perceptron [Rosenblatt,1958], Adaline [Widrow, 1962] Pierwszy program grajacy : Checkers [Samuel, 1963] Systemy ekspert: DENDRAL, MYCIN, AQVAL [1970 -] Reprezentacja wiedzy : frames [Minsky, 1975] Multilayer-Perceptron, Kohonen Maps,... [Rumelhart, 1985] Sztuczna ewolucja [Holland, Goldberg, 1989] Multi-strategy learning [Michalski, 1990] KDD, data mining, intelligent agents [1995 -] Web-semantics, [1998 -] Inteligentne Roboty, «inteligentne domy», Robo sapiens, a-life, 3 4 Pojęcie sieci neuronowej systems that are deliberately constructed to make use of some of the organizational principles that are felt to be used in the human brain. Anderson... a neural network is a system composed of many simple processing elements operating in parallel whose function is determined by network structure, connection strengths, and the processing performed at computing elements or nodes. DARPA Neural Network Study (1988) Definicje (cd).a neural network is an interconnected assembly of simple processing elements, nodes, whose functionality is loosely based on the animal neuron. The processing ability of the network is stored in the inter-unit connection strengths, or weights, obtained by a process of adaptation to, or learning from, a set of training patterns. Gurney Sieć neuronowa (sztuczna sieć neuronowa) to ogólna nazwa struktur matematycznych i ich programowych lub sprzętowych modeli, realizujących obliczenia lub przetwarzanie sygnałów poprzez rzędy elementów, zwanych sztucznymi neuronami. 5 6 1
Korzenie prac badawczych Neurobiologia (ponad 100 lat temu): Jak zachowują się komórki nerwowe przy różnych stymulacjach elektrycznych? Czy istnieje poziom minimalny aktywacji neuronu? Biorąc pod uwagę fakt że komórka ma ograniczone wymiary, jak komórki komunikują się ze sobą? Psychologia: Jak uczą się (zapominają, rozpoznają, funkcjonują) zwierzęta wykonywania określonych zadań? Badania nad funkcjonowaniem neuronu (ów)? McCulloch and Pitts model matematyczny neuronu Literatura Russell, S. J., Norvig, P., Artificial Intelligence: A Modern Approach (2nd ed.), Prentice Hall, 2003. Kosiński R., Sztuczne sieci neuronowe. Dynamika nieliniowa i chaos, 2007. Krose B., van der Smagt, An introduction to neural networks, 1996, http:/neuralnets.eu/materialy/ Rymarczyk M., (red), Decyzje, symulacje, sieci neuronowe, Tadeusiewicz R., Sieci neuronowe, Warszawa, 1993 http://winntbg.bg.agh.pl/skrypty/0001/ Arabas J., Wykłady z algorytmów ewolucyjnych, WNT 2001 Goldberg D.G., Algorytmy genetyczne i ich zastosowania, WNT 2003. Michalewicz Z., Algorytmy genetyczne + struktury danych = programy ewolucyjne, WNT 1999. http://www.neuralnets.eu/ http://ai.com/ 8 Historia Model neuronu [McCulloch, Pitts, 1943] Proces uczenia [Hebb, 1949] PERCEPTRON [Rosenblatt,1958] zbieżność algorytmu adaptacji wag Ograniczenia PERCEPTRONu błędne stwierdzenie Minskyiego Paperta, [1969] Problem XOR Bolzmann Machine [Hopfield, 1982] Back propagation - MLP [Rumelhart, Parker, Le Cun, 1985] Self-Adapting Maps [Kohonen, 1980] sieci Hopfielda [Hopfield, 1982] ICANN, IJCNN, ECANN, Kilka uwag o sieciach neuronowych (1) D.Hebb, in 1949, published The Organization of Behavior, in which he proposed that the effectiveness of a synapse between two neurons might be increased by correlated activity of those two neurons used widely in artificial neural models today there is also evidence of a biological mechanism in which neural activity modulates calcium ion flow, which, in turn, affects the physical structure of synapses Farley and Clark, in 1954 on an early digital computer at MIT, modeled a network of randomly connected neurons employing a modified Hebb learning rule that was able to learn to discriminate between two input patterns 10 Kilka uwag o sieciach neuronowych (2) F.Rosenblatt, in 1958, introduced the single-layer perceptron with adjustable synaptic weights and a threshold output neuron Rosenblatt conceptualized perceptrons as consisting of three layers, for sensory, association, and response, but the weights only varied on the synapses leading to the single threshold neuron He also introduced an error-correction rule (the perceptron learning rule) to adapt the weights and proved that if two input classes were linearly separable the algorithm would converge to a solution (the perceptron convergence algorithm) Kilka uwag o sieciach neuronowych (3) P.Werbos, in his 1974 PhD thesis, first demonstrated a method for training multi-layer perceptrons, essentially identical to Backprop but the work was largely ignored T.Kohonen [1982] introduced SOM algorithms for Self- Organized Maps, that continue to be explored and extended today D.Parker [1982] published an algorithm similar to Backprop, which was ignored. Y. LeCun [1985] published an algorithm similar to Backprop, which was again ignored 12 2
Kilka uwag o sieciach neuronowych(4) Historia (2) D.Ackley, G.Hinton, and T.Sejnowski [1985] introduced the Boltzmann machine (the first successful realization of a multilayered neural network) Diwersyfikacja badań w latach 90. Machine learning: mathematical rigor, Bayesian methods, infomation theory, support vector machines (now state of the art!),... D.Rumelhart, G.Hinton, and C.Williams [1986] introduced Backprop, the first widely recognized learning algorithm for multilayer perceptrons or neural networks Computational neurosciences: workings of most subsystems of the brain are understood at some level; research ranges from low-level compartmental models of individual neurons to large-scale brain models T. Sejnowski and C. Rosenberg [1986] introduced NETtalk, a text-to-speech neural network system trained using Backprop. 13 Przykłady - Autentyfikacja biometryczna Twarz Normalisation Apprentissage et + Codage Reconnaissance Détection des yeux Moment Vert Bleu Hue Saturation IntenJezeli té Filtre Trouver Trouver Inondation + de base Y X Convolution Extraction Decyzja Raw Glos Fréquence Transformation de l ondelite Normalisation Apprentissage et + Codage Reconnaissance Normalised w1 Przyjac Odrzucic Baza danych Badge Effacer les Jezelilences Réseau des neurones Face Module: Ekstrakcja cech charakterystycznych Video Acquisition Face Detection Face Localization Extraction Normalisation w2 C0 C1 C2 C3 C4 C5 C6 C7 C9 C10 C11 C12 C13 C14 Temps C15 Réseau des neurones 15 16 System IBE-AT: technologia agentowa Interpretacja obrazów satelitarnych Jeśli to 17 18 3
Alvinn Sieci neuronowe: cel i projektowanie Camera image 30 outputs for steering 4 hidden units 30x32 pixels as inputs Autonomous driving at 70 mph on a public highway 30x32 weights into one out of four hidden unit Wiedza o zadaniu do nauczenia podana jest w postaci zbioru przykładów, zwanym zbiorem uczącym (training examples). Specyfikacja sieci neuronowej określa: architekturę: zbiór neuronów i połączeń międy nimi. Każde połaczenie ma określona wagę (weight), model neuronu: informacja o procesie obliczeniowym w neuronie, algorytm uczacy (learning algorithm): stosowany do nauczenia sieci (poprzez modyfikacje wag połączeń). Cel: generalizacja przykładów tak aby sieć poprawnie rozpoznawała (rozwiązywała, klasyfikowała ) nowe przykłady. Mózg vs komputer Niektóre zastosowania NN w zarządzaniu Numbers Human brain Von Neumann computer (a.d. 2005) # elements 10 10-10 12 neurons 10 7-10 8 transistors # connections / element 10 4 10 switching frequency 10 3 Hz 10 9-10 10 Hz energy / operation 10-16 Joule 10-6 Joule power consumption 10 Watt 100-500 Watt reliability of elements low reasonable Modelowanie procesów decyzyjnych Wspomaganie decyzji menedżerskich Diagnostyka ekonomiczna przedsiębiorstw Planowanie i optymalizacja wielokryterialna Prognozowanie decyzji kupna-sprzedaży Ocena ryzyka, kredyty Optymalizacja portfela akcji Monitorowanie, systemy zabezpieczeń, identyfikacja Wyszukiwanie informacji, e-intelligence reliability of system high reasonable 21 22 Metody sztucznej ewolucji Algorytmy genetyczne Programowanie genetyczne Systemy klasyfikatorow Strategie ewolucyjne Podstawa symulacji : Ewolucja populacji rozwiązan poprzez procesy selekcji, krzyzowania, mutacji i reprodukcji Ch. DARWIN «On the Origin of Species by Means of Natural Selection», 1859 «surivival of the fittest» Wprowadzenie do metod ewolucyjnych Metody heurystyczne (ang. hill climbing) Niech będzie dana funkcja f(x,y) do maksymalizacji oraz operator R ktory «przemieszcza» punkt (x n-1,y n-1 ) do (x n,y n ) w ten sposob ze f(x n,y n ) > f(x n-1,y n-1 ) Dwie klasy operatorów : 1) korzystający jawnie z gradientu funkcji f 2) korzystający tylko z oceny funkcji f w otoczeniu punktu (x n-1,y n-1 ) Metody ewolucyjne (ang. evolution-based methods) J.Korczak, ULP 23 J.Korczak, ULP 24 4
Proces ewolucji populacja początkowa Proces ewolucji populacja końcowa J.Korczak, ULP 25 J.Korczak, ULP 26 Maksymalizacja funkcji Projekt ibe-at Expert Discovery and Database Connections Consulting and simulations each 5 sec Time series provider Time series aggregation each 1 min Database Quotes Experts Clients Oracle ias server Supervisor Expert Generator J.Korczak, ULP 27 J.Korczak, ULP 28 Internet Bourse-Experts - Agent Technology Podsumowanie Algorytmy ewolucyjne (AE) optymalizuja zagadnienia przy zmiennych ciaglych lub dyskretnych, przy czym liczba zmiennych moze byc duza AE nie wymagaja informacji o pochodnych AE maja zastosowanie przy zlozonych przestrzeniach funkcji kosztu Adaptacyjność i modularność Robustness Latwość implementacji Nie jest konieczna dogłebna znajomość działania modelu Latwość hybrydyzacji (sieci neuronowe, heurystyki) Latwość implementacji rownoległej algorytmu J.Korczak, ULP 29 J.Korczak, ULP 30 5