Skip to content
Dario Loi
Search
Menu

A Metacognitive Framework for Test-Time Adaptation: Taxonomy and Research Challenges

  • Dario Loi1,*
  • Gabriele Onorato1
  • Antonella Coviello1
  • Shahriar Rifat1
  • Nathaniel D. Bastian2
  • Francesco Restuccia1
  • 1 Northeastern University
  • 2 Pathfinder Applied Research, LLC

* Corresponding author

AAAI 2026 Fall Symposium on Artificial Metacognition (METACOG-26), Top 3 paper

A stream of in-distribution car images and out-of-distribution animals under Wild TTA. Left, fluency cues from the task backbone, such as entropy and energy, produce overlapping distributions labeled unreliable. Right, cues from a concept extractor produce separated clusters labeled reliable.
Figure 1.Standard vs Concept Cues in Wild Test-Time Adaptation (WTTA).

On this page

In short Test-time adaptation loses accuracy when the model updates on images from classes it never saw in training, which entropy cannot detect. Treating adaptation as metacognition, we classify twenty methods and show that a gate built on the model's internal concepts keeps accuracy stable.

Abstract

In Test-Time Adaptation, when out-of-distribution samples interleave unpredictably with corrupted in-distribution samples, adaptation without corrective measures is prone to significant performance decrease. Existing protocols rely on unreliable cues (e.g., predictive entropy) which are unable to distinguish corrupted in-distribution data from semantically novel open-set samples. To address this issue, we formalize Test-Time Adaptation through a two-level metacognitive framework that decouples task execution from control, facilitating a unified taxonomy that categorizes existing Test-Time Adaptation protocols across three core axes, i.e., which knowledge is monitored, which part of the models are targeted for adaptation, and how adaptation occurs. We provide evidence that robust corrective measures in Test-Time Adaptation require monitoring grounded in structured internal representations to reliably estimate model competence. Lastly, we frame monitoring as a resource-allocation problem, examine neuromorphic substrates for bounded self-regulation, and outline key open challenges.


Consider a classifier deployed on a camera recording a street. The model was trained on images captured in summer; by December, lighting, foliage and road surfaces have all changed, yet the street contains the same objects it did in July. The distribution of inputs has shifted with the environment, so the model may be less accurate than it was in the summer. This is covariate shift. The model should adapt to it by re-learning to be confident on its predictions in this new environment. Other inputs should never drive adaptation. Objects that belong to none of the model's classes, a cracked lens, a tampered feed, and an adversarial patch placed in the scene are all signals the update should ignore.

Test-Time Adaptation (TTA) addresses the first case by updating the model on the unlabeled samples it observes after deployment, most commonly by minimizing the entropy of its own predictions. This works as long as the test stream only contains covariate-shifted in-distribution (ID) data. Once out-of-distribution (OOD) samples are interleaved with it,1Wild TTA, in the terms of Niu et al. (2023): OOD samples arrive at an unknown, changing rate. unconditional adaptation trains the model on inputs it has no correct answer for, degrading performance. In our view, successful TTA needs a good monitoring signal, i.e., one able to tell apart the "good" samples, which the update should use, and the "bad" ones, which it should skip. Unconditional adaptation is brittle, whereas a more elaborate monitor allows the model to update itself selectively. We found the framework to build such a monitor in cognitive psychology.

Feeling of Rightness in adaptation

A chip labeled object level and a brain labeled meta level. An arrow labeled monitoring runs from the object level to the meta level, and an arrow labeled control runs back.
Figure 2.The two levels of metacognitive adaptation.

Cognitive psychology uses the term metacognition (Flavell, 1979) for supervising a cognitive process, i.e., watching and steering it without carrying it out. Nelson and Narens (1990) formalize it as a two-level architecture: (i) an object level performs the task and (ii) a meta level keeps a model of the object level, observes its state, and sends it control signals that change its behavior. TTA fits this lens naturally. Specifically, the network is the object level. The adaptation procedure is the meta level, deciding at each step whether and how the network should be updated. By looking at TTA through this framing, we can take inspiration from cognitive psychology to improve the meta level, and thus the overall performance of the system.

Most current protocols monitor the object level through its outputs, using cues such as predictive entropy, confidence margins or free energy, where a low-entropy prediction is taken to be a correct one. These cues estimate what psychologists call the Feeling of Rightness (Thompson, 2009), the sense of correctness induced by the fluent completion of a task, and are comparable to the experience-based cues described by Koriat (1997), which take effortless processing as a proxy for accuracy. As in humans, fluency can be high even when the answer is wrong. Under distribution shift, networks become overconfident (Guo et al., 2017), so an image of something never seen during training can still receive a confident prediction. Most adaptation protocols strengthen this confidence to adapt without true labels, which is the case in any realistic deployment. The model's overconfidence can therefore start a feedback loop of self-reinforcement, in which the model adapts to its own mistakes.

The same literature further separates automatic monitoring, which relies on fast, experience-based cues such as fluency, from deliberate monitoring, which relies on a deeper inspection of the object level (Shea et al., 2014). Entropy, which can be thought of as the scalar measure of a predictive distribution's "confidence" is an automatic cue. TTA protocols that rely only on automatic cues are therefore brittle, like a person who judges mostly by instinct. Our position is that the next generation of TTA protocols should add deliberate cues, which are more reliable and less prone to overconfidence, to the automatic ones. The next sections describe a deliberate cue based on concept-based interpretability and show how it can be used to improve TTA.

Correctness and competence

We split metacognitive monitoring in two. Correctness monitoring asks whether a given prediction is wrong, whereas competence monitoring asks whether the input lies inside what the model was built to handle. A familiar scene in fog is within the model's competence, even if the prediction turns out to be wrong. An object from a class the model never learned is outside of it, however confident the prediction is.

What each monitor measures

AUROC from 0.5 (chance) to 1. Ring: correctness. Ball: competence.

EntropyEntropy, correctness: 0.85Entropy, competence: 0.610.850.61Class prototypes (OWTTT)Class prototypes (OWTTT), correctness: 0.86Class prototypes (OWTTT), competence: 0.940.860.94Concept residual (FACE)Concept residual (FACE), correctness: 0.82Concept residual (FACE), competence: 0.910.820.910.50.751
Data table
MonitorCorrectnessCompetence
Entropy0.850.61
Class prototypes (OWTTT)0.860.94
Concept residual (FACE)0.820.91

Table 3 of the paper, mean of 15 seeds.

Entropy is a good correctness signal, but a poor competence signal. To measure this, we employ a ResNet-34 pretrained on ImageNet, using Imagenette, a 10-class subsample of ImageNet, as ID data, and NINCO, a dataset curated to share no classes with ImageNet, as OOD data. We degrade both with the same corruptions (Gaussian noise, defocus blur, fog and contrast), so that a monitor cannot reach a high AUROC merely by spotting the corruption. Measured by AUROC, where 1.0 is perfect monitoring and 0.5 is chance, entropy reaches 0.85 as a correctness monitor but only 0.61 as a competence monitor.

This was expected, since the two notions are similar. Entropy remains a good baseline adaptation loss. Competence is what OOD gating requires, so entropy must be supplemented to work as a gate.

Measuring the monitor in this way is itself one of the proposals of the paper. TTA protocols are evaluated by the accuracy of the adapted model, which conflates the quality of the monitor with that of the network and of the update rule. As such, we propose evaluating the meta level separately, through metrics derived from Signal Detection Theory as used in metacognition research (Fleming and Lau, 2014): metacognitive sensitivity, i.e., how well the monitor's confidence tracks correct predictions; semantic discrimination, i.e., how well it separates ID from OOD data; and corruption sensitivity, i.e., how strongly it responds to covariate shift.

A taxonomy of twenty methods

To compare protocols, we write the metacognitive loop as one update rule, with a variable for each decision a TTA protocol makes: which samples enter the update and with what weight, which parameters are adapted, how large the step is, when to roll the weights back toward the source model, and when to abstain. Each protocol then corresponds to one instantiation of this rule. We categorize twenty protocols2BN-Adapt, Tent, MEMO, CoTTA, RDumb, EATA, SAR, SoTTA, NOTE, RoTTA, DeYO, OWTTT, PeTTA, ROID, LAME, REM, MECTA, GALA, PALM, and LAW. along three axes, i.e., which knowledge is monitored, what part of the model is adapted, and how adaptation is regulated.

The taxonomy shows a few patterns. Deliberate knowledge, e.g., teacher networks or consistency across augmented views, is mostly allocated to loss construction and seldom to the decision of which samples to update on. That decision still relies on single-pass forward scores, or on state summaries that drift together with the model, resulting in a circular self-reinforcement of the model's biases. Adaptation loci remain largely static, and the few protocols that select them at run time do so through heuristics such as gradient statistics, which ignore what the representations encode. Lastly, abstention is rarely exercised.3Answering "none of the above" instead of naming a class.

A deliberate cue from concepts

To build a deliberate cue, we turn to concept-based interpretability. Concept extraction techniques such as CRAFT (Fel et al., 2023) and FACE (Bhusal et al., 2025) learn a compact dictionary of concepts from the model's internal activations on ID data, such that the features of a familiar image can be approximated as a nonnegative combination of those concepts. We fit the dictionary on the last-layer features of 2,000 Imagenette images. At test time, we reconstruct the features of each incoming sample through the dictionary, and use the normalized reconstruction residual, i.e., the fraction of the features left unexplained, as our cue. A corrupted ID image leaves some residual. An OOD image under the same corruption leaves more, as the concepts required to explain it are missing from the dictionary.

Two properties make the residual a suitable competence cue. First, it is independent of the labels predicted by the model. Second, it is computed on the frozen source network against a dictionary fixed before deployment, so that its reference does not drift as the model adapts.

On semantic discrimination, the concept residual reaches 0.91 with either dictionary, against 0.61 for entropy. It is a weaker correctness monitor than entropy (0.82 against 0.85), consistent with the distinction between the two kinds of monitoring.

Two rows of photos. Top: a noisy close-up of a gas pump's meter, beside two small crops, a gas pump and a cassette player's control panel. Bottom: a noisy photo from outside the model's classes, beside two small crops, a church tower and a man with a chain saw.
Figure 3.Top: an Imagenette gas pump under Gaussian noise, with the two most relevant concepts extracted by FACE. Bottom: a NINCO image under the same noise; its two most relevant concepts belong to unrelated classes.

Deliberate cues as test-time gates

We then use each cue as a gate. The network is adapted with Tent (Wang et al., 2021), which minimizes entropy over the affine normalization parameters, and only the samples whose score passes the gate's threshold enter the update. The threshold is estimated online from the scores observed in previous batches.4As in Li et al. (2023): the split that minimizes the variance within each group. We compare no gate, an entropy gate, our concept-residual gate, and the class-prototype distance of OWTTT (Li et al., 2023), an existing open-world TTA protocol, together with a perfect filter that uses the true ID/OOD label of every sample as an upper bound.

OOD samples let into the update

Share admitted by each gate when 80% of the stream is OOD.

  • Entropy gate
  • Concept residual gate
Gaussian noiseGaussian noise, entropy gate: 51%Gaussian noise, concept residual gate: 23%23%Defocus blurDefocus blur, entropy gate: 55%Defocus blur, concept residual gate: 35%35%FogFog, entropy gate: 54%Fog, concept residual gate: 4%4%ContrastContrast, entropy gate: 57%Contrast, concept residual gate: 3%3%0%20%40%60%
Data table
CorruptionEntropyResidual
Gaussian noise51%23%
Defocus blur55%35%
Fog54%4%
Contrast57%3%

Table 7 of the paper, mean of 15 seeds.

With 80% of the stream made of OOD samples, the entropy gate admits between 51% and 57% of them for adaptation, depending on the corruption. The residual gate admits 23% under Gaussian noise and 35% under defocus blur, and less than 4% under fog and contrast. After 200 adaptation steps under Gaussian noise at this contamination rate, ID accuracy is 0.52 without a gate, 0.57 with entropy, 0.68 with the concept residual, 0.72 with prototypes and 0.80 with the perfect filter, against 0.39 for the unadapted model.

Accuracy over a long run

ID accuracy over 2,000 steps, Gaussian noise, 60% of the stream OOD.

  • Concept residual
  • Entropy
  • Class prototypes
0.40.60.8unadapted, 0.39perfect filterConcept residual, step 200: 0.755Concept residual, step 400: 0.774Concept residual, step 600: 0.765Concept residual, step 800: 0.755Concept residual, step 1,000: 0.751Concept residual, step 1,200: 0.749Concept residual, step 1,400: 0.745Concept residual, step 1,600: 0.740Concept residual, step 1,800: 0.741Concept residual, step 2,000: 0.739Entropy, step 200: 0.730Entropy, step 400: 0.690Entropy, step 600: 0.608Entropy, step 800: 0.530Entropy, step 1,000: 0.488Entropy, step 1,200: 0.471Entropy, step 1,400: 0.461Entropy, step 1,600: 0.439Entropy, step 1,800: 0.433Entropy, step 2,000: 0.412Class prototypes, step 200: 0.779Class prototypes, step 400: 0.794Class prototypes, step 600: 0.795Class prototypes, step 800: 0.788Class prototypes, step 1,000: 0.789Class prototypes, step 1,200: 0.791Class prototypes, step 1,400: 0.790Class prototypes, step 1,600: 0.789Class prototypes, step 1,800: 0.790Class prototypes, step 2,000: 0.7892001,0002,000
Data table
StepConcept residualEntropyClass prototypesPerfect filter
2000.7550.7300.7790.823
4000.7740.6900.7940.851
6000.7650.6080.7950.857
8000.7550.5300.7880.860
1,0000.7510.4880.7890.860
1,2000.7490.4710.7910.860
1,4000.7450.4610.7900.861
1,6000.7400.4390.7890.862
1,8000.7410.4330.7900.861
2,0000.7390.4120.7890.861

Table 5 of the paper, mean of 10 seeds.

The gap widens over longer horizons. The table below reports ID accuracy over 2,000 steps under Gaussian noise, with 60% of the stream contaminated (mean over 10 seeds).

Gate Step 200 Step 1,000 Step 2,000
None 0.671 0.474 0.369
Entropy 0.730 0.488 0.412
Concept residual (ours) 0.755 0.751 0.739
Class prototypes (OWTTT) 0.779 0.789 0.789
Perfect filter 0.823 0.860 0.861

Ungated and entropy-gated adaptation decay monotonically. By step 2,000 they have fallen back to around 0.39, the accuracy of the unadapted model. Both deliberate gates hold steady across the full horizon.

Why self-monitoring matters for safe online adaptation

A model that updates itself after deployment runs without a supervisor to check the updates. In Wild TTA, a practical question is therefore when the model's own predictions are reliable enough to adapt on, as well as how to adapt. This is a question about self-monitoring in neural networks, i.e., about a model's estimate of its own competence, and it is where out-of-distribution detection, open-world test-time adaptation and selective prediction (abstaining on inputs the model cannot answer) meet. Our measurements show why a confidence-based monitor is a weak place to start: with 80% of the stream made of OOD samples, the entropy gate still lets roughly half of them through, whereas the concept-based competence check lets through between under 4% and 35%, depending on the corruption.

Any perception system that runs on a long, unlabeled stream could face this problem, for instance roadside cameras, inspection lines, or the perception stack of a vehicle. For such systems, we see safe online adaptation as depending on two things: a monitor that separates "a familiar scene seen through fog" from "something the model has never learned", and a record of why each update was accepted. The concept residual is a first step in that direction. The interpretability argument above explains why we think the second requirement is as important as the first.

The taxonomy also points to open questions. Deliberate cues are mostly used to build the loss and seldom to choose which samples to adapt on, the loci of adaptation are rarely chosen from semantic content, and abstention is seldom used. Combining a competence signal with those decisions, i.e., which samples, which parameters, when to roll back and when to abstain, is a natural next step for self-monitoring adaptation. Deliberate inspection also costs latency, memory and energy at every step, so deciding when to use it is itself a design problem that the framework makes explicit.

Limitations

The concept-based component of this work is preliminary. OWTTT's prototypes outperform our residual throughout the long-horizon run (0.79 against 0.74 at step 2,000), as well as in semantic discrimination (0.94 against 0.91). Both deliberate gates also cost accuracy when there is nothing to filter. On uncontaminated streams they end two to five points below ungated adaptation under each of the four corruptions, as they reject part of the corrupted ID samples. Lastly, our experiments cover one failure case of the street camera example, semantically novel objects. Physical damage or tampering with the camera is a separate problem that the paper does not evaluate.

However, unlike a prototype distance, the concept residual is interpretable. Since it derives from a decomposition over concepts that can be visualized as image crops, it allows us to quantify which concepts explain a given sample and how much of it remains unexplained, and thus why the gate admitted or rejected it. As shown in Figure 3, and further in the appendix of the paper, OOD images tend to retrieve semantically unrelated concepts that share structural qualities, such as texture or material.

Gating adaptation on an interpretable signal makes each adaptation decision explainable, so practitioners can verify the semantic rationale behind each update. Interpretability of a monitoring signal is particularly important in safety-critical applications and applies beyond Test-Time Adaptation. For instance, being able to tell a human operator which part of the input drove the model toward a specific decision is an important requirement for deploying autonomous systems such as self-driving cars. We believe the field should build more algorithms that combine interpretability with adaptation. The metacognitive framing of TTA can give a way to design and evaluate them.

At METACOG-26

We presented this work at METACOG-26, the AAAI 2026 Fall Symposium on Artificial Metacognition, where it received a Top 3 Paper award. At the same symposium we also presented a metacognitive perspective on anomaly detection, which reads anomaly detection through the same two levels. The code for our experiments is available on GitHub. Read the full paper at the top of this page for the full taxonomy of adaptation algorithms and the remaining results.

References

Cite

BibTeX
@article{Loi_2026, title={A Metacognitive Framework for Test-Time Adaptation: Taxonomy and Research Challenges}, volume={10}, ISSN={2994-4317}, url={http://dx.doi.org/10.1609/aaaiss.v10i1.43402}, DOI={10.1609/aaaiss.v10i1.43402}, number={1}, journal={Proceedings of the AAAI Symposium Series}, publisher={Association for the Advancement of Artificial Intelligence (AAAI)}, author={Loi, Dario and Onorato, Gabriele and Coviello, Antonella and Rifat, Shahriar and Bastian, Nathaniel D. and Restuccia, Francesco}, year={2026}, month=Nov, pages={147--162} }