1 Introduction

Complex cognitive processes often make use of internal mental models for the processes addressed; e.g., [9, 10, 12, 15]. In the current paper, the focus is on cognitive processes involved in monitoring and assessing the situation of a human (in the addressed case study, a car driver), and generating support actions in order to keep the situation (the driving) safe. For example, when we observed that the driver took alcohol, we will assess that it will not be safe to start driving and therefore as a support action we will (try to) block starting the car. As another example, if while driving we observe that the driver’s steering is unstable, we will assess this as unsafe driving and therefore as a support action we will propose to slow down the car (and perhaps completely stop the driving). Internal mental models involved in such processes are an analysis model to determine assessments based on the monitoring information and a support model to determine the proper support action based on the generated assessment. In principle, such internal mental models are adaptive so that they can improve over time.

Artificial variants of such cognitive processes implemented as AI, are more and more built in as automatic safety systems in new generations of cars. The advantage of this is that no passenger is needed to monitor the driver and, moreover, without further ado the car can more adequately execute support actions, for example, by refusing to start or refusing to drive fast if the driver condition is assessed as not safe.

In this paper, it is shown how the complex cognitive processes described above can be modeled using a network-oriented modeling approach. There are three crucial elements that play a role here. The first is that within the overall network model, internal mental models need to be modeled and executed, the second is that these mental models are adaptive so that they can improve over time, and the third is that control over these processes is useful. All three elements can be addressed well by the approach based on self-modeling networks described in [20]. According to this approach through what is called network reification or self-modeling, any network can be extended to a self-modeling network by adding a self-model of part of its own network structure characteristics. Moreover, this can be done iteratively, so that multi-order self-models can be included in a self-modeling network, where any included self-model (of some order) can have its own (next-order) self-model.

In the paper, in Sect. 2 the modeling approach based on self-modeling networks is briefly described. In Sect. 3 the application domain is described in some detail. Section 4 presents the design of the introduced self-modeling network model and Sect. 5 presents outcomes of example simulations of it. Finally, Sect. 6 is a discussion.

2 Network Models Using Self-models

In this section, the network-oriented modeling approach used from [19, 20] is briefly introduced.

Distinction Between Network Characteristics and Network States

The following is a crucial distinction for network models:

  • Network characteristics (such as connection weights and excitability thresholds) have values (their strengths) and determine (e.g., cognitive) processes and behaviour in an implicit, automatic manner. They can be considered to provide an embodiment view on the network. In principle, these characteristics by themselves may not be directly accessible nor observable for network states (or a person: usually you don’t see or feel a specific connection in your brain).

  • Network states (such as sensor states, sensory representation states, preparation states, emotion states) have values (their activation levels) and are explicit representations that may be accesible for network states or a person and can be handled or manipulated explicitly. They can be considered to provide an informational view on the network; usually the states are assumed to have a certain informational content. In principle, for the case of a mental network, states may be accessible or observable for a person: you may see (mental image), feel (emotion) or note in some other way a specific state in your brain.

Following [18, 20], a temporal-causal network model is characterised by (here X and Y denote nodes of the network, also called states):

  • Connectivity characteristics

  • Connections from a state X to a state Y and their weights ωX,Y

  • Aggregation characteristics

  • For any state Y, some combination function cY(..) defines the aggregation that is applied to the impacts ωX,YX(t) on Y from its incoming connections from states X.

  • Timing characteristics

Each state Y has a speed factor ηY defining how fast it changes for given impact. The following difference (or differential) equations that are used for simulation purposes and also for analysis of temporal-causal networks incorporate these network characteristics ωX,Y, cY(..), ηY in a standard numerical format:

$$ Y\left( {t + \Delta t} \right) = Y(t) + {{\varvec{\upeta}}}_{Y} [{\mathbf{c}}_{Y} ({{\varvec{\upomega}}}_{{X_{1} ,Y}} X_{1} (t), \ldots {{\varvec{\upomega}}}_{\begin{subarray}{l} X_{k} ,Y \\ \end{subarray} } X_{k} (t)) - Y(t)]\Delta t $$
(1)

for any state Y and where \({X}_{1}\) to \({X}_{k}\) are the states from which Y gets its incoming connections. Here the overall combination function cY(..) for state Y is the weighted average of available basic combination functions cj(..) by specified weights γj,Y (and parameters π1,j,Y, π2,j,Y of cj(..)) for Y:

$$ {\mathbf{c}}_{Y} \left( {V_{1} , \ldots , V_{k} } \right) = \frac{{\varvec{\upgamma}_{1,Y} {\mathbf{ c}}_{1} \left( {V_{1} , \ldots , V_{k} } \right){ } + { } \ldots { } + {{\varvec{\upgamma}}}{ }_{m,Y} {\mathbf{ c}}_{m} \left( {V_{1} , \ldots , V_{k} } \right){ }}}{{{{\varvec{\upgamma}}}_{1,Y} { } + { } \ldots { } + {{\varvec{\upgamma}}}{ }_{m,Y} { }}} $$
(2)

Such Eqs. (1), (2) and the ones in Table 1 are hidden in the dedicated software environment; see [20], Ch 9. Within the software environment described there, a large number of around 40 useful basic combination functions are included in a combination function library; see Table 1 for the first two of them: these are the ones used in this paper. The above concepts enable to design network models and their dynamics in a declarative manner, based on mathematically defined functions and relations. How it works is that the network characteristics ωX,Y, γj,Y, π1,j,Y, π2,j,Y, ηY that define the design of the network model, are given as input to the dedicated software environment, and hidden within this environment the difference Eqs. (1) are executed for all states, thus generating simulation graphs as output.

Table 1. Basic combination functions from the library used in the model presented here

Self-models Representing Network Characteristics by Network States

As indicated above, ‘network characteristics’ and ‘network states’ are two distinct concepts for a network. Self-modeling is a way to relate these distinct concepts to each other in an interesting and useful way:

  • A self-model is making the implicit network characteristics (such as connection weights and excitability thresholds) explicit by adding states for these characteristics; thus the network gets an internal self-model of part of the network structure itself.

  • In this way, different self-modeling levels can be created where network characteristics from one level relate to explicit states at a next level. By iteration, an arbitrary number of self-modeling levels can be modeled, covering second-order or higher-order effects.

Self-modeling causal networks can be recognized both in physical and mental domains. For example:

  • In the physical domain, in the brain, information about the characteristics of the network of causal relations between activation states of neurons is, for example, represented in physical configurations for synapses (e.g., connection weights), neurons (e.g., excitability thresholds) and/or chemical substances (e.g., neurotransmitters).

  • In the mental domain, a person can create mental states in the form of representations of his or her own (personal) characteristics, thus forming a subjective self-model (acquired by experiences); e.g., of being very sensitive for pain or for critical feedback or of having an anger issue.

Adding a self-model for a temporal-causal network is done in the way that for some of the states Y of the base network and some of the network structure characteristics for connectivity, aggregation and timing (in particular, some from ωX,Y, γi,Y, πi,j,Y, ηY), additional network states WX,Y, Ci,Y, Pi,j,Y, HY (self-model states) are introduced (see the blue upper plane in Fig. 2):

  1. (a)

    Connectivity self-model

    • Self-model states \({\bf W}_{X_{i}, Y} \) are added representing connectivity characteristics, in particular connection weights \(\varvec{\upomega}_{X_{i}, Y} \)

  2. (b)

    Aggregation self-model

    • Self-model states Cj,Y are added representing aggregation characteristics, in particular combination function weights γi,Y

    • Self-model states Pi,j,Yare added representing aggregation characteristics, in particular combination function parameters πi,j,Y

  3. (c)

    Timing self-model

    • Self-model states HY are added representing timing characteristics, in particular speed factors ηY

The notations WX,Y, Ci,Y, Pi,j,Y, HY for the self-model states indicate the referencing relation with respect to the characteristics ωX,Y, γi,Y, πi,j,Y, ηY: here W refers to ω, C refers to γ, P refers to π, and H refers to η, respectively. For the processing, these self-model states define the dynamics of state Y in a canonical manner according to Eqs. (1) whereby ωX,Y, γi,Y, πi,j,Y, ηY are replaced by the state values of WX,Y, Ci,Y, Pi,j,Y, HY at time t, respectively.

An example of an aggregation self-model state Pi,j,Y for a combination function parameter πi,j,Y is for the excitability threshold τY of state Y, which is the second parameter of the logistic sum combination function; then Pi,j,Y is usually indicated by TY, where T refers to τ. Such aggregation self-model states TY will play an important role in the network model addressed below, as will connectivity self-model states WX,Y, referring to connection weights ωX,Y. As the outcome of the addition of a self-model is also a temporal-causal network model itself, as has been proven in [21], Ch 10, this construction can easily be applied iteratively to obtain multiple levels of self-models.

3 Domain Description: Cognitive Analysis and Support Processes

In many cases, when humans perform complex or demanding tasks, it makes sense to keep an eye on them, to see how they are doing and to assess in how far their functioning is getting poor. If so, then some support actions may be needed or desirable. To determine such assessments and support actions requires complex and adaptive cognitive processes. For example, for a car driver, based on sensoring or observation data, it may involve judgements about the driver’s alcohol usage, gaze and steering behaviour and whether for long trips (s)he takes enough rest. If the gaze is unfocused or the steering behaviour unstable, this may be assessed as a driving risk and if that occurs, a support action like slowing down the car may be adequate. The knowledge behind such assessments may be adaptive, so that the underlying cognitive processes can improve over time.

Within such complex and adaptive cognitive processes usually internal mental models are used. For example, in [3,4,5,6] internal mental models were used for the analysis process and for the support process (see also Fig. 1):

  • analysis model

    This is used to assess the human’s states and processes using observations (possibly using specific sensors) and domain knowledge. Examples of observations that are used in the car driver example are a long period of driving, a gaze that is not well-focused, unstable steering, and alcohol usage. Examples of assessments that come out of this process are that there is a risk for getting exhausted or there are other risks for driving.

  • support model

    This is used to generate support for the human based on domain knowledge. This uses as input the assessments made by the analysis model. Examples of actions that come out of this process are advice to take some rest period, blocking the starting of the car (when it is not driving), and slowing down the car (when it is driving).

As such processes are in principle adaptive, a third internal mental model is needed [18], Ch. 16:

  • adaptation model

    To make the analysis and support model better fit the specific characteristics of the driver, car and the further situation. This can be done by adapting certain characteristics of the internal mental models for analysis and support.

Fig. 1.
figure 1

Adaptive model-based architecture to analyse and support humans; adapted from [18], Ch 16, p. 469

Section 4 addresses the question how these internal mental models can be modeled by a self-modeling network, with as outcome a second-order self-modeling network model.

4 The Second-Order Adaptive Self-modeling Network Model

In this section it will be shown how the modeling approach briefly described in Sect. 2 can be and actually has been used to model within one self-modeling network the adaptive mental models for analysis and support sketched in Sect. 3.

A useful network architecture to handle internal mental models in general is a self-modeling network that covers at least two levels (see also [2]): a base level representing the mental model as a network so that it can be used to process it (based on within-network dynamics), and a first-order self-model explicitly representing the (network) characteristics of the mental model which can be used for formation and adaptation of the mental model. In addition, a third level with a second-order self-model can be used to control these processes. This general setup has been applied here.

First two useful adaptation principles for plasticity and metaplasticity from the Cognitive Neuroscience literature are discussed. When self-models are changing over time, this offers a useful method to model adaptive networks. This does not only apply to first-order adaptive networks, but also to higher-order adaptive networks, using higher-order self-models. For example, two types of (connectivity and aggregation) self-model states can be used to model adaptive connection weights and intrinsic neuronal excitability as described in [7]:

‘Learning-related cellular changes can be divided into two general groups: modifications that occur at synapses and modifications in the intrinsic properties of the neurons. While it is commonly agreed that changes in strength of connections between neurons in the relevant networks underlie memory storage, ample evidence suggests that modifications in intrinsic neuronal properties may also account for learning related behavioral changes’. [7], p. 30.

More in particular, the following quote indicates that synaptic activity relates to long-lasting modifications in excitability of neurons:

$$ \begin{aligned} & {\text{`Long}} - {\text{lasting modifications in intrinsic excitability are manifested in changes}} \\ & {\text{in the neuron's response to a given extrinsic current }}({\text{generated by synaptic}} \\ & {\text{activity or applied via the recording electrode'}}. \left[ {7} \right],{\text{ p}}.{ 3}0 \\ \end{aligned} $$
(3)

The above refers to a form of plasticity, which can be described by a first-order adaptive network that is modelled using a dynamic first-order self-model for aggregation characteristics of the base network, in particular for the excitability threshold used in aggregation. Whether or not and to which extent such plasticity actually takes place is controlled by a form of metaplasticity; e.g., [1, 8, 13, 14, 16, 17]. For example, in [14] the following compact quote is found, summarizing that due to stimulus exposure, adaptation speed will increase:

$$ {\text{`Adaptation accelerates with increasing stimulus exposure'}} \, \left[ {{14}} \right],{\text{ p}}.{ 2} $$
(4)

This indeed refers to a form of metaplasticity, which can be described by a second-order adaptive network that is modeled using a dynamic second-order self-model for timing characteristics of the first-order self-model for the first-order adaptation. In this way, both (first- and second-order) adaptation principles for plasticity and metaplasticity summarized in (3) and (4) will be applied in the network model presented below.

Because of its complexity, the model will be presented in two steps as depicted in Fig. 2 and Fig. 3. In Fig. 2 the connectivity of the first two levels of the proposed network model is depicted. This covers the base network within the base (pink) plane, and the first-order self-model in the upper (blue) plane. For an overview of all states of the network model, see Table 2; here the first 10 states describe the base level and the next 15 states (up to state 25) the network’s first-order self-model.

The base network consists of two subnetworks, one that describes a mental model for the analysis to determine (by within-network dynamics) out of monitored information about the driver’s situation (long drive, alcohol, unstable steering, unfocused gaze), an assessment of the situation of the driver (within the considered scenarios the two options are exhaustiveness risk and driving risk). The second one describes a mental model for the support process to determine (by within-network dynamics) out of the assessment a suitable support action for the driver (in the considered scenarios three options: rest advice, slow down, and block start).

For these mental models described at the base level, corresponding self-models have been added to be able to change them, for example by learning. The first-order self-model in the upper plane in Fig. 2 models some of the network characteristics of the two (sub)networks at the base level:

Analysis Self-Model: First-order self-model W-states and T-states X11 to X16.

Support Self-Model: First-order self-model W-states and T-states X17 to X25.

Fig. 2.
figure 2

Connectivity of the first-order self-modeling network model

For each of the subnetworks for mental models at the base level, the first-order self-model has two submodels: a first-order connectivity self-model (based on W-states) and a first-order aggregation self-model (based on T-states). The connectivity self-model represents the connectivity characteristics of the particular mental model by self-model states WX,Y and the aggregation self-model represents the excitability thresholds of the assessment options (for the analysis model) and the support action options (for the support model) by self-model states TY. Each of these first-order self-model states WX,Y and TY has a downward connection (in pink) to indicate the state Y of the mental model at the base level for which they have their special effect; so, based on these downward links, the value of WX,Y plays the role of the indicated connection weight and the value of TY the role of excitability threshold for the state Y pointed at. For the sake of simplicity, the connectivity self-model states WX,Y have no incoming connections from other states; for the scenarios considered here they are kept constant, in further extensions of the model they easily may made dynamic as well, for example, based on hebbian learning as modeled in [21], Ch. 3.

The aggregation self-model states for excitability thresholds do have incoming connections which make them dynamic, to model the abovementioned adaptation principle (3) for plasticity from [7]. This is modeled by specifying a negative weight of the connections from the states that causally preceed the indicated state Y.

Table 2. Explanation of the states of the second-order self-modeling network model

In addition, to counterbalance an excess of this negative effect, a positive weight 1 is used for all upward connections from Y itself to TY. For the simulation outcomes discussed in next section it is shown how these two opposite effects create some equilibrium value for each aggregation self-model state TY, which illustrates one form of adaptivity in the model: in this way the aggregation self-model learns. However, by including a second-order self-model as shown (in the purple plane) in Fig. 3, this learning has been made adaptive itself (in particular the learning speed), which creates second-order adaptation used as a form of control over the first-order adaptation.

In Fig. 3, the connectivity of the entire second-order adaptive network model is depicted. Compared to Fig. 2 a third (upper, purple) plane was added consisting of a second-order self-model for the network. The second-order self-model states in this upper (purple) plane are explained in Table 2: the last 19 states from state 26 on:

Adaptation Self-Model: Second-order self-model W-states and HT-states X26 to X44.

As in the first-order self-model, the second-order self-model includes a second-order connectivity self-model using states \({\bf W}_{X,{\textbf{T}_{Y}}} \) for all incoming connections of the T-states of the first-order self-model. Again, like in the first-order self-model case, these states \({\bf W}_{X,{\textbf{T}_{Y}}} \) are kept constant for now. In addition, the second-order self-model includes a second-order timing self-model for the first-order T-states based on states \({\bf H}_{{\bf T}_{Y}} \). This second-order self-model is dynamic, which makes the whole network second-order adaptive. The special effect of each state \({\bf H}_{{\bf T}_{Y}} \) as speed factor for state TY is effectuated by the downward (pink) connection to the related state TY.

Fig. 3.
figure 3

Connectivity of the entire second-order self-modeling network model

To make them dynamic, the states \({\bf H}_{{\bf T}_{Y}} \) themselves are affected by upward connections from the base level network, in this case following the abovementioned adaptation principle (4) for metaplasticity ‘Adaptation accelerates with increasing stimulus exposure’ [14]. Therefore, there are (blue) upward links with positive weights to each state \({\bf H}_{{\bf T}_{Y}} \) from the base states causally preceeding base state Y. This makes that, as soon as these causal ‘antecedents’ of Y get higher activation levels, the adaptation speed (starting from 0: no adaptation initially) will increase, as will be shown in the example scenarios.

For full specifications of the adaptive network model, see the Appendix at URL https://www.researchgate.net/publication/344165044. For example, for connectivity characteristics all connection weights not determined bij W-states are 1, except for the connection from driving to \({\bf H}_{{\bf T}_{\rm blockstart}} \), which is −1. For aggregation characteristics, the logistic sum combination function is used for the base states for assessment and support options (with steepness σ = 8 and adaptive excitability threshold) and the second-order HT-states (with steepness σ = 4 and excitability threshold τ = 0.7 or 1.4 depending on the number of incoming connections). All other states use the Euclidean combination function with n = 1 and λ = 1 (see Table 1), which actually is just a sum function. For timing characteristics, the speed factors of the base states for assessment and support options are 0.5 and for the second-order HT-states 0.05. All other speed factors are adaptive (the base states for assessment and support options) or 0 (for the other base states and for all W-states). The initial values for all W-states (which are constant due to speed factor 0) are 1 when they represent a positive connection; negative ones are Wdriving, blockstart, Wlongdrive, \({{\bf T}_{\rm exhrisk}} \), Walcohol, \({{\bf T}_{\rm drivingrisk}} \), Wunstabsteer, \({{\bf T}_{\rm drivingrisk}} \), Wunfocgaze, \({{\bf T}_{\rm drivingrisk}} \), Wexhrisk, \({{\bf T}_{\rm restadvice}} \) which have initial value −1, and Wdrivingrisk, \({{\bf T}_{\rm slowdown}} \), Wdriving, \({{\bf T}_{\rm slowdown}} \), Wdrivingrisk, \({{\bf T}_{\rm blockstart}} \), Wdriving, \({{\bf T}_{\rm blockstart}} \) with initial value −0.5. The initial values of all HT-states are 0 as are they for all base states except the observables shown in Table 3, which depend on the chosen scenario. Finally, the initial values for the five T-states were on purpose set on too high values 2, 1.4, 2.4, 2.8, 2.4, respectively (in relation to the number of their incoming connections), in order to let adaptation happen.

5 Outcomes of Example Simulation Scenarios

In Figs. 4, 5 and 6 simulation results are shown for three realistic scenarios, defined by the common settings as shown in the role matrices in the Appendix discussed in the last paragraph of Sect. 4 and specific constant values 0 or 1 for the states X1 to X4 and X7 as shown in Table 3. In these graphs the following are shown:

  • the relevant assessment (resulting from the analysis model) and support action (resulting from the support model)

  • how the excitability thresholds used within the analysis model and the support model adapt over time and how the adaptation speed for them changes over time (resulting from the adaptation model)

The initial values for the excitabilty thresholds for the analysis model and support model were deliberately set too high, so that the adaptation process that was needed to get results is illustrated. Note that the adaptation speeds have initial values 0 so that in the first phase nothing happens in the analysis model and support model until indeed a suitable adaptation process has started and in a next phase has resulted in successful adaptation of the analysis and support models.

Table 3. The three displayed scenarios
Fig. 4.
figure 4

Long drive leads to an exhaustion risk assessment and to the support action rest advice

For Scenario 1, it can be seen in Fig. 4 that by the second-order self-model the adaptation speed for the exhaustion risk excitability threshold (within the analysis model) increases from time 0 on (the purple line); this is conform to the ‘Plasticity Versus Stability Conundrum’ discussed in [17], p. 773: only adapt when relevant (adaptation speed > 0), otherwise keep stable (adaptation speed 0). This increase in adaptation speed (due to stimulus exposure) results in adaptation of this excitability threshold (conform to (3) from [7]): starting at value 2, it goes down to finally (after time 13) reach values between 0.2 and 0.4 (the brown line). Apparently this is low enough, as after time 10 the exhaustion risk assessment is generated and reaches value 1 after time 15 (the red line), which makes a successful analysis model outcome for this scenario.

This in turn makes that by the adaptation model after time 10 the adaptation speed for the excitability threshold of the support action rest advice (in the support model) gets higher (the orange line). This results in adaptation of that threshold: the value which initially was 2.4 starts to decrease after time 10 and reaches values between 1.4 and 1.6 after time 18 (the dark purple line). Again, apparently this is low enough as the support action rest advice comes up after time 18 and reaches 1 after time 25 (the dark green line). This makes a successful support outcome.

For Scenario 2, it can be seen in Fig. 5 that by the adaptation model the adaptation speed for the driving risk excitability threshold (within the analysis model) increases from time 0 on (the light blue line), which results in adaptation of this threshold: starting at value 1.4, it goes down to (after time 7) reach values below 0.7 (the light green line).

Fig. 5.
figure 5

Driving with an unfocused gaze leads to a driving risk assessment and to the support action slow down

Apparently this is low enough, as from time 5–10 the driving risk assessment is generated and reaches value 1 after time 15 (the pink line), which makes a successful analysis model outcome for this case. This in turn makes that by the adaptation model after time 5 the adaptation speed for the excitability threshold of the support action slow down (in the support model) gets higher (the dark green line). This results in adaptation of that threshold: the value which initially was 2.8 starts to decrease after time 10 and reaches values between 1.4 and 1.6 after time 18 (middle green line). Again, apparently this is low enough as the support action slow down comes up after time 18 and reaches 1 after time 20 (the brown line). This makes a successful support model outcome for this case.

Fig. 6.
figure 6

Alcohol usage leads to a driving risk assessment and to the support action block start

For Scenario 3, Fig. 6 shows initially (for the analysis model) a similar pattern as in Scenario 2. However, for the second part of the process (for the support model), this scenario shows how also fluctuating patterns can occur. More specifically, this illustrates how the adaptation of the excitability threshold threshold gets reinforcement from the outcome of the support model, so that in the end they reach an equilibrium according to a fluctuating pattern.

6 Discussion

In complex cognitive processes, often internal mental models are used; e.g., [9, 10, 12, 15]. Such models can just be applied, but they are also often adaptive, in order to form and improve them. The focus in this paper was on adaptive cognitive analysis and support processes for the situation and states of a human in a demanding task; the adaptive network model was illustrated for a car driver. Within these processes internal mental models are used for the analysis and support processes.

An adaptive network model was presented that models such adaptive cognitive analysis and support processes. The network model makes use of adaptive first-order self-models for the internal mental models used for the cognitive analysis and support processes. To control the adaptation of these first-order self-models, second-order self-models are included. The adaptive network model was illustrated for realistic scenarios for a car driver who gets exhausted, shows unstable steering or shows an unfocused gaze and/or used alcohol.

For the adaptativity and its control, the network model makes use of two biologically plausible adaptation principles informed by the Cognitive Neuroscience literature, one within the first-order self-model for adaptation of aggregation characteristics of the base network, in particular the excitability threshold [7], and the other one [14] within the second-order self-model for adaptation of timing characteristics for the first-order self-model by metaplasticity [1, 8, 13, 14, 16, 17]. This study shows how complex adaptive cognitive processes based on internal mental models can be modeled in an adequate manner by multi-order self-modeling networks.