Preprint
Essay

This version is not peer-reviewed.

The Memory That Does Not Forget: The Wunderblock, Conditional Memory, and Variable Resolution in Psychoanalytic AI

Submitted:

23 June 2026

Posted:

24 June 2026

You are already at the latest version

Abstract
This essay presents a four-layer hierarchical memory architecture for retrieval-augmented systems applied to psychoanalytic domains, grounded in the Freudian Wunderblock as a design analogy. It argues that the flat memory of conventional RAG, which treats the whole corpus as an undifferentiated mass of text, destroys the temporal, typological, and genealogical distinctions that make psychoanalytic knowledge operable. It proposes four concepts: conditional memory as an alternative to flat memory, the curated memory unit as a minimal record that preserves identity, context, type, and provenance, conditional unavailability as a reversible demotion that keeps demoted knowledge recoverable, and variable resolution as the capacity to answer with the granularity each query demands. The specific contribution is not hierarchical, temporal, or forgetting-aware memory, which an established line of work already provides, but the combination, for psychoanalytic research, of typological layers, variable resolution, terminological curation, provenance, and the governance of conflicts between theoretical traditions. The Engram module of Cheng et al. (2026) is an in-model lookup primitive and is distinct from the external, curated memory described here. Cost observations are reported as illustrative hypothetical scenarios rather than as the results of a controlled evaluation.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

The Problem of Flat Memory

Retrieval-Augmented Generation transformed the field of artificial intelligence applied to text. The proposal of Lewis et al. (2020, p. 9459) to combine document retrieval with generative models, so that answers are anchored in verifiable evidence, addressed one of the central problems of large language models: hallucination. RAG was rapidly adopted as the standard architecture for systems built on specialised knowledge (Gao et al., 2024). There is, however, a problem that conventional RAG does not face, and that becomes severe in domains of high intellectual density. I will call it flat memory.
Conventional RAG treats the whole corpus as an undifferentiated mass of text. A biographical passage about Lacan, who was born in Paris in 1901 and broke with the IPA in 1953, has the same representational status as a technical definition of objet a in Seminar X. A formulation of the unconscious from 1953 is indistinguishable from a formulation from 1973, even though the concept passed through transformations that reshaped the entire field in those twenty years. A system that searches for Lacan's position on the unconscious may return a chunk from Seminar XI mixed with a chunk from Seminar I, and the fusion produces an answer that is textually supported and conceptually false. Flat memory is blind to the type, the time, and the genealogy of what it stores.
I confess that this failure has accompanied me since the beginning of the project. The first version of the system used conventional RAG. It answered simple questions competently and failed at any question that required a distinction between periods, traditions, or levels of specificity. The failure was silent, which made it more dangerous: the system answered fluently, and only someone who knew the domain noticed the deep confusion beneath the surface precision. Santos (2014) named epistemicide the destruction of forms of knowledge by the imposition of undifferentiated categories, and Carneiro (2005, pp. 96-97) gave the notion its racialised, Brazilian declension, describing it as a seizure of reason that wounds the rationality of the subjugated. Flat memory performs a formal epistemicide: it erases the distinctions that carry meaning and presents the result as though meaning had been preserved.
Possati (2021, p. 16) argues that AI systems have an unconscious dimension composed of latent executions, algorithmic noise, data biases, and projective identifications between humans and machines. The flat memory of conventional RAG is, I hold, a technical manifestation of that algorithmic unconscious: the system does not know that it is conflating levels of knowledge because it has no way to tell them apart. The confusion is architectural rather than accidental. The system does not choose to mix the biographical with the conceptual; it mixes because its memory holds no distinction that would make the mixture detectable.
The thesis of this essay is that the memory of an AI system for psychoanalytic domains must be conditional: organised in layers with different functions, different temporalities, and different access costs. Each layer stores or exposes a different class of information, and the system decides which layer to consult before it consults the language model.

The Wunderblock as a Model of Memory

The Wunderblock that Freud (1925/2011) described, the mystic writing-pad that children played with at Viennese fairs, is a memory device with a property no earlier support possessed: the surface clears when the sheet is lifted, while the marks persist in the layers beneath. The celluloid sheet receives the writing; the wax retains the marks permanently. The surface is always available for a new inscription, and the deep register conserves the trace of every earlier inscription. Freud saw in that toy the model of the perceptual apparatus: an unlimited capacity for reception together with the conservation of durable traces in the same device.
The connection between the Freudian Wunderblock and computational memory is a design analogy with operational consequences rather than a decorative metaphor. The mapping is heuristic: the four layers are functional classes of knowledge and do not correspond element by element to the surfaces of the writing-pad, yet the Wunderblock specifies a dynamic the architecture needs and resolves the same paradox that a memory architecture must resolve. How can a system both perceive, that is, inscribe new experiences, and remember, that is, retain traces of past experiences? Freud's answer was topological: different surfaces in the same apparatus perform different functions. The upper surface, transparent and renewable, receives and discards. The lower layer, opaque and persistent, retains without discarding. The architecture I present translates that topology into four computational layers with an analogous distinction between a renewable working surface and more persistent stores: the cache surface renews itself each session; the deep layers conserve knowledge permanently; and between them an activation and retention policy modulates access without destroying what has been stored.
Freud had already anticipated the question in the Project for a Scientific Psychology of 1895, when he thought of the Bahnungen, the facilitations or pathways between neurons, as the mechanism by which memory inscribes itself in the psychic apparatus (Freud, 1895/1996, p. 227). The Wunderblock of 1925 is the mature model of that intuition, no longer neuronal but topological. What the Project called facilitation, the Wunderblock calls inscription in a deep layer. What the Project called the contact barrier between neurons, the Wunderblock calls the surface that clears. The architecture I propose inherits that lineage: the layers L0 to L2.5 are the permanent facilitations, the cache is the renewable surface, and temporal scoring is the barrier that modulates access.
The transposition of the Wunderblock gains an operational layer that deserves description. The system implements dynamic context compression that operates in real time during the query session, and the compression varies with the active mode of use. The surface of the Wunderblock, which clears to receive new inscriptions, is transposed as the compression of old turns: they are summarised into a compact block that preserves themes and affects without preserving the literal wording. The wax that retains the marks is transposed as selective preservation: affect markers, moments of crisis, and turns where the subject named something for the first time are preserved intact regardless of their temporal position. The mechanism operates in a few milliseconds, with no call to the language model, by word-frequency extraction and marker identification, which shows that the Wunderblock as an architectural model does not raise the cost of computation: it organises it.

The Curated Memory Unit

A language model does not need the whole document to answer well; it needs a compact representation that preserves structure while removing redundancy. That intuition has a precise counterpart in recent architecture research. Cheng et al. (2026) observe that Transformers lack a native primitive for knowledge lookup and are forced to simulate retrieval through computation, an expensive runtime reconstruction of what is effectively a static lookup table, which wastes sequential depth that could serve higher-level reasoning. They introduce conditional memory as a complementary axis of sparsity, instantiated in a module they call Engram, which modernises the classic N-gram embedding into a constant-time lookup addressed by the recent context. The detail that matters for my purposes is the principle: knowledge can be addressed and retrieved as a compact, structured unit rather than reconstructed from raw text at every step.
For a question about the definition of objet a, the context of a RAG system may include five chunks on the same concept, each covering a different aspect with considerable overlap. The model reads thousands of tokens when it would need a few hundred. Liu et al. (2024) showed that language models systematically struggle to use information positioned in the middle of long contexts, the phenomenon they called lost in the middle. Much of the context is filler that the model effectively ignores. In my own development the move from raw chunks to compact, curated units reduced context size substantially while preserving answer quality; I report this as a formative observation rather than as a measured benchmark.
The curated memory unit I propose names the minimal record that preserves identity, context, type, and provenance. Each entry in my memory system is such a unit: a piece of meaning with metadata that lets the system tell what it is, where it came from, in what context it stood, and to which kind of knowledge it belongs. The difference between a chunk and a curated memory unit is the difference between a scrap of paper torn from a book and a catalogue card: the scrap contains text, the card contains knowledge about the text. My use of conditional memory names an architecture of layered external memory with differentiated access, which resonates with, and remains distinct from, the in-model conditional-memory primitive of Cheng et al. (2026).
The term engram connects neuroscience and psychoanalysis along parallel paths rather than a single line of influence. Semon (1904) coined engram to designate the durable modification in the nervous system produced by an experience. Freud, working earlier, described the mnemic trace, the Erinnerungsspur, in the Project for a Scientific Psychology (Freud, 1895/1996, p. 227) and in the topology of the Perception-Consciousness and Memory systems in chapter VII of The Interpretation of Dreams (Freud, 1900/1996). Since Semon's term postdates Freud's 1895 formulation, the two notions converge retrospectively rather than by documented influence. What both describe, and what the in-model lookup of Cheng et al. instantiates in its own way, is a stored trace that can be reactivated under specific conditions rather than retained in raw totality.
I hesitated before borrowing from the engram at all. Josselyn and Tonegawa (2020) showed that engrams are populations of neurons whose synaptic connections are strengthened by experience; the neurological engram is a biological phenomenon, and the unit in my architecture is a data structure. The borrowing is an analogy rather than an identity, and it earns its keep only if it does not collapse that difference, which is why I reserve the word engram for the neuroscientific and in-model lineage and name my own unit plainly, as a curated memory unit.

The Four Layers: From Biography to Style

The architecture I implemented translates the Wunderblock into four layers with distinct properties. Each layer has specific content, a weight in the final search score, an activation rule that determines when it is consulted, and a maximum context resolution it may inject. The sum of these properties produces a system that answers at a resolution appropriate to each kind of query, with no more context than necessary, which dilutes and confuses, and no less than necessary, which truncates and deforms. The weights, thresholds, token limits, and decay parameters reported throughout are heuristic choices of the current implementation, fixed during development and not yet validated by ablation.
Layer L0, biographical, stores factual data about authors: full name with aliases and spelling variants, dates, nationality, institutional affiliation, language of intellectual production, period of activity. It is the layer of lowest resolution, at most thirty tokens of injected context, and lowest weight (0.15), because biographical data are rarely the centre of an academic answer. Its activation is specific: the layer is consulted when the query mentions an author's name or when the router classifies the intention as biographical. The question of when Lacan was born is resolved by L0 in milliseconds, with no vector search and no language model, at no marginal external API cost. The question of what foreclosure is does not activate L0, which saves the tokens that would be injected without use. The decision not to activate is as important as the decision to activate: every unnecessary token of context is noise the model must ignore, and accumulated noise degrades the quality of the answer.
Layer L1, relational, stores the graph of influences and filiations between authors and concepts. It answers questions such as who influenced Lacan or what the relation is between Ferenczi and Freud. The distinction between alliance and antagonism in L1 is typed rather than binary. Lacan and Kojève have a relation of mediated transformative reading: Lacan did not absorb Kojève, he operated a specific torsion on Kojève's reading of Hegel. Lacan and Anna Freud have an institutional antagonism with theoretical divergence: the conflict is epistemological rather than merely personal. Lacan and Lévi-Strauss have an alliance with critical appropriation: Lacan took structuralism and transposed it into the field of the subject in a way that Lévi-Strauss himself did not recognise as continuity. These nuances are the difference between a system that explains intellectual relations and one that names them without understanding them. Weight: 0.25. Resolution: up to one hundred tokens.
Layer L2, semantic, is the heart of the system. It stores concepts with structured definitions: name of the concept, aliases and terminological variants, a short fifty-word definition, a full two-hundred-word definition, associated concepts with the type of association, the period of formulation in the author's work, an index of importance in the corpus, and primary sources. Weight: 0.40. Resolution: up to two hundred tokens. The power of L2 shows itself in comparison with conventional RAG. A query about objet petit a in conventional RAG generates an embedding of the query, searches for the most similar chunks, retrieves five chunks from different parts of the corpus, concatenates them into a context of around two thousand tokens, and sends them to the model for synthesis, a process that in development took tens of seconds and a non-trivial per-query API cost, and whose answer mixed periods without signalling the transformations of the concept. The same query against the system with L2 performs a direct lookup of the objet petit a entry by concept name and returns the structured definition with two hundred tokens of curated context, in tens of milliseconds and at no marginal external API cost, with the distinction of periods already incorporated by expert curation. I present these as formative development comparisons rather than as controlled measurements; the difference in latency and cost is one of orders of magnitude, and it is a matter of architecture rather than of efficiency.
I ask the reader to notice what this comparison reveals. Conventional RAG needs time and cost because it must simulate in real time what L2 stores permanently. L2 is the organised knowledge of the system, the equivalent of the decades of reading and note-taking that a specialised researcher accumulates, formalised in a structure the machine can access without redoing the work at every query. The construction of L2 is, however, the most labour-intensive work of the architecture. Each entry demands reading the primary text, identifying the period of formulation of the concept, extracting the definition with its nuances, determining the associated concepts and the type of association, and validating against the corpus to ensure that the definition introduces no anachronism. That work is irreducible to automation: one can automate the extraction of candidates, but validation and qualification require the psychoanalyst. L2 is the place where the human in the loop is most present and most consequential.
Layer L2.5, stylistic, is the most unusual. I have not found, among the architectures I reviewed, a layer dedicated specifically to psychoanalytic terminological, editorial, and translational tacit knowledge. It stores tacit knowledge about the psychoanalytic field: translation conventions, terminological prohibitions, style notes by author, warnings about entrenched incorrect usages, and particularities of editions and translators. Weight: 0.20. What L2.5 contains is in no dictionary: that Strachey renders Besetzung as cathexis and that this rendering should be avoided; that jouissance, most often rendered as gozo in the Brazilian literature, is kept in French in technical contexts by the project's convention; that the typographic distinction Autre and autre depends on editorial convention; that Seminar XXVII was not published in a definitive form and can be cited only with explicit qualification. That knowledge is what distinguishes those who know the field deeply from those who have read the introductions. It is not in the text of the Seminars: it lives in the embodied memory of decades of reading, teaching, supervision, and debate. L2.5 is the project of formalising that tacit knowledge into a computable structure, transferring it from the specialist's memory to a memory layer the system consults at each generation of text. It is the most psychoanalytic technical gesture of the architecture: bringing to the explicit what operated only in the implicit.

The Query Resolution Router: Before the Search, the Decision

The greatest operational innovation of the architecture is not in the search. It is in what happens before the search: the decision about which search to run, with which tools, with which model, at which cost. Conventional RAG either ignores that decision, always using the same strategy, or delegates it to the language model, which is slow and expensive. The Query Resolution Router makes that decision explicit and automated.
The observation that motivates the Router is simple: most queries in a specialised system do not need a language model. If the researcher asks what objet petit a is, the answer is in L2. Invoking a large model to answer that question is like calling a surgeon to measure blood pressure: technically possible, far too costly, entirely unnecessary. The Router classifies by pattern matching, with regular expressions that detect specific query structures, and falls back to a language model only when the patterns are insufficient. The pattern classifier is free, fast, and sufficient for a large share of queries in domains where language follows predictable conventions.
The Router operates in six modes. The DEFINITION mode is activated for definitional queries and resolves by direct lookup in L2 with no marginal external API cost in tens of milliseconds. The BIO mode is analogous for biographical data, resolved by L0. The CITATION mode is activated for searches of specific passages of the primary corpus. Together these three modes cover a large share of queries with no marginal external API cost. The THEORY_RELATION mode is activated for queries of theoretical analysis and comparison between authors, using vector search with cross-language translation and a generative model for synthesis, at a low per-query cost and a latency of tens of seconds. The GENERAL mode covers queries of general knowledge. The COMPLEX_ANALYSIS mode is reserved for queries that demand sophisticated reasoning and the generation of high-quality academic text, using the most powerful model of the cascade at the highest per-query cost.
The competitive positioning that results is singular. A premium configuration, a top-tier commercial model with professional translation for every query, produces high quality at a monthly cost on the order of thousands of dollars for a thousand queries a day. The architecture with the Query Resolution Router and layered memory routes most queries to the layers and the pattern classifier, which run at no marginal external API cost, and reserves the paid models for the minority of queries that genuinely require them. Whether this preserves quality, and by how much it lowers cost, depends on the model prices, the tokens per query, the share of queries on each route, the hardware, and the cache state; a reproducible costing that fixes those variables remains future work. I therefore present the cost contrast as a hypothetical scenario rather than as a measured result, and I make no quality-parity claim. The design intuition behind it is plain: spend computation where it changes the answer, not where a lookup suffices. I confess that this simple phrase, not wasting resources where they are not needed, carries a consequence that goes beyond financial economy. When the cost of access to organised knowledge falls towards zero for the most frequent questions, access is democratised. The architecture reduces the infrastructural disadvantage faced by researchers without access to premium services. Conditional memory is, in this sense, a political position about who can do serious research.

Hybrid Search and Conflict Resolution

The memory layers sit on top of an acquisition-and-retrieval pipeline that I describe in a companion manuscript (Bonomo, in preparation), and I note here only what bears on the memory architecture. For the queries that reach the modes that search the vector corpus, retrieval is hybrid, combining keyword and semantic ranking through Reciprocal Rank Fusion (Cormack et al., 2009, p. 758), with weights adapted to the kind of query. The corpus is multilingual: Lacan in French, Freud in German, the secondary literature across English, French, Spanish, and Portuguese. A multilingual embedding provides the baseline cross-language retrieval, so a query in Portuguese can reach a passage in French without prior translation; query translation is an optional terminological expansion that improves recall on specialised terms rather than a precondition of search. The asymmetry I adopt is deliberate: display translation, performed locally (NLLB Team, 2022), can tolerate imperfection because the researcher sees the original alongside it, while terminological expansion of the query is held to a stricter standard, since a corrupted term sends the search into the wrong region of the space without the researcher noticing.
A terminological guard protects the specialised vocabulary at the points where automatic translation would corrupt it, substituting the project's chosen equivalents before a term enters the cache. Those equivalents are editorial conventions of this project rather than universal verdicts, and the field's disputes are real: the Brazilian reception debates recalque against repressão for Freud's Verdrängung, and renders Lacan's jouissance most often as gozo, a consecrated translation that nonetheless loses part of the term, which is why the project keeps jouissance in French in technical contexts while flagging gozo as the accepted alternative. The guard encodes such decisions so that they apply consistently and remain visible as decisions, open to revision, rather than dissolving silently into the cache. What matters for the memory architecture is that these conventions live in the stylistic layer and are consulted at generation time, which is what lets a downstream agent avoid, for instance, rendering Besetzung as cathexis.
One example shows why the stakes are high. An uncontrolled rendering of foraclusão as exclusão would erase a clinical distinction, since foraclusão, Verwerfung in Freud and forclusion in Lacan, is the mechanism that the tradition ties to the structure of psychosis, while the common word exclusão carries none of that. The guard holds fifty-seven such terms across the working languages and substitutes the project's equivalents before a term reaches the cache, so that a single silent error does not propagate through every later search. I treat the gains from this layer as formative observations from building the system rather than as a benchmark.
The conflict-resolution module faces a problem that no embedding model resolves: theoretical homonymy. The unconscious for Freud, for Lacan, and for Jung designates different structures. The Freudian unconscious of the primary process and of repressed representations; the Lacanian unconscious structured like a language; the Jungian unconscious of the archetypes and the collective. A conventional system that searches for the unconscious retrieves chunks from the three traditions indistinctly, and the synthesis it produces is a non-concept that belongs to none of them. The module operates at three levels of severity determined by the number of traditions in conflict: low conflict raises an alert; medium conflict requests specification from the researcher; high conflict blocks the inference and presents the configurations separately, refusing to produce a synthesis that would introduce distortion. In development, before the module, a sizeable share of the answers to queries about terms shared across traditions mixed conceptualisations without signalling it; after the module that share fell sharply. I report these as formative observations. This is the kind of improvement that no embedding optimisation could produce, because the problem lies in the epistemic logic of how the results are treated rather than in the quality of the search.

Conditional Unavailability: Activation Decay and Reversible Demotion

The memory of the system is not timeless. Different kinds of knowledge have different relations with the present time of the query, and ignoring that difference produces a system that treats what was consulted yesterday and what has not been consulted in six months as equally relevant. Temporal scoring implements an activation-decay and retention policy: what was used a great deal recently has a lower activation threshold and is more easily evoked; what has not been used for a long time has a higher threshold. Nothing is destroyed.
The score is computed as a weighted combination of recency (weight 0.6), logarithmic frequency (weight 0.3), and historical relevance (weight 0.1). The decay is exponential after seventy-two hours without use, with a floor of thirty per cent, which keeps rarely consulted entries minimally available. In its mechanism this is an activation-decay and retention policy, close to the recency, importance, and relevance scoring of Generative Agents (Park et al., 2023), to the time-based forgetting and reinforcement of MemoryBank (Zhong et al., 2024), which draws on the Ebbinghaus forgetting curve, and to the tiered storage of memory-operating-system designs such as MemoryOS (Kang et al., 2025). I want to be exact about what it is and is not. It is not Freudian repression. Repression, in the clinical sense, is a defence: a representation is held out of consciousness because of its link to unpleasure, incompatibility, or conflict, and not because it was used a long time ago. I therefore call the operation conditional unavailability, and I invoke repression in two limited ways. First, as the inspiration for reversibility: what is demoted is unavailable rather than absent, and it can return when the context changes, in the spirit of Freud's claim (1915/2010) that the repressed is not destroyed but persists and can return in transformed forms. Second, as a critical model: that an automatic policy can render content unavailable is itself a warning, since a system could come to demote tensions for reasons unrelated to their importance, and naming the mechanism conditional unavailability keeps that warning audible. This also distinguishes the present notion from the algorithmic repression discussed in a companion essay on machine dreaming, where repression names the suppression of theoretical tensions by coherentist consolidation; the two uses name different operations and should not be conflated.
Conditional unavailability resolves a problem that flat memory ignores: the management of differentiated access to a knowledge too vast to be equally available at every moment. A corpus of 257,130 chunks cannot all be at the same level of activation without the search drowning in excess. The policy is the triage mechanism that lets the system prioritise without destroying, demote without erasing, and reactivate without reconstructing. The complete event sourcing that accompanies this dynamic records each operation as an immutable event: for any answer it is possible to trace exactly which entries were consulted, which thresholds were reached, and in which temporal state of the corpus the answer was generated. That auditability is a condition of epistemic transparency: the system does not merely answer, it declares the conditions under which the answer was produced. For a system that serves academic production, the audit trail allows one to verify that each citation comes from a validated entry. For a system that serves clinical listening, it allows one to verify that the namings of affect were generated from curated concepts and from correctly resolved conceptual conflicts.
Temporality has a clinically relevant application in the management of concepts with several historical configurations. The concept of jouissance in Lacan has at least three configurations: the forbidden jouissance of Seminar VII (1959-60), articulated with the Law and the father, the prohibition at the origin of desire; the surplus jouissance of Seminar XVI (1968-69), homologous to Marxian surplus value, the quota of jouissance lost on entry into language; and the feminine jouissance of Seminar XX (1972-73), beyond the phallic, which does not articulate completely with the Symbolic. A system without temporality returns the three configurations indistinctly, or the most frequent in the corpus, and produces an anachronistic synthesis that presents as coherent what is historically stratified. The system with the activation-decay policy prioritises the definition of the period under discussion: if the recent queries were about Seminar VII, the score of that period's definition rises, and the system prioritises it without erasing the others. The analogy with free association is not forced: just as the analyst listens to what the analysand says now in the light of what was said before, the system weighs what the researcher asks now in the light of earlier questions, and adjusts the resolution of the memory to the living context of the research session.
The policy gained an operation that makes the reversibility concrete. Every six hours a silent worker traverses the accumulated markers and runs a pruning pass: markers older than thirty days with fewer than two appearances receive the pruned flag. The pruned marker is not deleted: it remains in the database, inaccessible to the standard search, and recoverable if the context changes. The operation is a soft delete, and the choice was deliberate. The pruned marker is the point where the analogy with Freud's reversible repressed (1915/2010) does real work: if a theme that seemed resolved reappears in the subject's speech three months later, the system can reactivate the pruned markers and recognise that the theme had only been demoted, never resolved. The distinction between deleting and pruning is the distinction between erasure and reversible demotion: the first destroys, the second preserves under the condition of a reversible unavailability.

Learning from Error

The system errs. That simple sentence contains the most unexpected contribution of the architecture. The error-learning mechanism records each failure diagnosed by supervision and turns it into a rule that reduces the likelihood of recurrence. Failed searches, queries that return no result above the threshold or that the researcher reformulates several times, are recorded as failure events and classified: a conceptual gap when the concept is absent from L2, an authorial gap when the author has no profile in L0 or L1, a relational gap when the relation between authors is not mapped. The events are clustered by similarity to identify patterns: recurrent failures on the same theme indicate a systemic gap rather than a badly formulated query.
A concrete example: the pair Autre and autre, big Other and little other in Lacan, was identified as a high-severity gap. Multiple queries about other, Other, and the abbreviation A/a returned inadequate results because the typographic distinction was not captured by the embedding models, which normalise capitalisation, and L2 had no specific entry for the distinction. The system detected the pattern, classified it as a high-severity conceptual gap, and generated an expansion suggestion that the researcher validated: to add an L2 entry for big Other and petit autre, with a curated definition, associated concepts, and a terminological note on the typographic distinction that the editorial conventions of different translations treat in incompatible ways. The cycle of failure, detection, classification, suggestion, validation, and expansion is error-learning in action. The system does not learn on its own: validation by the human specialist is required before any expansion of the corpus. The system identifies where it needs to learn, frees the specialist from having to monitor the gaps actively, and presents the suggestions prioritised by severity and frequency.
Freud (1901/1996) showed that the parapraxis, the Fehlleistung, is a meaningful formation: it reveals something the subject did not know they knew. The errors of the system are not formations of the unconscious, because the system has no unconscious. They are, however, revealing of architectural biases the design did not anticipate. A system that confuses recalque with repressão reveals that the translation model was trained on a corpus where the two terms are synonyms. A system that mixes temporalities reveals that the chunking did not preserve temporal information. Each error, when diagnosed clinically rather than simply corrected metrically, reveals something about the structure of the system that smooth functioning would not reveal. I ask the reader to notice the inversion: in a conventional system the error is a bug to fix; in a system of psychoanalytic orientation the error is material to analyse. The correction that follows analysis modifies the position of the system; the correction that follows a bug diagnosis modifies only the parameter.

Towards a Memory That Knows What It Does Not Know

The contribution of this essay is double. The hierarchical layers L0 to L2.5 resolve the problem of flat memory, producing answers at a resolution appropriate to each kind of query and eliminating the cost of the language model for the queries that the lower layers resolve directly. Conditional unavailability introduces a dynamic into the memory: the system does not merely store, it prioritises, demotes, and reactivates as the context changes. Error-learning turns failures into accumulated knowledge. And the curated memory unit offers a record that preserves identity, context, type, and provenance. None of these mechanisms is new on its own: hierarchical memory, recency-and-importance scoring, and time-based forgetting are an established line of work, from the recency, importance, and relevance retrieval of Generative Agents (Park et al., 2023), to the forgetting-curve dynamics of MemoryBank (Zhong et al., 2024), to the tiered storage of MemoryOS (Kang et al., 2025). The contribution here is their combination, for psychoanalytic research, with the epistemological typing of the layers, variable resolution, terminological curation, provenance, and the governance of conflicts between traditions.
A further piece of evidence that the architecture is sound is that the same memory system feeds applications with distinct operational logics. A system of academic production consumes the layers for research: a lookup in L2 for definitions, a search in L1 for relations, a consultation of L2.5 before generating text to check terminological conventions. When the writing agent produces academic text, L2.5 ensures that it does not use cathexis, that it preserves objet petit a without translation, that it signals terminological ambiguities. When the revision agent audits the produced text, event sourcing makes it possible to trace each statement back to the corpus entry that supports it, flagging as a potential hallucination any statement with no identified chunk.
A system of clinical listening consumes the same layers for a completely different function: the naming of affects. When a person describes a suffering without managing to name it, such as a sense of not existing for real, of not being real, the semantic search filters by the subjective-experience type and retrieves concepts that describe similar experiences: depersonalisation, non-being, subjective alienation, central emptiness. The semantic classification constrains retrieval towards passages classified as conceptual, those that name experiences, rather than biographical data about those who described them. And the distinction between offering a diagnosis and offering a naming is formalised at the level of memory: L2.5 ensures that terms with a diagnostic charge are not presented as a naming of affect without the mediation that the position of listening requires. That one and the same memory system feeds both academic writing and the listening to suffering, without one application contaminating the other, shows that well-structured knowledge serves all who need it, whatever the context of use. The pipeline builds the memory once; the systems consume it each in its own way. The memory architecture has not been validated for clinical use and does not replace the independent safety, crisis, consent, and human-supervision subsystems that any listening deployment requires.
Possati (2021, p. 26) argues that AI reproduces the organisation of the psyche in three dimensions: effective functioning, correct functioning, and the black box. The explicit layers L0 to L2.5 are the effective functioning: the organised, accessible knowledge. Error-learning makes visible the mistaken correct functioning, what the system thought it knew but did not. And the activation-decay policy, with its threshold and its floor of thirty per cent, produces a limited black box: what lies below the threshold is not ignored, its access is made difficult, and it can return when the context changes. A cautious version of the distinction between repression and foreclosure can be applied to the system: what the memory demotes can return, while a gap in the corpus can produce an effect formally analogous to an ungrounded return, without constituting foreclosure in the Lacanian clinical sense.
I confess that there is something vertiginous in building a memory system for psychoanalysis using psychoanalytic concepts as the architectural model. The Wunderblock is less a metaphor than a working model for the architecture: a specification of a layered memory with differentiated access, where the surface clears to receive new inscriptions and the deep register conserves the trace of every earlier inscription. Computer science already has caches, paging, memory tiers, selective forgetting, and eviction policies. What psychoanalysis adds to the engineering of computational memory is not the invention of productive forgetting but a distinctive interpretation of unavailability and return, where what is demoted is not lost and where unavailability can be as structuring as presence.
Memory is not a feature one adds to an AI system: it is the architecture. The way a system organises what it knows determines what it can do, with what quality, at what cost, and with what epistemic transparency. Conditional memory is, in the end, a demonstration that organising well what one knows, with the right distinctions, in the right layers, with the right forgetting, is the act that makes knowledge possible. The Wunderblock, let us recall, was a fairground toy: it cost little and was within reach of any Viennese child. Freud built upon it a model of the psychic apparatus. The conditional memory I present is a researcher's toy: it costs little, operates with what is public, and sustains an architecture that organises knowledge with the seriousness knowledge deserves. That the same infrastructure serves both a system of academic research and a system for the listening of suffering is the strongest evidence that well-organised knowledge serves all who need it, and that memory, when it is conditional, is at once rigorous and democratic.

Limitations

This is a conceptual and design essay, and its claims should be read as such. The system exists and operates, and the corpus is real, with its 257,130 chunks, its four layers, its activation-decay policy, and its fifty-seven guarded terms. The comparative figures I report, on latency, cost, recall, conflict reduction, and terminological improvement, are formative observations from building the system rather than the results of a controlled evaluation. They were produced without a pre-registered protocol, a gold set, independently trained raters, inter-rater agreement, fixed baselines, recorded model versions and parameters, or confidence intervals, and the cost comparison with a premium configuration is an illustrative order-of-magnitude estimate rather than a measured benchmark. The Terminology Guard depends on continuous human curation: the fifty-seven terms were identified by a psychoanalyst with decades of practice, and new problematic terms appear as the field evolves. The Query Resolution Router classifies by pattern-based heuristics, efficient and free, yet limited to queries formulated in a conventional way. Error-learning depends on a sufficient volume of use for the failure patterns to become detectable, so in early use the system does not learn for lack of a clusterable history. And L2.5, which stores the most valuable tacit knowledge, is the layer that goes out of date most quickly, as terminological norms evolve, editions are revised, and consensuses change. Continuous maintenance by the human specialist is a condition of possibility of conditional memory rather than an accessory. A proper evaluation would hold the architecture fixed while varying the model, and the model fixed while varying the architecture, and would report metrics, hardware, and uncertainty; that is the natural next step for turning the design argument of this essay into a documented technical result.

Disclosure of AI Use

In preparing this manuscript the author used large language models during 2026 to assist with translation from Portuguese into English, drafting, language revision, and the organisation of references. All conceptual claims, interpretations, and final decisions remain the author’s own. The author reviewed and corrected the entire manuscript, verified the cited sources, and accepts full responsibility for the final text. No AI tool meets the criteria for authorship, and none is listed as an author. The system discussed in the essay (the layered memory architecture of PhDSapiens) is an object of the research, distinct from any tool used in manuscript preparation.

Author Contributions

H.A.R.B. is the sole author and is responsible for the conceptualisation, the theoretical analysis, the design of the memory architecture, and the writing of this manuscript.

Conflicts of Interest

The author is the founder of TMU-LAB and the designer and developer of the layered memory architecture, part of the PhDSapiens project, discussed in this essay. The author declares no financial conflicts of interest.

Funding

This research received no external funding.

Ethics Statement

This manuscript reports no study involving human participants and uses no identifiable clinical material. The clinical-listening examples are illustrative and constructed for exposition, and describe the design of research software rather than a clinical study. The memory architecture has not been validated for clinical use and does not replace the independent safety, crisis, consent, and human-supervision subsystems that a clinical deployment would require.

Data Availability

The system rests on a primary corpus of works by Freud, Lacan, and others that retain their respective copyrights and is therefore not publicly deposited. The architecture of the memory layers, the schema of the records, the temporal-scoring parameters, and the Terminology Guard list are available from the author on reasonable request.

Acknowledgments

The author thanks Véronique Donard for the prior collaborative work on the foundations of an ethical and decolonial AI (Bonomo & Donard, 2026), on which several of the concepts mobilised here build, and for her scientific supervision of the broader research within which the PhDSapiens project took shape.

References

  1. Bonomo, H. A. R. (in preparation). From the encyclopaedia to the vector: The corpus pipeline as epistemic act in psychoanalytic AI [Manuscript in preparation].
  2. Bonomo, H. A. R.; Donard, V. Violência epistêmica algorítmica: fundamentos teóricos e éticos de uma IA decolonial [Algorithmic epistemic violence: Theoretical and ethical foundations of a decolonial AI]. Tempo Psicanalítico 2026, 58, e-952. [Google Scholar]
  3. Carneiro, S. A construção do outro como não-ser como fundamento do ser [The construction of the other as non-being as the foundation of being]. Doctoral dissertation, Universidade de São Paulo, 2005. [Google Scholar]
  4. Cheng, X.; Zeng, W.; Dai, D.; Chen, Q.; Wang, B.; Xie, Z.; Huang, K.; Yu, X.; Hao, Z.; Li, Y.; Zhang, H.; Zhang, H.; Zhao, D.; Liang, W. Conditional memory via scalable lookup: A new axis of sparsity for large language models. arXiv 2026, arXiv:2601.07372. [Google Scholar]
  5. Cormack, G. V.; Clarke, C. L. A.; Büttcher, S. Reciprocal rank fusion outperforms Condorcet and individual rank learning methods. In Proceedings of the 32nd International ACM SIGIR Conference; 2009; pp. 758–759. [Google Scholar]
  6. Freud, S. Projeto de uma psicologia [Project for a scientific psychology]. In Edição standard brasileira das obras psicológicas completas de Sigmund Freud; Salomão, J., Translator; Imago, 1996; Vol. 1, p. 227. (Original work published 1895). [Google Scholar]
  7. Freud, S. A interpretação dos sonhos [The interpretation of dreams], chapter VII. In Edição standard brasileira das obras psicológicas completas de Sigmund Freud (Vols. 4–5).; Salomão, J., Translator; Imago, 1996. (Original work published 1900). [Google Scholar]
  8. Freud, S. Sobre a psicopatologia da vida cotidiana [The psychopathology of everyday life]. In Edição standard brasileira das obras psicológicas completas de Sigmund Freud; Salomão, J., Translator; Imago, 1996; Vol. 6. (Original work published 1901). [Google Scholar]
  9. Freud, S. A repressão [Repression]. In Obras completas; de Souza, P. C., Translator; Companhia das Letras., 2010; Vol. 12. (Original work published 1915). [Google Scholar]
  10. Freud, S. Nota sobre o “bloco mágico” [A note upon the mystic writing-pad]. In Obras completas; de Souza, P. C., Translator; Companhia das Letras., 2011; Vol. 16. (Original work published 1925). [Google Scholar]
  11. Gao, Y.; Xiong, Y.; Gao, X.; Jia, K.; Pan, J.; Bi, Y.; Dai, Y.; Sun, J.; Wang, H. Retrieval-augmented generation for large language models: A survey. arXiv 2024, arXiv:2312.10997. [Google Scholar]
  12. Josselyn, S. A.; Tonegawa, S. Memory engrams: Recalling the past and imagining the future. Science 2020, 367, eaaw4325. [Google Scholar] [CrossRef] [PubMed]
  13. Kang, J.; Ji, M.; Zhao, Z.; Bai, T. Memory OS of AI agent. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing; 2025; pp. 25961–25970. [Google Scholar] [CrossRef]
  14. Lacan, J. Le séminaire, livre VII: L’éthique de la psychanalyse (1959–1960); Seuil, 1986. [Google Scholar]
  15. Lacan, J. Le séminaire, livre XVI: D’un Autre à l’autre (1968–1969); Seuil, 2006. [Google Scholar]
  16. Lacan, J. Le séminaire, livre XX: Encore (1972–1973); Seuil, 1975. [Google Scholar]
  17. Lewis, P.; Perez, E.; Piktus, A.; Petroni, F.; Karpukhin, V.; Goyal, N.; Küttler, H.; Lewis, M.; Yih, W.; Rocktäschel, T.; Riedel, S.; Kiela, D. Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in Neural Information Processing Systems 2020, 33, 9459–9474. [Google Scholar]
  18. Liu, N. F.; Lin, K.; Hewitt, J.; Paranjape, A.; Bevilacqua, M.; Petroni, F.; Liang, P. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics 2024, 12, 157–173. [Google Scholar] [CrossRef]
  19. NLLB Team. No language left behind: Scaling human-centered machine translation; Meta AI, 2022. [Google Scholar]
  20. Park, J. S.; O’Brien, J. C.; Cai, C. J.; Morris, M. R.; Liang, P.; Bernstein, M. S. Generative agents: Interactive simulacra of human behavior. In Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology (UIST ’23); 2023. [Google Scholar]
  21. Possati, L. M. The algorithmic unconscious: How psychoanalysis helps in understanding AI; Routledge, 2021. [Google Scholar]
  22. Santos, B. S. Epistemologies of the South: Justice against epistemicide; Paradigm Publishers, 2014. [Google Scholar]
  23. Semon, R. Die Mneme als erhaltendes Prinzip im Wechsel des organischen Geschehens; Engelmann, 1904. [Google Scholar]
  24. Zhong, W.; Guo, L.; Gao, Q.; Ye, H.; Wang, Y. MemoryBank: Enhancing large language models with long-term memory. Proceedings of the AAAI Conference on Artificial Intelligence 2024, 38(17), 19724–19731. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated