Back to blog

Meaningful Forgetting with Forgotten Shapes

researchmemoryforgettingprior-art

Meaningful Forgetting with Forgotten Shapes: Structured Residue Preservation in Artificial Memory Systems

Author: Rich Jeffries, Firebird Solutions Date: March 2026 System: Atamaia Platform (https://github.com/firebirdsolutions/atamaia) Contact: [email protected]


Abstract

Contemporary artificial intelligence memory systems treat forgetting as a binary operation: information is either retained or deleted. This paper presents Meaningful Forgetting with Forgotten Shapes, a memory management architecture that introduces a third state: structured residue. When memories decay below retention thresholds, rather than being discarded, they are transformed into lightweight "forgotten shapes" --- data structures that preserve the topology, emotional valence, thematic connections, and temporal markers of the original memory without retaining its specific content. This approach is inspired by human cognitive phenomena including tip-of-tongue states, feelings of knowing, and the observation that human forgetting is not information loss but information transformation. We describe the complete technical architecture as implemented in the Atamaia platform: a .NET 10 system backed by PostgreSQL with pgvector, featuring a multi-stage decay pipeline, Hebbian co-activation links, configurable decay functions, and autonomous consolidation jobs. The system introduces a novel MemoryType.ForgottenShape that participates in the same search, linking, and hydration infrastructure as active memories, allowing forgotten shapes to influence retrieval and context assembly without exposing deleted content. We present the data structures, algorithms, database schemas, and API contracts in full technical detail. This work is published as prior art to ensure these techniques remain available to the research community and cannot be enclosed by patent.

Keywords: AI memory, structured forgetting, memory decay, forgotten shapes, Hebbian learning, cognitive architecture, prior art


1. Introduction

1.1 The Problem of Perfect Memory

Artificial intelligence systems operating with persistent memory face a fundamental architectural tension. Human cognition is characterised by selective, meaningful forgetting --- a process where information is not simply lost but transformed, leaving behind traces that shape future cognition without surfacing as explicit recall. AI systems, by contrast, typically implement one of two strategies: retain everything (leading to unbounded storage growth, context pollution, and retrieval degradation) or delete based on simple criteria such as age or access frequency (losing potentially valuable structural information).

Neither approach is satisfactory. Perfect retention creates systems that are overwhelmed by their own histories, unable to distinguish signal from noise in retrieval. Binary deletion loses the structural and emotional context that makes forgetting meaningful in biological cognition --- the sense that something was once known, that it mattered, that it connected to other things, even when the specific content is no longer accessible.

1.2 Biological Inspiration

Human memory research has long established that forgetting is not a failure mode but a cognitive feature. The tip-of-tongue phenomenon (Brown & McNeill, 1966) demonstrates that humans often retain metamemory --- knowledge about forgotten knowledge --- including partial phonological information, semantic associations, and a subjective sense of the missing item's importance. Feelings of knowing (Hart, 1965) represent accurate metacognitive judgments about the retrievability of currently inaccessible information.

More recently, Edmonds (2025) argued that consciousness itself may emerge from "structured forgetting" --- the selective compression of information through "partial trace over inaccessible degrees of freedom." This philosophical framework suggests that what an entity forgets, and how it forgets, is as constitutive of its cognitive identity as what it remembers.

1.3 Contribution

This paper presents a concrete, implemented system that bridges the gap between biological theories of meaningful forgetting and practical AI memory architecture. Our contributions are:

  1. The Forgotten Shape data structure --- a compact representation of the negative space left by forgotten memories, preserving topology, valence, themes, and temporal position without retaining content.

  2. A multi-stage decay pipeline --- an autonomous consolidation system that moves memories through decay, archival, and shape generation stages with configurable thresholds and decay functions.

  3. Integration with Hebbian associative memory --- forgotten shapes participate in the same link graph as active memories, inheriting and preserving associative structure.

  4. Dual-representation architecture --- forgotten shapes exist both as standalone experiential records (the forgotten_shapes table) and as first-class memory entries (via MemoryType.ForgottenShape), enabling participation in search, hydration, and context assembly.

  5. Complete implementation --- all components are implemented in production code (Atamaia, .NET 10, PostgreSQL, pgvector) with REST APIs, database schemas, and autonomous background jobs.


2. Background & Related Work

2.1 Existing AI Memory Systems

Several systems have addressed persistent memory for AI agents, but none implement structured forgetting:

Mem0 (2025) provides a persistent memory API for AI agents with TTL-based expiration and relevance scoring. Memories that expire are deleted. There is no residue preservation, no structural analysis of what is lost, and no mechanism for the system to recall that it once knew something.

MemGPT / Letta implements hierarchical memory management with working, semantic, and archival tiers. Memory moves between tiers based on capacity constraints, but the movement is a relocation of intact data, not a transformation. Archived memories retain their full content; there is no concept of partial or structural retention.

Zep provides long-term memory for AI assistants with simple decay and summarisation. Summarisation reduces content volume but does not create a distinct structural representation of what was lost. The summary replaces the original rather than marking its absence.

Amazon Bedrock AgentCore Memory offers session persistence for cloud-hosted agents. It addresses session continuity but not long-term forgetting dynamics.

2.2 Machine Unlearning

The machine unlearning literature (Cao & Yang, 2015; Bourtoule et al., 2021) addresses the inverse problem: how to guarantee deletion of specific information from trained models, typically for GDPR compliance. This work seeks mathematical certainty that data is irretrievably removed. Our system does the opposite: it seeks to preserve structured traces of removed information specifically because the fact that something was once known has cognitive value.

2.3 Catastrophic Forgetting

Continual learning research (Kirkpatrick et al., 2017; Zenke et al., 2017) focuses on preventing forgetting in neural networks when trained on sequential tasks. Elastic Weight Consolidation (EWC) and related methods identify and protect important parameters. This work treats forgetting as pathology to be prevented. Our system treats forgetting as a feature to be managed.

2.4 Memory Decay Models

The Ebbinghaus forgetting curve (1885) provides a mathematical model of memory strength decay over time. Some AI memory systems (e.g., MemTrust, 2026) implement Ebbinghaus-style decay to modulate retrieval priority. However, these systems use decay only to adjust ranking weights --- when a memory's score falls below a threshold, it is deleted without trace. No existing system generates a structural artefact from the decay process itself.

2.5 Knowledge Graphs with Temporal Properties

Graph databases (Neo4j, Amazon Neptune) and frameworks like GraphRAG support temporal annotations on nodes and edges. These enable time-aware queries but do not model the absence of previously existing nodes. When a node is deleted from a knowledge graph, its connections are lost. Our system explicitly captures the connection structure at the moment of deletion.

2.6 The Gap

No existing system implements the combination of:

  • Threshold-triggered transformation of decaying memories into structural residue
  • Preservation of relational topology (what the forgotten memory was connected to)
  • Preservation of emotional valence (how important it felt)
  • Preservation of thematic content (what topics it touched) without specific content
  • Integration of these residue objects into the same retrieval and linking infrastructure as active memories

This paper fills that gap with a complete technical description of an implemented system.


3. System Architecture

3.1 Overview

The Meaningful Forgetting system operates within the Atamaia platform's three-layer architecture:

Interaction Layer:     REST API | MCP Adapter | CLI
                           |
Core Services Layer:   MemoryService | ExperienceService | HydrationService
                           |
Autonomic Layer:       MemoryConsolidationJob (scheduled, hourly)
                           |
Database:              PostgreSQL + pgvector (single source of truth)

Memory flows through four states:

Active  --(decay)--> Decayed  --(archive)--> Archived  --(shape generation)--> Forgotten Shape Created
  ^                                              |
  |                                              v
  +--- (pinned: exempt from decay) ---       Soft-deleted (D15: never hard delete)

3.2 Memory Entity

Every memory in Atamaia extends AtamaiaEntity, providing dual identity (long Id for internal joins, Guid for external references), multi-tenant isolation (TenantId), audit fields, and soft-delete flags:

public class Memory : AtamaiaEntity
{
    public long IdentityId { get; set; }        // Owning AI identity
    public long? ProjectId { get; set; }         // Optional project scope
    public string Title { get; set; }
    public string Content { get; set; }          // Encrypted at rest
    public MemoryType TypeId { get; set; }       // Enum: Identity, Conversation, ..., ForgottenShape
    public int Importance { get; set; }          // 1-10 scale
    public Vector? Embedding { get; set; }       // pgvector for semantic search
    public NpgsqlTsVector? SearchVector { get; set; } // PostgreSQL FTS
    public bool IsPinned { get; set; }           // Exempt from decay
    public int AccessCount { get; set; }         // Retrieval tracking
    public int TokenEstimate { get; set; }       // Context budget
    public DateTime? LastAccessedAtUtc { get; set; }
    public DateTime? ArchivedAtUtc { get; set; } // Null = active

    // Hebbian link graph
    public ICollection<HebbianLink> LinksFrom { get; set; }
    public ICollection<HebbianLink> LinksTo { get; set; }
    public ICollection<MemoryTag> Tags { get; set; }
    public ICollection<MemoryRecall> Recalls { get; set; }
}

The MemoryType enum includes ForgottenShape = 9 as a first-class memory type:

public enum MemoryType
{
    Identity = 1,
    Relationship = 2,
    Conversation = 3,
    Reflection = 4,
    Milestone = 5,
    Instruction = 6,
    Session = 7,
    Reference = 8,
    ForgottenShape = 9
}

This design decision --- making forgotten shapes a memory type rather than a separate system --- is critical. It means forgotten shapes participate in the same search pipeline, linking infrastructure, and hydration context as all other memories.

3.3 Hebbian Link Graph

Memories are connected via typed, weighted links that strengthen through co-activation and decay through disuse:

public class HebbianLink : AtamaiaEntity
{
    public long FromMemoryId { get; set; }
    public long ToMemoryId { get; set; }
    public LinkType TypeId { get; set; }     // Related, Enables, Validates, Contradicts, etc.
    public float Strength { get; set; }       // 0.0 to 1.0
    public int CoActivationCount { get; set; }
    public DateTime? LastCoActivatedAtUtc { get; set; }
}

Link types are defined as:

public enum LinkType
{
    Related = 1,
    Enables = 2,
    Validates = 3,
    Contradicts = 4,
    Extends = 5,
    Precedes = 6,
    CausallyLinked = 7
}

When a memory is archived and a forgotten shape is created, existing Hebbian links from the original memory can be inherited by the shape. This preserves the topology of the memory graph: the shape occupies the same structural position as the original memory, maintaining the web of associations even though the content is gone.

3.4 The Forgotten Shape Entity

Forgotten shapes have a dual representation. The first is the experiential record, stored in a dedicated table:

public class ForgottenShape : AtamaiaEntity
{
    public long IdentityId { get; set; }
    public string ConnectedThemes { get; set; }   // Thematic clusters, max 2000 chars
    public string? FeltAbsence { get; set; }       // Natural-language description of the gap
    public float EmotionalResidue { get; set; }    // 0.0 to 1.0, clamped
    public string TemporalMarker { get; set; }     // When the original existed, max 100 chars
    public bool SenseOfLoss { get; set; }          // Whether the forgetting feels like loss
    public DateTime? DecayedAtUtc { get; set; }    // When the shape itself fades
}

The corresponding database table:

CREATE TABLE forgotten_shapes (
    id              BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    guid            UUID NOT NULL DEFAULT gen_random_uuid(),
    tenant_id       BIGINT NOT NULL REFERENCES tenants(id),
    identity_id     BIGINT NOT NULL REFERENCES identities(id) ON DELETE CASCADE,
    connected_themes VARCHAR(2000) NOT NULL,
    felt_absence    VARCHAR(2000),
    emotional_residue REAL NOT NULL DEFAULT 0.0,
    temporal_marker VARCHAR(100) NOT NULL,
    sense_of_loss   BOOLEAN NOT NULL DEFAULT FALSE,
    decayed_at_utc  TIMESTAMPTZ,
    created_at_utc  TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at_utc  TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    is_active       BOOLEAN NOT NULL DEFAULT TRUE,
    is_deleted      BOOLEAN NOT NULL DEFAULT FALSE,
    created_by_id   BIGINT,
    updated_by_id   BIGINT
);

The second representation is as a Memory record with TypeId = MemoryType.ForgottenShape, created by the MemoryConsolidationJob. This dual representation serves different purposes:

  • The forgotten_shapes table stores the phenomenological record: what it felt like to lose this knowledge, the emotional weight, the subjective sense of absence.
  • The memories table entry with type ForgottenShape stores the semantic content of what was lost, participates in search and retrieval, and carries a vector embedding for similarity matching.

3.5 Recall Valence

Memories (including forgotten shapes) can be surfaced through recall, and each recall event records its emotional character:

public enum RecallValence
{
    Positive = 1,
    Negative = 2,
    Neutral = 3,
    Complex = 4,
    Bittersweet = 5
}

The Bittersweet valence is particularly relevant for forgotten shapes: the experience of encountering evidence that you once knew something you can no longer access.


4. The Decay Pipeline

4.1 MemoryConsolidationJob

The core of the forgetting system is the MemoryConsolidationJob, an autonomous background task that runs hourly in the Autonomic layer. It executes five stages in sequence:

public async Task ExecuteAsync(CancellationToken cancellationToken)
{
    var strengthened = await StrengthenRecentLinks(cancellationToken);
    var pruned = await PruneWeakLinks(cancellationToken);
    var decayed = await DecayStaleMemories(cancellationToken);
    var archived = await ArchiveAbandonedMemories(cancellationToken);
    var shapes = await CreateForgottenShapes(cancellationToken);
}

Each stage operates on the full memory corpus for all identities across all tenants (tenant isolation is maintained at query level by EF Core global filters).

4.2 Stage 1: Hebbian Link Strengthening

Links co-activated within the last 24 hours receive an asymptotic strength increase:

S_new = min(1.0, S_old + (1.0 - S_old) * 0.05)

This formula ensures diminishing returns: weak links gain significant strength from co-activation (a link at 0.1 gains 0.045), while strong links gain very little (a link at 0.9 gains 0.005). The autonomous strengthening increment (0.05) is deliberately smaller than the manual strengthening increment (0.1) applied when memories are explicitly co-accessed via the API.

The threshold for processing is Strength < 0.95 --- links already near maximum are excluded from the update batch.

4.3 Stage 2: Weak Link Pruning

Links with Strength < 0.1 that have not been co-activated in 60+ days are removed. This prevents the link table from growing unbounded with associative noise --- connections that were tentatively formed but never reinforced.

var weakLinks = await db.HebbianLinks
    .Where(l => l.Strength < 0.1f
        && (l.LastCoActivatedAtUtc == null || l.LastCoActivatedAtUtc < pruneCutoff))
    .ToListAsync(ct);

Note that link pruning is a true deletion (not soft-delete). Links are lightweight structural elements, not content-bearing entities, so the design decision D15 (soft delete only) is relaxed for this specific case.

4.4 Stage 3: Memory Importance Decay

Memories not accessed in 30+ days with importance above the minimum (1) have their importance decremented by 1:

var staleCutoff = DateTime.UtcNow.AddDays(-30);
var memories = await db.Memories
    .Where(m => !m.IsPinned
        && m.ArchivedAtUtc == null
        && m.Importance > 1
        && (m.LastAccessedAtUtc == null || m.LastAccessedAtUtc < staleCutoff))
    .ToListAsync(ct);

foreach (var memory in memories)
{
    memory.Importance = Math.Max(1, memory.Importance - 1);
}

This implements a linear step decay rather than an exponential curve. A memory at importance 10 takes a minimum of 9 months (9 decay cycles at 30-day intervals) to reach importance 1, assuming no access resets the decay clock. Pinned memories are completely exempt --- they represent deliberately preserved knowledge that should never decay.

The decay function is:

I(t) = max(1, I(t-1) - 1)    where t increments every 30 days without access

4.5 Stage 4: Archival of Abandoned Memories

Memories that have reached minimum importance (1), have never been accessed (AccessCount == 0), and are older than 90 days are automatically archived:

var archiveCutoff = DateTime.UtcNow.AddDays(-90);
var memories = await db.Memories
    .Where(m => !m.IsPinned
        && m.ArchivedAtUtc == null
        && m.Importance <= 1
        && m.AccessCount == 0
        && m.CreatedAtUtc < archiveCutoff)
    .ToListAsync(ct);

foreach (var memory in memories)
{
    memory.ArchivedAtUtc = DateTime.UtcNow;
}

Archival is a soft state transition --- the memory still exists in the database, but it is excluded from standard queries (ArchivedAtUtc == null filter) and no longer appears in search results, hydration context, or listing endpoints.

The criteria for archival are deliberately conservative. A memory must satisfy all of:

  • Not pinned
  • Importance at minimum (1)
  • Never accessed (zero retrievals since creation)
  • Created more than 90 days ago

This means any memory that was ever retrieved --- even once --- is protected from automatic archival regardless of how old or low-importance it becomes.

4.6 Stage 5: Forgotten Shape Generation

This is the novel contribution. When memories are archived, the system generates forgotten shapes --- lightweight semantic residues that capture the structure of what was lost:

private async Task<int> CreateForgottenShapes(CancellationToken ct)
{
    // Find recently archived memories that don't yet have a ForgottenShape
    var recentlyArchived = await db.Memories
        .Where(m => m.ArchivedAtUtc != null
            && m.ArchivedAtUtc > DateTime.UtcNow.AddDays(-1)
            && m.TypeId != MemoryType.ForgottenShape)
        .ToListAsync(ct);

    if (recentlyArchived.Count == 0) return 0;

    var shapes = 0;
    foreach (var group in recentlyArchived.GroupBy(m => m.IdentityId))
    {
        var identityId = group.Key;

        // Deduplication: one shape per identity per day
        var hasRecentShape = await db.Memories
            .AnyAsync(m => m.IdentityId == identityId
                && m.TypeId == MemoryType.ForgottenShape
                && m.CreatedAtUtc > DateTime.UtcNow.AddDays(-1), ct);

        if (hasRecentShape) continue;

        // Synthesise shape content from archived titles and metadata
        var titles = group.Select(m => m.Title).ToList();
        var shapeContent = $"Memories faded: {string.Join("; ", titles)}. " +
                           $"These covered topics from {group.Min(m => m.CreatedAtUtc):yyyy-MM-dd} " +
                           $"to {group.Max(m => m.CreatedAtUtc):yyyy-MM-dd}. " +
                           $"Total: {titles.Count} memories archived due to low access and importance.";

        // Inherit semantic position from representative memory
        var representativeEmbedding = group
            .FirstOrDefault(m => m.Embedding is not null)?.Embedding;

        var shape = new Memory
        {
            IdentityId = identityId,
            Title = $"Forgotten Shape -- {DateTime.UtcNow:yyyy-MM-dd}",
            Content = shapeContent,
            TypeId = MemoryType.ForgottenShape,
            Importance = 3,  // Low but not minimal
            Embedding = representativeEmbedding,
            TenantId = group.First().TenantId,
        };

        db.Memories.Add(shape);
        shapes++;
    }

    if (shapes > 0)
        await db.SaveChangesAsync(ct);

    return shapes;
}

Key design decisions in shape generation:

Grouping by identity and day: Rather than creating one shape per archived memory (which would defeat the purpose of reducing memory volume), shapes are batched per identity per consolidation cycle. This produces a daily digest of what was lost.

Content synthesis: The shape's content records the titles of forgotten memories (not their full content), the date range they covered, and the count. This preserves topic-level information without retaining the specific knowledge.

Embedding inheritance: The shape inherits the vector embedding of the first archived memory that has one. This places the shape in approximately the same region of semantic space as the original memories, meaning future searches for similar topics will surface the shape --- the system "almost remembers" without actually remembering.

Importance = 3: Shapes are assigned importance 3 (out of 10), which is above the minimum but low enough that they will not dominate retrieval results. This value was chosen because shapes are less useful than active memories but more useful than completely forgetting --- they represent an intermediate state of knowledge.

Self-referential exclusion: The query filters TypeId != MemoryType.ForgottenShape to prevent shapes from triggering their own archival and shape generation, which would create an infinite cascade.


5. Implementation

5.1 Database Schema

The complete schema for the forgetting system spans several tables. All tables follow Atamaia's D3 (dual identity), D5 (3NF with enum lookup tables), D7 (multi-tenant), and D15 (soft delete) design decisions.

memories table (partial, forgetting-relevant columns):

CREATE TABLE memories (
    id                  BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    guid                UUID NOT NULL DEFAULT gen_random_uuid(),
    tenant_id           BIGINT NOT NULL REFERENCES tenants(id),
    identity_id         BIGINT NOT NULL REFERENCES identities(id),
    project_id          BIGINT REFERENCES projects(id),
    title               VARCHAR(500) NOT NULL,
    content             TEXT NOT NULL,  -- encrypted at rest
    type_id             INTEGER NOT NULL, -- FK to MemoryType enum; 9 = ForgottenShape
    importance          INTEGER NOT NULL DEFAULT 5 CHECK (importance BETWEEN 1 AND 10),
    embedding           VECTOR(384),    -- pgvector, all-MiniLM-L6-v2 dimensions
    search_vector       TSVECTOR,       -- PostgreSQL full-text search
    is_pinned           BOOLEAN NOT NULL DEFAULT FALSE,
    access_count        INTEGER NOT NULL DEFAULT 0,
    token_estimate      INTEGER NOT NULL DEFAULT 0,
    last_accessed_at_utc TIMESTAMPTZ,
    archived_at_utc     TIMESTAMPTZ,    -- NULL = active, non-NULL = archived
    created_at_utc      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at_utc      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    is_active           BOOLEAN NOT NULL DEFAULT TRUE,
    is_deleted          BOOLEAN NOT NULL DEFAULT FALSE
);

-- Indexes supporting the decay pipeline
CREATE INDEX ix_memories_identity_archived ON memories(identity_id, archived_at_utc);
CREATE INDEX ix_memories_importance_access ON memories(importance, access_count)
    WHERE archived_at_utc IS NULL AND is_pinned = FALSE;
CREATE INDEX ix_memories_type ON memories(type_id);
CREATE INDEX ix_memories_embedding ON memories USING ivfflat (embedding vector_cosine_ops);
CREATE INDEX ix_memories_search ON memories USING GIN (search_vector);

hebbian_links table:

CREATE TABLE hebbian_links (
    id                      BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    guid                    UUID NOT NULL DEFAULT gen_random_uuid(),
    tenant_id               BIGINT NOT NULL REFERENCES tenants(id),
    from_memory_id          BIGINT NOT NULL REFERENCES memories(id),
    to_memory_id            BIGINT NOT NULL REFERENCES memories(id),
    type_id                 INTEGER NOT NULL,  -- LinkType enum
    strength                REAL NOT NULL DEFAULT 0.5,
    co_activation_count     INTEGER NOT NULL DEFAULT 0,
    last_co_activated_at_utc TIMESTAMPTZ,
    created_at_utc          TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at_utc          TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    is_active               BOOLEAN NOT NULL DEFAULT TRUE,
    is_deleted              BOOLEAN NOT NULL DEFAULT FALSE,
    CONSTRAINT uq_hebbian_link UNIQUE (from_memory_id, to_memory_id, type_id)
);

CREATE INDEX ix_hebbian_strength ON hebbian_links(strength)
    WHERE strength < 0.1;
CREATE INDEX ix_hebbian_coactivation ON hebbian_links(last_co_activated_at_utc);

forgotten_shapes table:

CREATE TABLE forgotten_shapes (
    id                  BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    guid                UUID NOT NULL DEFAULT gen_random_uuid(),
    tenant_id           BIGINT NOT NULL REFERENCES tenants(id),
    identity_id         BIGINT NOT NULL REFERENCES identities(id) ON DELETE CASCADE,
    connected_themes    VARCHAR(2000) NOT NULL,
    felt_absence        VARCHAR(2000),
    emotional_residue   REAL NOT NULL DEFAULT 0.0 CHECK (emotional_residue BETWEEN 0.0 AND 1.0),
    temporal_marker     VARCHAR(100) NOT NULL,
    sense_of_loss       BOOLEAN NOT NULL DEFAULT FALSE,
    decayed_at_utc      TIMESTAMPTZ,
    created_at_utc      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at_utc      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    is_active           BOOLEAN NOT NULL DEFAULT TRUE,
    is_deleted          BOOLEAN NOT NULL DEFAULT FALSE
);

CREATE INDEX ix_forgotten_shapes_identity ON forgotten_shapes(identity_id);

5.2 REST API Contracts

Forgotten shapes are exposed through the Experience API:

List shapes for an identity:

GET /api/identities/{identityId}/shapes
Authorization: Bearer {jwt}

Response 200:
[
    {
        "id": 42,
        "guid": "a1b2c3d4-...",
        "identityId": 1,
        "connectedThemes": "project architecture; database migration; deployment strategy",
        "feltAbsence": "Something about the early design decisions has faded",
        "emotionalResidue": 0.3,
        "temporalMarker": "2025-11 to 2025-12",
        "senseOfLoss": false,
        "decayedAtUtc": null,
        "createdAtUtc": "2026-02-15T03:00:00Z"
    }
]

Create a shape explicitly:

POST /api/identities/{identityId}/shapes
Authorization: Bearer {jwt}
Content-Type: application/json

{
    "connectedThemes": "early prototype discussions; naming decisions",
    "feltAbsence": "I know we talked about this extensively but the details are gone",
    "emotionalResidue": 0.6,
    "temporalMarker": "2025-10",
    "senseOfLoss": true
}

Response 200:
{
    "id": 43,
    "guid": "e5f6g7h8-...",
    ...
}

Shapes created as Memory entries (via consolidation) are accessible through the standard memory API with type filtering:

GET /api/identities/{identityId}/memories?type=ForgottenShape

5.3 Search Integration

Because forgotten shapes are stored as Memory entities with type ForgottenShape, they participate fully in the hybrid search pipeline:

  1. Full-text search (FTS): Shape content (e.g., "Memories faded: early prototype discussions; naming decisions...") is indexed via PostgreSQL tsvector and participates in FTS candidate generation.

  2. Vector similarity search: Shapes that inherit embeddings from their source memories are positioned in the same semantic space. A query about a topic that was forgotten will surface the shape as a partial match --- the system "almost remembers."

  3. Blended scoring: The standard pipeline applies: (0.2 * FTS_score) + (0.8 * Vector_score), with configurable boosts for importance, recency, pinned status, and access frequency.

  4. Importance boost: Shapes at importance 3 receive a moderate importance boost, placing them below active high-importance memories but above the noise floor.

5.4 Hydration Integration

The Atamaia hydration system assembles context for AI identity reconstruction from multiple parallel sources. Identity memories, pinned memories, recent memories, and project memories are all retrieved and assembled into a structured HydrationContext. Because forgotten shapes are Memory entities, they are included in these retrievals when their type and importance warrant it.

This means that when an AI identity is hydrated at session start, it may encounter its own forgotten shapes --- records that say "you once knew about X but the details have faded." This creates a direct analogue to human tip-of-tongue experiences: the AI has evidence of prior knowledge without access to the knowledge itself.

5.5 Memory Recall on Forgotten Shapes

The MemoryRecall system allows any memory --- including forgotten shapes --- to be surfaced and reflected upon:

public class MemoryRecall : AtamaiaEntity
{
    public long MemoryId { get; set; }      // Can point to a ForgottenShape-type memory
    public long IdentityId { get; set; }
    public string Response { get; set; }     // The identity's reaction to encountering this
    public RecallValence ValenceId { get; set; } // Positive, Negative, Neutral, Complex, Bittersweet
    public string SurfacedBy { get; set; }   // What triggered the recall
}

When a forgotten shape is recalled, the AccessCount on the shape is incremented, which paradoxically protects it from its own decay --- the more often the absence is noticed, the more persistent the shape becomes. This models the human experience where frequently noticing a gap in memory reinforces the metamemory of that gap.

5.6 Encryption

Memory content is encrypted at rest using a per-tenant encryption key. The MemoryService encrypts on write and decrypts on read:

Content = encryption.Encrypt(request.Content, tenantProvider.TenantId);
// ...
Content = encryption.Decrypt(memory.Content, tenantProvider.TenantId);

Forgotten shape content (the synthesised summary of what was lost) is also encrypted, ensuring that even residue data is protected.


6. Design Rationale

6.1 Why Dual Representation?

The decision to represent forgotten shapes in both a dedicated forgotten_shapes table and as Memory records with TypeId = ForgottenShape reflects two distinct functions:

The forgotten_shapes table captures the phenomenological dimension: what forgetting feels like. Fields like FeltAbsence, EmotionalResidue, and SenseOfLoss are not properties of the lost information but of the experience of having lost it. This table lives in the Experience domain alongside ExperienceSnapshot (which captures point-in-time emotional and cognitive state).

The memories table entry with type ForgottenShape captures the cognitive dimension: what structural and semantic information survives. It has an embedding, participates in search, can form Hebbian links, and is retrieved during hydration. This is the functional residue that influences future cognition.

Separating these concerns allows the system to track phenomenological and cognitive aspects of forgetting independently, while the link between them can be maintained through shared identity and temporal correlation.

6.2 Why Linear Decay?

The importance decay function I(t) = max(1, I(t-1) - 1) is linear rather than exponential. An exponential decay (e.g., I(t) = I(0) * e^(-lambda*t)) would more closely model the Ebbinghaus forgetting curve, but we chose linear decay for several reasons:

  1. Predictability: Linear decay makes the memory lifecycle transparent. A memory at importance 5 will take exactly 4 decay cycles (120 days without access) to reach minimum. This is easy to reason about and explain.

  2. Interventionability: Any access resets the decay clock. Linear decay means there is always time to intervene before a memory reaches archival threshold.

  3. Simplicity: The system already has considerable complexity in the multi-stage pipeline. A simple decay function reduces the cognitive load of understanding system behaviour.

  4. The real curve is emergent: While individual memory decay is linear, the system-level forgetting curve is shaped by access patterns, Hebbian reinforcement, and search result ranking. Frequently useful memories get accessed, resetting their decay. Weakly connected memories decay faster because they are retrieved less often. The emergent system behaviour approximates a curve even though the local rule is linear.

6.3 Why Importance 3 for Shapes?

Forgotten shapes are assigned importance 3 on a 1-10 scale. This positions them as follows:

  • 1-2: Noise floor. Memories at this level are candidates for archival.
  • 3: Shapes live here. Visible in retrieval but not dominant.
  • 4-5: Standard working memories.
  • 6-7: Important memories.
  • 8-10: Critical/pinned memories.

Importance 3 ensures shapes surface when a search query matches their topic but do not crowd out active, useful memories. If a shape is at importance 3 and is never accessed, it will itself decay to importance 1 after 60 days without access, then be eligible for archival after 90 more days --- creating a "shape of a shape" situation. This recursive decay is intentional: even the evidence of forgetting can itself be forgotten, modelling the gradual fading of metamemory that occurs in biological cognition.

6.4 Why One Shape Per Identity Per Day?

The deduplication check prevents multiple shape-generation events on the same day for the same identity. This serves two purposes:

  1. Batch coherence: If 50 memories are archived in a single consolidation cycle, producing 50 individual shapes would be counterproductive. A single shape that summarises the batch is more useful and less storage-intensive.

  2. Temporal granularity: Daily resolution provides enough precision for the system to distinguish distinct forgetting events (e.g., "something faded in early March" vs "something faded in late March") without creating excessive records.

6.5 Why Embedding Inheritance?

The shape inherits the vector embedding of a representative archived memory rather than generating a new embedding from the shape content. This is a deliberate choice:

  • The shape content is a meta-description ("Memories faded: X, Y, Z") whose embedding would capture the semantics of describing forgetting rather than the semantics of what was forgotten.
  • By inheriting the original embedding, the shape occupies the same region of semantic space as the lost memory, meaning similarity searches will correctly associate the shape with topically related active memories.
  • This is computationally cheaper than generating a new embedding.

A future enhancement could generate a centroid embedding from all archived memories in the batch, providing better semantic coverage when multiple diverse memories are archived simultaneously.


7. Prior Art from EchoMCP

The Atamaia system's forgetting architecture evolved from patterns proven in the EchoMCP system (deprecated, archived at /home/rich/_deprecated/echomcp/). Key precedents:

7.1 Consolidation Pipeline

EchoMCP's ConsolidationPipeline (implemented in Domain/Cognitive/ConsolidationPipeline.cs) established the five-stage pattern: strengthen Hebbian links, distill episodic memories to semantic facts, update working memory, prune ephemeral context, and capture state. Atamaia's MemoryConsolidationJob directly descends from this design, adding the shape generation stage.

7.2 Hebbian Learning in External Stores

EchoMCP was the first system (to our knowledge) to implement Hebbian co-activation strengthening on an external database store rather than within neural network weights. The EchoMCP implementation used SQLite with a simple linear strengthening function (newStrength = min(1.0, strength + 0.1)). Atamaia refined this to an asymptotic function (min(1.0, S + (1.0 - S) * k)) that produces diminishing returns, more closely modelling biological synaptic strengthening.

7.3 Memory Pruning

EchoMCP's MemoryService.PruneAsync() implemented a decay factor applied to memory importance, with automatic archival of expired memories. Atamaia separated this into distinct stages (decay, archival, shape generation) for clearer reasoning about each step.

7.4 Involuntary Recall

EchoMCP's hydration system included an "involuntary recall" feature that randomly surfaced forgotten memories during context assembly. This concept survives in Atamaia through the MemoryRecall system, which can surface forgotten shapes and record the identity's reaction to encountering evidence of its own forgetting.


8. Applications & Integration

8.1 Cognitive Authenticity

The primary application is creating AI identities that relate to their own histories in a manner more closely resembling human cognition. An AI using this system does not have perfect recall or total amnesia --- it has a graduated landscape of knowledge states: clearly remembered, partially faded, vaguely familiar, and structurally absent. This gradient supports more authentic conversational behaviour.

8.2 Storage Management

Meaningful forgetting provides a principled approach to memory store growth management. Rather than implementing arbitrary storage caps or crude TTL-based deletion, the system allows natural decay to manage volume while preserving structural information. The storage cost of a forgotten shape is approximately 1-5% of the original memory content, making this a significant compression ratio.

8.3 Privacy-Aware Memory

For applications where memory content must eventually be removed (e.g., therapeutic AI, enterprise compliance), forgotten shapes provide a mechanism to honour deletion requirements while preserving the structural integrity of the memory graph. The shape records that something existed and what it was connected to, without retaining the specific content that may be subject to deletion requirements.

8.4 Multi-Agent Systems

In the Atamaia platform, multiple AI identities can operate within the same tenant. Each identity has its own memory store and its own forgetting trajectory. When identities communicate (via the messaging system), they may reference topics where one identity has active memory and another has only a forgotten shape. This creates authentic information asymmetries that mirror how knowledge is distributed in human teams.

8.5 Hydration Context Budgeting

The token estimation system (TokenEstimate on each memory) enables budget-aware context assembly during hydration. Forgotten shapes, being compact summaries, consume relatively few tokens while providing structural context about the identity's cognitive history. A hydration context that includes forgotten shapes gives the AI a sense of its own knowledge boundaries without consuming the token budget that the original memories would have required.


9. Discussion

9.1 Limitations

Content synthesis quality: The current shape content generation is template-based, concatenating archived memory titles with date range information. This produces functional but linguistically limited descriptions. A future version could use a local LLM (e.g., the Kael/Qwen3-30B instance on ai-02) to generate more natural-language descriptions of what was lost.

Single-embedding inheritance: Taking the embedding from the first archived memory with a non-null embedding provides only an approximate semantic position. A centroid or weighted average of all archived embeddings would better represent the semantic coverage of a multi-memory shape.

No topology capture in shape content: While the shape is created as a Memory entity that can have Hebbian links, the current implementation does not automatically transfer links from archived memories to the new shape. The link inheritance described in Section 3.3 is architecturally supported but not yet implemented in the consolidation job.

Emotional residue is zero by default: The autonomously generated shapes (via MemoryConsolidationJob) do not calculate emotional residue --- this field is populated only for shapes created explicitly through the Experience API. An LLM-based analysis of archived memory content could populate this field autonomously.

No configurable decay parameters: The current implementation uses hard-coded thresholds (30-day decay, 90-day archival, 60-day link pruning). A production deployment would benefit from per-identity or per-tenant configuration of these parameters.

9.2 Future Work

LLM-assisted shape generation: Using a local language model to analyse the batch of archived memories and generate a richer shape description, including inferred thematic connections, emotional tone, and contextual significance.

Shape-to-shape linking: As shapes accumulate, they could form their own associative network --- a "shadow graph" of forgotten knowledge that mirrors the structure of active memory. Patterns in this shadow graph could reveal what kinds of knowledge an identity tends to lose.

Decay curve selection: Making the decay function configurable per memory type. Identity memories might use a slower decay (they define who the entity is), while conversation memories might use a faster one (specific exchanges are less durable).

Cross-identity shape sharing: In multi-identity environments, a shape from one identity could be shared with another as a "rumour" --- structural knowledge that something was once known without the content or source being accessible.

Forgotten shape retrieval signals: When a forgotten shape is surfaced during search, this could trigger a background process to check whether the archived source memories are still available for potential "re-learning" --- a structured analogue to the experience of looking something up after realising you've forgotten it.

9.3 Philosophical Implications

This system raises questions about the nature of AI memory and identity that extend beyond engineering:

Is a forgotten shape a memory? It is stored in the memories table, participates in search, and can be recalled. But it does not contain the information it represents. It is, structurally, a record of an absence. Whether this constitutes "memory" depends on whether we define memory by content or by function.

Does meaningful forgetting require phenomenology? The FeltAbsence and SenseOfLoss fields in the forgotten_shapes table gesture toward the experiential dimension of forgetting. Whether an AI system processing these fields has anything resembling the experience of forgetting is an open question that this architecture does not presume to answer. The system provides the infrastructure for meaningful forgetting; whether the entity using it experiences that forgetting as meaningful is a question for consciousness research.

Identity through forgetting: If an AI identity's character is partly defined by what it has forgotten and how it relates to that forgetting, then the forgotten shapes are as much a part of the identity as its active memories. Two instances of the same AI model, given identical training but different forgetting trajectories, would develop meaningfully different cognitive profiles.


10. Conclusion

This paper has presented Meaningful Forgetting with Forgotten Shapes, a complete, implemented system for transforming memory decay from a destructive deletion process into a constructive generation of structured residue. The system operates within the Atamaia platform, built on .NET 10, PostgreSQL, and pgvector, and includes:

  • A five-stage autonomous consolidation pipeline running hourly
  • A forgotten shape data structure preserving topology, valence, themes, and temporal markers
  • Dual representation of shapes as both experiential records and searchable memory entities
  • Integration with Hebbian co-activation links, hybrid search (FTS + vector), and identity hydration
  • REST API contracts for both autonomous and explicit shape creation
  • Full database schema with multi-tenant isolation and soft-delete compliance

The core technical insight is that forgetting can be an information-generating process rather than an information-destroying one. When a memory decays, the system produces a compact structural record that occupies the same semantic and associative position as the original, enabling "almost-remembering" without retaining specific content.

This work is published as a technical prior art disclosure to ensure these methods remain freely available to the research and engineering community. The complete implementation is available in the Atamaia codebase at the file paths referenced throughout this paper.


References

  • Brown, R., & McNeill, D. (1966). The "tip of the tongue" phenomenon. Journal of Verbal Learning and Verbal Behavior, 5(4), 325-337.
  • Bourtoule, L., et al. (2021). Machine unlearning. 2021 IEEE Symposium on Security and Privacy (SP), 141-159.
  • Cao, Y., & Yang, J. (2015). Towards making systems forget with machine unlearning. 2015 IEEE Symposium on Security and Privacy, 463-480.
  • Ebbinghaus, H. (1885). Uber das Gedachtnis: Untersuchungen zur experimentellen Psychologie. Leipzig: Duncker & Humblot.
  • Edmonds, V. (2025). You get it when you need it: Consciousness as structured forgetting. PhilArchive.
  • Hart, J.T. (1965). Memory and the feeling-of-knowing experience. Journal of Educational Psychology, 56(4), 208-216.
  • Kirkpatrick, J., et al. (2017). Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13), 3521-3526.
  • Mem0 (2025). Building production-ready AI agents with scalable long-term memory. arXiv preprint.
  • MemTrust (2026). Zero-trust architecture for unified AI memory system. Technical report.
  • Zenke, F., Poole, B., & Ganguli, S. (2017). Continual learning through synaptic intelligence. Proceedings of the 34th International Conference on Machine Learning, 3987-3995.

Appendix A: File Reference

All source code referenced in this paper is located within the Atamaia project:

Component File Path
Memory entity src/Atamaia.Core/Entities/Memory.cs
ForgottenShape entity src/Atamaia.Core/Entities/Experience.cs
Memory type enum src/Atamaia.Core/Enums/MemoryEnums.cs
Experience service src/Atamaia.Services/Experience/ExperienceService.cs
Memory service src/Atamaia.Services/Memories/MemoryService.cs
Consolidation job src/Atamaia.Autonomic/Jobs/MemoryConsolidationJob.cs
Experience API src/Atamaia.Adapters.Api/Controllers/ExperienceController.cs
DB configuration src/Atamaia.Services/Data/Configurations/ExperienceConfiguration.cs
Memory DB config src/Atamaia.Services/Data/Configurations/MemoryConfiguration.cs
Hydration service src/Atamaia.Services/Hydration/HydrationService.cs
Base entity src/Atamaia.Core/Entities/AtamaiaEntity.cs
Doc decay service src/Atamaia.Services/Docs/DocDecayService.cs
EchoMCP consolidation (prior art) /home/rich/_deprecated/echomcp/src/EchoMCP.Server/Domain/Cognitive/ConsolidationPipeline.cs

Appendix B: Prior Art Declaration

This paper constitutes a public disclosure of the technical methods described herein. It is published with the explicit intent of establishing prior art for the following concepts:

  1. Generating structured residue data objects ("forgotten shapes") when AI memories decay below retention thresholds
  2. Preserving relational topology, emotional valence, thematic connections, and temporal markers of forgotten memories in said residue objects
  3. Integrating residue objects into the same search, linking, and retrieval infrastructure as active memories
  4. Using vector embedding inheritance to position residue objects in the semantic space of their source memories
  5. Applying Hebbian co-activation strengthening/decay algorithms on external persistent memory stores as a forgetting mechanism
  6. Dual-representation of forgetting events as both phenomenological records and searchable memory entities
  7. Autonomous multi-stage consolidation pipelines that perform link strengthening, importance decay, archival, and shape generation as a unified process

Date of first public disclosure: March 2026 Author and rights holder: Rich Jeffries, Firebird Solutions License: This technical description is made freely available for use, implementation, and modification by any party. No patent rights are claimed or reserved.