Spirituality

The Saṃskāra Stack

Rajesh Ranjan Mahapatra

Saṃskāra is the mind's persistence layer: every experience writes back to storage and biases the next read. How Yoga, Vedānta and Abhidhamma model habit, and what memory neuroscience adds to the picture.

© 2026 Rajesh Ranjan Mahapatra. 7 min read

The Saṃskāra StackAll Spirituality
Home · Writing · Spirituality

The Saṃskāra Stack

Saṃskāra is the mind's persistence layer: every experience writes back to storage and biases the next read. How Yoga, Vedānta and Abhidhamma model habit, and what memory neuroscience adds to the picture.

TLDR

  1. Saṃskāra is the mind's persistence layer: every experience writes back to storage and biases the next read.
  2. Every stateful system needs a persistence layer: the place where transactions leave traces that shape every future transaction.
  3. I want to take this metaphor seriously: not as decoration, but as a way of comparing three classical models of habit formation with each other and with modern memory research.
  4. The model has further structure. Saṃskāras aggregate into vāsanās : deeper dispositional channels, the "perfumes" of accumulated impressions that constitute personality and craving at the trait level.
  5. Advaita Vedānta largely inherits this vocabulary but answers a question Yoga leaves vague: where does the persistence layer sit in the system architecture?
Figure 1Event or action to stable attention opens a revision windowCausal and control schematic
Event or action to stable attention opens a revision window6 declared states connected by 7 authored relations. The figure supports the section TLDR. L0L1L2L3L4 01
Event or action
02
Active mental state
03
Trace is written
04
Disposition is strengthened
05
Future perception and response
06
Stable attention opens a revision window
Reading. The authored topology makes 7 declared relations across 6 states inspectable. Read it as the control structure for “TLDR”, not as measured performance. Dashed paths mark hypotheses, uncertainty or non-authoritative return paths. Schematic derived from the paper's authored topology; no measured quantities.
On this page

Every stateful system needs a persistence layer: the place where transactions leave traces that shape every future transaction. The Indian contemplative traditions identified the mind's persistence layer with remarkable precision and gave it a name: saṃskāra. The word means, roughly, "that which is put together": an impression, a groove, a formatted trace. Every experience, every volition, every repetition writes to this layer, and every subsequent perception and impulse is a read biased by what was written before.

I want to take this metaphor seriously: not as decoration, but as a way of comparing three classical models of habit formation with each other and with modern memory research. Because the traditions did not merely assert that experience leaves traces. They built differentiated architectures: what gets written, where it is stored, how it is retrieved, and (critically, since these are liberation technologies) how entries can be modified or deleted.

Yoga: the vṛtti–saṃskāra write loop

Patañjali's model is the most explicitly cyclical. A vṛtti (a fluctuation, a mental event, a thought or perception) arises in the mind-field (citta). When it subsides, it does not vanish; it deposits a saṃskāra. That saṃskāra then raises the probability of similar vṛttis arising later. The Yoga Sūtras and Vyāsa's commentary describe this as a wheel: vṛtti produces saṃskāra produces vṛtti. In engineering terms: every read triggers a write-back, and the write-back reweights future reads. It is a self-reinforcing cache with no default eviction policy.

The model has further structure. Saṃskāras aggregate into vāsanās: deeper dispositional channels, the "perfumes" of accumulated impressions that constitute personality and craving at the trait level. Volitionally charged impressions form the karmāśaya, the deposit of karma that shapes future circumstance. And crucially, Patañjali specifies a write operation that works in the practitioner's favor: the saṃskāra of restraint. Each moment of successful stillness itself deposits an impression (the nirodha-saṃskāra) so that stability becomes progressively self-maintaining. The cure uses the same persistence mechanism as the disease. You cannot switch off the write path; you can only change what gets written.

Vedānta: where the traces live

Advaita Vedānta largely inherits this vocabulary but answers a question Yoga leaves vague: where does the persistence layer sit in the system architecture? The Vedantic answer is the three-body model. The gross body (sthūla śarīra) is hardware. The subtle body (sūkṣma śarīra) carries the active faculties: mind, intellect, senses. And the causal body (kāraṇa śarīra) is the seed-state: the compressed store of vāsanās from which the whole personality re-instantiates.

The tradition's evidence for this layering is phenomenological and elegant: deep sleep. In dreamless sleep the subtle body's activity ceases (no thoughts, no dreams, no ego-process) yet you wake up as yourself, with your memories, your languages, your neuroses fully intact. Something persisted through the shutdown. Vedānta reads deep sleep as the mind resting in its causal state: processes terminated, storage intact, everything reloaded on waking. Whatever one makes of the ontology, the observation is sharp: personal continuity does not require continuous mental activity, so the traces must be stored somewhere other than the running process. State survives restart; therefore state is persisted outside the process.

Vedānta also gives vāsanā a distinctive spin: the deepest impressions are not merely habits of action but habits of identification: the standing misapprehension that awareness is the body-mind. Ignorance itself is modeled as a persistent entry, which is why the Vedantic remedy is knowledge rather than merely behavior change. Some corruption sits too deep in the stack to be patched by better transactions. It requires re-reading the whole store under a different light.

Abhidhamma: event-level granularity

The Theravāda Abhidhamma offers the finest-grained model of the three: a process model at event resolution. Mind is analyzed as a stream of discrete moments (citta), each arising with a bundle of concomitant factors (cetasikas), performing its function, and ceasing. Habit formation happens at a specific, named point in this stream: the javana phase, the moments of active response in each cognitive process where kamma is generated.

The texts state plainly that repetition conditions strength: each javana sequence conditions its successors (āsevana-paccaya, the "repetition condition" in the Paṭṭhāna's list of conditional relations). Habit is not a metaphorical groove here; it is a specified dependency between numbered events in a process trace.

Between active cognitive processes runs the bhavaṅga: the "life-continuum," a subliminal flow of mind-moments that maintains continuity when nothing is being actively processed. Bhavaṅga is the Abhidhamma's answer to the persistence question, and it is notably dynamic. Not a static store but a continuously running background process whose character was itself conditioned at the start of life and which colors everything that interrupts it.

Latent dispositions get their own category: the anusayas, tendencies like sensual craving, aversion, and conceit that persist in dormant form and activate when conditions trigger them. The distinction the Abhidhamma draws between an active defilement, one at the surface ready to fire. One merely latent is precisely the distinction between a running process, a warm cache, and an entry on disk. Liberation, in this model, is not suppressing active processes but deleting the latent entries: which is why the tradition insists that suppression through concentration alone is temporary, while insight alters the store itself.

Model Active process Persistent structure Update mechanism Claimed release mechanism
Yoga Vṛtti Saṃskāra, vāsanā, karmāśaya Repetition writes and reinforces traces Restraint writes a competing stabilising trace
Vedānta Subtle-body activity Causal-body seed state Identification sustains disposition Knowledge revises the identification
Abhidhamma Citta and javana Conditional continuity and latent tendency Repetition conditions successor events Insight removes the latent condition

The rows are conceptual translations, not evidence that the three traditions describe one hidden mechanism.

What modern memory research adds

The convergences are striking, and worth stating without overreach.

Hebbian plasticity is the vṛtti–saṃskāra loop in synaptic vocabulary: activity patterns that fire together strengthen their own future recurrence. Every read reweights the network. The traditions' core claim (experience is never neutral, every mental event trains the system that produced it) is now textbook neuroscience.

Procedural and habit memory research maps well onto the vāsanā level. Habit learning in the basal ganglia is dissociable from episodic memory, accumulates through repetition, operates without awareness, and (critically) is not erased by new learning. Extinction learning lays down a competing trace rather than deleting the old one, which is why extinguished habits spontaneously recover under stress or context change. Any meditator who has watched a "conquered" reaction reappear years later will recognize this instantly. The Abhidhamma's anusayas (dormant, conditions-triggered, surviving behavioral suppression) are a better model of this data than naive "habit breaking."

Reconsolidation adds the most interesting modern twist: a reactivated memory trace becomes temporarily labile and can be modified before it re-stabilizes. The write path can be reopened; but only while the entry is checked out. This gives a plausible mechanism sketch for why the traditions insist that transformation requires meeting a pattern in full awareness rather than avoiding it: an impression must be activated to be rewritten. Deliberate exposure with a changed response, under stable attention, is a reconsolidation protocol by another name.

And sleep-dependent consolidation (the finding that traces are actively reorganized and stabilized offline) gives an unexpected resonance to the Vedantic intuition that something essential about the persistence layer happens in deep sleep.

def revise_habit(trigger, response, awareness):
    trace = retrieve(trigger)
    if not trace.is_active:
        return "no update window"
    if awareness.is_stable and response != trace.predicted_response:
        return reconsolidate(trace, response)
    return reinforce(trace)

This is a mechanism sketch, not a literal model of saṃskāra or reconsolidation. It makes one testable constraint visible: a dormant pattern cannot be revised until it is active, and activation without a changed response may reinforce it.

Figure 2Trigger reactivates trace to later behaviour tests persistenceCausal and control schematic
Trigger reactivates trace to later behaviour tests persistence8 declared states connected by 4 authored relations. The figure supports the section What modern memory research adds. L0L1L2 01
Trigger reactivates trace
02
Stable awareness present?
03
Automatic response
04
Trace reinforced
05
Response changes?
06
Trace becomes labile
07
Competing response is encoded
08
Later behaviour tests persistence
Reading. The authored topology makes 4 declared relations across 8 states inspectable. Read it as the control structure for “What modern memory research adds”, not as measured performance. Dashed paths mark hypotheses, uncertainty or non-authoritative return paths. Schematic derived from the paper's authored topology; no measured quantities.

Reading the stack honestly

I am not claiming the traditions anticipated neuroscience, and I am not claiming neuroscience validates their metaphysics. Karma across lifetimes, the causal body, the ontology of mind-moments: these are claims of a different kind, and I hold them as a practitioner holds working hypotheses, not as settled findings.

The honest statement is narrower and, to me, more impressive: three independent first-person research programs converged on the same architectural insights: that mind is stateful. That state is layered from active process through warm disposition to deep store. That writes are automatic and continuous; that deletion is hard and suppression is not deletion. That the only real leverage is over what gets written next and over traces caught at the moment of reactivation.

That last point is the practical payload. You are writing to the saṃskāra stack right now, in this and every moment, whether or not you attend to the fact. Practice, in all three traditions, is simply taking responsibility for the write path.