Manuscript Offprint
arXiv:2610.03413AIBL: Augmented Instance-Based Learning with Structured Memory and Neural Embeddings
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Sequential learning systems often make decisions from accumulated experience while receiving high-dimensional inputs whose distribution may change over time. Instance-Based Learning Theory (IBLT) provides a principled case-based framework for such settings through stored situation–decision–utility instances, partial matching, activation, and blending. IBLT typically relies on symbolic knowledge representation in dictionary-like formats, but text, images, transaction vectors, and user-item histories often require learned similarity rather than hand-specified matching rules.
In this paper, we introduce AIBL (Augmented Instance-Based Learning), an instance-learning model formulated in a learned vector space for high-dimensional sequential data. AIBL generalizes symbolic situation matching to neural embedding similarity while retaining instance storage, activation-weighted retrieval, and utility blending. This makes AIBL suitable for applications such as text classification, transaction monitoring, drift adaptation, and recommendation, especially when stable symbolic attributes are unavailable or lossy and weakly supported observations should not be blended immediately with active memory. The AIBL model organizes memory into active, forgotten, and surprise stores. Surprise memory separates weakly matched, possible out-of-distribution, or corner-case observations from active memory, reducing forced fitting to the nearest available cases. An observation-driven graduation algorithm promotes recurring surprise instances to active memory, allowing the memory to incorporate repeated novel patterns that may arise under concept drift.
We evaluate the same implementation on five machine learning tasks and three controlled simulation tasks, comparing AIBL with classical IBLT variants and task-specific baselines where appropriate. On the machine-learning tasks where a symbolic IBLT baseline is reported, AIBL improves accuracy by 6 to 17 percentage points. The results show where vector-space retrieval improves over symbolic matching and how the added memory mechanisms govern novelty detection, cold-start handling, drift adaptation, and reward learning under the tested protocols.
Keywords: Instance based learning, neural embeddings, memory systems, cognitive modeling, streaming learning, anomaly detection, contextual bandits, case based retrieval
1 Introduction
Many deployed learning systems make decisions as data arrive. Fraud detectors process transactions sequentially. Recommenders update behavior as users reveal preferences. Text classifiers may encounter topics that were not present in the initial stream. In each case, the learner must use accumulated experience while deciding whether the current input is well supported by that experience. This judgment is difficult when observations are often high dimensional, feedback may be delayed or partial, and the data distribution may change after deployment.
Learning from stored cases is a natural fit for this setting because predictions remain tied to experience. A learner can retrieve earlier observations, compare them with the current query, and combine their observed outcomes rather than compressing all past experience into fitted parameters alone. This supports streaming operation, learning from limited data, and inspection of the cases that influenced a decision. The same structure can also create a failure mode. If the closest stored cases are still poor matches, ordinary retrieval can force the system to treat weak evidence as sufficient evidence.
Instance-Based Learning Theory (IBLT) (Gonzalez et al. 2003; Gonzalez and Dutt 2011) provides a principled foundation for this type of case based sequential decision making. It represents experience as instances that contain a situation, a decision, and a utility value. It retrieves similar prior instances, weights them by a decaying activation term, blends their utilities, and updates memory after feedback. Together with its cognitive plausibility (its principles reflect the underlying neural mechanisms of learning and decision-making (Stocco et al. 2024; Yang et al. 2024)), its robustness and reliability have made IBLT a popular and widely-used machine learning framework, having been applied to fields as varied as reinforcement learning (Gershman and Daw 2017), epidemiology (Mitsopoulos et al. 2025), cybersecurity (Dutt et al. 2013), phishing detection (Xu et al. 2022), teaming between humans and machines (Lebiere et al. 2025), and algorithmic theory of mind (Stocco et al. 2026).
IBLT applications typically rely on dictionary-like situation representations for which the relevant attributes and partial matching functions are manually specified. In contrast, the predictive similarity structure of documents, images, transaction records, and user and item histories is high dimensional, task dependent, and learned from data rather than available as a compact set of hand coded situation attributes.
This motivates a vector space formulation that addresses the representation problem while preserving the instance based logic. A vector space formulation addresses the representation problem while preserving the instance based logic. Learned encoders can map observations from one or more data modalities into embeddings. This makes similarity computable across high dimensional inputs and allows retrieval to use latent task relevant structure.
Once retrieval is defined in an embedding space, however, weak matches require a special memory policy. Observations with low similarity should not always be blended immediately with active memory, because doing so can make distributional change or corner cases appear as ordinary nearest case predictions.
To address the limitations of IBLT, we introduce AIBL (Augmented Instance-Based Learning), an embedding based instance learning model for high dimensional sequential data. AIBL keeps the IBLT structure in which each instance contains a situation, a decision, and a utility value, while generalizing retrieval to neural embedding spaces. The model organizes instances into active, forgotten, and surprise stores. Surprise memory preserves weakly matched cases that may become useful if similar observations recur. It also separates possible out of distribution observations and corner cases from active memory, reducing forced fitting to the nearest available cases.
The movement between memory stores is governed by specified algorithms. AIBL promotes a surprise instance to active memory only after repeated similar observations provide sufficient evidence that it should participate in ordinary retrieval and blending. It also decays inactive instances, reactivates forgotten instances when they become relevant again, and uses outcome aware duplicate handling so that nearby embeddings with substantially different observed outcomes can remain distinct.
The paper makes three contributions. First, it formulates IBLT in a learned vector space, reducing the need for hand specified situation attributes and similarity functions when observations are text, tabular records, user and item pairs, or other encoded inputs. Second, it introduces active, forgotten, and surprise memory stores with a rule that promotes recurring instances with low similarity. Third, it evaluates the augmented model across five machine learning tasks and three controlled novelty simulations against symbolic IBLT variants and task-specific baselines.
The evaluation compares AIBL with classical IBLT variants and task-specific baselines where appropriate. On the machine learning tasks where a symbolic IBLT baseline is reported, AIBL improves accuracy by 6 to 17 percentage points. Ablations and threshold sweeps show how the added memory mechanisms govern novelty detection, cold start handling, drift adaptation, and reward learning under the tested protocols.
The remainder of the paper is organized as follows. Section 2 reviews instance based learning, computational memory models, memory augmented machine learning, and novelty detection. Section 3 presents the AIBL model and its vector space memory representation. Section 4 describes the storage, promotion, retrieval, blending, decay, and outcome update algorithms, together with their computational and storage costs. Section 5 reports the experimental protocols and baseline comparisons. Section 6 discusses the interpretation and limitations of the results. Section 7 concludes with the main findings and open problems.
2.1 Instance-Based Learning and Symbolic Retrieval
The fundamental unit of IBLT is an instance that records a situation, a decision, and the utility of the outcome of the decision. Learning occurs as these instances accumulate and are refined by feedback. At decision time, the model compares the current situation with stored instances, retrieves relevant cases, blends their utilities, and updates memory after the outcome is observed.
The original IBLT implementation was built upon the ACT-R declarative memory specification (Anderson 2007), an influential model of human long term episodic memory. In ACT-R, retrieval depends on base level activation, partial matching, and blending. Activation reflects how often and how recently an instance has been used. Partial matching lets nonidentical situations contribute when their attributes are similar. Blending combines the utilities of retrieved instances, so the response need not be determined by a single stored case.
The activation of instance i at time t is computed as follows:
The sum ranges over all access times , controls power law decay, and controls stochastic noise. AIBL retains this term as the temporal component of retrieval weight.
AIBL preserves the instance storage, retrieval weighted by activation, and utility blending mechanisms of IBLT. It adds a learned vector space representation for situation comparison. Encoders for text, images, tabular records, or user and item interactions map observations to vectors whose distances can be used for retrieval. This formulation keeps the case based decision rule of IBLT while changing the operational role of similarity. Similarity now determines both which prior cases support a prediction and whether a new observation is sufficiently unsupported to require separate memory handling.
2.2 Relationship to Memory Models in Cognition and Machine Learning
The embedding based approach in AIBL also draws on computational memory models, but expresses several memory operations in vector space terms. Retrieval becomes nearest neighbor search over stored embeddings. Recency and frequency enter through the activation term, and task relevance is reflected in the utility values associated with retrieved instances. This lets the model retain the memory logic of instance based decision making while using continuous similarity to compare high dimensional observations.
The connection is most direct for retrieval based on activation. In ACT-R (Anderson 2007), declarative chunks become easier to retrieve when they have been used frequently or recently. AIBL applies the same temporal principle to stored experience instances, while using embedding similarity rather than symbolic chunk matching to compare the current observation with memory.
Differentiable memory systems provide a closer computational comparison. Neural Turing Machines (Graves et al. 2014) and Memory Networks (Weston et al. 2015) retrieve from external vector memories through learned attention. AIBL also uses vector indexed retrieval, but separates representation learning from memory control. The encoder supplies embeddings, while explicit algorithms determine storage, retrieval, forgetting, and promotion.
Memory augmented machine learning provides the closest machine learning context for the vector space component of AIBL. These methods use learned representations as memory keys. An encoder maps an input to a vector, and retrieval returns stored items with nearby keys. This makes memory lookup possible for text, images, transaction records, user and item histories, and other high dimensional observations without requiring hand coded situation attributes. For AIBL, this supplies the search layer. The remaining question is how stored cases should be managed when retrieval support is weak, outdated, or recurrent.
Model-free episodic control (Blundell et al. 2016) and Neural Episodic Control (Pritzel et al. 2017) store triples containing a state, an action, and a value, indexed by embeddings. This enables value updates without gradient steps. These models show how embedding indexed experience can support fast value estimation. Their memory policy is usually governed by capacity limits or replacement rules. AIBL uses the same keyed experience idea, but each stored item is an IBLT instance with an observed outcome and associated access history. The retrieval weight combines vector similarity with activation, and unsupported observations can be routed to surprise memory rather than forced into ordinary blending.
Systems for retrieval augmented generation (Lewis et al. 2020) retrieve documents from external corpora using embedding similarity. In AIBL, the retrieved objects are prior experiences rather than documents. A retrieved item carries an observed outcome, an access history, and a memory tier assignment. The retrieval result therefore affects both prediction and future memory state.
Nearest neighbor methods over pretrained embeddings include prototypical networks (Snell et al. 2017) and kNN-LM (Khandelwal et al. 2020). These methods use nearby embeddings to support classification or next token prediction. AIBL instead retrieves outcomes from previous experiences and weights them by both similarity and activation. When the nearest neighbors provide weak support, the model stores the observation separately and uses recurrence to decide whether it should later enter active memory.
Case-based reasoning (Kolodner 1992) provides the closest conceptual precedent. It solves problems by retrieving and adapting similar past cases. AIBL can be interpreted as an embedding indexed case based system with temporal activation, surprise memory, promotion based on recurrence, forgetting, and reactivation.
Prior embedding indexed memory methods mainly specify how stored vectors are retrieved and used for prediction. By contrast, AIBL specifies the complementary policy for managing cases indexed by embeddings. The policy determines how cases enter memory, when weakly supported cases are withheld from ordinary retrieval, how repeated cases with weak support are promoted, and how inactive cases can be forgotten or reactivated.
2.3 Novelty and Anomaly Detection
Retrieval indexed by embeddings also changes how novelty is defined. In symbolic IBLT, mismatch is determined by the task variables and partial matching functions chosen by the modeler. In AIBL, an observation has low support when its embedding is far from stored experience under the model's similarity metric. Novelty is therefore tied to retrieval support, rather than assigned by a separate representation before prediction.
This view connects AIBL to anomaly detection, which studies methods for identifying observations that depart from a reference distribution (Chandola et al. 2009). Classical approaches include one class support vector machines (Schölkopf et al. 2001), which learn a boundary around the training data, and isolation forests (Liu et al. 2008), which identify anomalies as points that are easy to isolate through random partitioning. Autoencoder reconstruction error is also widely used as an anomaly signal (Sakurada and Yairi 2014). Inputs with high reconstruction error are treated as potential distributional deviations.
These methods usually produce an anomaly score outside the prediction rule or pass that score to a separate decision procedure. AIBL instead uses the same similarity computation for prediction and memory routing. If the maximum similarity to active memory falls below a threshold, the observation is stored in surprise memory and withheld from ordinary blending. If similar observations recur, the graduation rule can promote them into active memory. Novelty detection is therefore integrated with the lifecycle of stored instances.
3 AIBL Model Specification
The previous discussion of related work identifies two requirements for extending IBLT to learned representations: the model must keep decisions tied to stored experiences, and it must define how weakly supported embeddings are handled before they influence prediction. This section describes the formal model used by AIBL. It defines the stored instance, the memory system, the similarity rule, the retrieval quantity weighted by activation, the configuration parameters, and the tier transitions implemented by the algorithms in Section 4.
Each AIBL experience is represented as an instance indexed by an embedding vector. Instances are assigned to active, forgotten, or surprise memory. Decisions are computed from similarity, activation, and observed outcomes.
Table 1 Formal components of the AIBL decision model. The table lists the variables used to represent observations, actions, outcomes, similarity, and memory decisions governed by thresholds.
| Component | Definition |
| State | Embedding from encoder. Typical dimensions include |
| Action | Discrete choice or memory operation such as store, retrieve, graduate, or forget |
| Utility | Scalar outcome observed after action and used for instance updates |
| Similarity | |
| Thresholds | for retrieval, for novelty, and for duplicate handling |
3.1 Formal Definitions
AIBL separates three components of the decision model. The encoder supplies a vector representation of the current observation. The memory tier determines whether a stored instance participates in ordinary retrieval, remains dormant, or waits for recurrence. Finally, the retrieval weight determines how much a stored outcome contributes to the blended value used for decision making.
Definition 1 (Instance). An instance is a tuple . The vector is the encoded observation. The variable is the decision variable. It is an action in sequential decision tasks and a class label in supervised tasks. The null value is allowed when an instance has no assigned action or label. The scalar is the most recent observed outcome. The tier variable records whether the instance belongs to active, forgotten, or surprise memory. The vector of access times records retrieval events. The statistics , , and maintain the running mean and variance of observed outcomes. The counter records matches used for promotion from surprise memory.
Definition 2 (Memory System). A memory system is a tuple . The sets , , and contain active, forgotten, and surprise instances. The parameter configuration contains the thresholds and counts that govern retrieval, storage, forgetting, and promotion.
Definition 3 (Cosine Similarity). For embeddings , AIBL computes similarity by the cosine rule
(2) where is the inner product and is the Euclidean norm. The value lies in , with larger values indicating greater similarity. For normalized embeddings, cosine similarity reduces to the inner product.
The temporal component of retrieval is the IBLT activation term from Equation 1. It increases with repeated or recent access and decreases as access times recede. For a query embedding and a stored embedding , the general AIBL retrieval score can include an additive similarity contribution. The effective activation of instance at time is
where is the base level activation, is cosine similarity, and controls the similarity contribution. The case gives purely temporal activation.
The original IBLT formulation (Gonzalez et al. 2003) introduces a special similarity mismatch penalty. AIBL instead uses an additive form that follows the ACT-R treatment of spreading activation, where contextual cues add to base level activation (Anderson 2007). AIBL uses the embedding of the current observation as the cue. The log activation is then converted to a positive retrieval weight.
The retrieval weight for instance i determines its contribution to the blended value.
where the indicator function enforces the similarity threshold . Instances below the threshold do not contribute to the blend.
The experimental implementation applies this rule in two steps. It first retains only instances with . The blending rule then assigns each retained instance the weight . This is the default case , with similarity entering linearly during blending.
3.2 AIBL Memory Tiers
AIBL uses memory tiers to separate three different retrieval states. Some instances are sufficiently supported to participate in ordinary blending. Others have become inactive through decay but may still become relevant again. A third group consists of observations with low support that should be recorded without immediately affecting prediction.
Active memory contains instances used for ordinary retrieval and blending. Capacity limits on this tier bound retrieval cost. If an implementation imposes a maximum active memory size, instances with low activation are candidates for migration or removal.
Forgotten memory contains active instances whose activation has decayed below a threshold. These instances are not part of ordinary active retrieval, but they remain available for reactivation. When a forgotten instance is retrieved with sufficient similarity, its access time is updated and the instance returns to active memory.
Surprise memory contains inputs whose maximum similarity to stored instances falls below . This tier prevents observations with low support from being blended immediately with active memory. It also records possible out-of-distribution observations and corner cases that may become useful if they recur. Each later incoming embedding is compared with surprise memory. If it matches a surprise instance with similarity at least , that instance's counter is incremented. The instance is promoted to active memory when its counter reaches the graduation parameter . Section 4 gives the corresponding algorithm.
3.3 AIBL Configuration Parameters
AIBL uses a small set of nine parameters to control storage and retrieval for embedding-indexed instances. Some parameters are fixed by the representation, such as the embedding dimension. Others set decision boundaries for retrieval, novelty routing, duplicate handling, and forgetting. The count parameters determine how memory behaves when few cases have been stored and when a pattern with low support appears repeatedly. Table 2 gives the default values used unless a task specific setting is reported in Section 5.
Table 2 AIBL configuration parameters used by the model and algorithms. Defaults are the values used unless an experiment reports a task specific setting.
| Parameter | Default | Role in AIBL |
|---|---|---|
| 768 | Representation dimension supplied by the encoder | |
| 0.5 | Power law exponent in the activation decay term | |
| 0.7 | Minimum similarity required for active memory retrieval | |
| 0.3 | Similarity threshold for routing inputs with low support to surprise memory | |
| 0.95 | Same action similarity threshold for duplicate updates | |
| -2.0 | Activation cutoff for moving active instances to forgotten memory | |
| 5 | Number of initial instances stored directly in active memory | |
| 2 | Number of later matches required to promote a surprise instance | |
| 2.0 | Outcome deviation cutoff, in standard deviations, for creating a separate nearby instance |
The embedding dimension is determined by the encoder rather than by the memory algorithm. It ranges from 64 in several experiments here to 384 for Sentence-BERT and 768 for many encoders based on BERT (Devlin et al. 2019; Reimers and Gurevych 2019). Exact similarity search scales linearly in for each candidate instance. The decay exponent controls how rapidly activation decreases as access times recede. The default value follows the ACT-R base-level learning equation used in IBLT.
The threshold parameters determine how the memory system uses similarity and activation. The retrieval threshold determines which stored instances are eligible for blended value computation. Raising requires closer matches, while lowering it admits more distant cases. The novelty threshold controls routing to surprise memory after cold start. Inputs whose maximum similarity to stored memory falls below this value are stored outside active memory. The duplicate threshold identifies instances with the same action that are close/similar enough to update rather than duplicate. The forgetting threshold moves active instances to forgotten memory when their activation becomes sufficiently low.
The remaining parameters control early storage (), recurrence in surprise memory (), and outcome variation for nearby instances (). The first instances enter active memory without novelty checks. This prevents an empty memory from classifying every initial input as new. The graduation parameter specifies how many later matches a surprise instance must receive before promotion. The outcome deviation parameter determines when a new observation near a stored embedding should be stored as a separate instance because its observed outcome differs substantially from the instance's historical mean.
3.4 AIBL Memory Flow
The preceding definitions specify the objects stored by AIBL. The memory flow completes the model by specifying how a new observation changes those objects. The order of operations matters because an empty memory, a repeated case, and a case with low support require different updates. AIBL first handles sparse memory, then checks whether the observation should update an existing instance with the same action, and then decides whether a new instance has enough support to enter active memory.
When a new observation is encoded, AIBL compares the current instance count with . If fewer than instances have been stored, the observation enters active memory directly. This cold start step prevents the first observations from being routed to surprise memory only because too few cases have been stored for meaningful similarity comparisons.
After cold start, intake begins with duplicate handling. The new embedding is compared with active instances that have the same action or label. If the maximum similarity among instances with the same action exceeds , the matched instance is updated unless the observed outcome deviates from that instance's running outcome history by more than standard deviations. In that case, AIBL creates a new instance even though the embedding is close, because nearby embeddings with different outcomes may reflect context that is not represented by the current encoder. Section 4 gives the running statistics update used for this decision.
If duplicate updating is not applied, AIBL performs novelty routing. The model computes the maximum similarity between the new embedding and stored memory. If this value is below , the observation is routed to surprise memory and does not participate in ordinary blending. Otherwise, it enters active memory.
Tier changes continue after intake. Active instances move to forgotten memory when . Forgotten instances return to active memory when later retrieved with similarity above . Surprise instances are compared with later incoming embeddings. A match with similarity at least increments the surprise instance's counter. The instance is promoted when the counter reaches . The reported experiments use for both routing into surprise memory and matching against surprise memory.
4 AIBL Algorithms
The previous section defined the AIBL state variables and memory tiers. This section gives the algorithms that update and query those states. The algorithms follow the data path of an observation. Intake creates or updates instances. Promotion moves recurring cases with low support from surprise memory into active memory. Retrieval and blending compute action values from active and reactivated instances. Maintenance applies forgetting, capacity limits, and updates to outcome statistics.
4.1 Embedding Intake and Instance Storage
The intake algorithm decides whether a new observation tuple, consisting of a state, an action, and an outcome, updates an existing instance, enters active memory, or is held in surprise memory. The ordering is part of the model. Cold start populates active memory before similarity thresholds are used. Duplicate handling then prevents repeated observations of the same action from creating unnecessary copies. The outcome deviation test preserves separate instances when nearby embeddings produce substantially different outcomes. After these checks, novelty routing uses maximum similarity to stored memory to decide whether the observation has enough support for ordinary retrieval.
Algorithm 1 AIBL Embedding Intake
Require: Embedding e, action a, outcome o
Ensure: Stored or updated instance
1: Increment global time
2: if total instance count then
3: Create instance (e, a, o) in
4: return created instance
5: end if
6:
7: if is not empty then
8:
9:
10: if then
11: if OutcomeDeviation( , o, , ) then
12: Proceed to create a distinct instance
13: else
14: Update with outcome o and access time t
15: return
16: end if
17: end if
18: end if
19: Compute
20: if and action a does not exist in then
21: Create instance (e, a, o) in
22: else
23: Create instance (e, a, o) in
24: end if
25: Compare e with existing surprise memory for possible promotion
26: return created instance
Algorithm 1 uses two similarity searches after cold start. The duplicate search is restricted to active instances with the same action. If its best match exceeds and the outcome is consistent with the matched instance's running outcome history, the existing instance is updated rather than used to create a duplicate. If the outcome deviates by more than standard deviations, AIBL creates a separate instance despite the embedding match. This separate instance preserves cases in which nearby embeddings with the same action have outcomes that differ enough to suggest that the current representation may be missing relevant context.
The support search computes over stored memory. If support is below , the new instance is routed to surprise memory unless its action is already represented in active memory. That exception is used only for supervised tasks with closed labels, where a known label should not be treated as new solely because a particular example is distant from previous examples. In anomaly detection or open world settings, new actions or classes should not bypass surprise routing, so the implementation uses a fixed sentinel action value.
Let denote the embedding dimension, and let , , and denote the numbers of active, forgotten, and surprise instances, respectively. Let denote the number of active instances with action . With exact search, duplicate handling costs . The support search costs when all tiers are scanned. Updating an existing duplicate costs constant time after retrieval because the outcome statistics are updated online. Creating a new instance stores one embedding and a fixed set of scalar fields, so the storage cost for each instance is when access histories are capped.
4.2 Surprise Memory Promotion
The intake step records observations with low support without allowing them to affect ordinary blending immediately. Promotion later converts such records into active instances. The rule is based on recurrence rather than on a single observation. A surprise instance must be matched by later embeddings with similarity at least until its counter reaches . This separates isolated observations with weak support from patterns that appear repeatedly in embedding space.
The algorithm is called after intake with the current embedding. If the current intake step inserted a new surprise instance, that instance is excluded from the scan. This prevents a newly created surprise instance from counting its own insertion as recurrence.
Let denote the number of surprise instances before promotion is evaluated. With exact search, Algorithm 2 costs for each incoming embedding. Counter updates and tier changes take constant time after the matching instances have been found. The threshold determines how close a later embedding must be to count as recurrence, and determines how many such matches are required before promotion. The implementation uses cumulative counts rather than a sliding window, so a recurring surprise pattern can be promoted even when its matches are not consecutive.
Let denote the number of surprise instances before promotion is evaluated. With exact search, Algorithm 2 costs for each incoming embedding. Counter updates and tier changes take constant time after the matching instances have been found. The threshold determines how close a later embedding must be to count as
Algorithm 2 AIBL Surprise Memory Promotion
Require: New embedding e, excluded instance , surprise threshold , graduation threshold
Ensure: Updated active and surprise memories
1: for all do
2: if then
3: continue
4: end if
5:
6: if then
7:
8: if then
9: Remove from
10: Add to
11: Set
12: Update access time of to t
13: end if
14: end if
15: end for
recurrence, and determines how many such matches are required before promotion. The implementation uses cumulative counts rather than a sliding window, so a recurring surprise pattern can be promoted even when its matches are not consecutive.
4.3 Retrieval, Blending, and Memory Maintenance
After intake and promotion, prediction or action selection proceeds through three linked operations. Retrieval identifies active and forgotten instances whose action and embedding support the current query. Blending converts the retained outcomes into an action value using activation and similarity weights. Maintenance updates tier membership and enforces capacity limits after memory access changes the state. These operations are grouped because retrieval can reactivate forgotten instances, blending depends on the retrieved set, and maintenance depends on the resulting activation and access history.
Retrieval is restricted to active and forgotten memory. Surprise memory is excluded from ordinary prediction until a surprise instance is promoted. Algorithm 3 applies the action filter and similarity threshold to the stored instances that are eligible for prediction. Forgotten instances that satisfy the retrieval condition are reactivated, making retrieval both a query operation and a memory state update.
Let denote the number of active and forgotten instances that pass the optional action filter, and let denote the number of retained matches. Exact retrieval costs . Selecting the top matches costs with a bounded heap, or if all retained matches are sorted.
The retained set determines the value assigned to a candidate action. Algorithm 4 returns a task specific default utility when no retained instances are available. Otherwise, each retained instance contributes in proportion to . Recency and frequency enter through activation, while representational closeness enters through similarity.
Algorithm 3 AIBL Retrieval
Require: Query embedding , optional action filter , similarity threshold , top-k limit
Ensure: Up to retained pairs of instances and similarities
1:
2: for all do
3: if is specified and then
4: continue
5: end if
6:
7: if then
8: Add to
9: if then
10: Move to
11: Set
12: Update access time of to
13: end if
14: end if
15: end for
16: return Up to elements of with largest similarity
Let denote the number of active and forgotten instances that pass the optional action filter, and let denote the number of retained matches. Exact retrieval costs . Selecting the top matches costs with a bounded heap, or if all retained matches are sorted.
The retained set then determines the value assigned to a candidate action. Algorithm 4 returns a default utility for the task when no retained instances are available. Otherwise, each retained instance contributes in proportion to . Recency and frequency enter through activation, while representational closeness enters through similarity.
For a query embedding and target action , retrieval returns at most instances with matching action and similarity at least . The blended value is the average of their observed outcomes, weighted by activation and similarity.
where and is the stored outcome. In reward learning, indicates whether reward was received. In classification, for the correct class and otherwise.
For a candidate action set A, AIBL computes one blended value per action and samples from a softmax distribution over those values.
Algorithm 4 AIBL Blended Value
Require: Query embedding , action , similarity threshold , top-k limit , noise
Ensure: Blended expected value
1: matches ← Retrieve( , , , )
2: if matches is empty then
3: return default_utility
4: end if
5: weighted_sum ← 0
6: total_weight ← 0
7: for all
8: activation of using Equation 1
9: {Add noise}
10:
11: weighted_sum ← weighted_sum +
12: total_weight ← total_weight +
13: end for
14: return weighted_sum / total_weight
where controls exploration. As , selection becomes greedy. As , selection approaches uniform random choice. The experiments use fixed values of for each task.
Blending costs after retrieval because at most retained instances contribute to each action value. For a candidate action set , computing all blended values costs after retrieval has identified the retained matches for each action.
After retrieval, blending, and any intake updates, Algorithm 5 keeps the memory tiers consistent with the activation rule and capacity limits. The decay rule moves active instances whose activation has fallen below into forgotten memory. Optional capacity limits then remove excess instances from each tier.
Let denote the number of active instances before decay is evaluated. Decay evaluation costs . Capacity enforcement can be implemented by sorting or by partial selection, depending on how many instances exceed the tier limit.
4.4 Outcome Statistics for Nearby Duplicate Handling
Algorithm 1 treats a high similarity match with the same action as a candidate duplicate. Embedding similarity alone is not sufficient for consolidation, because two close embeddings can still produce different outcomes when the encoder omits a relevant variable or when feedback is stochastic. AIBL therefore stores outcome statistics with each instance. These statistics are used only after the embedding match has passed the duplicate threshold .
For a matched instance, the stored outcomes define a local outcome history. The new outcome is compared with that history before the instance is updated. When
Algorithm 5 AIBL Memory Maintenance
Require: Forgetting threshold , capacity limits , ,
Ensure: Updated active, forgotten, and surprise memories
1: for all do
2: activation using Equation 1
3: if then
4: Move from to
5: Set
6: end if
7: end for
8: If , remove active instances with lowest activation until
9: If , remove oldest forgotten instances until
10: If , remove oldest surprise instances until
at least two prior outcomes are available and the variance is not numerically zero, the comparison uses the z-score
where and are the running mean and standard deviation for the matched instance. If , the candidate duplicate is stored as a separate instance. If , the matched instance is updated.
Algorithm 6 AIBL Outcome Deviation Test
Require: Instance I with statistics , new outcome , threshold , tolerance
Ensure: Boolean indicating whether the new outcome should create a separate instance
1: if then 2: return false 3: end if 4: 5: 6: if then 7: return 8: end if 9: 10: return
Algorithm 6 returns false when the instance has too little outcome history to estimate variance. When the variance is below , the z-score is not well defined, so the algorithm compares the new outcome directly with the running mean. This prevents division by zero while still separating a new outcome that differs from an effectively constant history.
If the outcome deviation test returns false, AIBL updates the matched instance using Welford's online mean and variance update (Welford 1962). The update is applied separately for each stored instance, so no global outcome distribution is required.
Algorithm 7 AIBL Welford Update for Each Instance
Require: Instance I with current statistics , new outcome
Ensure: Updated statistics
1:
2:
3:
4:
5:
6: return
Algorithm 7 maintains three scalar statistics for each stored instance. The count n starts at 1 when an instance is created, the running mean is initialized to the first outcome, and is initialized to 0. Each accepted candidate duplicate changes only these statistics and the access history of the matched instance. The outcome sequence itself does not have to be retained. For , the sample variance is recovered as . Both the deviation test and the Welford update cost constant time once the matched instance has been found, so outcome aware duplicate handling does not change the asymptotic cost of the embedding search.
The full duplicate handling step begins with the embedding match
for a new experience ( ). The maximization is evaluated only when at least one active instance has action . If no such instance exists, duplicate handling is skipped. If the selected match satisfies , AIBL applies Algorithm 6 to the outcome history stored with . Embedding similarity therefore determines whether two experiences are close enough for consolidation, while the outcome deviation test determines whether the new scalar outcome is consistent with that history.
4.5 Computational and Storage Cost
Let , , and denote the numbers of active, forgotten, and surprise instances, and let be the embedding dimension. Brute force retrieval over active and forgotten memory costs per query. Duplicate detection over active instances with the same action costs , where is the number of active instances with action . Surprise promotion checks cost for each incoming embedding when promotion is evaluated against all surprise instances.
The storage cost of an instance is , where is the number of stored access times. If access histories are capped at a fixed length, the storage cost for each instance is . With tier capacity limits , , and , total memory is
Table 3 Per instance outcome statistics for nearby duplicate handling
| Symbol | Default | Description |
|---|---|---|
| 1 (init) | Count of outcomes observed for this instance | |
| (init) | Running mean of observed outcomes | |
| 0 (init) | Sum of squared deviations (Welford accumulator) | |
| derived | Sample variance computed as | |
| derived | Sample standard deviation computed as | |
| 2.0 | Outcome deviation threshold in standard deviations | |
| Tolerance for near zero variance and numerical equality | ||
| computed | Z score of incoming outcome |
, or under capped histories. Approximate nearest neighbor indices can reduce retrieval time for large memories without changing the tier transition rules.
4.6 Equation and Algorithm Correspondence
Table 4 summarizes how the mathematical quantities defined above enter the AIBL algorithms. The correspondence makes the implementation path explicit, from embedding comparison and activation weighting to tier transitions and outcome statistics updates.
Table 4 Mapping from AIBL mathematical quantities to the algorithms that use them
| Quantity or rule | Algorithmic use | Effect |
|---|---|---|
| Cosine similarity | Algorithms 1, 2, and 3 | Compares embeddings for duplicate handling, novelty routing, recurrence in surprise memory, and retrieval |
| Activation from Equation 1 | Algorithms 4 and 5 | Weights retained outcomes and determines whether an active instance moves to forgotten memory |
| Effective activation from Equation 3 | Optional variant of Algorithm 4 | Adds a contribution from embedding similarity when |
| Retrieval weight from Equation 4 | Algorithms 3 and 4 | Applies the retrieval threshold and assigns weights to retained instances |
| Blended value from Equation 5 | Algorithm 4 | Computes the action value from retrieved outcomes |
| Instance match from Equation 8 | Algorithm 1 | Finds the closest active instance with the same action for duplicate handling |
| Welford statistics and z score from Equation 7 | Algorithms 6 and 7 | Tests whether a nearby duplicate should remain separate and updates outcome statistics for each instance |
| Counter threshold | Algorithm 2 | Promotes a surprise instance after enough later matches |
5 Experiments
Two sets of experiments were carried out to evaluate whether the augmented IBLT, using vector space retrieval, three-tier memory, and contextual retrieval, improves both prediction and behavior relative to standard instance based models.
The first group of experiments uses datasets in which the relevant similarity is lexical, categorical, transactional, temporal, or based on users and items. These tasks test whether memory indexed by embeddings can support classification, reward learning, anomaly detection, drift adaptation, and recommendation under the same storage and retrieval rules. The second group of experiments uses controlled simulations that introduce new options or rule changes during a sequential task. These simulations isolate the roles of surprise memory, graduation, decay, and cold start storage.
Across all experiments, AIBL is evaluated as a streaming learner. At each step it receives an encoded observation, computes an action value or detection decision from stored instances, observes feedback, and updates memory. The baselines are chosen to match the task type. When a baseline result is taken from published ranges rather than rerun under the same stream, the relevant table states that difference.
5.1 Experimental Setup
All experiments used a Python/NumPy implementation of the AIBL algorithms. Encoders were trained before streaming evaluation and then held fixed, so the reported differences reflect storage, retrieval, thresholding, and promotion rather than online changes to encoder weights. Autoencoders were trained in PyTorch when a task required a learned tabular representation. For the Electricity stream, the normalized numerical feature vector was used directly as the vector key because the dataset already provides compact numerical state variables.
Records with missing feature values were removed before encoder training. The same filtered records were used during AIBL evaluation. This kept every stored instance and every query embedding tied to a complete observation from the corresponding task.
Each task used the embedding dimension induced by its representation. Sentence-BERT produced text vectors. Autoencoders produced vectors for the Mushroom and fraud experiments. The Electricity experiment used normalized numerical vectors. Matrix factorization produced vectors for recommendation. All vectors were normalized to unit L2 norm before storage and retrieval so that cosine similarity was used consistently across memory operations.
AIBL used the default parameter values in Table 2 unless a subsection reports task specific values. The cold start count was fixed before evaluation. Similarity thresholds , decay exponent , and temperature were selected by grid search on validation sets comprising 10% of the training data when a task required tuning. The validation split was not used for final streaming evaluation.
Primary results are from single runs with fixed random seeds unless otherwise stated. For the reward learning task, an additional analysis over 5 seeds gave mean accuracy of . Baselines were chosen according to the task. Directly evaluated baselines are reported as point estimates. Published reference results for
LinUCB, Isolation Forest, and Matrix Factorization are reported as ranges because their protocols are similar but not identical to the AIBL streaming evaluation.
5.2 Text Classification on 20 Newsgroups
The text classification experiment compares symbolic instance memory with embedding-indexed memory on the 20 Newsgroups dataset. This task is useful for this comparison because lexical overlap and semantic similarity can produce different retrieval neighborhoods for the same document.
We used the scikit-learn version of 20 Newsgroups with headers, footers, and quoted text removed. This produced 18,846 raw documents, of which 18,331 contained nonempty text after cleaning. For AIBL, we generated 384 dimensional embeddings using Sentence-BERT (all-MiniLM-L6-v2). For symbolic baselines, we used TF-IDF vectors with 5,000 features.
We sampled a stratified stream of 2,000 documents. The first 100 documents were used as warmup instances. Each method then predicted the category of the next document, received the true category, and updated its state before the following document. The text experiment used , , , and . These lower threshold and decay values reflect the stationary nature of the classification stream, where older labeled documents remain useful evidence for category membership.
Table 5 Streaming text classification on cleaned 20 Newsgroups over 1,900 predictions after warmup
| Method | Accuracy | Macro F1 | Features | Novelty Det. | Semantic Gen. |
|---|---|---|---|---|---|
| Naive Bayes (TF-IDF) | 49.2% | 0.470 | Symbolic | No | No |
| IBLT (TF-IDF) | 53.5% | 0.513 | Symbolic | No | No |
| k-NN (TF-IDF) | 46.7% | 0.454 | Symbolic | No | No |
| k-NN (Sentence-BERT) | 61.7% | 0.598 | Embeddings | No | Yes |
| AIBL (Sentence-BERT) | 60.3% | 0.573 | Embeddings | Yes | Yes |
Semantic generalization indicates retrieval over Sentence-BERT embeddings rather than TF-IDF feature overlap.
AIBL with Sentence-BERT embeddings achieved 60.3% accuracy and 0.573 macro F1. This is higher than the symbolic IBLT result under the same streaming protocol, which reached 53.5% accuracy and 0.513 macro F1. The result indicates that embedding-indexed retrieval improves over the symbolic instance memory baseline on this text stream. Sentence-BERT k-NN achieved the highest predictive accuracy at 61.7%, showing that most of the accuracy gain in this task comes from the representation itself. AIBL adds novelty routing and activation-weighted memory updates, but those mechanisms do not improve top-line classification accuracy over k-NN in this experiment.
To test the contribution of the novelty routing mechanism, we held out 4 categories (rec.autos, sci.med, talk.politics.guns, alt.atheism). After storing 2,000 documents from the remaining 16 categories, AIBL correctly flagged 88.5% of 200 held out documents using the criterion with .
5.3 Reward Learning on the UCI Mushroom Dataset
The Mushroom task is useful for evaluating reward learning because the observations are categorical, the correct action is deterministic, and one type of error is more costly than the other. We use it to compare AIBL memory indexed by embeddings with symbolic instance memory and linear bandit baselines under the same online feedback protocol. The UCI Mushroom dataset (Dua and Graff 2019) contains 8,124 samples, each described by 22 categorical attributes and labeled as edible or poisonous. Rows with missing attribute values were removed, leaving 5,644 complete samples. One hot encoding of the remaining records produced 98 input features.
Each trial presents one mushroom as the context. The available actions are “eat” and “avoid”. Eating is optimal for edible mushrooms, and avoiding is optimal for poisonous mushrooms. The reward is 1.0 for the optimal action, 0.0 for avoiding an edible mushroom, and -1.0 for eating a poisonous mushroom. The learner observes only the reward for the selected action. The experiment is therefore a contextual bandit problem with chosen action feedback, not a supervised classification problem with full label feedback after every prediction.
AIBL used embeddings from a fully connected autoencoder trained on the complete one hot feature vectors without labels. The encoder had layers of size with ReLU activations. The decoder mirrored this structure and was trained for 100 epochs using Adam with learning rate and binary cross entropy reconstruction loss. The 64 dimensional encoder outputs were L2-normalized before storage and retrieval.
A stratified 10% validation split was used to select AIBL parameters. The final evaluation sampled a 1,000-trial stream without replacement from the remaining 5,079 examples. The validation sweep considered , , and . The selected setting was , , and . This high similarity threshold reflects the structure of the task, where small changes in categorical attributes can change whether eating is safe.
Table 6 reports all methods on the same sampled stream. The bandit baselines include LinUCB (Li et al. 2010) and linear Thompson sampling (Thompson 1933; Chapelle and Li 2011).
AIBL with autoencoder embeddings selected the optimal action on 96.6% of trials. The symbolic IBLT baseline reached 87.9% on the same stream, so memory indexed by embeddings improved the optimal action rate by 8.7 percentage points. LinUCB achieved the highest rate at 97.8%. Linear Thompson sampling matched AIBL in optimal action rate and obtained a slightly higher mean reward.
These results show that instance memory indexed by embeddings can support reward learning on categorical contexts when retrieval is restricted to close matches. They do not show superiority over specialized linear bandit algorithms on this dataset, although AIBL's performance was close to that of the best task-specific algorithm.
The Mushroom task has only two actions and deterministic labels. Larger action spaces and delayed reward remain open settings for evaluation.
Table 6 UCI Mushroom reward learning with chosen action feedback over 1,000 trials
| Method | Opt. Action | Mean Reward | Regret | Repr. | Rule |
|---|---|---|---|---|---|
| Linear ε-greedy | 86.3% | 0.852 | 148 | One hot | Ridge values |
| LinUCB | 97.8% | 0.971 | 29 | One hot | Linear UCB |
| Linear Thompson sampling | 96.6% | 0.958 | 42 | One hot | Linear posterior |
| IBLT (one hot) | 87.9% | 0.824 | 176 | Symbolic | Similarity and activation |
| AIBL (autoencoder) | 96.6% | 0.953 | 47 | Vector | Similarity and activation |
Optimal action rate is the fraction of trials on which the method selected “eat” for an edible mushroom or “avoid” for a poisonous mushroom. Cumulative regret is computed against reward 1.0 on every trial. AIBL parameters were selected on the validation split before final evaluation.
5.4 Anomaly Detection on Credit Card Fraud Data
The third experiment evaluates routing through surprise memory on the Kaggle credit card fraud dataset (Dal Pozzolo et al. 2014). The dataset contains 284,807 European cardholder transactions from September 2013, including 492 frauds. The fraud rate is therefore , which makes false-positives important even when recall is high. Each transaction provides 28 features derived by PCA and the transaction amount. We used the 28 PCA features together with the log-transformed amount, giving 29 numerical inputs. The dataset contains no missing values.
The evaluation treats fraud detection as a semi-supervised anomaly problem. Training uses only normal transactions. Fraud labels are used only to select detection thresholds on a validation split and to compute final metrics. We sampled 50,000 normal transactions for autoencoder training. AIBL memory was initialized with 10,000 normal embeddings from that training set. The validation split contained 980 normal transactions and 20 frauds. The held-out evaluation sample contained 4,900 normal transactions and 100 frauds.
The autoencoder used layers of size in the encoder and a mirrored decoder. It was trained for 50 epochs with Adam, learning rate , and mean squared reconstruction loss. The encoder outputs were L2-normalized before AIBL storage and retrieval. AIBL flags a transaction when its maximum cosine similarity to normal memory is below the novelty threshold . The threshold was selected on the validation split from the grid with step size 0.01. The selected value was .
We also included an IBLT baseline. IBLT requires a symbolic situation description before retrieval, while the fraud data provide continuous anonymized PCA coordinates. We therefore constructed a symbolic encoding by binning each of the 29 inputs by quantile, using cut points learned from normal training transactions. The baseline used the same normal memory size as AIBL. Its support score was the maximum fraction of matching binned attributes among stored normal instances. The validation split selected 3 bins per attribute and a support threshold of 0.655.
Table 7 reports all methods on the same held out evaluation sample. Local Outlier Factor is included as a density-based nearest neighbor baseline (Breunig et al. 2000).
Table 7 Credit card fraud detection with thresholds selected by validation over 5,000 held out transactions
| Method | Precision | Recall | FPR | F1 | TP/FN/FP/TN | Nearest Cases |
|---|---|---|---|---|---|---|
| AIBL support | 0.975 | 0.780 | 0.04% | 0.867 | 78/22/2/4898 | Yes |
| IBLT quantile binned support | 0.563 | 0.490 | 0.78% | 0.524 | 49/51/38/4862 | Yes |
| Autoencoder reconstruction | 0.912 | 0.730 | 0.14% | 0.811 | 73/27/7/4893 | No |
| Isolation Forest | 0.536 | 0.520 | 0.92% | 0.528 | 52/48/45/4855 | Limited |
| One Class SVM | 0.729 | 0.780 | 0.59% | 0.754 | 78/22/29/4871 | Limited |
| Local Outlier Factor | 0.902 | 0.740 | 0.16% | 0.813 | 74/26/8/4892 | Limited |
Thresholds were selected on the validation split and then applied to the held-out evaluation sample. FPR is the false positive rate over the 4,900 normal transactions. AIBL uses maximum cosine similarity to normal memory as its support score. IBLT uses maximum partial match support over attributes binned by quantile.
AIBL achieved the highest F1 score in this evaluation. It detected 78 of the 100 frauds and flagged only 2 of the 4,900 normal transactions, giving 0.975 precision and a false positive rate. The IBLT baseline detected 49 frauds and produced 38 false positives. Relative to that baseline, AIBL increased F1 by 34.3 percentage points while using the same transaction variables and the same number of stored normal instances. One Class SVM matched AIBL's recall, but produced 29 false positives and a lower F1 score. Autoencoder reconstruction and Local Outlier Factor also produced low false positive rates, but missed more frauds.
The result supports a specific claim about AIBL rather than a general claim about fraud detection. When a memory of normal cases is available, maximum similarity to stored normal embeddings can serve as an anomaly score. AIBL also retains the nearest normal cases for each flagged transaction, which gives a case-based audit trail for the detection decision. The experiment does not evaluate temporal transaction sequences, merchant graphs, or supervised fraud classifiers.
5.5 Concept Drift Adaptation on Electricity Market Data
The fourth experiment tests online adaptation on the Electricity Market dataset (Harries 1999) from OpenML. The stream contains 45,312 observations taken every half hour from the Australian New South Wales electricity market. Each observation has eight variables giving date, day, period, price, demand, and transfer information. The label indicates whether the price moved up or down. The stream has no missing values, and the original temporal order was preserved.
The dataset is useful because its distribution changes over time. It does not provide ground truth drift markers. We therefore avoid assigning recovery times to unannotated drift points. Instead, we evaluate each method as an online predictor. The first 5,000 observations initialize preprocessing and memory. The next 5,000 observations select AIBL and IBLT parameters. The remaining 35,312 observations form the held-out stream. Each method predicts the next label, observes the true label, and then updates before the following observation.
AIBL used the standardized eight-dimensional feature vector as its vector key. This choice follows from the data format. Unlike text or fraud records, the Electricity stream already supplies compact numerical state variables, so an unsupervised autoencoder was not needed to define the retrieval space. AIBL retrieved the 10 nearest stored vectors by cosine similarity and weighted their labels by activation with . The validation sweep considered , , and . The selected setting was , , and .
The IBLT baseline used the same eight variables after quantile binning, consistent with the standard IBLT format using symbolic attributes before partial matching. Validation selected 10 bins per attribute, , and . The sliding window baseline used the 500 most recent observations with . Table 8 reports all methods on the same held-out stream.
Table 8 Online prediction on the Electricity Market stream with memory parameters selected by validation
| Method | Acc. | Macro F1 | Final-Q Acc. | Low Support | Memory/Update Rule |
|---|---|---|---|---|---|
| Online logistic | 86.0% | 0.856 | 84.8% | Not used | Online coefficient update |
| Sliding window kNN | 79.7% | 0.789 | 82.8% | Not used | 500 recent cases, |
| IBLT binned | 80.6% | 0.791 | 83.9% | 0.0% | 5,000 binned cases |
| AIBL vector | 87.7% | 0.873 | 89.4% | 0.0% | 5,000 vector cases, |
Final quarter accuracy is computed over the last 25% of the held out stream. Low support rate is the fraction of held out observations for which the maximum support fell below the retrieval threshold selected by validation.
AIBL achieved the highest overall accuracy, macro F1, and final quarter accuracy. Relative to IBLT with quantile bins, it improved accuracy by 7.1 percentage points and macro F1 by 8.2 points. This comparison isolates the representation effect. Both methods use the same ordered observations and the same memory size, but IBLT depends on discretized attributes while AIBL compares continuous state vectors directly. The result also shows that local retrieval and activation decay are important for this stream. AIBL outperformed the sliding window kNN baseline because it used both vector similarity and case values weighted by decay, rather than a fixed recency window alone.
5.6 Sequential Recommendation on MovieLens
The fifth experiment evaluates whether AIBL can use learned user and item representations for sequential recommendation. MovieLens 100K (Harper and Konstan 2015) contains 100,000 ratings from 943 users on 1,682 movies. We sorted the ratings by timestamp and treated each rating as one decision point. The target was one when the user rated the movie at least four stars and zero otherwise.
The first 70,000 ratings trained the matrix factorization representation. The next 10,000 ratings were used only for validation, and the final 20,000 ratings were used for evaluation. AIBL stored one experience for each observed user and movie rating. The vector representing a user–movie pair was created by concatenating the normalized 32-dimensional user and movie factor vectors and one additional coordinate to store the standardized matrix factorization score. This produced a 65-dimensional key for similarity search. After each prediction, the observed binary outcome was added to memory.
The symbolic IBLT baseline used the same temporal protocol but represented each case with user demographics and movie genre indicators. This comparison separates the effect of vector space similarity among users and items from the sequential memory rule. The AIBL parameters were selected on the validation segment. The best validation region used 50 to 100 neighbors, decay between 0.25 and 0.5, and a decision threshold between 0.40 and 0.45. The selected evaluation model used , decay , and decision threshold 0.40.
Table 9 MovieLens 100K recommendation results under temporal validation and evaluation.
| Method | Accuracy | Precision | Recall | F1 | Retrieval basis |
|---|---|---|---|---|---|
| Popularity baseline | 65.0% | 64.3% | 85.4% | 0.734 | Item positive rate |
| Item kNN collaborative filtering | 67.5% | 65.7% | 88.8% | 0.755 | User history and item similarity |
| Matrix factorization | 63.3% | 61.9% | 91.3% | 0.738 | Direct score threshold |
| IBLT symbolic support | 62.2% | 60.8% | 93.2% | 0.736 | Demographics and genre indicators |
| AIBL matrix factor support | 67.4% | 65.0% | 92.1% | 0.762 | Vector memory over factor keys |
All metrics are computed on the final 20,000 ratings ordered by timestamp. AIBL used normalized user and movie factors, the standardized matrix factorization score, a memory size of 10,000 cases, and memory parameters selected by validation.
AIBL obtained the highest F1 score and nearly matched the highest accuracy. Relative to symbolic IBLT, it improved accuracy by 5.2 percentage points and F1 by 2.6 points. Relative to direct matrix factorization, it improved accuracy by 4.2 points and F1 by 2.4 points. The gain comes from using learned user and item vectors as retrieval keys and updating the case memory through the held out stream.
The support threshold did not provide a useful cold-start signal in this split. The temporal warmup contains 80,000 ratings before evaluation, so most evaluation pairs have substantial historical support. The result should therefore be interpreted as evidence for sequential recommendation indexed by vectors, not as evidence for cold start detection on MovieLens.
5.7 Controlled Novelty Simulations
Experiments 6–8 isolate memory control behavior in sequential choice tasks. The simulations are not intended as fits to human data. They test algorithm performance in simulated sequential decision tasks where a new option appears, an outcome distribution changes, or the relevant decision rule changes without warning. Each experiment used
100 simulated agents and 5 random seeds. Standard IBLT with one memory tier was compared with full AIBL and four ablated AIBL variants.
The Novelty Phases task has four stages. It starts with two options and that have different probabilistic payoffs in the Standard phase. It introduces a third high-value option with the Novelty phase, changes the outcome distribution for option A in the Shift phase, and then returns to the original distribution in the Recovery phase. This design separates ordinary repeated choice from the specific case in which an option with low support recurs enough times to become useful.
Table 10 Novelty Phases simulation with prediction accuracy by phase.
| Model | Standard | Novelty | Shift | Recovery |
|---|---|---|---|---|
| IBLT (Standard) | 0.630±0.001 | 0.844±0.001 | 0.650±0.002 | 0.638±0.003 |
| AIBL (Full) | 0.630±0.001 | 0.753±0.001 | 0.649±0.002 | 0.638±0.003 |
| AIBL (No Graduation) | 0.629±0.001 | 0.072±0.001 | 0.645±0.001 | 0.637±0.003 |
| AIBL (No Surprise) | 0.630±0.001 | 0.844±0.001 | 0.649±0.002 | 0.638±0.003 |
| AIBL (No Decay) | 0.630±0.001 | 0.753±0.001 | 0.626±0.003 | 0.639±0.003 |
| AIBL (No Cold Start) | 0.609±0.002 | 0.753±0.001 | 0.650±0.002 | 0.638±0.002 |
The Standard phase has two options. The Novelty phase introduces option C. The Shift phase changes the outcome distribution for option A. The Recovery phase restores the original distribution.
Table 10 shows that the graduation rule is necessary when surprise memory withholds newly observed options from ordinary retrieval. Full AIBL reaches accuracy in the Novelty phase, while the variant without graduation falls to . Removing surprise memory makes the model behave like standard IBLT in this task because all observations are immediately available for retrieval. That setting avoids the failure caused by removing graduation, but it also removes the separate memory state for observations with low support.
The Dynamic Bandits task tests a more direct form of change in the option set. It begins with three arms, , , and , adds arm , removes arm while adding arm , and then continues with the remaining four arms. The new arms have higher expected reward than at least some existing arms, so performance depends on whether recurring new options can become available to the retrieval and blending rule.
The Dynamic Bandits results show the same mechanism as the Novelty Phases task. Removing graduation reduces accuracy from to when arm D appears and keeps performance low after the later arm change. Full AIBL remains below standard IBLT in the phase where arm D first appears because it initially withholds low-support observations from ordinary retrieval until recurrence criteria are met. The delay is the cost of separating those cases from ordinary retrieval. Once that design choice is made, graduation is required for repeated new options to affect later choices. Removing cold start storage has a smaller and more localized effect. It lowers initial phase bandit accuracy from to and standard phase accuracy in Novelty Phases from to .
Table 11 Dynamic Bandits simulation with prediction accuracy by phase.
| Model | Initial | Arm D Appears | Arms Change | Stable |
|---|---|---|---|---|
| IBLT (Standard) | ||||
| AIBL (Full) | ||||
| AIBL (No Graduation) | ||||
| AIBL (No Surprise) | ||||
| AIBL (No Decay) | ||||
| AIBL (No Cold Start) |
The Initial phase has three arms. The second phase adds arm D. The third phase removes arm B and adds arm E. The Stable phase keeps the remaining four arms.
The last experiment used the Wisconsin Card Sorting Task (WCST). The WCST is a standard task for studying flexible decision making and rule learning in humans (Nyhus and Barceló 2009). It uses four multidimensional response options and changes the sorting rule between the color, shape, and number attributes. Correct performance depends on inferring which attribute is currently relevant. This task tests a different limitation of AIBL. The implementation stores action outcomes but does not infer an explicit hidden rule. Instance similarity alone is therefore not sufficient to identify the correct options, and all variants remain close to chance accuracy, as shown in Table 12. This boundary case shows that tiered memory alone is not sufficient to solve latent rule inference.
Table 12 Wisconsin Card Sorting simulation with rule changes and prediction accuracy by phase.
| Model | Overall | Pre shift | Post shift |
|---|---|---|---|
| IBLT (Standard) | |||
| AIBL (Full) | |||
| AIBL (No Graduation) | |||
| AIBL (No Surprise) | |||
| AIBL (No Decay) | |||
| AIBL (No Cold Start) |
The task has four response options. Chance accuracy is 0.25. Pre shift and post shift refer to trials outside and inside the early period after an unannounced rule change.
5.8 Parameter and Mechanism Sensitivity
The previous subsections report held out performance for the selected AIBL configurations. The remaining question is how those results depend on the parameters and memory rules rather than on a single setting. We therefore summarize the validation sweeps used to choose each task configuration and the mechanism ablations used in the controlled simulations. This analysis is not a separate benchmark. It identifies which parameters control the relevant behavior in each task.
Table 13 Task specific AIBL parameter sensitivity from validation sweeps and controlled simulations.
| Evaluation | Selection measure | Best setting or nearby region | Supported interpretation |
|---|---|---|---|
| 20 Newsgroups | Accuracy and macro F1 | , decay 0.10 | Fixed reproduced setting. Accuracy 60.3% and macro F1 0.573 |
| Mushroom reward learning | Optimal action rate | , decay 0 to 0.30, | High similarity is best when small attribute changes alter reward |
| Credit card fraud | Validation F1 | to 0.89 | The novelty threshold sets the precision and recall tradeoff |
| Electricity drift | Validation macro F1 | to 10, to 0.98, decay 0.50 to 0.75 | Moderate decay emphasizes recent local cases |
| MovieLens recommendation | Validation F1 | to 250, decay 0.25 to 0.50, value threshold 0.35 to 0.45 | Broad neighborhoods help after the factor representation is fixed |
| Controlled simulations | Accuracy by phase | Graduation enabled | Promotion is needed for recurring options with low support |
The table is derived from the task specific validation sweeps and the controlled simulation summaries. Regions near the best values use validation metrics, while the reported test tables in the preceding subsections use held out evaluation data.
Table 13 reports regions near the best values from the reproduced experiment outputs. A configuration is included in the region when its validation score is within 0.5 percentage points of the best score, except for fraud where the region is defined by validation F1 within 0.02 of the best value. Text classification is listed with its reproduced setting because the current text script evaluates one fixed parameter choice.
The table shows that no single threshold regime is uniformly best. In the Mushroom experiment, the best settings use a high retrieval threshold because nearby but distinct categorical patterns can imply different rewards. In the Electricity stream, performance is strongest when a small neighborhood is combined with moderate decay, which gives more weight to recent local cases. In MovieLens, the best F1 values occur over larger neighborhoods because the matrix factorization representation already places related user and item pairs near one another. In fraud detection, the novelty threshold is the controlling parameter because the prediction itself is whether a transaction has weak support under the normal memory representation.
The controlled simulations clarify the role of graduation. In tasks where surprise memory withholds observations with low support, repeated observations must eventually enter active memory if they are to affect choices. Without graduation, Novelty Phases accuracy drops from to during the novelty phase, and Dynamic Bandits accuracy drops from to when arm D appears. The WCST simulation is different. All variants remain near chance because the model stores action outcomes but does not infer the hidden sorting rule.
The dataset experiments put these sensitivity results in context. AIBL outperforms the symbolic IBLT baseline on the primary metric in each dataset comparison. The gains are 6.8 percentage points in text accuracy, 8.7 points in Mushroom optimal action rate, 34.3 points in fraud F1, 7.1 points in Electricity accuracy, and 2.6 points in MovieLens F1. Because these comparisons use the same task streams as the corresponding IBLT baselines, the differences reflect vector retrieval and memory state handling rather than a change in the evaluation protocol.
The same results also define the limits of the claim. AIBL does not dominate every task specific method. Sentence-BERT k-NN is slightly more accurate on 20 Newsgroups, LinUCB is best on Mushroom, and item kNN has the highest MovieLens accuracy. The contribution shown here is narrower. AIBL provides an instance memory rule that can use learned vector representations while retaining case storage, activation weighting, novelty routing, and online memory updates.
6 Discussion
AIBL is an algorithmic extension of IBLT for settings where symbolic task variables are unavailable, lossy, or too rigid for retrieval. It keeps the central instance-based operations. Experiences are stored as cases, retrieval depends on similarity and activation, and observed outcomes update later choice. The main change is that the situation component of an instance is represented by a vector produced by an encoder. Similarity is therefore determined by the encoder, metric, and retrieval threshold rather than by a hand-specified partial matching function.
This representation change also changes how atypical inputs are handled. In standard IBLT, every query is compared against the available symbolic cases and blended from the retrieved set. In AIBL, weak support can change the memory update itself. The support score is:
When this score is below , the observation is routed to surprise memory rather than treated as an ordinary retrieved case. Graduation then determines whether repeated observations with low support become active evidence. This explains the results from the controlled simulations. Without graduation, recurring new options remain outside active memory and cannot guide later choices. With graduation, they can enter the same retrieval and blending rule as other stored experiences. Decay serves a different role. It reduces the influence of older cases when recent outcomes are more reliable, as in streams with changing distributions.
The results also show where the model should not be overinterpreted. AIBL does not infer hidden task rules from feedback. The WCST simulation remains near chance because the implementation stores action outcomes but does not learn an explicit latent sorting rule. AIBL also does not replace specialized task models. On some datasets, a task-specific baseline achieves the best single metric. The evidence supports a narrower conclusion. Instance memory indexed by vectors can improve over symbolic IBLT on the tested streams while adding explicit rules for weak support, promotion, decay, and case retention.
AIBL decisions can be traced to retrieved instances, their similarities, activations, and stored outcomes. This gives a case-based account of the decision rule, but it does not by itself establish a causal explanation. The same quantities can support audit logs and error analysis. For example, a flagged transaction can be inspected through its nearest stored normal transactions and its maximum similarity score.
6.1 Limitations
Retrieval complexity scales linearly with memory size per query) under exact search. For memories above instances, approximate nearest neighbor indices such as FAISS or ScaNN would be needed. Performance also depends on encoder quality. If the encoder places dissimilar cases near one another or separates cases that should be compared, AIBL inherits that error through its retrieval rule.
The current implementation learns values for individual actions but not action sequences or temporal credit assignment. Parameter tuning requires validation data, which may not always be available in deployment. The sensitivity analysis is also not a full factorial ablation over all parameters and tasks. It summarizes the validation sweeps used by the reproduced experiments and the mechanism ablations used in the controlled simulations.
7 Conclusion and Open Problems
This paper introduced AIBL, an extension of instance-based learning that uses embeddings for sequential settings with high-dimensional observations. The model preserves the case-based structure of IBLT. Experiences are stored as instances containing a situation, a decision, and a utility value. They are retrieved by similarity and activation and updated after feedback. The representation of the situation is moved into a learned vector space, which allows the same memory rule to operate on text, tabular records, transaction vectors, and user and item representations.
The second part of the model is a memory policy for weak support. AIBL does not force every query with low similarity into ordinary blending. It routes weakly supported observations to surprise memory, keeps inactive cases in forgotten memory, and promotes recurring surprise cases into active memory when the recurrence threshold is met. These rules make novelty handling part of the same storage and retrieval process used for prediction.
The experiments support two main conclusions. Retrieval indexed by vectors improves over symbolic IBLT on the tested dataset streams when the symbolic representation is obtained from hand coded or binned attributes. The controlled simulations show why the additional memory rules matter. Surprise memory separates weakly supported cases from ordinary retrieval, but graduation is required when recurring new cases should later influence decisions. The WCST simulation also identifies a boundary of the approach, since tiered memory does not by itself infer hidden task rules.
Several technical problems remain open. Large memories require sublinear retrieval methods without changing the semantics of activation and blending. Thresholds for retrieval, novelty routing, and graduation should be selected by methods that reduce dependence on held out validation data. The bandit setting needs regret analysis under memory decay, surprise routing, and partial feedback. Novelty, drift, and cold-start signals should also be evaluated directly with detection metrics and abstention or exploration policies.
Code and Data Availability
The implementation, experimental code, and ablation scripts will be released upon publication. The experiments use public datasets including 20 Newsgroups, UCI Mushroom, Credit Card Fraud, Electricity Market, and MovieLens 100K.
Acknowledgments
This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA). The views, opinions, and/or findings expressed are those of the authors and should not be interpreted as representing the official views or policies of DARPA or the U.S. Government. Distribution Statement "A" (Approved for Public Release, Distribution Unlimited)".
References
Anderson JR (2007) How Can the Human Mind Occur in the Physical Universe? Oxford University Press, New York
Blundell C, Uria B, Pritzel A, et al (2016) Model-free episodic control. arXiv preprint arXiv:160604460
Breunig MM, Kriegel HP, Ng RT, et al (2000) LOF: Identifying density-based local outliers. Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data pp 93–104
Chandola V, Banerjee A, Kumar V (2009) Anomaly detection: A survey. ACM Computing Surveys 41(3):1–58
Chapelle O, Li L (2011) An empirical evaluation of Thompson sampling. In: Advances in Neural Information Processing Systems, pp 2249–2257
Dal Pozzolo A, Le Borgne YA, Bontempi G, et al (2014) Learned lessons in credit card fraud detection from a practitioner perspective. Expert Systems with Applications 41(10):4915–4928
Devlin J, Chang MW, Lee K, et al (2019) BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics, pp 4171–4186
Dua D, Graff C (2019) UCI machine learning repository. University of California, Irvine, School of Information and Computer Sciences, URL https://archive.ics.uci.edu/ml
Dutt V, Ahn YS, Gonzalez C (2013) Cyber situation awareness: Modeling detection of cyber attacks with instance-based learning theory. Human Factors 55(3):605–618
Gershman SJ, Daw ND (2017) Reinforcement learning and episodic memory in humans and animals: An integrative framework. Annual Review of Psychology 68:101–128
Gonzalez C, Dutt V (2011) Instance-based learning: Integrating sampling and repeated decisions from experience. Psychological Review 118(4):523–551
Gonzalez C, Lerch FJ, Lebiere C (2003) Instance-based learning in dynamic decision making. Cognitive Science 27(4):591–635
Graves A, Wayne G, Danihelka I (2014) Neural Turing machines. arXiv preprint arXiv:1410.5401
Harper FM, Konstan JA (2015) The MovieLens datasets: History and context. ACM Transactions on Interactive Intelligent Systems 5(4):Article 19. https://doi.org/10.1145/2827872
Harries M (1999) SPLICE-2 comparative evaluation: Electricity pricing. Tech. rep., University of New South Wales, School of Computer Science and Engineering
Khandelwal U, Levy O, Jurafsky D, et al (2020) Generalization through memorization: Nearest neighbor language models. In: International Conference on Learning Representations
Kolodner JL (1992) An introduction to case-based reasoning. Artificial Intelligence Review 6(1):3–34
Lebiere C, Pirolli P, Johnson M, et al (2025) Cognitive models for machine theory of mind. Topics in Cognitive Science 17(2):268–290
Lewis P, Perez E, Piktus A, et al (2020) Retrieval-augmented generation for knowledge-intensive NLP tasks. In: Advances in Neural Information Processing Systems
Li L, Chu W, Langford J, et al (2010) A contextual-bandit approach to personalized news article recommendation. In: Proceedings of the 19th International Conference on World Wide Web, pp 661–670
Liu FT, Ting KM, Zhou ZH (2008) Isolation forest. In: Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, pp 413–422
Mitsopoulos K, Baker L, Lebiere C, et al (2025) Cognitively-plausible reinforcement learning in epidemiological agent-based simulations. Frontiers in epidemiology 5:1563731
Nyhus E, Barceló F (2009) The wisconsin card sorting test and the cognitive assessment of prefrontal executive functions: A critical update. Brain and Cognition 71(3):437–451
Pritzel A, Uria B, Srinivasan S, et al (2017) Neural episodic control. In: International Conference on Machine Learning, pp 2827–2836
Reimers N, Gurevych I (2019) Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, pp 3982–3992
Sakurada M, Yairi T (2014) Anomaly detection using autoencoders with nonlinear dimensionality reduction. In: Proceedings of the MLSDA 2014 2nd Workshop on Machine Learning for Sensory Data Analysis, pp 4–11
Schölkopf B, Platt JC, Shawe-Taylor J, et al (2001) Estimating the support of a high-dimensional distribution. Neural Computation 13(7):1443–1471
Snell J, Swersky K, Zemel RS (2017) Prototypical networks for few-shot learning. In: Advances in Neural Information Processing Systems
Stocco A, Rice P, Thomson R, et al (2024) An integrated computational framework for the neurobiology of memory based on the ACT-R declarative memory system. Computational Brain & Behavior 7(1):129–149
Stocco A, Bushnell L, Poovendran R (2026) Algorithmic metacognition through fast inverse instance-based learning. In: Proceedings of the 23rd International Conference on Cognitive Modeling, in press
Thompson WR (1933) On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika 25(3/4):285–294
Welford BP (1962) Note on a method for calculating corrected sums of squares and products. Technometrics 4(3):419–420
Weston J, Chopra S, Bordes A (2015) Memory networks. In: Proceedings of the International Conference on Learning Representations
Xu T, Singh K, Rajivan P (2022) Modeling phishing decision using instance-based learning and natural language processing. Proceedings of the 55th Hawaii International Conference on System Sciences pp 1–10
Yang YC, Sibert C, Stocco A (2024) Reliance on episodic vs. procedural systems in decision-making depends on individual differences in their relative neural efficiency. Computational Brain & Behavior 7(3):420–436