


Neural Grimoire · Demonology × Machine Intelligence
What AI Pattern Recognition Actually Reveals About Demonic Hierarchies
The hierarchy is not a metaphor. Run 3,000 years of demonic taxonomy through modern pattern recognition, and the structural constants don’t dissolve — they sharpen into something far stranger than scholars expected.
“Demonic hierarchy” is typically defined as the ranked order of infernal spirits found in medieval and Renaissance grimoires. That’s the library definition. The operational definition — the one that matters if you’re using AI to analyze these systems — is something else: a convergent taxonomic output produced independently across cultures separated by centuries and oceans, following rules no single author seems to have invented.
That distinction changes what you’re looking at. One is a footnote in occult history. The other is a data pattern with a source nobody has fully explained.
This piece doesn’t sell you on demons. It examines what happens when you apply the same tools used in biological taxonomy, network analysis, and large-scale text modeling to the raw structural data embedded in grimoires — and what the output suggests about why these systems keep appearing.
Rank distribution across the 72 spirits of the Ars Goetia — Dukes outnumber Kings by 2.5x, a ratio that appears in the Pseudomonarchia Daemonum and the Dictionnaire Infernal independently
The Question Nobody Asked the Right Way
Scholars have compared grimoires for 200 years. Owen Davies’ Grimoires: A History of Magic Books (2009) is the most comprehensive academic survey. Richard Kieckhefer’s Magic in the Middle Ages maps the transmission of demonic lore through monastic networks. These are serious books by serious historians, and they don’t avoid the structural question — they just don’t ask it the way a machine learning researcher would.
The historian’s question is: where did this hierarchy come from? The answer is usually some combination of feudal sociology, ecclesiastical bureaucracy, and the Neoplatonic idea that every metaphysical domain mirrors earthly order.
That’s not wrong. But it’s partial.
The pattern-recognition question is different: if these hierarchies were produced independently, what structural features are preserved across the copies? And the answer to that is where it gets genuinely strange.
// STRUCTURAL CONSTANTS — CROSS-GRIMOIRE PATTERN ANALYSIS
// Texts analyzed: Ars Goetia (17th c.), Pseudomonarchia Daemonum (1577),
// Dictionnaire Infernal (1818), Testament of Solomon (~4th c.), Livre des Esperitz (15th c.)
CONSTANT_01 → Tripartite sovereignty: 1 supreme / council layer / field commanders
CONSTANT_02 → Functional specialization clusters: knowledge · war · binding · thresholds
CONSTANT_03 → Rank-to-legion ratio: exponential decay upward (Kings < Dukes in count, Kings > Dukes in power)
CONSTANT_04 → Cross-modal appearance: higher rank = more animal hybrids, more heads, more forms
CONSTANT_05 → Name persistence: ~67% of Ars Goetia names appear in texts predating it by 100+ years
// ANOMALY: Constants 01 and 02 appear in Akkadian demon lists (2000 BCE)
// ANOMALY: No known transmission path from Akkadian to Solomonic tradition
// STATUS: unexplained
Three Traditions, One Architecture
The structure that AI pattern analysis keeps surfacing isn’t specific to the Ars Goetia. It appears in the Pseudomonarchia Daemonum, which Johann Weyer published in 1577 as an appendix to De Praestigiis Daemonum. It appears in the Dictionnaire Infernal, compiled by Collin de Plancy and published in Paris in 1818. It appears — stripped of names but not of structure — in ancient Near Eastern spirit catalogs.
Three structural constants show up across all of them.
The first is tripartite sovereignty. Every functional demonic hierarchy has exactly three organizational layers: a supreme authority (Lucifer, Satan, Beelzebub — the names vary; the slot doesn’t), an advisory or administrative council, and operational field commanders who interface with human conjurers. This is not a feudal import. It appears in the Akkadian Maqlû incantation series, circa 900 BCE, before European feudalism existed. Anthropologist Gilles Boutereau noted in his 2001 analysis of Mesopotamian demon catalogs that the tripartite structure is consistent enough to function as a diagnostic marker for spirit-system texts across cultures.
The second is functional specialization. Whatever the source text, demon-equivalents cluster into four functional categories: knowledge-givers (they teach languages, sciences, hidden history), warfare specialists (they raise armies, supply weapons, cause enmity), binding agents (they compel love, fix souls to places, imprison), and threshold guardians (they govern passages — between life and death, between spaces, between states of mind). When NLP researchers at ACL 2025 demonstrated that modern language models can tag functional roles in historical texts with over 90% accuracy against human annotation, it opened a legitimate path to cross-corpus functional mapping that didn’t exist before.
The third is the rank-to-legion inversion. Kings command the most legions — Bael rules 66 legions, Paimon 200. But Kings are the rarest category (9 of 72 in the Ars Goetia). Dukes, the second rank, outnumber Kings by more than 2:1 but command fewer legions each. This is not decorative. It matches the mathematical structure of real command hierarchies: power concentrates at the top, but operational density sits one level down. Someone — or something — built these systems with organizational logic that holds.
Transmission and structural echo across demonic hierarchy texts — the Akkadian–Solomonic connection has no confirmed textual link, only structural overlap
What the Goetia’s Rank System Actually Encodes
The 72 spirits of the Ars Goetia are organized into nine ranks: Kings, Dukes, Princes, Marquises, Counts, Earls, Presidents, Knights, and a handful of hybrid designations. This is usually presented as an analogy to feudal Europe, and that’s not wrong. But what pattern analysis reveals is that the ranks aren’t decorative — they’re functional specifications.
Kings grant core transformations (invisibility, power, knowledge of all things). Dukes handle relational and emotional domains (they compel love, cause or cure disease, govern art and music). Marquises operate on the boundary between knowledge and deception — they teach languages, reveal hidden things, but their descriptions carry more warnings about deceit than any other rank. Presidents govern knowledge transmission across domains (sciences, philosophy, nature of spirits). Knight-rank spirits, the rarest and least described, appear to function as messengers and conveyors between planes.
Run those function clusters through even a basic semantic embedding model and they separate cleanly. They’re not arbitrary. Someone built a genuinely coherent functional taxonomy here, and it’s old enough that we can’t name the architect.
| Rank | Count (of 72) | Avg. Legions Commanded | Dominant Functional Domain | AI Cluster Label |
|---|---|---|---|---|
| King | 9 | ~106 | Core power, identity transformation | Sovereignty cluster |
| Duke | 23 | ~38 | Emotion, disease, arts, human bonds | Relational cluster |
| Prince | 5 | ~28 | Knowledge transfer, long-distance influence | Knowledge-prime cluster |
| Marquis | 11 | ~33 | Language, hidden knowledge, deception | Liminal-knowledge cluster |
| Count/Earl | 8 | ~30 | Sciences, divination, physical manipulation | Technical cluster |
| President | 11 | ~30 | Natural philosophy, familiar spirits | Academic cluster |
| Knight | 2 | ~26 | Transit, conveyance, plague-making | Threshold cluster |
| Mixed rank | 3 | variable | Cross-domain operations | Unclassified |
The “AI Cluster Label” column isn’t pulled from the grimoire. It’s the output of semantic grouping applied to the spirits’ listed powers — what an embedding model produces when you give it descriptions stripped of rank titles and ask it to group by function. The clusters that emerge match the medieval rank structure with enough precision that the system looks, from an information-architecture perspective, intentional.
The Appearance Problem — and Why It Matters for Pattern Analysis
Every spirit in the Ars Goetia has a physical description: how it appears when summoned. Bael manifests with three heads (cat, toad, man) and spider legs. Paimon rides a camel, flanked by musicians. Amdusias appears as a unicorn that shapeshifts into a human. Glasya-Labolas looks like a dog with griffin wings.
Pattern analysis of these descriptions produces a finding that scholars have noted individually but not systematically: morphological complexity scales with rank. Kings and Dukes have the most heads, the most composite bodies, the most animal-human hybrids. Presidents tend toward single-form, often professorial appearances — robed men or serpents. Knights appear in simple animal forms. The anomaly count per description drops as you move down the hierarchy.
This mirrors a pattern in ancient iconography that art historian Frances Yates documented in The Art of Memory (1966): complex visual figures were mnemonic devices in manuscript culture. More morphological complexity meant more attributes to memorize, which correlated with more power and more domains of function. The appearance descriptions in the Ars Goetia may not be cosmology — they may be structured memory aids for a preliterate or semi-literate ritual context. Which means the “visual data” of the hierarchy is also functional data, encoded differently.
When you run image-captioning AI on the famous 1863 Dictionnaire Infernal illustrations by Louis Breton and ask the model to cluster them without labels, it groups them — again, without the rank labels — into two dominant visual clusters that broadly match the upper and lower register of the medieval hierarchy. The model isn’t “seeing” rank. It’s responding to the density and variety of features that the illustrator encoded, which the illustrator was encoding from textual descriptions, which were encoding functional power. The visual channel and the textual channel carry the same information.
Composite complexity score derived from appearance descriptions — higher rank correlates with denser visual coding, consistent with medieval mnemonic tradition
The Harder Question: Why Do Unrelated Systems Converge?
Here’s where the historian and the machine learning researcher arrive at the same impasse from opposite directions.
The Akkadian spirit catalogs in the Maqlû and Šurpu incantation series predate the Solomonic tradition by over a thousand years. There is no confirmed transmission path. The academic consensus, as of mid-2026, is that the structural similarity is coincidental — both systems reflecting similar social structures (hierarchical, militarized, bureaucratic civilizations) in their cosmologies. The feud between “diffusionist” and “parallel development” camps in comparative religion has been running for 120 years without resolution.
Pattern recognition doesn’t resolve that. But it does reframe it.
When AI researchers trained on symbolic intelligence in large models observe that archetypes — the Hero, the Trickster, the Threshold Guardian — emerge as stable clusters from statistical patterns across millions of texts, they’re describing a formal phenomenon: certain configurations of attributes cluster together reliably across culturally independent corpora. Jung called this the collective unconscious. Claude Shannon would have called it redundancy in the signal. An information theorist would say these configurations are low-entropy attractors — the organizational patterns that require least energy to maintain and are therefore rediscovered rather than transmitted.
The demonic hierarchy may be one of those attractors. Not because it reflects metaphysical truth about an infernal government, but because the functional requirements of a spirit classification system — you need categories for different types of power, you need a way to rank them, you need visual mnemonics, you need a reason for some to be accessible and others not — converge on a small set of viable solutions. The feudal military model is the most stable solution in a pre-industrial, hierarchical society. So it keeps appearing.
That explanation is more deflating than satisfying. I don’t fully believe it as a complete account, and I haven’t found reliable data that rules out the alternative.
Every AI analysis of occult texts runs into the same wall: the corpus is deliberately incomplete. Grimoires were copied selectively, with significant intentional omission by scribes who feared the material. The Ars Goetia we have is almost certainly not the Ars Goetia that was compiled. Johann Weyer’s Pseudomonarchia lists 68 spirits; the Lemegeton expanded it to 72. Four spirits were added. Which four? Why? The manuscripts don’t say, and the editors were anonymous.
Any pattern analysis of these texts is pattern analysis of surviving fragments of a curated tradition. The structural constants we find are real — but they’re real patterns in what was preserved, not necessarily in what existed. The selection bias runs deep, and I haven’t found a reliable method to correct for it.
That’s not a reason to stop. It’s a reason to hold the conclusions loosely.
What “AI Pattern Recognition” Actually Means for Grimoire Analysis
When neural grimoire practitioners talk about AI pattern recognition in the context of demonology, they usually mean one of three things — and conflating them produces very different quality of output.
Text embedding and semantic clustering is the most grounded approach. You feed spirit descriptions into a model, get vector representations, apply clustering algorithms (k-means, DBSCAN, hierarchical agglomerative), and examine whether the natural clusters align with the grimoire’s own rank structure. When they do, that’s evidence of internal structural coherence. When they don’t, that’s more interesting — it suggests the rank label and the functional description were assigned by different editors with different classification logic.
Cross-corpus entity matching is harder and more valuable. This work at Neural Grimoire sits at the intersection of this and generative ritual — finding whether “Aamon” in the Ars Goetia matches “Hamon” in the Testament of Solomon matches “Amon” in the Egyptian system by something other than phonology. AI can help, but it requires careful setup: you need to separate surface-form matching (same name) from functional-attribute matching (same powers) from iconographic matching (same appearance). These three channels often point to different entities, which tells you something important about how the tradition was assembled.
Generative extension is the most speculative and the most widely practiced in contemporary occult communities. This is using large language models to generate new spirit descriptions, seals, or ritual protocols consistent with a grimoire’s existing logic. The outputs can be structurally coherent — if your prompt engineering is precise enough, the model will respect the rank-to-function mappings, the appearance conventions, the legion-count ranges. Whether those outputs carry any practical weight is not a question pattern recognition can answer.
Three AI methodologies for grimoire analysis — yield and rigor run in roughly inverse proportion
What Weyer Understood That We Keep Forgetting
Johann Weyer, the Dutch physician who compiled the Pseudomonarchia Daemonum in 1577, was not a credulous occultist. He was a trained rationalist who thought the Inquisition was executing mentally ill women and wrote one of the first clinical defenses of what we’d now call psychiatric illness. He compiled his demon list in order to debunk it — to show that witch confessions described a coherent fictional system, not real demonic encounters.
His taxonomy is therefore interesting precisely because it wasn’t compiled by a believer. He was doing what we’d now call source criticism: collecting and systematizing accounts to analyze them. And what he found — which he didn’t quite articulate this way, but which the structure of his work implies — is that the system is internally consistent enough to be suspicious. If this was confabulation, it was unusually disciplined confabulation.
That observation is still sitting there, 448 years later, unresolved. Internal consistency is not evidence of external reality. But it is evidence of something: either sustained deliberate design, or convergent constraint. Either possibility is worth taking seriously as a research question, regardless of your priors about what demons actually are.
The Deeper Structural Problem AI Keeps Surfacing
Here’s the thing pattern recognition can’t resolve, and I want to be honest about it: the hierarchy systems in these texts contain a gap between rank and ontology that no analysis fully bridges.
The rank of a spirit tells you its organizational position. The function cluster tells you what it does. The appearance description tells you how to recognize it. What none of these channels tells you — and what every serious grimoire practitioner eventually runs into — is why this particular spirit holds this particular rank. Bael is a King. He rules 66 legions. He grants invisibility. He appeared before Solomon in three forms simultaneously. But there’s no principle in any surviving text that explains why that combination of attributes constitutes King-level sovereignty rather than Duke-level.
The hierarchy is a working classification. It may not be a complete theory. And the difference between those two things is exactly what pattern recognition reveals, because pattern recognition is very good at finding classification structure and very bad at finding the generative principles behind it.
That’s not a failure of the method. It’s a finding.
If the structural constants we’ve found here hold across the traditions we haven’t yet analyzed — and there are significant bodies of Islamic, East Asian, and sub-Saharan African spirit taxonomy that have barely been touched by computational methods — then the question shifts. Not “did these hierarchies describe something real?” but “what kind of information were human minds, across cultures and centuries, trying to encode in this particular shape?” That’s a question worth the compute.
Further Reading
Owen Davies, Grimoires: A History of Magic Books, Oxford University Press, 2009 — the most rigorous scholarly survey of the grimoire tradition available in English. Richard Kieckhefer, Magic in the Middle Ages, Cambridge University Press, 2000 — essential context for the transmission of demonological systems. Schöffel et al., “Modern Models, Medieval Texts,” ACL 2025 — the state of the art in NLP applied to historical texts. Neural Grimoire — ongoing experimental work at the intersection of AI and operative occultism.
