Full text
Paulo Jorge da Silva Barbosa Dynamic neural system for endowing intelligent cars with the ability to learn their occupants' routines dezembro de 2021 UMinho | 2021 Paulo Jorge da Silva Barbosa Dynamic neural system for endowing intelligent cars with the ability to learn their occupants' routines Universidade do Minho Escola de Ciências
COPYRIGHT AND TERMS OF USE OF THIS WORK BY A THIRD PARTY This is academic work that can be used by third parties as long as internationally accepted rules and good practices regarding copyright and related rights are respected. Accordingly, this work may be used under the license provided below. If the user needs permission to make use of the work under conditions not provided for in the indicated licensing, they should contact the author through the RepositoriUM of Universidade do Minho. Licença concedida aos utilizadores deste trabalho Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc/4.0/ ii
ACKNOWLEDGEMENTS First and foremost, I would like to thank both professor Wolfram Erlhagen and professor Estela Bicho whose continual support and guidance were fundamental in writing this dissertation. Secondly, I wish to express my deepest gratitude to Doctor Flora Ferreira for taking the time and patience to help me. To Professor Sergio Monteiro, I am immensely thankful for his expertise and guidance. I also wish to thank my colleagues from MARLab, Pedro Guimarães, Weronika Wojtak, and Ankit Patel. Lastly, I am immensely thankful to all my friends and family for always being present. iii
STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. iv
RESUMO Sistema neuronal dinâmico para dotar carros inteligentes com a habilidade de aprender as routinas dos seus ocupantes Conduzir um veículo é uma atividade rotineira que inclui visitar os mesmos lugares relativamente à mesma hora do dia ou dia da semana. Deste modo, veículos cognitivos/inteligentes que tenham a capacidade de aprender e se adaptar antecipadamente às rotinas dos seus ocupantes poderão assistir de forma autónoma o condutor nas suas deslocações diárias. No âmbito desta dissertação, foi desenvolvido um modelo usando campos dinâmicos neuronais para aprender aspetos ordinais e temporais sobre os destinos que integram a rotina de um condutor, assim como os passageiros e objetos que trazem e levam quando entram e saem em certos destinos. Adicionalmente, métodos tradicionais de machine learning (nomeadamente, regressão linear, regressão ridge, e redes neuronais artificiais) foram aplicados para aprender qual a configuração de conforto no interior do veículo pretendida pelos seus utilizadores. Experiências realizadas com dados reais relativos às rotinas de vários veículos, validam a arquitetura para múltiplos condutores, passageiros, e objetos. Os resultados confirmam que o sistema corretamente prevê, na maioria dos casos, para onde ir, quando ir, quanto tempo lá ficar, quem é o condutor, e quem são os passageiros, e objetos que entram e saem num dado ponto de paragem. O sistema baseado em campos dinâmicos permite uma rápida adaptação a mudanças numa rotina quando as previsões falham mais do que uma vez consecutivamente ou quando um novo destino deve ser integrado nesta. Adicionalmente, os erros de previsão dão-se somente quando se verificam grandes desvios relativamente ao que é habitual. Quanto às técnicas de machine learning, os valores das métricas de erro são mais baixos quanto menor for o número de utilizadores que partilham o veículo. Os modelos propostos poderão ser implementos no cockpit de um veículo para providenciar assistência personalizada pertinente, assim como, as previsões podem ser usadas antecipadamente para a preparação da viagem. Palavras-chave: Modelo neurocomputacional, Aprendizagem de rotinas de condutores, Previsão temporal e espacial, Campos dinâmicos neuronais. v
ABSTRACT Dynamic neural system for endowing intelligent cars with the ability to learn their occupants’ routines Driving a vehicle is often a routine activity that comprises visiting the same places at relatively the same time of a given day or day of the week. Thus, cognitive/intelligent vehicles capable of learning and adapting to their occupants’ routines might assist the driver autonomously in his daily trips. This dissertation aims to develop a new model using Dynamic Neural Fields to learn ordinal and temporal aspects regarding driver destinations, as well as which objects the occupants bring and take when they enter or exit at each location. Additionally, it applies traditional machine learning methods - linear and ridge regressions and artificial neural networks - to learn the desired comfort setting by the driver inside the vehicle. Experiments performed with real data regarding the routines of several vehicles validate the developed architecture for multiple drivers, passengers, and objects. The results confirm the system correctly predicts, in most cases, where to go, when to go, how long to stay there, who is the driver, and who are the passengers, and objects coming in and out at a specific stop location. The activation-based learning mechanism implemented in the Dynamic Neural Fields models also supports a fast adaption to consistent changes in the routine when predictions fail more than once or when an existing one needs to integrate a new destination. Prediction errors happen in cases of an exceptional, one-time deviation from routine behavior. Regarding the machine learning techniques, the error values increase with the number of users sharing a vehicle. The proposed models may be implemented in a vehicle’s cockpit to provide pertinent personalized assistance and make anticipated predictions to prepare users for a trip. Keywords: Neurocomputational model, Learning driver routines, Time and space prediction, Dynamic neural fields. vi
TABLE OF CONTENTS 1 Introduction......................................... 2 1.1 Contextualization and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Objectives ...................................... 3 1.3 Documentorganization ................................ 3 1.4 Contributions of this dissertation . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 Stateoftheart ....................................... 6 2.1 Human-Machine Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Driver Routine Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 MaterialsandMethods ................................... 13 3.1 Datasets ....................................... 13 3.2 DynamicFieldTheory................................. 17 3.3 MachineLearning................................... 25 4 CognitiveModels ...................................... 33 4.1 Dynamic Neural Fields Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 MachineLearningModels............................... 40 5 ResultsandDiscussion ................................... 44 5.1 Where to go? When to go? How long to stay there? . . . . . . . . . . . . . . . . . . . 44 5.2 What is the driver routine? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.3 Whowillenter/exit?.................................. 48 5.4 Which objects will come inside/outside? . . . . . . . . . . . . . . . . . . . . . . . . 48 5.5 What is the vehicle’s desired comfort setting? . . . . . . . . . . . . . . . . . . . . . 49 6 ConclusionsandFutureWork ................................ 52 6.1 General Discussion and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . 52 6.2 FutureWork ..................................... 52 A Appendix .......................................... 60 A.1 ForwardEulerMethod................................. 60 A.2 DNF Implementation Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 A.3 Remaining Dynamic Neural Fields Results . . . . . . . . . . . . . . . . . . . . . . . 63 A.4 SundayRoutine.................................... 70 A.5 Remaining Machine Learning Results . . . . . . . . . . . . . . . . . . . . . . . . . 72 vii
1.1 CONTEXTUALIZATION AND MOTIVATION This dissertation is integrated into the NEUROFIELD project and the UMinho & Bosch partnership program - EasyRide: Experience is Everything. The former aims to analyze and apply models based on Dynamic Neural Fields (DNFs) in cognitive robotic systems. The latter, in its turn, strives to endow cognitive/intelligent vehicles with the capacity to learn and adapt to driver routines. Driving a vehicle is often a repetitive task in which people tend to go to the same places at the same time of the day or day of the week. For instance, for many drivers, weekdays consist of leaving home in the mornings, dropping the kids at school, and heading to the office; later, the same trip is reversed by departing from work, picking up the kids from school, and returning home. Frequently, a person’s daily trips are bound to routines in other temporal scales, such as going to the gym or the church on specific days of the week. Several different approaches, most of them based on statistical models (Simmons et al., 2006), have been put forward to predict the next location in human mobility, for which a large amount of data is necessary. Traditional Markov models perform well for a specific set of behaviors but require setting destinations a priori. Moreover, they have a hard time incorporating patterns over different timescales. More recently, (Ferreira et al., 2019) proposed a DNFs-based learning model capable of acquiring sequential information regarding a driver’s destinations as well as the corresponding time properties. It is relevant to mention that, in contrast to Markov models, this system allows memorizing long sequences of events over (multiple) different timescales and does not require setting destinations in advance. The fundamental supposition is that driving is mostly a routine and that, by observing previous sequences with encoded temporal information, one can make predictions regarding future driver intent. Learning occurs implicitly - the driver is never questioned about destinations - and is a continuous process modeled by coupled Dynamic Neural Fields. The theoretical framework of DNFs implements key-processing mechanisms to implement memory, recall, and decision-making in cognitive systems ((Schöner, 2008), (Sandamirskaya et al., 2013)), including the learning of sequential tasks ((Sandamirskaya and Schoner, 2008), (Ferreira et al., 2014), (Ferreira et al., 2021)). Despite all of this, there is still room for improvement. Several extensions to this model, such as learning driver, passenger, and object routines as well as adjusting the vehicle’s comfort settings according to the user’s preferences, would benefit the system’s overall utility and serve as this dissertation’s motivation and goal. 2
1.2 OBJECTIVES As mentioned above, this dissertation aims to develop, implement, and test a DNFs-based model that extends the one found in (Ferreira et al., 2019) in which, besides learning multiple destinations and their respective time properties, it can also acquire information regarding which occupants and objects come in and out of the vehicle. It can answer the following questions: • Where to go? • When to go? • How long to stay there? • Who is the driver? • Which passengers come in and out of the vehicle at a given destination? • Which objects come in and out of the vehicle at a given destination? Moreover, using Machine Learning techniques, the system also predicts the next trip’s comfort setting by adjusting the vehicle’s temperature, cockpit mirror pose, and driver seat pose. 1.3 DOCUMENT ORGANIZATION The remainder of this thesis is organized as follows: Chapter 2 presents the state-of-the-art of vehicle routine prediction and comprises two sections: • The first reviews ongoing progress in Human-Machine Interaction by giving the reader a brief history of the subject and detailing new advances and approaches. • The second focuses more specifically on the problem of Driver Routine Prediction. It details current approaches employed to tackle this issue, namely Artificial Neural Networks, Hidden Markov Models, and Dynamic Field Theory. Chapter 3 describes the materials and theoretical frameworks employed in this dissertation and is structured the following way: • Firstly, the gathered datasets used to train and validate the developed models are detailed by specifying what each column’s values represent. 3
• Afterward, a description of Dynamic Field Theory (the framework supporting DNFs) follows. This section also mentions how one can implement higher cognition using this tool. • The last section touches on Machine Learning concepts related to adjusting the vehicle’s comfort settings, namely linear regression, ridge regression, and artificial neural networks. Chapter 4 presents the cognitive models developed throughout this dissertation and is split into two sections: • The first describes the global architecture based on Dynamic Neural Fields together with the required mathematical formulation for the implementation. • The second describes all implemented Machine Learning models. The tuning values and evaluation metrics are also presented. Chapter 5 describes the results of the simulations performed to validate the previously presented models by going over each question these can answer. Chapter 6 presents the conclusion by briefly reviewing the developed work and provides ideas/extensions for future work. 1.4 CONTRIBUTIONS OF THIS DISSERTATION Part of the work developed for this dissertation resulted in the following publication: add the full refernence here, pages etc. or refer to the reference list • Wojtak, W., Ferreira, F., Guimarães, P., Barbosa, P., Monteiro, S., Erlhagen, W., & Bicho, E. (2021, September). Towards Endowing Intelligent Cars with the Ability to Learn the Routines of Multiple Drivers: A Dynamic Neural Field Model. In International Conference on Computational Science and Its Applications (pp. 337-349). Springer, Cham. It is relevant to mention that certain parts of this dissertation - namely, the introduction, the cognitive models (regarding DNFs), and the results - are based on this article. Furthermore, the results of this dissertation were presented at the NEXT Driving Tomorrow event, organized by the University of Minho and Bosch, which took place on November 9 and 10, 2021. 4
2. STATE OF THE ART
This dissertation aims to build a Human Vehicle Interaction (HVI) system. HVI is, in its turn, a subset of Human-Machine Interaction (HMI). Understanding these topics, as their most recent innovations, is the goal of this section. The first chapter introduces Human-Machine and Human Vehicle Interaction and presents some functioning examples of systems employing these theories. The second chapter examines the concept of Driver Routine Prediction and presents approaches employed to tackle this issue, namely Long Short-Term Memory Networks (LSTMs), Hidden Markov Models, and Dynamic Neural Fields. 2.1 HUMAN-MACHINE INTERACTION Human-Machine Interaction, sometimes also called Human-Robot Interaction (HRI), is a ”field of study dedicated to understanding, designing, and evaluating robotic systems for use by or with humans” ((Kanda and Ishiguro, 2017)). There are various categories of interaction - or communication - between humans and robots (Yanco and Drury, 2004). In the context of this dissertation, however, only proximate interactions are covered. Proximate interactions correspond to those where both agents are co-located (in time and space). Social robots are a great example of HRI systems with proximate interactions (for a recent review, see (Sheridan, 2020)). The history of HMI begins with the development of robots. Robotic technology surged in the mid to late 20th century. Despite this, the notion of robotic-like behavior has been around for centuries. For more information on the history of robotics, see the first chapter of (Kurfess, 2004). Early robotic implementations consisted of devices with minimal autonomy. One early example is Nikola Tesla’s remotely controlled boat (see Figure 2.1). Since then, technological advancements have allowed for more complex robots such as unmanned underwater vehicles (for instance, (Fong and Thorpe, 2001) and (Whitcomb, 2000)). Figure 2.1: Schematic representation of Tesla’s remotely controlled boat. Source: engadget. A new approach designated by behavior-based robotics appeared in the 1980s and allowed robots to 6
produce more complex behavioral patterns (Arkin, 2000). Hybrid architectures followed soon after, which allow to combine sophisticated reactive behaviors and high-level cognitive reasoning, improving interactions with humans (Guo et al., 2017), (Egerstedt, 2000). More recently, artificial intelligence researchers have made continuous efforts to develop fully autonomous robots (Kurrek et al., 2020), (Dautenhahn, 1995). In the field of HRI, the framework of Dynamic Neural Fields has been used to endow autonomous robots with human-like cognitive capacities in cooperative tasks ((Bicho et al., 2010), (Erlhagen and Bicho, 2014)). Developing a Human-Machine Integration system is a multidisciplinary endeavor with contributions from psychology, mathematics, and computer science, to name just a few. Likewise, it is possible to apply HMI concepts to other fields. In the context of this dissertation, the focus is on HMI’s tie with Human Vehicle Interaction Systems. This topic is covered next. 2.1.1 Human Vehicle Interaction As mentioned previously, HVI deals with the communication between humans and vehicles. The scope of HVI includes trains, busses, motorbikes, and other types of vehicles, not only cars (Bishop, 2000). The main objective of this area of study is to endow vehicles with cognitive abilities in order to assist a user in different tasks. Vehicles with these capacities are called Intelligent Vehicles (IVs). IVs are safer, more efficient, and more pleasant to drive (Sun et al., 2018a). Despite automobiles having played a key role in shaping modern society - with more than 800 million vehicles on the planet - research in the area of IVs is very recent. The first published papers can be traced back to the 1980s in the context of military vehicles (Dickmanns, 2002), (Thorpe, 1990). A very significant portion of the research aimed at IVs has been the development of an autonomous vehicle. The first automated drive took place in the mid to late 1990s, using computer vision techniques. A case study by Bundeswehr Universität Munich (UBM) demonstrated that a vehicle could drive autonomously for 95% of the trip between Munich, Germany, and Copenhagen, Denmark. The Argo Project followed soon after as a low-cost approach to build an autonomous vehicle. Developed at the University of Parma, the vehicle was capable of following the lane, locating obstacles, and, when instructed, changing lanes with 95% autonomy (Bertozzi et al., 1998). More recently, there have been attempts to create autonomous vehicles with Deep Learning techniques (see (Huval et al., 2015) and (Sallab et al., 2017)). Despite all of this, due to legal concerns, the concept of a fully autonomous vehicle is not currently feasible. A goal redirection took place in the automotive industry - equipping a vehicle with an Advanced Driving Assistance System (ADAS). An ADAS is an electronic system that, while using automated technology, assists a vehicle’s user with driving and parking. Various systems have appeared based on this paradigm since then (see (Kannan et al., 2010), (Meschtscherjakov et al., 2016), and (Knobel et al., 2011)). It is 7
also important to mention that HVI concepts have also been extensively applied to a vehicle’s cockpit ((Sun et al., 2018b), (Choi et al., 2018)). 2.2 DRIVER ROUTINE PREDICTION Learning the ordinal and temporal aspects of a driver’s routine is at the core of this dissertation. Thus, in this context, learning about driver routine prediction is very relevant. For most people, the act of driving is a repetitive task. People often go to the same places at approximately the same time of the day or day of the week (Eagle and Pentland, 2009). As a result, several different approaches, most of them statistical, to predict driver routines have surged. This chapter overviews the most commonly used ones. Due to the very nature of driving, however, none will be 100% accurate. No matter how closely a person follows his routine, sooner or later, he will break it. As a result, most models built to tackle this problem are probabilistic. 2.2.1 Artificial Neural Networks Researchers from the University of Minho proposed, in (Fernandes et al., 2020), a framework based on hierarchical density-based clustering followed by a Deep Neural Network (DNN) for spatial-temporal prediction of driver’s routines. Figure 2.2 presents a scheme of the developed model. For a detailed description of the results, see (Fernandes et al., 2020). Firstly, the model employs a clustering algorithm called HDBSCAN for the extraction of points of interest. HBSCAN works by looking for denser regions of the data and assuming the presence of noise (Fernandes et al., 2020). For more information on this algorithm, see (Campello et al., 2013). Secondly, a DNN composed of a Long Short Term Memory layer and two dense layers is applied. LSTMs have been proven extremely useful when it comes to analyzing temporal dynamics and sequentially structured data. Different fields such as, for instance, sentiment analysis (Cliche, 2017), natural language processing (Liu et al., 2016), and speech recognition (Petridis et al., 2017), to name just a few, have extensively applied these networks to solve problems. 8
Figure 2.2: Deep Learning Model. From: (Fernandes et al., 2020) 2.2.2 Hidden Markov Models Another approach to tackle this problem consists of using Hidden Markov Models (HMM). A Hidden Markov Model is a statistical model that tracks processes with a hidden state. One can think of these structures as a probability transition graph (see Figure 2.3). HMMs follow two key ideas. The first is that the transition from one state to another depends solely on the current state. The other one is that past states remain unidentified. To learn more about HMMs, see (Eddy, 2004). (Simmons et al., 2006) made use of this mathematical structure to predict driver routes and destination intents. Taking the process as a sequence of driver actions and the hidden state as the intended destination and route, they achieved approximately 98% accuracy in most cases. Figure 2.3: Visual representation of a Hidden Markov Model. 2.2.3 Dynamic Field Theory Dynamic Neural Fields (DNFs) have been introduced as a mathematical framework to analyze the dynamics of pattern formation in neuronal populations (Amari, 1977). They have been used to implement braininspired processing mechanisms in autonomous robots, such as working memory, decision making, and prediction ((Schöner, 2008), (Sandamirskaya et al., 2013), (Bicho et al., 2010), (Erlhagen and Bicho, 2014)). Moreover, DNFs have proven capable of encoding the ordinal and temporal properties of sensory 9
events. By combining these features, DNFs have been applied to learn sequential tasks ((Sandamirskaya and Schoner, 2008), (Ferreira et al., 2014), (Ferreira et al., 2021), (Sousa et al., 2015)). In the context of driver routine applications, DNF models proved effective in identifying stop locations/points of interest from GPS data ((Ferreira et al., 2019), (Ferreira et al., 2021)). (Ferreira et al., 2019) proposed a DNF model (see Figure 2.4) for learning driver habits - when to go, where to go, how long to stay there - based on the assumption that driving is mostly a routine and, by observing past sequences, one can make predictions regarding future trips. GPS coordinates (latitude and longitude) and a signal indicating whether the car was turned on or off served as input; the latter provided information regarding whether a trip was a departure or arrival. The memory of events is represented by stable neural activation patterns or bumps in the respective encoding field. The activation level of each bump varies as a function of time. It thus encodes the time elapsed since the start of the routine. The sequential information can be recalled from memory to make predictions about future events. Figure 2.4: Schematic view of the model proposed in (Ferreira et al., 2019) with several interconnected neural fields implementing sequence learning, memory, and sequence recall for arrivals and departures. 10
2.2.4 Final Notes As a final remark, it is important to stress that despite the success of the mentioned approaches in tackling the learning and memorizing of longer sequences of events at different time scales, which in the case of the DNF approach does not require a pre-defined set of destinations, there is still room for improvement. For instance, the important capacity to forget events has not been properly addressed yet. An event might be a part of a user’s routine for a while and cease to be so afterward. Ideally, the system should adapt to these variations. Moreover, the approaches have not yet been applied to learn individual passenger or object routines. A user might remember to go to work at a given time but forget to bring his laptop. 11
to implement cognitive operations such as the memorization and recall of events together with their order and relative timing. This chapter explains the DNF approach by first introducing the main concepts, then constructing a Neural Field with the Amari equation, and, lastly, obtaining higher cognition via the coupling of DNFs. 3.2.1 General Introduction The first applications of DFT by Schöner and colleagues addressed the planning of eye and arm movements ((Erlhagen and Schöner, 2002); (Schöner et al., 1997)). Following their work, a growing community of researchers has extended the uses of this structure. DNFs have proven effective in many areas ranging from Cognitive Science to the control of Autonomous Robots (for an overview see (Schöner et al., 2014)). Perceptual states and motor actions are embedded in continuous space. DNFs represent neuronal populations that encode in their activity patterns continuous dimensions such for instance object features like position, orientation or color, and movement parameters such as direction or amplitude. For instance, if we were to encode color by its hue value, a bump in the range of 52-60 would represent yellow. The activity patterns are initially triggered by external inputs but become self-sustained due to strong recurrent excitatory and inhibitory interactions within the population. After cessation of the external input, a localized activation bump represents a memory of a specific value of the encoded dimension. 3.2.2 Dynamic Neural Fields The work presented in this dissertation is based on the Neural Fields of Amari type, that is, fields described by the Amari equation (Amari, 1977). This equation describes the dynamics of a neural system in terms of space and time continuous neural activation u(x, t), where xcorresponds to the position in parametric space and trepresents time. This specific model has proven useful in DFT due to its adequacy in modeling cognitive processes, such as memory, forgetting, detection, and decision making (Bicho et al., 2010) and the possibility to conduct mathematical analysis. The following integro-differential equation defines the dynamical behavior of a one-dimensional neural field for x∈R: τ∂u(x, t) ∂t =−u(x, t) + h+S(x, t) + cuξ(x, t) + ∫w(|x−y|)f(u(y, t)) dy (3.1) Due to complexity, a description of both the linear (3.2) and non-linear (3.3) parts of the equation follows. Taking a look at the linear part first, u(x, t)stands for the neural activation at feature value xand time t. The parameter h < 0corresponds to the homogeneous resting level to which neural activity will decay 18
in the absence of external input. The external input at site xand time tis, in turn, given by S(x, t). The time scale of the field dynamics is defined by τ > 0. Lastly, cuξ(x, t)represents white Gaussian noise with strength cu(for more information regarding the importance of noise in a dynamical system, see the Neural Dynamics chapter of (Schöner et al., 2014)). τ∂u(x, t) ∂t =−u(x, t) + h+S(x, t) + cuξ(x, t)(3.2) The non-linear integral term describes the excitatory and inhibitory interconnections in the neural population. They explain the existence of input-specific persistent population activity which is believed to constitute a neural substrate for cognitive functions (see Figure 3.7). Typically, the interactions are assumed to be homogeneous, that is, the interaction strength depends only on the Euclidean distance between any two neurons xand yin the field, w(x, y) = w(|x−y|). Only neurons with a sufficiently high activation level contribute to the recurrent interactions. ∫w(|x−y|)f(u(y, t)) dy (3.3) The non-linear function f(u)models the neuron’s firing rate with threshold 0and can be taken as the sigmoidal function with steepness parameter σ > 0(Equation 3.4) or as the Heaviside step function (Equation 3.5). f(u) = 1 1 + e−σu (3.4) f(u) = 1if u≥0 0if u < 0 (3.5) 3.2.3 Types of Interaction Kernels Whenever a field should support, at most, the evolution a single memory bump at a time in response to several external inputs, its interaction kernel must be of lateral inhibition type, that is, excitation dominates at closer distances whereas neurons more far apart inhibit each other (Figure 3.6) (Amari, 1977). An example of a lateral inhibition kernel is given by the following equation: wlat(x) = wexce−x2 2σ2 exec −winh,(3.6) where wexec >0and σexec >0define, respectively, the amplitude and standard deviation, and winh >0 the constant inhibition for distant neurons. 19
Figure 3.6: Lateral Inhibition Kernel Figure 3.6 illustrates that a neuron will excite other neurons if their distance is smaller than xs. Otherwise, inhibition dominates with a growing strength which stabilizes to a constant level at distance xd. As a consequence, two subpopulations receiving supra-threshold inputs of different strengths compete with each other. If the lateral inhibition is sufficiently strong, only the subpopulatiion getting the stronger input will stabilize a bump pattern (Figure 3.7). Figure 3.7: Cooperation and competition in a neural field. Neurons within the sub-populations receiving the external input, S1(x)and S2(x), respectively, excite each other whereas the interaction between the two sub-populations is mutually inhibitory. The oscillatory kernel with several zero crossings (Figure 3.8), in turn, supports the existence of inputinduced multi-bump solutions (Laing et al., 2002), (Ferreira et al., 2016): wosc(x) = Ae−b|x|(bsin |αx|+cos αx),(3.7) 20
where b > 0determines the decay rate, A > 0the amplitude, and 0< α < 1the spatial phase of w. Figure 3.8: Oscillatory Kernel 3.2.4 Higher Cognition With DNFs As mentioned before, it is possible to implement cognitive processes, such as memory (Johnson et al., 2009), prediction (Erlhagen and Bicho, 2006), or forgetting (Zibner et al., 2011) to name just a few, using the Amari Neural Field model. Some of of these functionalities are specifically relevant in the context of this dissertation and are, thus, presented below. 3.2.5 Detection DNFs can code both the presence and absence of information. Whenever all neurons in a field have activity below the threshold 0, even in the presence of input, no perceptual events are encoded in a memory bump. This happens when the excitatory input S(x, t)does not drive the activation above the threshold (Figure 3.9 (a)). Thus, to induce an input detection, a localized input at site xmust be sufficiently strong and must be applied for a sufficiently long time interval to guarantee that f(u(x, t)) >0(Figure 3.9 (b)) holds. 21
(a) (b) Figure 3.9: Detection in a DNF. In (a), the excitatory input (dotted line) is not strong enough to trigger supra-threshold activity. In (b), a self-sustained activation peak develops. 3.2.6 Memory and Forgetting As was mentioned before, an input-induced localized activity pattern can persist long after its input source has disappeared. In this case, the stable bump of activity represents the memory of a perceived event. Suppressing this memory representation results in forgetting this event. This memory and forgetting mechanism can be handled by controlling the resting activity level of the field. As shown by (Amari, 1977), a neural population will maintain a bump even in the absence of input if its excitation/inhibition balance is above the threshold 0, i.e., h≥ −Wm=−maxx{∫x 0w(|x−y|)dx}. Suppressing an existing bump can thus be achieved by lowering the resting level h. In applications, a transient inhibitory input is typically applied which switches the state of the field from a stable bump to the homogeneous resting level. A subthreshold input not able to create a bump may still be behaviorally relevant by creating a fading memory trace which preshapes the field (Figure 3.10). This preshaping from external input sources or connected neural populations may for instance bias the competitive process in decision making or the predicted timing of events recalled from memory (Ferreira et al., 2021). Figure 3.10: Preshaped field. The resting level at site Ais higher than everywhere else. 22
3.2.7 Multi-Item Memory As mentioned in the previous section, when the coupling function is of oscillatory type (see Equation 3.7), the field dynamics supports multi-bump solutions. Two main scenarios might be useful to consider. The first one is when several supra-threshold inputs are presented at around the same time. Alternatively, the inputs are applied sequentially, that is, one or more bumps already exist in the field when a new input is presented. In both case, the field with oscillatory coupling is able to stabilize a multi-bump pattern (Figures 3.11 and 3.12). This behavior is in strong contrast with the behavior of a field with lateral-inhibition coupling which supports only a single bump at a time. Figure 3.11: Two simultaneous excitatory inputs occur at sites Aand B. Due to the oscillatory kernel, the field dynamics is able to sustain both bumps. Figure 3.12: When site B receives excitatory input (dashed line), there’s a pre-existing bump at site A. Additionally, the activity pattern at site B stabilizes. 3.2.8 Encoding of the order and timing of perceived events In the context of this dissertation, certain fields need to recall not only the perceived events but also their relative order and timing. This challenge has already been addressed by (Ferreira et al., 2021). The 23
solution lies in choosing the baseline activity to be time-dependent, i.e., h=h(t), which is mathematically equivalent to changing the threshold of the firing rate function f(u). The dynamics for this parameter are given by the following equation: ∂h(x, t) ∂t =βMf(u(x, t)) + [1 −f(u(x, t))][−h(x, t) + h0],(3.8) where f(u)again corresponds to the step function with threshold 0,h0to the baseline activation to which hconverges without activation at field site x, and βM≥0defines the buildup rate at sites that have received input. As a consequence of this threshold accommodation dynamics, the bump amplitude increases monotonically with elapsed time. For the presentation of a series of perceptual events this means that the evolving multi-bump pattern encodes in the bump amplitudes the information about the order and the relative timing of events (Figure 3.13). Figure 3.13: Memory of order and relative timing of a series of three events. The bump amplitudes encode the serial order and their relative difference the time interval elapsed between the events. 3.2.9 Decision Making DNFs can implement arguably one of the most crucial cognitive skills: decision making. For this to happen, the field’s lateral inhibition must be strong enough, i.e., a sufficiently large winh >0parameter must be chosen (see Equation 3.6). In this case, two evolving supra-threshold activation patterns in the range of lateral inhibition will compete with each other for activation. As a consequence, only the field site which received the strongest support is able to evolve a bump which in turn suppresses the activity at the other site below threshold. Two factors determine which site will win. The first is the strength of the excitatory input (Figure 3.14). If two field sites, Aand B, with the same initial conditions, receive excitatory input for the same amount 24
of time, the one with the highest input level will win. However, if one site, for instance A, appears to be already preshaped by input from connected populations, it has a competitive advantage (Figure 3.15 - left). In this case, site Amay win the competition even though the external input is again stronger at site B (Figure 3.15 - right). Figure 3.14: Competition in the case of a homogeneous resting state. The decision favors the neural population which received the stronger excitatory input (dotted line). Figure 3.15: Competition in a field with preshape. Even though the localized input is stronger at site B, due to the preshape, the neural population at site Ais the one which gets activated. 3.3 MACHINE LEARNING The following section introduces the necessary machine learning concepts employed throughout the dissertation. A general introduction to the subject, as well as its learning paradigms, are presented first. 3.3.1 General Introduction Machine Learning (ML) is a branch of artificial intelligence (AI) that relies on data and algorithms to learn designated tasks. A more formal definition is presented in (Mitchell, 1997) as follows: ”A computer pro- 25
gram is said to learn from experience Ewith respect to some class of tasks Tand performance measure Pif its performance at tasks in T, as measured by P, improves with experience E.”. Since its foundations in the second half of the twentieth century, the subject has gone through periods of neglect - known as the AI winter - and periods of great interest by part of the research community. More recently, with the increase of computational power, ML has been applied extensively to tackle various challenges, such as self-driving vehicles (Rao and Frtunikj, 2018), playing go (Silver et al., 2016), and natural language processing, (Deng and Liu, 2018) to name just a few. Machine learning algorithms base themselves on the following learning paradigms: -Supervised Learning The algorithms belonging to this paradigm receive labeled data as input, i.e., each instance is coupled with its correct output. An error rate is obtained by comparing the actual and predicted label values. The main goal is to minimize this error. -Unsupervised Learning Unlike the previous method, in unsupervised learning, the labels are absent. Therefore the algorithm operates by finding statistical patterns in the data. One way of doing so is by grouping similar elements together - this technique is called clustering. -Semi-Supervised Learning Semi-supervised learning combines both methods mentioned above, i.e., certain elements are labeled while others are not. It is most common to find these algorithms applied to problems where obtaining a label’s value is rather costly. -Reinforcement Learning Reinforcement learning algorithms run in a closed-loop with the environment. The desired output is not initially known but is discovered by maximizing a reward function. The main idea is that high values act as rewards and, conversely, low values as punishments. 3.3.2 Linear Regression Linear regression is an instance of a supervised learning algorithm. It aims to calculate the relationship between variables - assuming a direct correlation amongst them - by plotting a line (see, Figure 3.16). These variables are called the independent and dependent variables, given that the value of the latter variable depends on the value of the former. A linear regression model creates a mathematical framework that predicts the dependent variable’s value when provided with its independent counterpart. 26
Given a dataset D={yi, xi,1, ..., xi,m}n i=1, a linear regression takes the following form: yi=β0+β1xi,1+... +βmxi,m +ϵi=xT iβ+ϵi, i = 1, ..., m (3.9) Alternatively, in matrix notation: y=Xβ +ϵ(3.10) where Xis a matrix of row-vectors, each containing the independent variable set, yis a vector of the dependent variables, βis a vector containing the intercept (β0) and the coefficients (β1, ..., βm), and ϵa noise vector. Figure 3.16: Example of a linear regression. The method presented here is called Ordinary Least Squares (OLS), and it works by iterative application. Fitting entails calculating the coefficients ˆ β(as the original βare not known) that minimize the error between the actual and predicted values, i.e., minimizing the following loss function: LOLS(ˆ β) = n ∑ i=1 (yi−xT iˆ β)2=||y−Xˆ β||2(3.11) The error is squared to ensure that the results are always positive, not allowing error cancellation to occur. The coefficients are obtained in the following way: ˆ βOLS = (XTX)−1(XTy)(3.12) 27
A description of each part follows for the case of arrival events (departure events are treated in the analogous manner). The External Inputs are collected every time the user switches the vehicle off. They include the GPS coordinates (latitude and longitude) and the time and day of the week of the arrival. The Sequence Learning part processes the external inputs and encodes a sequence of pattern positions and their respective time properties for a given weekday. When the vehicle switches off at a specific location, the Global Position System’s (GPS) input drives the evolution of a bump in the latitude field uElat and the longitude field uElon . Each of these bumps triggers, through excitatory connections, the evolution of a localized activity pattern at the corresponding sites in the respective sequence memory fields (uSMlat , uSMlon ). Inhibitory feedback from the sequence memory to the encoding fields destabilize the existing bump in the latter. This mechanism ensures that newly arrived localized input will create a peak at a different field location even if the position is the same, allowing a place to be encoded multiple times. A sequence of these events creates a multi-bump pattern in the sequence memory fields, with the strength of activation decreasing from bump to bump. This activation gradient is achieved by applying a threshold accommodation dynamics to the self-sustained activity patterns, which leads to a continuous increase of the bump’s amplitude as a function of elapsed time. The Long Term Memory (LTM) stores, in separate fields, memories of daily routines corresponding to different days of the week. According to the information represented by a bump in the weekday field, uDay the corresponding consolidation fields, uClat ,uClon , and the associated LTM fields, uLT Mlat ,uLT Mlon , receive excitatory input from the encoding and sequence memory fields. The consolidation field controls whether a new stop location becomes stored in LTM as part of a daily routine or whether a memorized stop location is forgotten (if it ceases to occur). When a stop event happens frequently, the accumulated localized activity in uClat (uClon ) is above threshold. Therefore, the combined excitatory input from uClat (uClon ), uElat (uElon ), and uSMlat (uSMlon ) is able to create a memory bump in the LTM fields. If, on the other hand, a bump exists in uLT Mlat (uLT Mlon ) but the activity in uClat (uClon ) is sub-threshold due to a continuous activity decay without excitation from the encoding field uElat (uElon ), the LTM becomes suppressed mediated by inhibition. We can also find excitatory connections from the memory fields back to uElat and uElon . This feedback excitation causes a pre-activation of neural populations in the encoding fields (representing previously visited locations). Functionally, this pre-shaping mechanism increases the robustness of the encoding process in the face of noisy and potentially incomplete GPS inputs. Time and Day stores information regarding the routine duration of a day. The routine duration field - uRD - receives excitatory input from the weekday field - uDay - when the day begins. The amplitude of the resulting self-sustained activity pattern increases continuously due to applied threshold accommodation dynamics. At the end of the day, the bump’s amplitude represents 24 hours. This value is essential to defining the baseline activity level in the decision fields. 34
Finally, in the Sequence Recall phase, the model uses the stored information to predict the intended destinations and the arrival time. The decision field uDlat (uDlon ) receives the activation gradient stored in uLT Mlat (uLT Mlon ) as sub-threshold input. A continuous increase of the baseline activity in uDlat (uDlon ) brings all subpopulations closer to the threshold for the evolution of a self-stabilized bump. The prediction of the location and arrival time of the first destination arises when the activity of the population with the highest pre-activation in the decision field reaches a supra-threshold value. Through excitatoryinhibitory connections between associated populations in the decision and working memory fields, the system guarantees that when a bump evolves in the latter, the supra-threshold activity is suppressed in the former. This process continues until the population with the lowest pre-activation has reached threshold, and the prediction about the last stop event has been stored in working memory. The figure below illustrates a more in-depth overview of the destinations model. Figure 4.2: Schematic view of the destinations model architecture with several interconnected neural fields implementing sequence learning, long term memory and sequence recall. Dedicated Models Despite answering significant questions regarding vehicle routines, it is still possible to improve the destinations model. Every trip must have one of several possible drivers and, in addition, may also include passengers and associated objects that are part of a daily routine. The dedicated models serve as extensions to the base model aiming to memorize and recall this additional routine information. 35
It is relevant to mention that these dedicated models do not encompass a sequence learning phase. Instead, they receive excitatory input carrying the information about the encoded destinations (from ulat and ulon) and an additional input signaling whether or not the user/passenger/object in question is inside the vehicle. Hence, for any element being part of a routine, a bump will emerge in the consolidation fields (and, consequently, in the LTM fields) only if the destination input and the input from insight the vehicle are simultaneously present. Keeping this in mind, three dedicated models were created capable of answering the following questions for each trip: •Users Dedicated Model: Who is the driver? •Passengers Dedicated Model: Who will enter/ exit? •Objects Dedicated Model: Which objects will come inside/outside? It is relevant to mention that there will be an instantiation of each dedicated model per element present (i.e., if there are two different users, there will be two instantiations of the users’ model), each with its unique memory. Moreover, since each dedicated model’s memory formation depends on the external inputs provided by the base model, the driver/passenger/object information will synchronize (in space and time) with other events during sequence recall. This synchronization works for consolidating and forgetting an event. Figures 4.3 and 4.4 present schematic views of a dedicated model and the global DNF-based architecture, respectively. Dedicated Model External Inputs Time and Day Sequence Learning Long Term Memory Sequence Recall → Destinations Model User/Passenger/Object Information Consolidation Latitude 𝑢𝐶𝑙𝑎𝑡 LTM Latitude 𝑢LTM𝑙𝑎𝑡 Consolidation Longitude 𝑢𝐶𝑙on LTM Longiitude 𝑢LTM𝑙on Decision: Latitude 𝑢𝐷𝑙𝑎𝑡 Working Memory: Latitude 𝑢𝑊𝑀𝑙𝑎𝑡 Decision: Longitude 𝑢𝐷𝑙on Working Memory: Longitude 𝑢𝑊𝑀𝑙on Day Selection + Encoding Figure 4.3: Schematic view of the architecture of the dedicated models. 36
Sequence Learning Sequence memory: Latitude Sequence Recall The driver __ will departure (arrive) from(at) ____ at about ___ a.m(p.m) and the passengers _____ and objects _____ will go in (out). LTM LTM:Destinations 𝑢𝐿T𝑀𝑙𝑎𝑡 Day of the week Encoding: Latitude 𝑢E𝑙𝑎𝑡 𝑢SM𝑙𝑎𝑡 𝑢DAY Consolidation: Latitude 𝑢𝐶𝑙𝑎𝑡 Decision: Latitude 𝑢𝐷𝑙𝑎𝑡 Working Memory: Latitude 𝑢𝑊𝑀𝑙𝑎𝑡 Day of the week Latitude coordinate when the car departs(arrives) Routine duration 𝑢RD External Inputs Passengers in(out) Objects in(out) Recall: Driver Recall: Passengers Recall: Objects Encoding: Longitude uElong 𝑢 𝐿T𝑀𝑙𝑜𝑛g Sequence memory: Longitude uSMlong Consolidation: Longitude 𝑢𝐶𝑙𝑜𝑛𝑔 Decision: Longitude 𝑢𝐷𝑙𝑜𝑛𝑔 Working Memory: Longitude 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 Longitude coordinate when the car departs(arrives) LTM: Driver LTM: Passengers LTM: Objects 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 𝑢𝐷𝑙𝑎𝑡 𝑢𝑊𝑀𝑙𝑎𝑡 𝑢𝐷𝑙𝑜𝑛𝑔 𝑢𝑊𝑀𝑙𝑜𝑛𝑔 Recaill: Destinations Driver D1.... D2P1P2P3.... O1O2O3.... O4 .... .... .... .... .... .... Excitatory connection Inhibitory connection Day selection LTM: Long Term Memory LTM: Latitude LTM: Longitude Figure 4.4: DNF-based global architecture, comprising both the destinations and the dedicated models. 37
Before concluding this section, a few notes regarding the implementation follows. Regarding the DNF models, using the forward Euler method (for more details, see Appendix A.1), numerical simulations were done in MATLAB. The in-built functions fft and ifft, for the the fast Fourier Transform (FFT) and its inverse were used to compute the spatial convolution of the field equation. Mathematical Model Equations In the following section, the mathematical equations of the model are described in detail. The specific model parameters used in the numerical simulations can be found in Appendix A.2. The population dynamics in each field is governed by the integro-differential Equation 3.1. We use the lateral inhibition kernel wlat (Equation 3.6) in the fields in which only one bump at a time should evolve (e.g., uEand uDay). To enable stable multi-bump solutions in the memory fields, an oscillatory connectivity function wosc (Equation 3.7) is used. The activation gradients in uSMlat and uSMlon encode the serial order of visited locations, which means, the higher a bump’s amplitude, the earlier its corresponding location was visited. Since the bump amplitude increases as a function of elapsed time, the difference in bump amplitude of two successive destinations represents the time interval separating the two visits. The activation gradient is established according to the following state-dependent dynamics: τh ∂hSM (x, t) ∂t =κf(uSM (x, t)) + (1 −f(uSM (x, t)))(−hSM (x, t) + hSM0),(4.1) where hSM0defines the baseline activation to which hSM relaxes without input at position x,κ > 0is the growth rate when supra-threshold activity is present, and τhis the time scale of the dynamics. The time window for the buildup is proportional to the total routine time. If one considers a time window of 24 hours, the h-level accommodation dynamics begins at t=tstart (00:00) and ends at t=tend (24:00). The consolidation field uCis governed by the following equation capable of memorizing frequent destinations and forgetting scarcely visited ones: ∂uC(x, t) ∂t =λbuild(−uC(x, t) + a)f(uE(x, t)) +λdecay(−uC(x, t) + hc)(1−f(uE(x, t))). (4.2) It integrates the input from uEwith a linear growth rate given by λbuild, approaching a value a > 0, which, represents the maximum level of activation in uC. When there is no supra-threshold activity in uE, the bumps in uCdecay with a slower rate λdecay towards the resting level hc<0. The growth and decay rates function such that: 38
• A destination’s accumulated localized activity in uCis above threshold after visits in two consecutive weeks. • Activity falls below threshold after the predicted visit did not occur in two consecutive weeks. The memory’s formation and forgetting periods can be adapted by choosing the λbuild and λdecay parameters accordingly. The remaining mathematical formulations, concerning the long-term memory and sequence recall mechanisms, are identical for all DNF-based models. To explain the model equations, we use the general user model as an example. Note that for instance the notation uuser1 Clat would represent user 1’s consolidation field for the latitude coordinate. The dynamic build-up of a routine’s long term memory is performed in uuser LT Mlat (uuser LT Mlon ) through excitatory connections from uSMlat (uSMlon ), uElat (uElon ), and uClat (uClon ). The LTM fields receive the following input: Suser(x, t) = Duserf(uC(x, t))f(uE(x, t))uSM (x, t),(4.3) where Duser =Aid ×max ADay (f(uDay(x, t)−θ)),(4.4) and AID and ADay represent the input signaling whether or not the user is present (0if not; 1otherwise) and the region in the field uDay, which receives information about the current day of the week. Since Duser = 1 when bumps exist in both fields and 0otherwise, it acts as a multiplicative signal that gates the input from the encoding and sequence memory fields to the associated LTM fields. The gradient in the LTM fields is established by the following state-dependent dynamics: τh ∂hLT M (x, t) ∂t = (1 −f(uLT M (x, t)))(−hLT M (x, t) + hLT M0) +f(uLT M (x, t))f(uC(x, t))f(uSM (x, t))(−hLT M (x, t) + hSM (x, t)) +f(uLT M (x, t))(1 −f(uC(x, t)))(−hLT M (x, t) + hLT Minih ) (4.5) where hLT M0<0is the baseline activity to which hLT M converges without supra-threshold activity at position x. The negative constant hLT Minih <0represents the stable state to which hLT M converges at sites with a bump in uLT M (x, t)and no supra-threshold activity in uC(x, t). This ensures the deletion of a stop location memory that is no longer part of a daily routine. At positions xwith sub-threshold activation 39
in the sequence memory, consolidation, and long term memory fields, the h-value hLT M (x, t), tends to hSM (x, t). The bump amplitude in uLT M (x, t)thus matches the corresponding bump amplitude in uSM (x, t), which means that the relative timing information recorded during the last routine is preserved in long-term memory. The decision and working memory fields perform the recall of the learned routine. The prior receives the multi-bump patterns from uuser LT Mlat (uuser LT Mlon ) as sub-threshold input: Suser(x) = Duseruuser LT M (x).(4.6) The coefficient Duser given by Equation 4.4 ensures that only the gradient corresponding to the current day of the week and the specific driver contributes to this input. To recall the order and timing information stored in the activation gradients, we apply a linear dynamics growth to the resting level hDin uDlat (uDlon ), which brings all pre-activated sub-populations closer to the threshold 0: dhD(t) dt =κD, hD(t0) = hD0<0,(4.7) where κddefines the constant growth rate. The initial value of hD0matches bump amplitude of the routine duration field from the last routine execution. Since this amplitude represents 24 hours, the stop events reach threshold 0 at the predicted event time. To guarantee that the driving assistant anticipates the predicted timing, one only has to set the initial resting state to a slightly higher value to reduce the activation gap to the threshold. 4.2 MACHINE LEARNING MODELS The ML-based architecture consists of three independent models which aim to predict the comfort features inside the vehicle, namely the desired temperature, cockpit mirror, and driver’s seat poses. The models are quite similar in structure, only differing in length of the output vector. More specifically: • The Temperature Model predicts a vector with one element containing the value of the temperature inside the cockpit in degrees Celsius. • The Cockpit Mirror Pose Model predicts a vector with two elements corresponding to the values of the pan and tilt angles, respectively. • The Driver Seat Pose Model predicts a vector with three elements corresponding to the values of the driver seat’s position, height, and angle, respectively. 40
Apart from this, all processing steps, ranging from the data processing to the tuning, are the same for all models. Consequently, throughout this section, these steps are explained only once and can be generalized to the other models. The two remaining subsections detail the data processing and model selection steps. 4.2.1 Data Processing The data processing phase is relatively simple and comprises only three steps. First, the data in the user’s column (ID_Pass_1) is one-hot encoded, i.e., a new column is created for each different user value, indicating his/her presence in the vehicle as a binary value (1if present and 0otherwise). Afterward, the data is split into training, testing, and validation (if fed to a neural network) sets as follows: •Training Set: Weeks 1-7. •Testing Set: Weeks 8-11 if there is no validation set; Weeks 8-10, otherwise. •Validation Set: Week 11, if it exists. Lastly, all generated datasets have their columns filtered according to the desired model’s labels (i.e., the values it aims to predict). For instance, in the case of the Cockpit Mirror Pose Model, only the encoded driver information and the cockpit mirror pan and tilt angle columns are kept. 4.2.2 Model Selection and Tuning For clarity, the present subsection is divided into two halves. The first concerns the regression models (both linear and ridge), and the second discusses the neural networks. Regression Models The linear regression models are relatively straightforward as there are no parameters to tune. For ridge regression, however, this is not the case. For each model and vehicle, we tested several solvers to compute the ridge coefficients, namely singular value decomposition, and stochastic average gradient descent. Moreover, the tolerance value (i.e., the desired precision of the solution) was also tuned (ranging from 0.0001 to 0.1). Neural Network Models According to the universal approximation theorem, a feed-forward neural network with only a single hidden layer can approximate any function (for discussion see (Guliyev and Ismailov, 2018)). Consequently, the 41
defined neural network models contain only three layers - input, hidden, and output. The number of neurons in the first and last layer is fixed according to the specific model and vehicle. For instance, considering the Driver Seat Pose Model and a vehicle with two different drivers, there will be: • Two neurons in the input layer each representing a single user. • Three neurons in the output layer corresponding to the driver’s seat position, height, and angle values, respectively. A brute-force technique was employed to designate the number of neurons in the hidden layer, ranging between 2and 128. We trained and evaluated the network for all these values and kept the one that produced the best results. Moreover, in an attempt to further improve these results, we included early stopping and model checkpoints. The former halts the training process after some epochs if there is no positive change in the evaluation metrics. The latter saves the weights associated with the best-performing network. This can be loaded afterwards for when making predictions. The number of epochs varied between 100 and 1000 by increments of 100, and the batch size value was 32. Evaluation Metrics As evaluation metrics Mean Absolute Error (MAE) and Mean Squared Error (MSE) were chosen. While the former measures the average error magnitude in a set of predictions, the latter computes their variance, i.e., how close a line is to a group of points. Considering a set of nelements where yiand ˆyicorrespond to the i-th entry’s actual and predicted values, the following equations denote the MAE and MSE, respectively: MAE =1 n n ∑ i=1 |yi−ˆyi|,(4.8) MSE =1 n n ∑ i=1 (yi−ˆyi)2.(4.9) To conclude, concerning the ML approach implementation, the language of choice was Python (version 3.8), with the additional libraries: • Numpy and Pandas (to explore and process data), • Scikit-learn, Tensorflow, and Keras (to build, train, and tune the models), • Matplotlib (to assess model performance). 42
5. RESULTS AND DISCUSSION
By analyzing Table 5.7, one can conclude all models perform quite well. The MAE values indicate that the prediction error is always below one degree or centimeter, depending on the feature. This is because each user has a preferred value for each of the comfort settings and very rarely strays from it. However, it is important to stress that a perfect score in the prediction is impossible as one never adjusts the driver seat and the cockpit mirror poses exactly in the same way. 50
6. CONCLUSIONS AND FUTURE WORK
6.1 GENERAL DISCUSSION AND LIMITATIONS This dissertation presented a DNF-based approach capable of learning and memorizing both the ordinal and temporal properties of a vehicle, including all its different driver, passenger, and object routines. The learning is continuous, happens implicitly without driver feedback, and is adaptable to different time scales (e.g., hours, days, or weeks). Moreover, we also built ML models to predict and, consequently, adjust the comfort setting inside the cockpit, namely the temperature, the cockpit mirror, and the driver seat poses. Experiments performed with real data regarding the routines of several vehicles validate the developed architecture for multiple drivers, passengers, and objects. Additionally, the results confirm that the system can correctly respond, in most cases, to the following questions: Where to go? When to go? How long to stay there? Who is (are) the driver/passenger(s)/object(s)? What are the desired comfort settings? Regarding vehicle trips, prediction errors happen in cases of an exceptional, one-time deviation from routine behavior. The activation-based learning mechanism implemented in the DNFs models also supports a fast adaption to consistent changes in the routine when predictions fail more than once or when an existing one needs to integrate a new destination. By contrast, other neural network approaches (such as deep learning) store acquired information in synaptic weights to learn sequential tasks. Weight-based learning strategies typically require re-training models every few weeks to update a vehicle’s routine. With DNFs, no such problem arises. Additional destinations, drivers or objects can and be added or deleted on the fly. The relatively high computational cost of the DNF-based approach (manly due to the spatial convolution) and the limited access to computational power in the present implementation impacted the model’s performance. It this would not be an issue, one could set the field size and the time step values to higher numbers and, thus, produce more accurate results. The former would increase the spatial resolution of the model by encoding locations with similar GPS coordinates in spatially separated bumps. Currently, bumps are created in neighboring positions which might be off by around 0.005 latitude/longitude degrees. The greater the field size, the lower is the resulting spatial error. Increasing the time step would decrease the temporal difference between the real event and its prediction by the DNF model. It is important to stress however that an observed larger temporal mismatch between the real event and its prediction in some cases is the result of a highly irregular timing pattern for a specific location. 6.2 FUTURE WORK Despite having tackled the proposed objectives for this dissertation and obtaining good results, there is still room for more work to be carried out as well as several extensions to the current architecture. One immediate step would be to run the DNFs architecture for the remaining 19 datasets. By doing so, one 52
might spot issues that have not been thought of thus far. Also, instead of splitting the architecture into DNF and ML-based approaches, to integrate the comfort setting module directly in the DNF framework by applying Hebbian (weight-based) learning mechanisms (Miller and MacKay, 1994). Despite DNFs being able to learn over multiple timescales, in the current implementation, the developed architecture only does so weekly. If, for instance, one has the habit of going to a given location once a month, the model would not integrate the event as a part of a routine behavior as it does not occur on at least two consecutive weeks. Integrating other factors such as the current traffic conditions into the long-term memory could produce more effective route selection/recommendations without requiring input from the driver. For instance, considering that, on a particular day, the traffic is slower than usual, the system could alert the driver to depart earlier than usual from a stop location so that he/she arrives still in time at the next destination. Lastly, the developed models were fed with with pre-processed data, collected a priori. This is a limitation for real-world applications of the model. Augmenting the system with the capacity to identify who and what enters/exits a vehicle would be ideal. Combining such a system with the current one offers an integral solution, ready to be embedded into a vehicle. 53
BIBLIOGRAPHY Amari, S.-i. (1977). Dynamics of pattern formation in lateral-inhibition type neural fields. Biological cybernetics, 27(2):77–87. Arkin, R. C. (2000). Behavior-Based Robotics (Intelligent Robotics and Autonomous Agents). A Bradford Book. Belkin, M., Hsu, D., Ma, S., and Mandal, S. (2019). Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849– 15854. Bertozzi, M., Broggi, A., Conte, G., and Fascioli, R. (1998). The experience of the argo autonomous vehicle. Proceedings of SPIE - The International Society for Optical Engineering. Bicho, E., Louro, L., and Erlhagen, W. (2010). Integrating verbal and nonverbal communication in a dynamic neural field architecture for human-robot interaction. Frontiers in Neurorobotics, 4:5. Bishop, R. (2000). A survey of intelligent vehicle applications worldwide. In Proceedings of the IEEE Intelligent Vehicles Symposium 2000 (Cat. No.00TH8511), pages 25–30. Campello, R. J., Moulavi, D., and Sander, J. (2013). Density-based clustering based on hierarchical density estimates. In Pacific-Asia conference on knowledge discovery and data mining, pages 160– 172. Springer. Choi, J.-K., Kim, K., Kim, D., Choi, H., and Jang, B. (2018). Driver-adaptive vehicle interaction system for the advanced digital cockpit. In 2018 20th International Conference on Advanced Communication Technology (ICACT), pages 307–310. IEEE. Cliche, M. (2017). Bb_twtr at semeval-2017 task 4: Twitter sentiment analysis with cnns and lstms. arXiv preprint arXiv:1704.06125. Dautenhahn, K. (1995). Getting to know each other—artificial social intelligence for autonomous robots. Robotics and autonomous systems, 16(2-4):333–356. Deng, L. and Liu, Y. (2018). Deep learning in natural language processing. Springer. Dickmanns, E. (2002). he development of machine vision for road vehicles in the last decade. Proc. IEEE Intelligent Vehicles Symposium, 1:268–281. Eagle, N. and Pentland, A. S. (2009). Eigenbehaviors: Identifying structure in routine. Behavioral Ecology and Sociobiology, 63(7):1057–1066. 54
Eddy, S. R. (2004). What is a hidden markov model? Nature biotechnology, 22(10):1315–1316. Egerstedt, M. (2000). Behavior based robotics using hybrid automata. In International Workshop on Hybrid Systems: Computation and Control, pages 103–116. Springer. Erlhagen, W. and Bicho, E. (2006). The dynamic neural field approach to cognitive robotics. Journal of neural engineering, 3(3):R36. Erlhagen, W. and Bicho, E. (2014). A dynamic neural field approach to natural and efficient human-robot collaboration. In Neural fields, pages 341–365. Springer. Erlhagen, W. and Schöner, G. (2002). Dynamic field theory of movement preparation. Psychological review, 109(3):545. Fernandes, C., Ferreira, F., Erlhagen, W., Monteiro, S., and Bicho, E. (2020). A deep learning approach for intelligent cockpits: Learning drivers routines. In International Conference on Intelligent Data Engineering and Automated Learning, pages 173–183. Springer. Ferreira, F., Erlhagen, W., and Bicho, E. (2016). Multi-bump solutions in a neural field model with external inputs. Physica D: Nonlinear Phenomena, 326:32 – 51. Ferreira, F., Erlhagen, W., Sousa, E., Louro, L., and Bicho, E. (2014). Learning a musical sequence by observation: A robotics implementation of a dynamic neural field model. In 4th International Conference on Development and Learning and on Epigenetic Robotics, pages 157–162. IEEE. Ferreira, F., Wojtak, W., Erlhagen, W., Vicente, P., Patel, A., Monteiro, S., and Bicho, E. (2019). A dynamic neural model for endowing intelligent cars with the ability to learn driver routines: where to go, when to arrive and how long to stay there. In Towards Cognitive Vehicles Workshop (TCV2019), IROS2019, pages 15–18. Ferreira, F., Wojtak, W., Fernandes, C., Guimarães, P., Monteiro, S., Bicho, E., and Erlhagen, W. (2021). Dynamic identification of stop locations from gps trajectories based on their temporal and spatial characteristics. In International Conference on Artificial Neural Networks, pages 347–359. Springer. Ferreira, F., Wojtak, W., Sousa, E., Louro, L., Bicho, E., and Erlhagen, W. (2021). Rapid learning of complex sequences with time constraints: A dynamic neural field model. IEEE Transactions on Cognitive and Developmental Systems, pages 853–864. Fong, T. and Thorpe, C. (2001). Vehicle teleoperation interfaces. Autonomous robots, 11(1):9–18. Guliyev, N. J. and Ismailov, V. E. (2018). On the approximation by single hidden layer feedforward neural networks with fixed weights. Neural Networks, 98:296–304. 55
Guo, D., Sun, F., Liu, H., Kong, T., Fang, B., and Xi, N. (2017). A hybrid deep architecture for robotic grasp detection. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1609–1614. IEEE. Huval, B., Wang, T., Tandon, S., Kiske, J., Song, W., Pazhayampallil, J., Andriluka, M., Rajpurkar, P., Migimatsu, T., Cheng-Yue, R., et al. (2015). An empirical evaluation of deep learning on highway driving. arXiv preprint arXiv:1504.01716. Johnson, J., Spencer, J. P., Luck, S. J., and Schöner, G. (2009). A dynamic neural field model of visual working memory and change detection. Psychological science, pages 568–77. Kanda, T. and Ishiguro, H. (2017). Human-robot interaction in social robotics. CRC Press. Kannan, S., Thangavelu, A., and Kalivaradhan, R. (2010). An intelligent driver assistance system (i-das) for vehicle safety modelling using ontology approach. International Journal of UbiComp, 1(3):15–29. Knobel, M., Schwarz, F., Palleis, H., and Schumann, J. (2011). Towards designing experiences for advanced driving assistance systems. In Workshop User Experience in Cars. in Conjunction with 13th IFIP TC13 Conf. on HCI (INTERACT’11), pages 3–10. Kurfess, T. R. (2004). Robotics and Automation Handbook. CRC Press. Kurrek, P., Zoghlami, F., Jocas, M., Stoelen, M., and Salehi, V. (2020). Q-model: An artificial intelligence based methodology for the development of autonomous robots. American Society of Mechanical Engineers, pages 1–16. Laing, C. R., Troy, W. C., Gutkin, B., and Ermentrout, G. B. (2002). Multiple bumps in a neuronal model of working memory. SIAM Journal on Applied Mathematics, 63(1):62–97. Liu, Y., Sun, C., Lin, L., and Wang, X. (2016). Learning natural language inference using bidirectional lstm model and inner-attention. arXiv preprint arXiv:1605.09090. McCulloch, W. S. and Pitts, W. (1943). A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133. Meschtscherjakov, A., Tscheligi, M., Szostak, D., Krome, S., Pfleging, B., Ratan, R., Politis, I., Baltodano, S., Miller, D., and Ju, W. (2016). Hci and autonomous vehicles: contextual experience informs design. In Proceedings of the 2016 CHI Conference Extended Abstracts on Human Factors in Computing Systems, pages 3542–3549. Miller, K. D. and MacKay, D. J. (1994). The role of constraints in hebbian learning. Neural computation, 6(1):100–126. 56
Mitchell, T. M. (1997). Machine Learning. McGraw-Hill. Petridis, S., Li, Z., and Pantic, M. (2017). End-to-end visual speech recognition with lstms. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 2592–2596. IEEE. Rao, Q. and Frtunikj, J. (2018). Deep learning for self-driving cars: Chances and challenges. In Proceedings of the 1st International Workshop on Software Engineering for AI in Autonomous Systems, SEFAIS ’18, page 35–38, New York, NY, USA. Association for Computing Machinery. Sallab, A. E., Abdou, M., Perot, E., and Yogamani, S. (2017). Deep reinforcement learning framework for autonomous driving. Electronic Imaging, 2017(19):70–76. Sandamirskaya, Y. and Schoner, G. (2008). Dynamic field theory of sequential action: A model and its implementation on an embodied agent. In 2008 7th IEEE international conference on development and learning, pages 133–138. IEEE. Sandamirskaya, Y., Zibner, S. K., Schneegans, S., and Schöner, G. (2013). Using dynamic field theory to extend the embodiment stance toward higher cognition. New Ideas in Psychology, 31(3):322–339. Schöner, G. (2008). Dynamical systems approaches to cognition. Cambridge handbook of computational cognitive modeling, pages 101–126. Schöner, G., Kopecz, K., and Erlhagen, W. (1997). The dynamic neural field theory of motor programming: Arm and eye movements. In Advances in Psychology, volume 119, pages 271–310. Elsevier. Schöner, G., Spencer, J., and Group, D. R. (2014). Dynamic thinking : A Primer On Dynamic Field Theory. Oxford University Press. Sheridan, T. B. (2020). A review of recent research in social robotics. Current Opinion in Psychology, 36:7–12. Cyberpsychology. Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L., Van Den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., et al. (2016). Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489. Simmons, R., Browning, B., Zhang, Y., and Sadekar, V. (2006). Learning to predict driver route and destination intent. In 2006 IEEE Intelligent Transportation Systems Conference, pages 127–132. IEEE. Sousa, E., Erlhagen, W., Ferreira, F., and Bicho, E. (2015). Off-line simulation inspires insight: a neurodynamics approach to efficient robot task learning. Neural Networks, 72:123–139. 57
Sun, X., Chen, H., Shi, J., Guo, W., and Li, J. (2018a). From hmi to hri: Human-vehicle interaction design for smart cockpit. In Kurosu, M., editor, Human-Computer Interaction. Interaction in Context, pages 440–454, Cham. Springer International Publishing. Sun, X., Chen, H., Shi, J., Guo, W., and Li, J. (2018b). From hmi to hri: Human-vehicle interaction design for smart cockpit. In International Conference on Human-Computer Interaction, pages 440–454. Springer. Thorpe, C. (1990). Vision and Navigation: the Carnegie Mellon Navlab. Kluwer Academic Publishers. Whitcomb, L. L. (2000). Underwater robotics: out of the research laboratory and into the field. In Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No.00CH37065), volume 1, pages 709–716 vol.1. Yanco, H. A. and Drury, J. (2004). Classifying human-robot interaction: an updated taxonomy. In 2004 IEEE International Conference on Systems, Man and Cybernetics (IEEE Cat. No.04CH37583), volume 3, pages 2841–2846 vol.3. Zibner, S. K., Faubel, C., Iossifidis, I., and Schoner, G. (2011). Dynamic neural fields as building blocks of a cortex-inspired architecture for robotic scene representation. IEEE Transactions on Autonomous Mental Development, 3(1):74–91. 58
A. APPENDIX 59
A.3.3 Thursday Routine Users Homer’s Thursday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 503.91(±6.11) 9 505.88(±5.99) Arrival S2School 11 517.09(±3.65) 9 518.38(±3.5) Departure S3School 11 534.64(±5.51) 9 536.12(±5.71) Arrival S4Work 11 581.18(±8.86) 9 585.5(±6.44) Departure S5Work 11 1009.5(±3.35) 9 1011.0(±4.74) Arrival S6School 11 1019.62(±2.18) 9 1020.38(±3.28) Departure S7School 11 1036.64(±12.85) 9 1037.88(±7.13) Arrival S8Home 11 1057.27(±1.05) 9 1059.62(±3.74) Table A.14: Real and predicted times (in minutes) for Homer’s Thursday routine. Marge’s Thursday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S9Home 3 1074.67(±2.62) 0 − Arrival S10 Grocery 3 1087.67(±2.49) 0 − Departure S11 Grocery 3 1095.67(±2.49) 0 − Arrival S12 Home 3 1104.0(±1.41) 0 − Departure S13 Home 2 1106.0(±1.63) 0 − Arrival S14 Friend’s 2 1137.0(±0.82) 0 − Departure S15 Friend’s 2 1261.0(±0.82) 0 − Arrival S16 Home 2 1276.33(±0.94) 0 − Departure S17 Home 2 1376.5(±0.5) 0 − Arrival S18 Shopping 2 1354.5(±0.5) 0 − Departure S19 Shopping 2 1376.5(±0.6) 0 − Arrival S20 Home 2 1402.0(±2.0) 0 − Table A.15: Real and predicted times (in minutes) for Marge’s Thursday routine. Passengers Bart’s Thursday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 503.91(±6.11) 9 505.88(±5.99) Arrival S6School 11 1019.62(±2.18) 9 1020.38(±3.28) Departure S13 Home 2 1106.0(±1.63) 0 − Departure S15 Friend’s 2 1261.0(±0.82) 0 − Table A.16: Real and predicted times (in minutes) for Bart’s Thursday routine. 66
Lisa’s Thursday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 503.91(±6.11) 9 505.88(±5.99) Arrival S6School 11 1019.62(±2.18) 9 1020.38(±3.28) Table A.17: Real and predicted times (in minutes) for Lisa’s Thursday routine. Objects Object routines for driver Homer Name Event Type Stops Location NS Real Time NP Pred. Time Bag 1 Departure S1Home 11 503.91(±6.11) 9 505.88(±5.99) Arrival S6School 11 1019.62(±2.18) 9 1020.38(±3.28) Bag 2 Departure S1Home 11 503.91(±6.11) 9 505.88(±5.99) Arrival S6School 11 1019.62(±2.18) 9 1020.38(±3.28) Table A.18: Real and predicted times (in minutes) for object routines associated with the driver Homer on Thursday. Object routines for driver Marge Name Event Type Stops Location NS Real Time NP Pred. Time H.B 1 Departure S13 Home 2 1106.0(±1.63) 0 − Departure S15 Friend’s 2 1261.0(±0.82) 0 − Table A.19: Real and predicted times (in minutes) for object routines associated with the driver Homer on Thursday (H.B = Handbag). A.3.4 Friday Routine Users Homer’s Friday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 504.18(±6.01) 9 506.38(±5.63) Arrival S2School 11 517.45(±3.39) 9 520.88(±4.62) Departure S3School 11 534.36(±5.19) 9 535.75(±5.43) Arrival S4Work 11 581.55(±8.6) 9 585.75(±5.63) Departure S5Work 5 651.2(±3.54) 2 654.5(±0.5) Arrival S6Meeting Office 5 673.2(±2.04) 2 681.5(±0.5) Departure S7Meeting Office 5 853.8(±1.47) 2 859(±1.0) Arrival S8Work 5 867.6(±1.5) 2 874.0(±2.0) Departure S9Work 11 1019.89(±4.28) 9 1011.0(±3.3) Arrival S10 School 9 1019.89(±2.51) 8 1022.75(±3.6) Departure S11 School 9 1037.46(±12.37) 8 1039.25(±8.45) Arrival S12 Home 11 1057.45(±1.37) 9 1060.12(±3.3) Table A.20: Real and predicted times (in minutes) for Homer’s Friday routine. 67
Marge’s Friday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S13 Home 5 1074.4(±1.5) 2 1082.5(±5.5) Arrival S14 Grocery 5 1087.4(±1.85) 2 1092.5(±2.5) Departure S15 Grocery 5 1096.6(±2.24) 2 1097.0(±4.0) Arrival S16 Home 5 1106.2(±2.56) 2 1103.5(±0.5) Departure S17 Home 9 1218.44(±1.34) 7 1222.83(±4.18) Arrival S18 Gym 9 1239.67(±2.26) 7 1247.43(±11.18) Departure S19 Gym 9 1307.67(±1.76) 7 1312.86(±4.97) Arrival S20 Home 9 1315.56(±3.17) 7 1319.71(±6.02) Table A.21: Real and predicted times (in minutes) for Marge’s Friday routine. Passengers Passengers’ Friday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 504.18(±6.01) 9 506.38(±5.63) Arrival S10 School 9 1019.89(±2.51) 8 1022.75(±3.6) Table A.22: Real and predicted times (in minutes) for Bart and Lisa’s Friday routine. Objects Object routines for driver Homer Name Event Type Stops Location NS Real Time NP Pred. Time Bag 1 Departure S1Home 11 504.18(±6.01) 9 506.38(±5.63) Arrival S10 School 9 1019.89(±2.51) 8 1022.75(±3.6) Bag 2 Departure S1Home 11 504.18(±6.01) 9 506.38(±5.63) Arrival S10 School 9 1019.89(±2.51) 8 1022.75(±3.6) Table A.23: Real and predicted times (in minutes) for object routines associated with the driver Homer on Friday. Object routines for driver Marge Name Event Type Stops Location NS Real Time NP Pred. Time G.B Departure S17 Home 9 1218.44(±1.34) 7 1222.83(±4.18) Departure S19 Gym 9 1307.67(±1.76) 7 1312.86(±4.97) Table A.24: Real and predicted times (in minutes) for object routines associated with the driver Marge on Friday. 68
A.3.5 Saturday Routine Users Homer’s Saturday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 443.82(±1.59) 9 445.0(±1.8) Arrival S2Church 11 463.82(±3.56) 9 466.75(±2.17) Departure S3Church 11 575.91(±3.32) 9 580.88(±3.66) Arrival S4Home 11 587.0(±2.04) 9 587.0(±1.73) Table A.25: Real and predicted times (in minutes) for Homer’s Saturday routine. Marge’s Saturday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S5Home 5 934.6(±1.02) 0 − Arrival S6Hospital 5 953.0(±1.1) 0 − Departure S7Hospital 5 1039.4(±0.8) 0 − Arrival S8Home 5 1056.2(±1.33) 0 − Departure S9Home 7 1219.29(±1.48) 3 1218.33(±1.7) Arrival S10 Gym 7 1240.57(±3.2) 3 1258.0(±11.22) Departure S11 Gym 7 1307.29(±1.38) 3 1307.33(±1.25) Arrival S12 Home 7 1314.29(±2.81) 3 1313.0(±1.63) Table A.26: Real and predicted times (in minutes) for Marge’s Saturday routine. It is important to note, regarding the Table above, that the trip associated with going to the hospital (namely Stops S5,S6,S7, and S8) occurs every two weeks. Consequently, the system does not memorize it. Passengers Bart’s Saturday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 443.82(±1.59) 9 445.0(±1.8) Departure S3Church 11 575.91(±3.32) 9 580.88(±3.66) Departure S5Home 5 934.6(±1.02) 0 − Departure S7Hospital 5 1039.4(±0.8) 0 − Table A.27: Real and predicted times (in minutes) for Bart’s Saturday routine. 69
Marge and Lisa’s Saturday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 443.82(±1.59) 9 445.0(±1.8) Departure S3Church 11 575.91(±3.32) 9 580.88(±3.66) Table A.28: Real and predicted times (in minutes) for Marge and Lisa’s Saturday routine. Objects Object routines for driver Homer Name Event Type Stops Location NS Real Time NP Pred. Time H.B 1 Departure S1Home 11 443.82(±1.59) 9 445.0(±1.8) Departure S3Church 11 575.91(±3.32) 9 580.88(±3.66) H.B 2 Departure S1Home 11 443.82(±1.59) 9 445.0(±1.8) Departure S3Church 11 575.91(±3.32) 9 580.88(±3.66) Table A.29: Real and predicted times (in minutes) for object routines associated with the driver Homer on Saturday (H.B = Handbag). Object routines for driver Marge Name Event Type Stops Location NS Real Time NP Pred. Time G.B Departure S9Home 7 1219.29(±1.48) 3 1218.33(±1.7) Departure S11 Gym 7 1307.29(±1.38) 3 1307.33(±1.25) Table A.30: Real and predicted times (in minutes) for object routines associated with the driver Marge on Saturday. A.4 SUNDAY ROUTINE Users Homer’s Sunday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 444.0(±1.28) 9 446.25(±2.17) Arrival S2Church 11 464.55(±3.65) 9 466.0(±3.39) Departure S3Church 11 576.09(±3.34) 9 581.75(±3.7) Arrival S4Home 11 586.55(±2.27) 9 586.0(±2.06) Departure S5Home 7 1155.57(±1.59) 2 1157.5(±0.5) Arrival S6Restaurant 7 1159.86(±0.99) 2 1165.5(±7.5) Departure S7Restaurant 7 1174.0(±2.2) 2 1182.5(±7.5) Arrival S8Home 7 1203.29(±1.67) 2 1212.0(±7.0) Table A.31: Real and predicted times (in minutes) for Homer’s Sunday routine. 70
Passengers Passengers’ Sunday Routine Event Type Stops Location NS Real Time NP Predicted Time Departure S1Home 11 444.0(±1.28) 9 446.25(±2.17) Departure S3Church 11 576.09(±3.34) 9 581.75(±3.7) Table A.32: Real and predicted times (in minutes) for Bart, Lisa, and Marge’s Sunday routine. Objects Object routines for driver Homer Name Event Type Stops Location NS Real Time NP Pred. Time H.B 1 Departure S1Home 11 444.0(±1.28) 9 446.25(±2.17) Departure S3Church 11 576.09(±3.34) 9 581.75(±3.7) H.B 2 Departure S1Home 11 444.0(±1.28) 9 446.25(±2.17) Departure S3Church 11 576.09(±3.34) 9 581.75(±3.7) Table A.33: Real and predicted times (in minutes) for object routines associated with the driver Homer on Sunday (H.B = Handbag). 71
A.5 REMAINING MACHINE LEARNING RESULTS A.5.1 Vehicle Identification Vehicle ID Number of users HMI_01 2 HMI_02 2 HMI_03 2 HMI_04 2 HMI_05 2 HMI_06 2 HMI_07 2 HMI_08 2 HMI_09 1 HMI_10 2 HMI_11 2 HMI_12 2 HMI_13 2 HMI_14 1 HMI_15 2 HMI_16 1 HMI_17 2 HMI_18 1 HMI_19 1 HMI_20 2 Table A.34: Number of users per vehicle. 72
A.5.2 Temperature Model Vehicle Linear Regression Ridge Regression Neural Networks Train Test Train Test Train Test ID MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE HMI_01 .051 .031 .047 .029 .050 .031 .046 .029 .043 .032 .039 .029 HMI_02 .036 .002 .087 .073 .032 .016 .085 .069 .024 .016 .075 .067 HMI_03 .107 .052 .102 .041 .137 .054 .131 .055 .065 .056 .049 .040 HMI_04 .089 .084 .004 .001 .115 .086 .032 .002 .102 .085 .019 .001 HMI_05 .097 .071 .028 .001 .097 .071 .028 .013 .101 .072 .031 .001 HMI_06 .125 .086 .043 .002 .121 .087 .038 .002 .098 .089 .009 .001 HMI_07 .082 .060 .073 .050 .082 .060 .073 .050 .068 .060 .053 .051 HMI_08 .052 .033 .125 .107 .060 .033 .131 .107 .047 .033 .118 .105 HMI_09 .001 .001 .001 .001 .001 .001 .001 .001 2.99 8.98 2.98 8.99 HMI_10 .112 .076 .038 .002 .112 .076 .039 .002 .089 .079 .011 .001 HMI_11 .076 .056 .020 .001 .074 .056 .019 .001 .065 .057 .009 .001 HMI_12 .081 .041 .083 .042 .079 .039 .079 .041 .048 .041 .046 .040 HMI_13 .078 .051 .116 .090 .078 .051 .012 .090 .069 .051 .109 .091 HMI_14 .001 .001 .001 .001 .016 .001 .016 .001 .001 .001 .001 .001 HMI_15 .230 .211 .043 .018 .237 .210 .050 .019 .217 .212 .027 .020 HMI_16 .001 .001 .001 .001 .016 .001 .015 .001 .001 .001 .001 .001 HMI_17 .025 .012 .012 .001 .045 .014 .034 .006 .017 .015 .002 .001 HMI_18 .001 .001 .001 .001 .016 .001 .016 .001 .008 .001 .008 .001 HMI_19 .001 .001 .001 .001 .016 .001 .017 .002 .016 .001 .016 .001 HMI_20 .001 .001 .001 .001 .013 .001 .014 .001 .023 .001 .024 .001 Table A.35: Temperature Prediction Results. N. Drivers Linear Regression Ridge Regression Neural Networks Train Test Train Test Train Test MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE 1 .001 .001 .001 .001 .001 .001 .001 .001 .251 .749 .251 .749 2 .103 .072 .069 .038 .111 .074 .068 .041 .090 .075 .052 .038 Table A.36: Average Temperature Prediction Results Per Number of Users. 73
A.5.3 Cockpit Mirror Pose Model Vehicle Feature Linear Regression Ridge Regression Neural Networks Train Test Train Test Train Test ID MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE HMI_01 Pan .350 .178 .456 .256 .349 .178 .453 .254 .376 .205 .506 .298 Tilt .368 .192 .351 .167 .371 .196 .354 .167 .470 .335 .440 .278 HMI_02 Pan .391 .201 .411 .231 .390 .201 .413 .235 .455 .328 .517 .399 Tilt .314 .146 .329 .164 .314 .146 .330 .166 .369 .198 .336 .169 HMI_03 Pan .299 .121 .286 .102 .295 .121 .279 .102 .291 .128 .264 .107 Tilt .381 .215 .415 .215 .381 .215 .415 .215 .358 .225 .367 .216 HMI_04 Pan .352 .166 .481 .282 .352 .166 .476 .278 .350 .170 .456 .261 Tilt .374 .191 .560 .349 .374 .190 .560 .346 .373 .197 .593 .387 HMI_05 Pan .426 .220 .229 .085 .424 .220 .232 .085 .421 .230 .180 .082 Tilt .360 .185 .524 .304 .360 .186 .524 .304 .357 .188 .518 .303 HMI_06 Pan .367 .184 .348 .170 .367 .184 .348 .170 .372 .195 .333 .176 Tilt .363 .184 .407 .243 .363 .183 .403 .233 .356 .192 .453 .285 HMI_07 Pan .360 .179 .387 .198 .361 .178 .377 .192 .363 .181 .386 .203 Tilt .371 .187 .306 .149 .372 .187 .317 .148 .371 .187 .306 .145 HMI_08 Pan .355 .173 .346 .175 .352 .173 .348 .177 .416 .310 .559 .396 Tilt .421 .238 .289 .120 .421 .238 .289 .122 .611 .538 .576 .507 HMI_09 Pan .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 HMI_10 Pan .391 .198 .350 .165 .392 .199 .348 .163 .392 .207 .349 .175 Tilt .362 .191 .456 .233 .366 .192 .436 .237 .362 .193 .445 .235 HMI_11 Pan .358 .167 .374 .192 .358 .167 .375 .192 .417 .238 .353 .187 Tilt .340 .165 .404 .201 .340 .165 .404 .201 .437 .295 .597 .471 HMI_12 Pan .352 .168 .392 .189 .352 .168 .391 .189 .353 .176 .448 .245 Tilt .360 .168 .334 .183 .361 .167 .342 .183 .355 .178 .317 .200 HMI_13 Pan .396 .207 .357 .166 .396 .207 .361 .171 .395 .233 .484 .284 Tilt .337 .161 .449 .270 .340 .160 .449 .272 .336 .165 .436 .256 HMI_14 Pan .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 HMI_15 Pan .297 .125 .404 .210 .297 .125 .402 .209 .298 .138 .474 .274 Tilt .264 .105 .326 .148 .266 .105 .319 .142 .250 .115 .397 .200 HMI_16 Pan .001 .001 .001 .001 .001 .001 .001 .001 .010 .001 .010 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .010 .001 .010 .001 HMI_17 Pan .316 .147 .527 .281 .318 .147 .526 .281 .302 .164 .632 .405 Tilt .336 .165 .482 .284 .338 .164 .474 .276 .322 .171 .548 .356 HMI_18 Pan .001 .001 .001 .001 .001 .001 .001 .001 .012 .001 .012 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 HMI_19 Pan .001 .001 .001 .001 .001 .001 .001 .001 .002 .001 .002 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .009 .001 .010 .001 HMI_20 Pan .340 .182 .643 .422 .401 .181 .644 .418 .352 .230 .626 .470 Tilt .113 .024 .751 .571 .113 .025 .751 .574 .134 .048 .702 .509 Table A.37: Cockpit Mirror Pose Prediction Results. 74
N. Drivers Feature Linear Regression Ridge Regression Neural Networks Train Test Train Test Train Test ID MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE MAE MSE 1 Pan .001 .001 .001 .001 .001 .001 .001 .001 .002 .001 .002 .001 Tilt .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 .001 2 Pan .446 .218 .499 .260 .450 .218 .498 .260 .462 .261 .547 .330 Tilt .422 .210 .532 .300 .423 .210 .531 .299 .455 .269 .586 .376 Table A.38: Average Cockpit Mirror Pose Prediction Results Per Number of Users. 75