Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Type 2: the metacognitive stage

The main goal of ReMeta is making inferences about metacognitive noise and biases. Metacognitive noise is any noise that occurs after the computation of the type 1 decision variable (yy). Metacognitive biases describe under- and overconfidence.

As shown in the below diagram, this fundamentally requires a decision by the modeler at which point in the hierarchy such sources of noise and bias may occur.

ReMeta considers three sources of metacognitive noise:

How to enableWhat it isReference
Noisy report (default)cfg.type2_noise_type = 'report'Noisy confidence reportShekhar & Rahnev (2021)
Noisy readoutcfg.type2_noise_type = 'readout'Noisy readout of type 1 evidenceGuggenmos (2022)
Noisy temperaturecfg.type2_noise_type = 'temperature'Noisy estimate of one’s own type 1 noiseBoundy-Singer et al. (2022)

At this point, these noise sources are mutually excluside, i.e. the modeler has to make an assumption about the dominant source of metacognitive noise (or do systematic testing).

ReMeta is fundamentally built on the assumption that observers computed as the probability p(correct)p(\text{correct}) that the type 1 decision was correct, i.e.

p(correct)=Φ(z2σ1)p(\text{correct}) = \Phi\left(\frac{z_2}{\sigma_1}\right)

in case of normal type 1 noise and

p(correct)=12tanh(π23σ1z2)p(\text{correct}) = \frac{1}{2}\tanh\left(\frac{\pi}{2\sqrt{3}\sigma_1}z_2\right)

in case of logistic type 1 noise.

Note that this assumption is required to compute metacognitive biases, as otherwise one would have to ask: under/overconfident relative to what?

In ReMeta, confidence cc is represented on a scale from 0, corresponding to p(correct)=0.5p(\text{correct})=0.5 (i.e. guessing), to 1, corresponding to p(correct)=1p(\text{correct})=1. Mathematically this is a simple transformation:

c=2p(correct)1c = 2\,p(\text{correct}) - 1

For this reason, confidence ratings should be passed as normalized values between 0 and 1 to ReMeta.

Default parameters

Type 2 noise

ParameterSymbolHow to enableDefaultPossible values
type2_noiseσ2\sigma_2cfg.param_type2_noise.enable = 111

While the the nature of type 2 metacognitive noise is up to the researcher ('report', 'readout' or 'temperature'), the type2 noise parameter cannot be disabled, as a probabilistic aspect is required for maximum likelihood estimation.

The difference between the three sources of metacognitive noise is not just conceptual. Each noise source has a clear computational signature, as seen below:

<IPython.core.display.Image object>

In all three cases, higher metacognitive noise (σ2\sigma_2) leads to a shallower relationship between type 1 evidence z1z_1 and confidence cc, i.e. to reduced metacognitive sensitivity. Howvever, for very high metacognitive noise, the noisy-report model predicts average confidence for all type 1 evidence, the noise-readout model maximum confidence, and the noisy-temperature model minimal confidence.

Which noise type is dominant for human observers is currently unknown. For an individual study, we recommend checking out the type 2 likelihod for each of the architectures to make an informed decision.

Type 2 noise distribution

Likewise unknown is the precise distributional nature of metacognitive noise. In ReMeta, the distribution can be set via

cfg.param_type2_noise.distribution = '...'

Available options:

cfg.type2_noise_typeDefaultAvailable choices for cfg.type2_noise_dist
'report''beta_mode''beta_mean_std', 'beta_mode_std', 'beta_mode', 'truncated_normal_mode_std', 'truncated_normal_mode', 'truncated_gumbel_mode_std', 'truncated_gumbel_mode', 'truncated_lognormal_mode_std', 'truncated_lognorm', 'truncated_lognormal_mode', 'truncated_lognormal_mean'
'readout' / 'temperature''lognormal_mode_std''lognormal_median_std', 'lognormal_mean', 'lognormal_mode', 'lognormal_mode_std', 'lognormal_mean_std','gamma_mode_std', 'gamma_mean_std', 'gamma_mean', 'gamma_mode', 'gamma_mean_cv','betaprime_mean_std','truncated_normal_mode_std', 'truncated_normal_mode','truncated_gumbel_mode_std', 'truncated_gumbel_mode'

The suffices _mode and _mean indicate a parameterization of the distribution which preserves the mode and mean, respectively. The suffices _std and _cv indicate a parameterization such that type2_noise (i.e. σ2\sigma_2) corresponds to the standard deviation and the coefficient of variation, respectively.

A paper is still to be written about the evidence and validity of different metacognitive noise distributions. For now, the default choices (beta_mode / lognormal_mode_std) in ReMeta are motivated by the following criteria:

  • Good performance on test datasets (not yet published)

  • External validity: type 2 noise parameter correlates well with IQ (not yet published)

  • Analytical parameterization possible (=computationally efficient)

  • Parameter type2_noise corresponds roughly to the standard deviation of the noise distribution, for ease of interpretability across models.

  • Previous evidence in favor of the lognormal distribution as opposed to e.g. a Gamma distribution 13.

import remeta
import numpy as np
%load_ext autoreload
%autoreload 2
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

The default distribution for noisy-report models 'beta_mode' follows the standard mode-concentration parameterization of the Beta distribution:

x=confidence c;σ2=metacognitive noisex=\text{confidence }c;\quad\sigma_2=\text{metacognitive noise}
Concentration:κ=2+x(1x)σ22\text{Concentration:}\quad\kappa = 2 + \frac{x(1-x)}{\sigma_2^2}
XBeta(1+x(κ2),1+(1x)(κ2))X \sim \mathrm{Beta}(1 + x(\kappa - 2),1 + (1-x)(\kappa - 2))

In this parameterization, σ2\sigma_2 is not exactly the standard deviation of the Beta distribution, but a reasonable approximation.

The default distribution for noise-readout/temperature models 'lognormal_mode_std' is an exact parameterization in terms of standard deviation and mode:

Noisy-readout:    x=type 1 evidence z1\text{Noisy-readout:}\;\; x=\text{type 1 evidence }z_1
Noisy-temperature:    x=type 1 noise σ1\text{Noisy-temperature:}\;\; x=\text{type 1 noise }\sigma_1
σ2=metacognitive noise\sigma_2=\text{metacognitive noise}
a  =  σ22x2a \;=\; \frac{\sigma_2^{2}}{x^{2}}
Δ  =  3256a3+27a2    9a\Delta \;=\; \sqrt{3}\,\sqrt{256a^{3}+27a^{2}} \;-\; 9a
R  =  16(23)1/3aΔ1/3+2(23)2/3Δ1/3+1R \;=\; -\frac{16\left(\frac{2}{3}\right)^{1/3}a}{\Delta^{1/3}} + 2\left(\frac{2}{3}\right)^{2/3}\Delta^{1/3} + 1
S  =  4(23)1/3aΔ1/3Δ1/321/332/3+12R+12S \;=\; \frac{4\left(\frac{2}{3}\right)^{1/3}a}{\Delta^{1/3}} - \frac{\Delta^{1/3}}{2^{1/3}3^{2/3}} + \frac{1}{2\sqrt{R}} + \frac{1}{2}
T  =  14R  +  12S  +  14T \;=\; \frac{1}{4}\sqrt{R} \;+\; \frac{1}{2}\sqrt{S} \;+\; \frac{1}{4}
XLogNormal(ln(xT),lnT)X \sim \mathrm{LogNormal}\big(\ln(x\,T),\,\ln T\big)
(i.e. ln(xT) and lnT are the mean and varianceof the underlying normal distribution)\text{(i.e. }\ln(x\,T)\text{ and }\ln T\text{ are the mean and variance}\\\text{of the underlying normal distribution)}
Type 2 noise distributions with \sigma_2=0.1.

Type 2 noise distributions with σ2=0.1.\sigma_2=0.1.

Type 2 criteria

ParameterSymbolHow to enableDefaultPossible values
type2_criteriaγi\gamma^icfg.param_type2_criteria.enable = <ncriteria>30, <ncriteria>

The majority of confidence scales used in the field are based on a discrete scales, e.g. 1=very unsure, 2=unsure, 3=sure, 4=very sure. Thus, participants in such studies need to apply criteria to map a (possibly) continuous internal estimate to a finite number of response options.

In ReMeta, such criteria are fitted at the last stage of the process. Specifically, it is assumed that observers have a continuous internal estimate of confidence (range 0-1) and apply a set of criteria γ1,,γn\gamma^1, \dots, \gamma^n to this internal estimate.

<IPython.core.display.Image object>

The number of fitted confidence criteria is set via cfg.param_type2_criteria.enable = <ncriteria>, where <ncriteria> should be the number of available confidence ratings minus 1. The default is 3, i.e. corresponding to a 4-point confidence scale.

By default, it is recommended to fit confidence criteria even for continuous confidence scales. Even for continuous scales, observers tend to have idiosyncratic ways of using different sections of the scale and this is often best accounted for through confidence criteria. For continuous scales, we recommend setting cfg.param_type2_criteria.enable to 3 or 4.

Criterion and confidence bias

If confidence data are fitted with type2_criteria enabled, ReMeta will compute an average criterion bias which could be considered an estimate of the overall metacognitive bias.

As an example, let’s generate data in which each of the observers three confidence criteria [0.35, 0.5, 0.85] is shifted by 0.1 from Bayes-optimal confidence criteria [0.25, 0.5, 0.75].

params = dict(type1_noise=0.5, type1_bias=0, type2_noise=0.25, type2_criteria=[0.35, 0.6, 0.85])
np.random.seed(0)
sim = remeta.simulate(params=params)

The red line below indicates the new mapping from internal (continuous) confidence to reported (discrete) confidence, relative to the Bayes-optimal mapping (blue line):

<IPython.core.display.Image object>

Positive criterion shifts are reflected in underconfident confidence reports, since higher internal confidence is required for each discrete confidence rating.

We now fit ReMeta to this dataset (using default settings, i.e. no remeta.Configuration is required, though we pass the true parameters for reference).

rem = remeta.ReMeta(true_params=params)
rem.fit(sim.stimuli, sim.choices, sim.confidence)
result = rem.summary()

If type 2 criteria are fitted, the ReMeta summary contains a key 'type2_criteria_bias' in result.params_extra which reflects just that:

print(f"Criterion bias: {result.params_extra['type2_criteria_bias']:.3f}")
Criterion bias: 0.099

Thus the criterion bias was estimated to be +0.089 (ground truth was +0.1). The confidence bias is just the negative of the criterion bias and is also part of params_extra:

print(f"Confidence bias: {result.params_extra['type2_criteria_confidence_bias']:.3f}")
Confidence bias: -0.099

Negative and positive confidence biases correspond to under- and overconfident observers, respectively.

In ReMeta, the type 2 criterion bias is computed as a weighted average deviation of estimated criteria γ^\hat{\boldsymbol{\gamma}} from Bayes-optimal criteria γbayes\boldsymbol{\gamma}^\text{bayes}. The weights are the uncertainty estimates of each criterion, such that more reliabily estimated criteria contribute stronger to the bias computation. In practise, we use the full covariance matrix for this weighted bias to also consider the correlation between criterion uncertainties:

criterion bias=1Σγ1(γ^γbayes)1Σγ11\text{criterion bias} = \frac{ \mathbf{1}^\top \Sigma_{\gamma}^{-1} \left( \hat{\boldsymbol{\gamma}} - \boldsymbol{\gamma}^\text{bayes} \right)}{\mathbf{1}^\top \Sigma_{\gamma}^{-1} \mathbf{1}}

where Σγ1\Sigma_{\gamma}^{-1} is the inverse sampling covariance matrix of the criteria.

However, there’s a catch...

While computing a confidence bias in this way serves for a first approximation, these bias estimates are post-hoc, i.e. they are not part of the process model and thus are likely (sic) biased.

This is a real dilemma in confidence modeling: human participants clearly apply idiosyncratic confidence criteria in their responses and those should be modeled; on the other hand, modeling those criteria makes an estimation of metacognitive biases very challenging.

The two parameters described below (type2_evidence_bias and type2_confidence_bias) make an attempt at incorporating bias parameters within the process model.

Additional parameters

Metacognitive evidence bias

ParameterSymbolHow to enableDefaultPossible values
type2_evidence_biasφ2\varphi_2cfg.type2_evidence_bias.enable = 100, 1

Type 2 criteria account for metacognitive biases that occur at the level of the confidence report, i.e. when observers map an internal sense of confidence to an external confidence scale. The idea of a metacognitive evidene bias φ2\varphi_2 is that biases may also occur at an earlier stage - specifically for the internal representation of metacognitive evidence z2z_2, which is algorithmically reflected as follows (assuming normal type 1 noise):

p(correct)=Φ(φ2z2σ1)p(\text{correct}) = \Phi\left(\frac{\varphi_2 z_2}{\sigma_1}\right)

The effect of ϕ2\phi_2 on confidence is shown in the figure below.

<IPython.core.display.Image object>

In theory, the metacognitive evidence parameter φ2\varphi_2 is separable from the effects of type 2 criteria γi\gamma_i; in practice — with limited sample size — they might trade of each other.

Metacognitive confidence bias

ParameterSymbolHow to enableDefaultPossible values
type2_confidence_biasα2\alpha_2cfg.type2_confidence_bias.enable = 100, 1

It seems tempting to model a metacognitive bias as a parameter that systematically affects all confidence criteria. For instance, consistent withe notion of an additive and multiplicative criteriorn bias above, one could think of describing metacognitive biases as a parametric deviation from Bayes-optimal criteria (e.g. aγibayes+ba\gamma_i^\text{bayes} + b). Indeed, the evidence bias φ2\varphi_2 above plays a role similar to aa.

Additive shifts, in turn, are always tricky, since they need to be accompanied by clipping (e.g., neither evidence nor confidence can be below 0). ReMeta offers one additional metacognitive bias parameter that circumvents clipping issues: the confidence bias α2\alpha_2:

p(correct)=(Φ(z2σ1))1/α2p(\text{correct}) = \left(\Phi\Big(\frac{z_2}{\sigma_1}\Big)\right)^{1/\alpha_2}

α2\alpha_2 is a power-law parameter which ensures that confidence remains between 0 and 1. Such a parameter has little biological plausibility, but it is mathematically convenient. To some very rough approximation it resembles an additive shift, with appropriate asymptotic behavior at the confidence bounds 0 and 1.

<IPython.core.display.Image object>

The computational signature of α2\alpha_2 is clearly distinguishable from the evidence bias φ2\varphi_2:

<IPython.core.display.Image object>

The parameters φ2\varphi_2 and α2\alpha_2 are thus likely distinguishable in a parameter recovery analysis. Nevertheless, they have little empirical validation and may not work well with simultaneous confidence criteria. Fot this reason, φ2\varphi_2 and α2\alpha_2 are disabled by default.

References
  1. Shekhar, M., & Rahnev, D. (2021). The nature of metacognitive inefficiency in perceptual decision making. Psychological Review, 128(1), 45–70. 10.1037/rev0000249
  2. Guggenmos, M. (2022). Reverse engineering of metacognition. eLife, 11. 10.7554/elife.75420
  3. Boundy-Singer, Z. M., Ziemba, C. M., & Goris, R. L. (2022). Confidence reflects a noisy decision reliability estimate. Nature Human Behaviour, 6(11), 1546–1558. 10.1038/s41562-022-01464-x