The Eight Consciousnesses (Skt. aṣṭa vijñānakāyāḥ) is a classification developed in the tradition of the Yogācāra school of Mahayana Buddhism. They enumerate the five sense consciousnesses, supplemented by the mental consciousness (manovijñāna), the defiled mental consciousness (kliṣṭamanovijñāna), and finally the fundamental store-house consciousness (ālāyavijñāna), which is the basis of the other seven. This eighth consciousness is said to store the impressions (vāsanāḥ) of previous experiences, which form the seeds (bīja) of future karma in this life and in the next after rebirth.
All surviving schools of Buddhist thought accept – "in common" – the existence of the first six primary consciousnesses (Sanskrit: vijñāna, Tibetan: རྣམ་ཤེས་, Wylie: rnam-shes). The internally coherent Yogācāra school associated with Maitreya, Asaṅga, and Vasubandhu, however, uniquely – or "uncommonly" – also posits the existence of two additional primary consciousnesses, kliṣṭamanovijñāna and ālayavijñāna, in order to explain the workings of karma. The first six of these primary consciousnesses comprise the five sensory faculties together with mental consciousness, which is counted as the sixth. According to Gareth Sparham,
The ālaya-vijñāna doctrine arose on the Indian subcontinent about one thousand years before Tsong kha pa. It gained its place in a distinctly Yogācāra system over a period of some three hundred years stretching from 100 to 400 C.E., culminating in the Mahāyānasaṃgraha, a short text by Asaṅga (circa 350), setting out a systematic presentation of the ālaya-vijñāna doctrine developed over the previous centuries. It is the doctrine found in this text in particular that Tsong kha pa, in his Ocean of Eloquence, treats as having been revealed in toto by the Buddha and transmitted to suffering humanity through the Yogācāra founding saints (Tib. shing rta srol byed): Maitreya[-nātha], Asaṅga, and Vasubandhu.
While some noteworthy modern scholars of the Gelug tradition (which was founded by Tsongkhapa's reforms to Atisha's Kadam school) assert that the ālāyavijñāna is posited only in the Yogācāra philosophical tenet system, all non-Gelug schools of Tibetan buddhism maintain that the ālāyavijñāna is accepted by the various Madhyamaka schools, as well. The Yogācāra eightfold network of primary consciousnesses – aṣṭavijñānāni in Sanskrit (from compounding aṣṭa, "eight", with vijñānāni, the plural of vijñāna "consciousnesses"), or Tibetan: རྣམ་ཤེས་ཚོགས་བརྒྱད་, Wylie: rnam-shes tshogs-brgyad – is roughly sketched out in the following table.
The first five sense-consciousnesses along with the sixth consciousness are identified in the Suttapiṭaka, especially the Salayatanavagga subsection of the Saṃyuttanikāya:
"Monks, I will teach you the All. Listen & pay close attention. I will speak."
The Blessed One said, "What is the All? Simply the eye & forms, ear & sounds, nose & aromas, tongue & flavors, body & tactile sensations, intellect & ideas. This, monks, is called the All.  Anyone who would say, 'Repudiating this All, I will describe another,' if questioned on what exactly might be the grounds for his statement, would be unable to explain, and furthermore, would be put to grief. Why? Because it lies beyond range."
Also, the early Buddhist texts speak of anusayā (Sanskrit: anuśayāḥ), the “underlying tendencies” or “latent dispositions” which keep beings caught in the circle of samsara. These potential tendencies are generally seen as unconscious processes which "lie beneath" our everyday consciousness, and according to Waldron "they represent the potential, the tendency, for cognitive and emotional afflictions (Pali: kilesā, Sanskrit: kleśāḥ) to arise".
The Sautrāntika school of Buddhism, which relied closely on the sutras, developed a theory of seeds (bīja, 種子) in the mindstream (cittasaṃtāna, 心相續, lit. "mind-character-continuity") to explain how karma and the latent dispositions continued throughout life and rebirth. This theory later developed into the alayavijñana view.
The Theravāda theory of the bhavaṅga may also be a forerunner of the ālāyavijñana theory. Vasubandhu cites the bhavaṅgavijñāna of the Sinhalese school (Tāmraparṇīyanikāya) as a forerunner of the ālāyavijñāna. The Theravadin theory is also mentioned by Xuánzàng.
The texts of the Yogācāra school gives a detailed explanation of the workings of the mind and the way it constructs the reality we experience. It is "meant to be an explanation of experience, rather than a system of ontology". The theory of the ālāyavijñana and the other consciousnesses developed out of a need to work out various issues in Buddhist Abhidharma thought. According to Lambert Schmithausen, the first mention of the concept occurs in the Yogācārabhumiśāstra, which posits a basal consciousness that contains seeds for future cognitive processes. It is also described in the Saṃdhinirmocanasūtra and in the Mahāyānasaṃgraha of Asaṅga.
Vasubandhu is considered to be the systematizer of Yogācāra thought. Vasubandhu used the concept of the six consciousnesses, on which he elaborated in the Triṃśikaikākārikā (Treatise in Thirty Stanzas).
According to the traditional interpretation, Vasubandhu states that there are eight consciousnesses (vijñānāni, singular: vijñāna):
The ālayavijñāna (Japanese: 阿頼耶識 arayashiki), or the "All-encompassing foundation consciousness", forms the "base-consciousness" (mūlavijñāna) or "causal consciousness". According to the traditional interpretation, the other seven consciousnesses are "evolving" or "transforming" consciousnesses originating in this base-consciousness. The store-house consciousness accumulates all potential energy as seeds (bīja) for the mental (nāma) and physical (rūpa) manifestation of one's existence (nāmarūpa). It is the storehouse-consciousness which induces rebirth, causing the origination of a new existence.
The ālayavijñāna is also described in the Saṃdhinirmocanasūtra as the "mind which has all the seeds" (sarvabījakam cittam) which enters the womb and develops based on two forms of appropriation or attachment (upādāna); to the material sense faculties, and to predispositions (vāsanāḥ) towards conceptual proliferations (prapañca). The Saṃdhinirmocanasūtra also defines it in varying ways:
This consciousness is also called the appropriating consciousness ("adana-vijñana") because the body is grasped and appropriated by it.
It is also called the "alaya-vijñana" because it dwells in and attaches to this body in a common destiny ("ekayogakṣema-arthena").
In a seemingly innovative move, the Saṃdhinirmocanasūtra states that the alayavijñana is always active subliminally and occurs simultaneously with, "supported by and depending upon" the six sense consciousnesses.
According to Asanga's Mahāyānasaṃgraha, the alayavijñana is taught by other Buddhist schools by different names. He states that the alaya is what the Mahasamghikas call the “root-consciousness” (mulavijñana), what the Mahīśāsakas call “the aggregate which lasts as long as samsara” (asaṃsārikaskandha) and what the Sthaviras call the bhavaṅga.
The store-house consciousness receives impressions from all functions of the other consciousnesses, and retains them as potential energy, bīja or "seeds", for their further manifestations and activities. Since it serves as the container for all experiential impressions it is also called the "seed consciousness" (種子識) or container consciousness.
According to Yogācāra teachings, the seeds stored in the store consciousness of sentient beings are not pure.[note 2]
The store consciousness, while being originally immaculate in itself, contains a "mysterious mixture of purity and defilement, good and evil". Because of this mixture the transformation of consciousness from defilement to purity can take place and awakening is possible.
The equation of ālāyavijñāna and tathāgatagarbha was contested. It was seen as "something akin to the Hindu notions of ātman (permanent, invariant self) and prakṛti (primordial substrative nature from which all mental, emotional and physical things evolve)." According to Lusthaus, the critique led by the end of the eighth century to the rise of the logico-epistemic tradition of Yogācāra and a hybrid school combining Tathāgatagarbha thought with basic Yogācāra doctrines:
The logico-epistemological wing in part sidestepped the critique by using the term citta-santāna, "mind-stream", instead of ālaya-vijñāna, for what amounted to roughly the same idea. It was easier to deny that a "stream" represented a reified self. On the other hand, the Tathāgatagarbha hybrid school was no stranger to the charge of smuggling notions of selfhood into its doctrines, since, for example, it explicitly defined the tathāgatagarbha as "permanent, pleasurable, self, and pure (nitya, sukha, ātman, śuddha)". Many Tathāgatagarbha texts, in fact, argue for the acceptance of selfhood (ātman) as a sign of higher accomplishment. The hybrid school attempted to conflate tathāgatagarbha with the ālaya-vijñāna.
The traditional interpretation of the eight consciousnesses may be discarded on the ground of a reinterpretation of Vasubandhu's works. According to Kalupahana, instead of positing such an consciousnesses, the Triṃśikaikākārikā describes the transformations of this consciousness:
Taking vipaka, manana and vijnapti as three different kinds of functions, rather than characteristics, and understanding vijnana itself as a function (vijnanatiti vijnanam), Vasubandhu seems to be avoiding any form of substantialist thinking in relation to consciousness.
Whatever, indeed, is the variety of ideas of self and elements that prevails, it occurs in the transformation of consciousness. Such transformation is threefold, [namely,]
the resultant, what is called mentation, as well as the concept of the object. Herein, the consciousness called alaya, with all its seeds, is the resultant.
The ālāyavijñāna therefore is not an eighth consciousness, but the resultant of the transformation of consciousness:
Instead of being a completely distinct category, alaya-vijnana merely represents the normal flow of the stream of consciousness uninterrupted by the appearance of reflective self-awareness. It is no more than the unbroken stream of consciousness called the life-process by the Buddha. It is the cognitive process, containing both emotive and co-native aspects of human experience, but without the enlarged egoistic emotions and dogmatic graspings characteristic of the next two transformations.
The second transformation is manana, self-consciousness or "Self-view, self-confusion, self-esteem and self-love". According to the Lankavatara and later interpreters it is the seventh consciousness. It is "thinking" about the various perceptions occurring in the stream of consciousness". The alaya is defiled by this self-interest;
[I]t can be purified by adopting a non-substantialist (anatman) perspective and thereby allowing the alaya-part (i.e. attachment) to dissipate, leaving consciousness or the function of being intact.
The third transformation is viṣayavijñapti, the "concept of the object". In this transformation the concept of objects is created. By creating these concepts human beings become "susceptible to grasping after the object":
Vasubandhu is critical of the third transformation, not because it relates to the conception of an object, but because it generates grasping after a "real object" (sad artha), even when it is no more than a conception (vijnapti) that combines experience and reflection.
A similar perspective is give by Walpola Rahula. According to Walpola Rahula, all the elements of the Yogācāra storehouse-consciousness are already found in the Pāli Canon. He writes that the three layers of the mind (citta, manas, and vijñāna) as presented by Asaṅga are also mentioned in the Pāli Canon:
Thus we can see that 'Vijñāna' represents the simple reaction or response of the sense organs when they come in contact with external objects. This is the uppermost or superficial aspect or layer of the 'Vijñāna-skandha'. 'Manas' represents the aspect of its mental functioning, thinking, reasoning, conceiving ideas, etc. 'Citta' which is here called 'Ālayavijñāna', represents the deepest, finest and subtlest aspect or layer of the Aggregate of consciousness. It contains all the traces or impressions of the past actions and all good and bad future possibilities.
According to Thomas McEvilley, although Vasubandhu had postulated numerous ālāya-vijñāna-s, a separate one for each individual person in the parakalpita,[note 2] this multiplicity was later eliminated in the Fa Hsiang and Huayan metaphysics.[note 7] These schools inculcated instead the doctrine of a single universal and eternal ālaya-vijñāna. This exalted enstatement of the ālāyavijñāna is described in the Fa Hsiang as "primordial unity".
A core teaching of Chan/Zen Buddhism describes the transformation of the Eight Consciousnesses into the Four Wisdoms.[note 8] In this teaching, Buddhist practice is to turn the light of awareness around, from misconceptions regarding the nature of reality as being external, to kenshō, "directly see one's own nature".. Thus the Eighth Consciousness is transformed into the Great Perfect Mirror Wisdom, the Seventh Consciousness into the Equality (Universal Nature) Wisdom, the Sixth Consciousness into the Profound Observing Wisdom, and First to Fifth Consciousnesses into the All Performing (Perfection of Action) Wisdom.
The author of the AMF was deeply concerned with the question of the respective origins of ignorance and enlightenment. If enlightenment is originally existent, how do we become submerged in ignorance? If ignorance is originally existent, how is it possible to overcome it? And finally, at the most basic level of mind, the alaya consciousness (藏識), is there originally purity or taint? The AMF dealt with these questions in a systematic and thorough fashion, working through the Yogacāra concept of the alaya consciousness. The technical term used in the AMF which functions as a metaphorical synonym for interpenetration is "permeation" or "perfumation (薫)," referring to the fact that defilement (煩惱) "perfumates" suchness (眞如), and suchness perfumates defilement, depending on the current condition of the mind.