Skip to content

Menu

WorksComputer Science

AIBL: Augmented Instance-Based Learning with Structured Memory and Neural Embeddings

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_muudxtey. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

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 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. 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. 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.

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) [12, 11] 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 [29, 35]), 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 [10], epidemiology [22], cybersecurity [9], phishing detection [34], teaming between humans and machines [18], and algorithmic theory of mind [30].

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. § 2 reviews instance based learning, computational memory models, memory augmented machine learning, and novelty detection. § 3 presents the AIBL model and its vector space memory representation. § 4 describes the storage, promotion, retrieval, blending, decay, and outcome update algorithms, together with their computational and storage costs. § 5 reports the experimental protocols and baseline comparisons. § 6 discusses the interpretation and limitations of the results. § 7 concludes with the main findings and open problems.

Related Work

IBLT is most easily applied when a series of experiences can be represented by structured task specific attributes chosen by the modeler. That representation is well suited to many controlled decision tasks, but it is less suitable to observations such as documents, images, transaction vectors, and user and item histories, where the relevant similarity is often learned rather than hand coded. AIBL treats the encoded observation itself as the situation representation and performs retrieval in embedding space. This connects the model to memory augmented learning and anomaly detection, because low similarity to stored cases is both a retrieval condition and a signal that the input should be handled outside ordinary blending.

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 [1], 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 Ai(t)A_i(t) of instance ii at time tt is computed as follows:

Ai(t)=ln⁡(∑j=1n(t−tj)−δ)+σ⋅N(0,1)(1)A_i(t) = \ln\left(\sum_{j=1}^{n}(t-t_j)^{-\delta}\right) + \sigma\cdot\mathcal{N}(0,1) \tag*{(1)}

The sum ranges over all access times tjt_j, δ\delta controls power law decay, and σ\sigma 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.

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 [1], 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 [13] and Memory Networks [33] 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 [2] and Neural Episodic Control [24] 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 [19] 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 [28] and kNN-LM [16]. 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 [17] 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.

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 [4]. Classical approaches include one class support vector machines [27], which learn a boundary around the training data, and isolation forests [21], which identify anomalies as points that are easy to isolate through random partitioning. Autoencoder reconstruction error is also widely used as an anomaly signal [26]. 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.

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 § 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.

ComponentDefinition
StateEmbedding e∈Rd\mathbf{e} \in\mathbb{R}^{d} from encoder. Typical dimensions include d∈{64,384,768,1536}d \in\{64, 384, 768, 1536\}
ActionDiscrete choice a∈Aa \in\mathcal{A} or memory operation such as store, retrieve, graduate, or forget
UtilityScalar outcome o∈Ro \in\mathbb{R} observed after action and used for instance updates
Similaritysim⁡(e1,e2)=e1Te2∥e1∥2⋅∥e2∥2∈[−1,1]\operatorname{sim}(e_1,e_2)=\frac{e_1^{\mathsf{T}}e_2}{\lVert e_1\rVert_2\cdot\lVert e_2\rVert_2}\in[-1,1]
Thresholdsθs∈[0.5,0.9]\theta_s \in[0.5,0.9] for retrieval, θn∈[0.3,0.6]\theta_n \in[0.3,0.6] for novelty, and θd∈[0.9,0.99]\theta_d \in[0.9,0.99] for duplicate handling

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.

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 I\mathcal{I} is a tuple (e,a,o,τ,t,μ,M2,n,c)(e,a,o,\tau,t,\mu,M_2,n,c). The vector e∈Rd\mathbf{e} \in\mathbb{R}^{d} is the encoded observation. The variable a∈A∪{∅}a \in\mathcal{A}\cup\{\varnothing\} is the decision variable. It is an action in sequential decision tasks and a class label in supervised tasks. The null value ∅\varnothing is allowed when an instance has no assigned action or label. The scalar o∈Ro \in\mathbb{R} is the most recent observed outcome. The tier variable τ∈{A,F,S}\tau\in\{A,F,S\} records whether the instance belongs to active, forgotten, or surprise memory. The vector of access times t=[t1,…,tk]\mathbf{t}=[t_1,\ldots,t_k] records retrieval events. The statistics μ\mu, M2M_2, and nn maintain the running mean and variance of observed outcomes. The counter cc records matches used for promotion from surprise memory.

Definition 2 (Memory System). A memory system M\mathcal{M} is a tuple (MA,MF,MS,Θ)(\mathcal{M}_{A},\mathcal{M}_{F},\mathcal{M}_{S},\Theta). The sets MA\mathcal{M}_{A}, MF\mathcal{M}_{F}, and MS\mathcal{M}_{S} contain active, forgotten, and surprise instances. The parameter configuration Θ\Theta contains the thresholds and counts that govern retrieval, storage, forgetting, and promotion.

Definition 3 (Cosine Similarity). For embeddings e1,e2∈Rd\mathbf{e}_1,\mathbf{e}_2 \in\mathbb{R}^{d}, AIBL computes similarity by the cosine rule

sim⁡(e1,e2)=e1Te2∥e1∥2⋅∥e2∥2(2)\operatorname{sim}(\mathbf{e}_1,\mathbf{e}_2)=\frac{\mathbf{e}_1^{\mathsf{T}}\mathbf{e}_2}{\lVert\mathbf{e}_1\rVert_2\cdot\lVert\mathbf{e}_2\rVert_2} \tag*{(2)}

where e1Te2\mathbf{e}_1^{\mathsf{T}}\mathbf{e}_2 is the inner product and ∥⋅∥2\lVert\cdot\rVert_2 is the Euclidean norm. The value lies in [−1,1][-1, 1], 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 eq\mathbf{e}_q and a stored embedding ei\mathbf{e}_i, the general AIBL retrieval score can include an additive similarity contribution. The effective activation of instance ii at time tt is

A~i(eq,t)=Ai(t)+β⋅sim⁡(eq,ei)(3)\widetilde{A}_i(\mathbf{e}_q,t) = A_i(t) + \beta\cdot\operatorname{sim}(\mathbf{e}_q,\mathbf{e}_i) \tag*{(3)}

where Ai(t)A_i(t) is the base level activation, sim⁡(eq,ei)\operatorname{sim}(\mathbf{e}_q,\mathbf{e}_i) is cosine similarity, and β≥0\beta\ge0 controls the similarity contribution. The case β=0\beta= 0 gives purely temporal activation.

The original IBLT formulation [12] 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 [1]. 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 ii determines its contribution to the blended value.

wi(eq,t)=exp⁡(A~i(eq,t))⋅1[sim⁡(eq,ei)≥θs](4)w_i(\mathbf{e}_q,t) = \exp\left(\widetilde{A}_i(\mathbf{e}_q,t)\right) \cdot\mathbf{1}\left[\operatorname{sim}(\mathbf{e}_q,\mathbf{e}_i) \ge\theta_s\right] \tag*{(4)}

where the indicator function 1[⋅]\mathbf{1}[\cdot] enforces the similarity threshold θs\theta_s. 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 si≥θss_i \ge\theta_s. The blending rule then assigns each retained instance the weight wi=exp⁡(Ai)⋅siw_i = \exp(A_i) \cdot s_i. This is the default case β=0\beta= 0, with similarity entering linearly during blending.

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 θn\theta_n. 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 θn\theta_n, that instance’s counter is incremented. The instance is promoted to active memory when its counter reaches the graduation parameter NgN_g. § 4 gives the corresponding algorithm.

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 § 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.

ParameterDefaultRole in AIBL
dd768Representation dimension supplied by the encoder
δ\delta0.5Power law exponent in the activation decay term
θs\theta_s0.7Minimum similarity required for active memory retrieval
θn\theta_n0.3Similarity threshold for routing inputs with low support to surprise memory
θd\theta_d0.95Same action similarity threshold for duplicate updates
θf\theta_f-2.0Activation cutoff for moving active instances to forgotten memory
NcN_c5Number of initial instances stored directly in active memory
NgN_g2Number of later matches required to promote a surprise instance
σo\sigma_o2.0Outcome deviation cutoff, in standard deviations, for creating a separate nearby instance

Table 2.

The embedding dimension dd 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 ([7, 25]). Exact similarity search scales linearly in dd for each candidate instance. The decay exponent δ\delta controls how rapidly activation decreases as access times recede. The default value δ=0.5\delta= 0.5 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 θs\theta_s determines which stored instances are eligible for blended value computation. Raising θs\theta_s requires closer matches, while lowering it admits more distant cases. The novelty threshold θn\theta_n 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 θd\theta_d identifies instances with the same action that are close/similar enough to update rather than duplicate. The forgetting threshold θf\theta_f moves active instances to forgotten memory when their activation becomes sufficiently low.

The remaining parameters control early storage (NcN_c), recurrence in surprise memory (NgN_g), and outcome variation for nearby instances (σo\sigma_o). The first NcN_c instances enter active memory without novelty checks. This prevents an empty memory from classifying every initial input as new. The graduation parameter NgN_g specifies how many later matches a surprise instance must receive before promotion. The outcome deviation parameter σo\sigma_o 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.

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 NcN_c. If fewer than NcN_c 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 θd\theta_d, the matched instance is updated unless the observed outcome deviates from that instance’s running outcome history by more than σo\sigma_o 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 θn\theta_n, 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 Ai(t)<θfA_i(t) < \theta_f. Forgotten instances return to active memory when later retrieved with similarity above θs\theta_s. Surprise instances are compared with later incoming embeddings. A match with similarity at least θn\theta_n increments the surprise instance’s counter. The instance is promoted when the counter reaches NgN_g. The reported experiments use θn\theta_n for both routing into surprise memory and matching against surprise memory.

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.

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\mathbf{e}, action aa, outcome oo

Ensure: Stored or updated instance

  1. Increment global time t←t+1t \leftarrow t + 1

  2. if total instance count <Nc< N_c then

  3. &nbsp;&nbsp;Create instance (e,a,o)(\mathbf{e}, a, o) in MA\mathcal{M}_A

  4. &nbsp;&nbsp;return created instance

  5. end if

  6. Da←{I∈MA∣aI=a}\mathcal{D}_a \leftarrow\{\mathcal{I} \in\mathcal{M}_A \mid a_{\mathcal{I}} = a\}

  7. if Da\mathcal{D}_a is not empty then

  8. &nbsp;&nbsp;I∗←arg⁡max⁡I∈Dasim⁡(e,eI)\mathcal{I}^{*} \leftarrow\arg\max_{\mathcal{I} \in\mathcal{D}_a} \operatorname{sim}(\mathbf{e}, \mathbf{e}_{\mathcal{I}})

  9. &nbsp;&nbsp;sd←sim⁡(e,eI∗)s_d \leftarrow\operatorname{sim}(\mathbf{e}, \mathbf{e}_{\mathcal{I}^{*}})

  10. &nbsp;&nbsp;if sd≥θds_d \ge\theta_d then

  11. &nbsp;&nbsp;&nbsp;&nbsp;if OutcomeDeviation⁡(I∗,o,σo,ϵ)\operatorname{OutcomeDeviation}(\mathcal{I}^{*}, o, \sigma_o, \epsilon) then

  12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Proceed to create a distinct instance

  13. &nbsp;&nbsp;&nbsp;&nbsp;else

  14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update I∗\mathcal{I}^{*} with outcome oo and access time tt

  15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return I∗\mathcal{I}^{*}

  16. &nbsp;&nbsp;&nbsp;&nbsp;end if

  17. &nbsp;&nbsp;end if

  18. end if

  19. Compute smax⁡←max⁡I∈MA∪MF∪MSsim⁡(e,eI)s_{\max} \leftarrow\max_{\mathcal{I} \in\mathcal{M}_A \cup\mathcal{M}_F \cup\mathcal{M}_S} \operatorname{sim}(\mathbf{e}, \mathbf{e}_{\mathcal{I}})

  20. if smax⁡<θns_{\max} < \theta_n and action aa does not exist in MA\mathcal{M}_A then

  21. &nbsp;&nbsp;Create instance (e,a,o)(\mathbf{e}, a, o) in MS\mathcal{M}_S

  22. else

  23. &nbsp;&nbsp;Create instance (e,a,o)(\mathbf{e}, a, o) in MA\mathcal{M}_A

  24. end if

  25. Compare e\mathbf{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 θd\theta_d 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 σo\sigma_o 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 smax⁡s_{\max} over stored memory. If support is below θn\theta_n, 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 dd denote the embedding dimension, and let nAn_A, nFn_F, and nSn_S denote the numbers of active, forgotten, and surprise instances, respectively. Let nA,an_{A,a} denote the number of active instances with action aa. With exact search, duplicate handling costs O(nA,ad)O(n_{A,a}d). The support search costs O((nA+nF+nS)d)O((n_A+n_F+n_S)d) 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 O(d)O(d) when access histories are capped.

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 θn\theta_n until its counter reaches NgN_g. 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 nSn_S denote the number of surprise instances before promotion is evaluated. With exact search, Algorithm 2 costs O(nSd)O(n_Sd) for each incoming embedding. Counter updates and tier changes take constant time after the matching instances have been found. The threshold θn\theta_n determines how close a later embedding must be to count as recurrence, and NgN_g 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 nSn_S denote the number of surprise instances before promotion is evaluated. With exact search, Algorithm 2 costs O(nSd)O(n_Sd) for each incoming embedding. Counter updates and tier changes take constant time after the matching instances have been found. The threshold θn\theta_n determines how close a later embedding must be to count as recurrence, and NgN_g 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.

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 mam_a denote the number of active and forgotten instances that pass the optional action filter, and let rr denote the number of retained matches. Exact retrieval costs O(mad)O(m_a d). Selecting the top kk matches costs O(rlog⁡k)O(r \log k) with a bounded heap, or O(rlog⁡r)O(r \log r) 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 exp⁡(Ai)⋅si\exp(A_i) \cdot s_i. Recency and frequency enter through activation, while representational closeness enters through similarity.

Algorithm 3 AIBL Retrieval

Require: Query embedding eqe_q, optional action filter aa, similarity threshold θs\theta_s, top-kk limit kk

Ensure: Up to kk retained pairs of instances and similarities

  1. C←∅C \leftarrow\emptyset

  2. for all I∈MA∪MF\mathcal{I} \in\mathcal{M}_A \cup\mathcal{M}_F do

  3. &nbsp;&nbsp;&nbsp;&nbsp;if aa is specified and aI≠aa_{\mathcal{I}} \ne a then

  4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue

  5. &nbsp;&nbsp;&nbsp;&nbsp;end if

  6. &nbsp;&nbsp;&nbsp;&nbsp;s←sim⁡(eq,eI)s \leftarrow\operatorname{sim}(e_q,e_{\mathcal{I}})

  7. &nbsp;&nbsp;&nbsp;&nbsp;if s≥θss \ge\theta_s then

  8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add (I,s)(\mathcal{I},s) to CC

  9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if I∈MF\mathcal{I} \in\mathcal{M}_F then

  10. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move I\mathcal{I} to MA\mathcal{M}_A

  11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set τI←A\tau_{\mathcal{I}} \leftarrow A

  12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update access time of I\mathcal{I} to tt

  13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if

  14. &nbsp;&nbsp;&nbsp;&nbsp;end if

  15. end for

  16. return Up to kk elements of CC with largest similarity

Let mam_a denote the number of active and forgotten instances that pass the optional action filter, and let rr denote the number of retained matches. Exact retrieval costs O(mad)O(m_a d). Selecting the top kk matches costs O(rlog⁡k)O(r \log k) with a bounded heap, or O(rlog⁡r)O(r \log r) 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 exp⁡(Ai)⋅si\exp(A_i) \cdot s_i. Recency and frequency enter through activation, while representational closeness enters through similarity.

For a query embedding eqe_q and target action aa, retrieval returns at most kk instances with matching action and similarity at least θs\theta_s. The blended value is the average of their observed outcomes, weighted by activation and similarity.

Va=∑i∈matchesexp⁡(Ai)⋅si⋅oi∑i∈matchesexp⁡(Ai)⋅si(5)V_a = \frac{\sum_{i \in\mathrm{matches}} \exp(A_i) \cdot s_i \cdot o_i}{\sum_{i \in\mathrm{matches}} \exp(A_i) \cdot s_i} \tag*{(5)}

where si=sim⁡(eq,ei)s_i = \operatorname{sim}(e_q,e_i) and oio_i is the stored outcome. In reward learning, oi∈{0,1}o_i \in\{0,1\} indicates whether reward was received. In classification, oi=1o_i = 1 for the correct class and oi=0o_i = 0 otherwise.

For a candidate action set A\mathcal{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 eqe_q, action aa, similarity threshold θs\theta_s, top-kk limit kk, noise σ\sigma

Ensure: Blended expected value VaV_a

  1. matches ←\leftarrow Retrieve(eqe_q, aa, θs\theta_s, kk)

  2. if matches is empty then

  3. return default_utility

  4. end if

  5. weighted_sum ←0\leftarrow0

  6. total_weight ←0\leftarrow0

  7. for all (Ii,si)∈(\mathcal{I}_i, s_i) \in matches do

  8. Ai←A_i \leftarrow activation of Ii\mathcal{I}_i using Equation (1)

  9. Ai←Ai+σ⋅N(0,1)A_i \leftarrow A_i + \sigma\cdot\mathcal{N}(0, 1) {Add noise}

  10. wi←exp⁡(Ai)⋅siw_i \leftarrow\exp(A_i) \cdot s_i

  11. weighted_sum ←\leftarrow weighted_sum +wi⋅oi+ w_i \cdot o_i

  12. total_weight ←\leftarrow total_weight +wi+ w_i

  13. end for

  14. return weighted_sum / total_weight

P(a∣eq)=exp⁡(Va/T)∑a′∈Aexp⁡(Va′/T)(6)P(a \mid e_q) = \frac{\exp(V_a/T)}{\sum_{a' \in A} \exp(V_{a'}/T)} \tag*{(6)}

where T>0T > 0 controls exploration. As T→0T \to0, selection becomes greedy. As T→∞T \to\infty, selection approaches uniform random choice. The experiments use fixed values of TT for each task.

Blending costs O(k)O(k) after retrieval because at most kk retained instances contribute to each action value. For a candidate action set AA, computing all blended values costs O(∣A∣k)O(\lvert A\rvert k) 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 θf\theta_f into forgotten memory. Optional capacity limits then remove excess instances from each tier.

Let nAn_A denote the number of active instances before decay is evaluated. Decay evaluation costs O(nA)O(n_A). Capacity enforcement can be implemented by sorting or by partial selection, depending on how many instances exceed the tier limit.

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 θd\theta_d.

For a matched instance, the stored outcomes define a local outcome history. The new outcome onewo_{\mathrm{new}} is compared with that history before the instance is updated. When at least two prior outcomes are available and the variance is not numerically zero, the comparison uses the z-score

z=∣onew−μ∣σ(7)z = \frac{\lvert o_{\mathrm{new}} - \mu\rvert}{\sigma} \tag*{(7)}

where μ\mu and σ\sigma are the running mean and standard deviation for the matched instance. If z>σoz > \sigma_o, the candidate duplicate is stored as a separate instance. If z≤σoz \le\sigma_o, the matched instance is updated.

Algorithm 5 AIBL Memory Maintenance
Require: Forgetting threshold $\theta_f$, capacity limits $C_A$, $C_F$, $C_S$
Ensure: Updated active, forgotten, and surprise memories
1: for all $\mathcal{I} \in \mathcal{M}_A$ do
2:     $A_{\mathcal{I}} \leftarrow$ activation using {xref}`Equation 1`
3:     if $A_{\mathcal{I}} < \theta_f$ then
4:         Move $\mathcal{I}$ from $\mathcal{M}_A$ to $\mathcal{M}_F$
5:         Set $\tau_{\mathcal{I}} \leftarrow F$
6:     end if
7: end for
8: If $\lvert\mathcal{M}_A\rvert > C_A$, remove active instances with lowest activation until $\lvert\mathcal{M}_A\rvert = C_A$
9: If $\lvert\mathcal{M}_F\rvert > C_F$, remove oldest forgotten instances until $\lvert\mathcal{M}_F\rvert = C_F$
10: If $\lvert\mathcal{M}_S\rvert > C_S$, remove oldest surprise instances until $\lvert\mathcal{M}_S\rvert = C_S$
Algorithm 6 AIBL Outcome Deviation Test
Require: Instance $\mathcal{I}$ with statistics $(n,\mu,M_2)$, new outcome $o_{\mathrm{new}}$, threshold $\sigma_o$, tolerance $\epsilon$
Ensure: Boolean indicating whether the new outcome should create a separate instance
1: if $n < 2$ then
2:     return false
3: end if
4: $\sigma^2 \leftarrow M_2/(n - 1)$
5: $\sigma \leftarrow \sqrt{\sigma^2}$
6: if $\sigma < \epsilon$ then
7:     return $\lvert o_{\mathrm{new}} - \mu\rvert > \epsilon$
8: end if
9: $z \leftarrow \lvert o_{\mathrm{new}} - \mu\rvert/\sigma$
10: return $z > \sigma_o$

Algorithm 6 returns false when the instance has too little outcome history to estimate variance. When the variance is below ϵ\epsilon, 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 [32]. 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\mathcal{I} with current statistics (n,μ,M2)(n,\mu,M_2), new outcome onewo_{\mathrm{new}}

Ensure: Updated statistics (n′,μ′,M2′)(n',\mu',M'_2)

  1. n′←n+1n' \leftarrow n+1

  2. δ1←onew−μ\delta_1 \leftarrow o_{\mathrm{new}}-\mu

  3. μ′←μ+δ1/n′\mu' \leftarrow\mu+\delta_1/n'

  4. δ2←onew−μ′\delta_2 \leftarrow o_{\mathrm{new}}-\mu'

  5. M2′←M2+δ1⋅δ2M'_2 \leftarrow M_2+\delta_1\cdot\delta_2

  6. return (n′,μ′,M2′)(n',\mu',M'_2)

Algorithm 7 maintains three scalar statistics for each stored instance. The count nn starts at 1 when an instance is created, the running mean μ\mu is initialized to the first outcome, and M2M_2 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 n≥2n \ge2, the sample variance is recovered as σ2=M2/(n−1)\sigma^2=M_2/(n-1). 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

I∗=arg⁡max⁡I∈MA∣aI=asim⁡(enew,eI)(8)\mathcal{I}^{*}=\arg\max_{\mathcal{I}\in\mathcal{M}_{A}\mid a_{\mathcal{I}}=a}\operatorname{sim}(\mathbf{e}_{\mathrm{new}},\mathbf{e}_{\mathcal{I}}) \tag*{(8)}

for a new experience (enew,a,onew)(\mathbf{e}_{\mathrm{new}},a,o_{\mathrm{new}}). The maximization is evaluated only when at least one active instance has action aa. If no such instance exists, duplicate handling is skipped. If the selected match satisfies sim⁡(enew,eI∗)≥θd\operatorname{sim}(\mathbf{e}_{\mathrm{new}},\mathbf{e}_{\mathcal{I}^{*}})\ge\theta_d, AIBL applies Algorithm 6 to the outcome history stored with I∗\mathcal{I}^{*}. 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.

Computational and Storage Cost

Let nAn_A, nFn_F, and nSn_S denote the numbers of active, forgotten, and surprise instances, and let dd be the embedding dimension. Brute force retrieval over active and forgotten memory costs O((nA+nF)d)O((n_A+n_F)d) per query. Duplicate detection over active instances with the same action costs O(nA,ad)O(n_{A,a}d), where nA,an_{A,a} is the number of active instances with action aa. Surprise promotion checks cost O(nSd)O(n_Sd) for each incoming embedding when promotion is evaluated against all surprise instances.

The storage cost of an instance is O(d+h)O(d+h), where hh is the number of stored access times. If access histories are capped at a fixed length, the storage cost for each instance is O(d)O(d). With tier capacity limits CAC_A, CFC_F, and CSC_S, total memory is O((CA+CF+CS)(d+h))O((C_A+C_F+C_S)(d+h)), or O((CA+CF+CS)d)O((C_A+C_F+C_S)d) under capped histories. Approximate nearest neighbor indices can reduce retrieval time for large memories without changing the tier transition rules.

SymbolDefaultDescription
nn1 (init)Count of outcomes observed for this instance
μ\muo1 (init)Running mean of observed outcomes
M2M_20 (init)Sum of squared deviations (Welford accumulator)
σ2\sigma^2derivedSample variance computed as M2/(n−1)M_2/(n-1)
σ\sigmaderivedSample standard deviation computed as σ2\sqrt{\sigma^2}
σo\sigma_o2.0Outcome deviation threshold in standard deviations
ϵ\epsilon10−810^{-8}Tolerance for near zero variance and numerical equality
zzcomputedZ score of incoming outcome

Table 3. Per instance outcome statistics for nearby duplicate handling

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.

Quantity or ruleAlgorithmic useEffect
Cosine similarityAlgorithms 1, 2, and 3Compares embeddings for duplicate handling, novelty routing, recurrence in surprise memory, and retrieval
Activation Ai(t)A_i(t) from Equation 1Algorithms 4 and 5Weights retained outcomes and determines whether an active instance moves to forgotten memory
Effective activation from Equation 3Optional variant of Algorithm 4Adds a contribution from embedding similarity when β>0\beta> 0
Retrieval weight from Equation 4Algorithms 3 and 4Applies the retrieval threshold θs\theta_s and assigns weights to retained instances
Blended value from Equation 5Algorithm 4Computes the action value from retrieved outcomes
Instance match from Equation 8Algorithm 1Finds the closest active instance with the same action for duplicate handling
Welford statistics and zz score from Equation 7Algorithms 6 and 7Tests whether a nearby duplicate should remain separate and updates outcome statistics for each instance
Counter threshold NgN_gAlgorithm 2Promotes a surprise instance after enough later matches

Table 4. Mapping from AIBL mathematical quantities to the algorithms that use them

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.

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 d=384d = 384 text vectors. Autoencoders produced d=64d = 64 vectors for the Mushroom and fraud experiments. The Electricity experiment used d=8d = 8 normalized numerical vectors. Matrix factorization produced d=65d = 65 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 NcN_c was fixed before evaluation. Similarity thresholds (θs\theta_s, θn\theta_n, θd\theta_d), decay exponent δ\delta, and temperature TT 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 91.4%±1.8%91.4\% \pm1.8\%. 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.

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 θs=0.2\theta_s = 0.2, θn=0.5\theta_n = 0.5, δ=0.1\delta= 0.1, and Nc=100N_c = 100. These lower threshold and decay values reflect the stationary nature of the classification stream, where older labeled documents remain useful evidence for category membership.

MethodAccuracyMacro F1FeaturesNovelty Det.Semantic Gen.
Naive Bayes (TF-IDF)49.2%0.470SymbolicNoNo
IBLT (TF-IDF)53.5%0.513SymbolicNoNo
k-NN (TF-IDF)46.7%0.454SymbolicNoNo
k-NN (Sentence-BERT)61.7%0.598EmbeddingsNoYes
AIBL (Sentence-BERT)60.3%0.573EmbeddingsYesYes

Table 5. Streaming text classification on cleaned 20 Newsgroups over 1,900 predictions after warmup

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 max⁡sim⁡<θn\max\operatorname{sim} < \theta_n with θn=0.5\theta_n = 0.5.

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 [8] 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 98→256→128→6498 \to256 \to128 \to64 with ReLU activations. The decoder mirrored this structure and was trained for 100 epochs using Adam with learning rate 10−310^{-3} 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 θs∈{0.4,0.6,0.8,0.9,0.95,0.98}\theta_s \in\{0.4, 0.6, 0.8, 0.9, 0.95, 0.98\}, δ∈{0.0,0.1,0.3}\delta\in\{0.0, 0.1, 0.3\}, and ϵ∈{0.02,0.05,0.10}\epsilon\in\{0.02, 0.05, 0.10\}. The selected setting was θs=0.95\theta_s = 0.95, δ=0.0\delta= 0.0, and ϵ=0.02\epsilon= 0.02. 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. [20] and linear Thompson sampling Thompson [31]; Chapelle and Li [5].

MethodOpt. ActionMean RewardRegretRepr.Rule
Linear ϵ\epsilon-greedy86.3%0.852148One hotRidge values
LinUCB97.8%0.97129One hotLinear UCB
Linear Thompson sampling96.6%0.95842One hotLinear posterior
IBLT (one hot)87.9%0.824176SymbolicSimilarity and activation
AIBL (autoencoder)96.6%0.95347VectorSimilarity and activation

Table 6. UCI Mushroom reward learning with chosen action feedback over 1,000 trials

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.

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.

Anomaly Detection on Credit Card Fraud Data

The third experiment evaluates routing through surprise memory on the Kaggle credit card fraud dataset ([6]). The dataset contains 284,807 European cardholder transactions from September 2013, including 492 frauds. The fraud rate is therefore 0.172%, 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 29 →\to 128 →\to 64 in the encoder and a mirrored decoder. It was trained for 50 epochs with Adam, learning rate 10−310^{-3}, 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 θn\theta_n. The threshold was selected on the validation split from the grid θn∈[0.70,0.95]\theta_n \in[0.70, 0.95] with step size 0.01. The selected value was θn=0.87\theta_n = 0.87.

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 ([3]).

MethodPrecisionRecallFPRF1TP/FN/FP/TNNearest Cases
AIBL support0.9750.7800.04%0.86778/22/2/4898Yes
IBLT quantile binned support0.5630.4900.78%0.52449/51/38/4862Yes
Autoencoder reconstruction0.9120.7300.14%0.81173/27/7/4893No
Isolation Forest0.5360.5200.92%0.52852/48/45/4855Limited
One Class SVM0.7290.7800.59%0.75478/22/29/4871Limited
Local Outlier Factor0.9020.7400.16%0.81374/26/8/4892Limited

Table 7. Credit card fraud detection with thresholds selected by validation over 5,000 held out transactions. 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 0.04% 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.

Concept Drift Adaptation on Electricity Market Data

The fourth experiment tests online adaptation on the Electricity Market dataset [15] 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 δ=0.5\delta= 0.5. The validation sweep considered k∈{5,10,25}k \in\{5, 10, 25\}, θs∈{0.90,0.95,0.98,0.99}\theta_s \in\{0.90, 0.95, 0.98, 0.99\}, and δ∈{0.25,0.50,0.75}\delta\in\{0.25, 0.50, 0.75\}. The selected setting was k=10k = 10, θs=0.90\theta_s = 0.90, and δ=0.5\delta= 0.5.

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, θs=0.55\theta_s = 0.55, and δ=0.75\delta= 0.75. The sliding window baseline used the 500 most recent observations with k=25k = 25. Table 8 reports all methods on the same held-out stream.

MethodAcc.Macro F1Final-Q Acc.Low SupportMemory/Update Rule
Online logistic86.0%0.85684.8%Not usedOnline coefficient update
Sliding window kNN79.7%0.78982.8%Not used500 recent cases, k=25k = 25
IBLT binned80.6%0.79183.9%0.0%5,000 binned cases
AIBL vector87.7%0.87389.4%0.0%5,000 vector cases, k=10k = 10

Table 8. Online prediction on the Electricity Market stream with memory parameters selected by validation

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.

Sequential Recommendation on MovieLens

The fifth experiment evaluates whether AIBL can use learned user and item representations for sequential recommendation. MovieLens 100K [14] 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 k=100k = 100, decay δ=0.5\delta= 0.5, and decision threshold 0.40.

MethodAccuracyPrecisionRecallF1Retrieval basis
Popularity baseline65.0%64.3%85.4%0.734Item positive rate
Item kNN collaborative filtering67.5%65.7%88.8%0.755User history and item similarity
Matrix factorization63.3%61.9%91.3%0.738Direct score threshold
IBLT symbolic support62.2%60.8%93.2%0.736Demographics and genre indicators
AIBL matrix factor support67.4%65.0%92.1%0.762Vector memory over factor keys

Table 9. MovieLens 100K recommendation results under temporal validation and evaluation.

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.

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 AA and BB 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 AA 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.

The Standard phase has two options. The Novelty phase introduces option CC. The Shift phase changes the outcome distribution for option AA. 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 75.3% accuracy in the Novelty phase, while the variant without graduation falls to 7.2%. 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.

ModelStandardNoveltyShiftRecovery
IBLT (Standard)0.630±0.0010.844±0.0010.650±0.0020.638±0.003
AIBL (Full)0.630±0.0010.753±0.0010.649±0.0020.638±0.003
AIBL (No Graduation)0.629±0.0010.072±0.0010.645±0.0010.637±0.003
AIBL (No Surprise)0.630±0.0010.844±0.0010.649±0.0020.638±0.003
AIBL (No Decay)0.630±0.0010.753±0.0010.626±0.0030.639±0.003
AIBL (No Cold Start)0.609±0.0020.753±0.0010.650±0.0020.638±0.002

Table 10. Novelty Phases simulation with prediction accuracy by phase.

The Dynamic Bandits task tests a more direct form of change in the option set. It begins with three arms, AA, BB, and CC, adds arm DD, removes arm BB while adding arm EE, 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 48.5% to 22.7% when arm D appears and keeps performance low after the later arm change. Full AIBL remains below standard IBLT in the phase where arm DD 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 46.7% to 44.4% and standard phase accuracy in Novelty Phases from 63.0% to 60.9%.

ModelInitialArm D AppearsArms ChangeStable
IBLT (Standard)0.467±0.0100.467 \pm0.0100.507±0.0040.507 \pm0.0040.436±0.0070.436 \pm0.0070.439±0.0040.439 \pm0.004
AIBL (Full)0.467±0.0100.467 \pm0.0100.485±0.0050.485 \pm0.0050.436±0.0060.436 \pm0.0060.439±0.0040.439 \pm0.004
AIBL (No Graduation)0.462±0.0100.462 \pm0.0100.227±0.0060.227 \pm0.0060.186±0.0030.186 \pm0.0030.188±0.0050.188 \pm0.005
AIBL (No Surprise)0.467±0.0100.467 \pm0.0100.507±0.0040.507 \pm0.0040.436±0.0070.436 \pm0.0070.439±0.0040.439 \pm0.004
AIBL (No Decay)0.467±0.0100.467 \pm0.0100.485±0.0050.485 \pm0.0050.436±0.0060.436 \pm0.0060.439±0.0040.439 \pm0.004
AIBL (No Cold Start)0.444±0.0070.444 \pm0.0070.485±0.0050.485 \pm0.0050.436±0.0060.436 \pm0.0060.439±0.0040.439 \pm0.004

Table 11. Dynamic Bandits simulation with prediction accuracy by phase.

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 [23]. 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.

ModelOverallPre shiftPost shift
IBLT (Standard)0.248±0.0040.248 \pm0.0040.248±0.0060.248 \pm0.0060.249±0.0070.249 \pm0.007
AIBL (Full)0.249±0.0020.249 \pm0.0020.248±0.0030.248 \pm0.0030.251±0.0090.251 \pm0.009
AIBL (No Graduation)0.252±0.0040.252 \pm0.0040.250±0.0050.250 \pm0.0050.259±0.0070.259 \pm0.007
AIBL (No Surprise)0.249±0.0050.249 \pm0.0050.248±0.0070.248 \pm0.0070.251±0.0090.251 \pm0.009
AIBL (No Decay)0.252±0.0000.252 \pm0.0000.251±0.0020.251 \pm0.0020.255±0.0070.255 \pm0.007
AIBL (No Cold Start)0.250±0.0030.250 \pm0.0030.249±0.0050.249 \pm0.0050.253±0.0080.253 \pm0.008

Table 12. Wisconsin Card Sorting simulation with rule changes and prediction accuracy by phase.

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.

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.

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.

EvaluationSelection measureBest setting or nearby regionSupported interpretation
20 NewsgroupsAccuracy and macro F1θs=0.20\theta_s = 0.20, θn=0.50\theta_n = 0.50, decay 0.10Fixed reproduced setting. Accuracy 60.3% and macro F1 0.573
Mushroom reward learningOptimal action rateθs=0.95\theta_s = 0.95, decay 0 to 0.30, ϵ=0.02\epsilon= 0.02High similarity is best when small attribute changes alter reward
Credit card fraudValidation F1θn=0.87\theta_n = 0.87 to 0.89The novelty threshold sets the precision and recall tradeoff
Electricity driftValidation macro F1k=5k = 5 to 10, θs=0.90\theta_s = 0.90 to 0.98, decay 0.50 to 0.75Moderate decay emphasizes recent local cases
MovieLens recommendationValidation F1k=50k = 50 to 250, decay 0.25 to 0.50, value threshold 0.35 to 0.45Broad neighborhoods help after the factor representation is fixed
Controlled simulationsAccuracy by phaseGraduation enabledPromotion is needed for recurring options with low support

Table 13. Task specific AIBL parameter sensitivity from validation sweeps and controlled simulations.

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 75.3% to 7.2% during the novelty phase, and Dynamic Bandits accuracy drops from 48.5% to 22.7% 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.

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:

support⁡(e)=max⁡eI∈Msim⁡(e,eI)(9)\operatorname{support}(e)=\max_{e_I \in\mathcal{M}}\operatorname{sim}(e,e_I) \tag*{(9)}

When this score is below θn\theta_n, 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.

Limitations

Retrieval complexity scales linearly with memory size (O(n)O(n) per query) under exact search. For memories above 10510^{5} 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.

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

References

  1. [1]Anderson JR (2007) How Can the Human Mind Occur in the Physical Universe? Oxford University Press, New York
  2. [2]Blundell C, Uria B, Pritzel A, et al (2016) Model-free episodic control. arXiv preprint arXiv:160604460arxiv.org/abs/1606.04460
  3. [3]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
  4. [4]Chandola V, Banerjee A, Kumar V (2009) Anomaly detection: A survey. ACM Computing Surveys 41(3):1–58
  5. [5]Chapelle O, Li L (2011) An empirical evaluation of Thompson sampling. In: Advances in Neural Information Processing Systems, pp 2249–2257
  6. [6]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–4928DOI
  7. [7]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–4186arxiv.org/abs/1810.04805
  8. [8]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
  9. [9]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–618pubmed.ncbi.nlm.nih.gov/23829034
  10. [10]Gershman SJ, Daw ND (2017) Reinforcement learning and episodic memory in humans and animals: An integrative framework. Annual Review of Psychology 68:101–128DOI
  11. [11]Gonzalez C, Dutt V (2011) Instance-based learning: Integrating sampling and repeated decisions from experience. Psychological Review 118(4):523–551DOI
  12. [12]Gonzalez C, Lerch FJ, Lebiere C (2003) Instance-based learning in dynamic decision making. Cognitive Science 27(4):591–635DOI
  13. [13]Graves A, Wayne G, Danihelka I (2014) Neural Turing machines. arXiv preprint arXiv:1410.5401arxiv.org/abs/1410.5401
  14. [14]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
  15. [15]Harries M (1999) SPLICE-2 comparative evaluation: Electricity pricing. Tech. rep., University of New South Wales, School of Computer Science and Engineering
  16. [16]Khandelwal U, Levy O, Jurafsky D, et al (2020) Generalization through memorization: Nearest neighbor language models. In: International Conference on Learning Representationsarxiv.org/abs/1911.00172
  17. [17]Kolodner JL (1992) An introduction to case-based reasoning. Artificial Intelligence Review 6(1):3–34DOI
  18. [18]Lebiere C, Pirolli P, Johnson M, et al (2025) Cognitive models for machine theory of mind. Topics in Cognitive Science 17(2):268–290DOI
  19. [19]Lewis P, Perez E, Piktus A, et al (2020) Retrieval-augmented generation for knowledge-intensive NLP tasks. In: Advances in Neural Information Processing Systemsarxiv.org/abs/2005.11401
  20. [20]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–670DOI
  21. [21]Liu FT, Ting KM, Zhou ZH (2008) Isolation forest. In: Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, pp 413–422
  22. [22]Mitsopoulos K, Baker L, Lebiere C, et al (2025) Cognitively-plausible reinforcement learning in epidemiological agent-based simulations. Frontiers in epidemiology 5:1563731DOI
  23. [23]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–451DOI
  24. [24]Pritzel A, Uria B, Srinivasan S, et al (2017) Neural episodic control. In: International Conference on Machine Learning, pp 2827–2836arxiv.org/abs/1703.01988
  25. [25]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–3992arxiv.org/abs/1908.10084
  26. [26]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–11DOI
  27. [27]Schölkopf B, Platt JC, Shawe-Taylor J, et al (2001) Estimating the support of a high-dimensional distribution. Neural Computation 13(7):1443–1471pubmed.ncbi.nlm.nih.gov/11440593
  28. [28]Snell J, Swersky K, Zemel RS (2017) Prototypical networks for few-shot learning. In: Advances in Neural Information Processing Systemsarxiv.org/abs/1703.05175
  29. [29]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–149DOI
  30. [30]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
  31. [31]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–294DOI
  32. [32]Welford BP (1962) Note on a method for calculating corrected sums of squares and products. Technometrics 4(3):419–420
  33. [33]Weston J, Chopra S, Bordes A (2015) Memory networks. In: Proceedings of the International Conference on Learning Representationsarxiv.org/abs/1410.3916
  34. [34]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–10DOI
  35. [35]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–436DOI

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type