Hypercomputation without bothering the cactus people: Software development for the DMT headspace

Posted on 26 September 2024 by Cube Flipper

I would hazard a guess that some readers of this blog might already be familiar with the delightful Scott Alexander story, Universal Love, Said The Cactus Person – in which the unnamed protagonist asks a couple of DMT entities to factorise a large integer:

“Universal love”, said the cactus person.

“Transcendent joy”, said the big green bat.

“Right”, I said. “I’m absolutely in favor of both those things. But before we go any further, could you tell me the two prime factors of 1,522,605,027,922,533,360,535,618,378,132,637,429,718,068,114,961,380,688,657,908,494,580,122,963,258,952,897,654,000,350,692,006,139?”

“Universal love”, said the cactus person.

“Transcendent joy”, said the big green bat.

Supposedly, this would demonstrate the reality of DMT entities, or at least that they are capable of extraordinary feats of computation, or somesuch:

“I want to advance psychedelic research. If you can factor that number, then it will convince people back in the real – back in my world that this place is for real and important. Then lots of people will take DMT and flock here and listen to what you guys have to say about enlightenment and universal love, and make more sense of it than I can alone, and in the end we’ll have more universal love, and… what was the other thing?”

“Transcendent joy”, said the big green bat.

This story is a poetic telling of one of the experiments proposed in the paper, A Methodology for Studying Various Interpretations of the N,N-dimethyltryptamine-Induced Alternate Reality (Rodriguez, 2006). This paper is primarily concerned with demonstrating the reality of the DMT realms and proposes to do so via a number of routes, including by demonstrating its computational utility. I’ll confess that I find myself less concerned with the reality or unreality of DMT realms than I do with the computational utility aspect.

I find myself sympathetic to the view that our brains – or at least, the electromagnetic fields they contain – are capable of some extraordinary feats of computation, where the rules of computation are less like logic gates and more in the realm of Maxwell’s equations. Such dynamics would be at play at all times, but it is conceivable that what we see when we take psychedelics is what happens when this process is altered, revealing its underlying dynamics.

This is a view shared by Andrés Gómez Emilsson of the Qualia Research Institute. As I currently understand it, Andrés’ theory is as follows:

  1. The physical state which corresponds to subjective experience is the electromagnetic radiation trapped within a topologically closed region of the electromagnetic field – for example, a closed surface where the magnetic flux density is zero – somewhere within the brain.
  2. The electromagnetic radiation explores all possible paths through the enclosure in parallel, and the superposition of all these paths – the path integral from quantum electrodynamics – forms the wave patterns which we perceive as the phenomenal fields. This is where the computation happens.
  3. Variation in permittivity of the substrate underlying the topological pocket adjusts the speed of the radiation passing through the substrate, shaping the path integral as is computationally useful.

I would recommend reading Bijan Fakhri’s writeup, The Electrostatic Brain: How a Web of Neurons Generates the World-Simulation that is You for a more detailed exploration of what QRI think is going on:

The Brain as a Non-linear Optical Computer theory proposes that the brain enlists electromagnetic waves to create a powerful computational medium. In other words, evolution has co-opted the electromagnetic field for its massive parallelism, holistic behavior, and self-organizing tendencies, to unleash its computational potential with non-linear wave interactions.

However, for the purposes of this essay, I hope to concern myself less with the details of an exact theory or mechanism and more with the construction of an experiment which could demonstrate the computational power of the visual system.

Harnessing optics for computation

One of the primary functions of the visual system is to solve the inverse optics problem. This is an underdetermined problem – for every two dimensional visual field, there are a large number of possible three dimensional interpretations to choose from. A classical computer would find this problem computationally expensive, whereas the visual system solves this problem in real time, selecting the most parsimonious solution from a vast array of possibilities. Perhaps some kind of massively parallel process is at play?

Illustrating the inverse optics problem: A single visual stimulus may have multiple depth map solutions.

The vision researcher Steven Lehar was the original proponent of the non-linear optical computing model, and explored the inverse optics problem as a candidate example of a computational problem solved by this computational paradigm. Around the same time as I was reading his papers back in 2022, I was also experimenting with DMT. I quickly noticed that DMT interfered with this process of solving the inverse optics problem in interesting ways.

Take the simple Necker cube percept – illustrated below – which has a pair of possible depth map solutions which may be flipped between. When I vape a small amount of DMT and stare at it, one of two artificial depth maps is formed – and the cube leaps out of the screen into three dimensional life.

A Necker cube, the classic example of a bistable percept.

The nature of this phenomenon is a little hard to explain, but I assure the reader it’s quite vivid. If you’re familiar with stereograms or autostereograms – also known as Magic Eye images – it’s a very similar experience. These are perhaps hard to master for some, so here’s a different image which should hint at what it feels like:

“Bavarian”, by Akiyoshi Kitaoka (2008). Even sober, one can gain a sense of how this stimulus “wants” to pop into three dimensions, and with DMT in the mix it does so with ease, exploring a wide variety of pyramid, staircase, and checkerboard shaped depth map solutions.

It occurred to me that perhaps this phenomenon could be recruited to demonstrate the computational power of the DMT-altered visual system, using color as input and depth as output. I discussed this prospect with Andrés at the time, and while both skeptical, I figured it would be a worthwhile low-cost high-reward experiment. I set myself a challenge: How could I construct a multistable visual stimulus which when viewed with the assistance of DMT provided evidence of eerily-fast computation?

And so began the weirdest design brief that I’ve ever worked on.

Harnessing soap bubbles for computation

I’ve long been interested in alternative computing paradigms, and I drew some amount of inspiration from Scott Aaronson’s 2005 paper, NP-complete Problems and Physical Reality:

Can NP-complete problems be solved efficiently in the physical universe? I survey proposals including soap bubbles, protein folding, quantum computing, quantum advice, quantum adiabatic algorithms, quantum-mechanical nonlinearities, hidden variables, relativistic time dilation, analog computing, Malament-Hogarth spacetimes, quantum gravity, closed timelike curves, and “anthropic computing”. The section on soap bubbles even includes some “experimental” results. While I do not believe that any of the proposals will let us solve NP-complete problems efficiently, I argue that by studying them, we can learn something not only about computation but also about physics.

Put briefly, NP-complete is a complexity class of problems which are difficult to solve efficiently using classical computers. NP-complete problems are all mutually reducible – if you can figure out how to solve one problem efficiently, then you can solve them all. Such a demonstration would have wide-ranging implications.

Aaronson discusses an experiment in which the energy minimising process of soap bubble relaxation may be recruited to solve an NP-hard problem – NP-hard being a broader complexity class which includes NP-complete problems:

Given a set of points in the Euclidean plane, a Steiner tree is a collection of line segments of minimum total length connecting the points, where the segments can meet at vertices (called Steiner vertices) other than the pegs themselves. Garey, Graham, and Johnson showed that finding such a tree is NP-hard. Yet a well-known piece of computer science folklore maintains that, if two glass plates with pegs between them are dipped into soapy water, then the soap bubbles will rapidly form a Steiner tree connecting the pegs, this being the minimum-energy configuration.

In a kind of computer science MythBusters, Aaronson took it upon himself to verify this urban legend, with disappointing results – his apparatus often became stuck on local minima:

The result was fascinating to watch: with 3 or 4 pegs, the optimum tree usually is found. However, by no means is it always found, especially with more pegs. Soap-bubble partisans might write this off as experimental error, caused (for example) by inaccuracy in placing the pegs, or by the interference of my hands. However, I also sometimes found triangular “bubbles” of three Steiner vertices – which is much harder to explain, since such a structure could never occur in a Steiner tree. In general, the results were highly nondeterministic; I could obtain entirely different trees by dunking the same configuration more than once. Sometimes I even obtained a tree that did not connect all the pegs.

This still influenced my line of thinking, and I took it upon myself to read up on energy minimisation problems and computational complexity theory, searching for the kind of problem which had a graphical analogue that might easily be converted to a multistable visual stimulus. I also found his failure modes illustrative, anticipating that any visual stimulus I might construct might run into similar problems.

Harnessing vision for computation

Some time later, I ran across a tweet highlighting Mark Changizi’s 2008 paper, Harnessing vision for computation:

Might it be possible to harness the visual system to carry out artificial computations, somewhat akin to how DNA has been harnessed to carry out computation? I provide the beginnings of a research programme attempting to do this. In particular, new techniques are described for building ‘visual circuits’ (or ‘visual software’) using wire, NOT, OR, and AND gates in a visual modality such that our visual system acts as ‘visual hardware’ computing the circuit, and generating a resultant perception which is the output.

Changizi’s apparatus is a quite straightforward system of coupled Necker cubes. Some cubes are shaded in a way that constrains their state, providing the circuit’s input – while others are left unconstrained. Bistable wires transport state from one place to another, and the viewer may solve the computation by tracing the circuit with their eye.

Construction of an XOR circuit using NOT, OR, and AND gates.

My critique of this system relates to its unwieldiness – the viewer must trace around tediously with their eye in order to arrive at the destination, as the percept itself does not fit inside the fovea. The computation performed is also quite simple and does not demonstrate much power. However, I found it immensely encouraging that somebody else was thinking along the same lines as I was, and I took it as a sign that I was on the right track. Perhaps this system could be scaled somehow.

Harnessing light for computation

The Ising model is a mathematical model from statistical mechanics used to describe ferromagnetism. It describes a graph or lattice of interacting spins, which might have one of two states: –1 or +1.

Each pair of spins σi and σj has a coupling constant Jij, describing their interaction:

  • If Jij > 0, the interaction is ferromagnetic and the spins prefer to be the same.
  • If Jij < 0, the interaction is antiferromagnetic and the spins prefer to be the opposite.
  • If Jij = 0, the spins are noninteracting.

The energy of the whole system can then be found by simple summation:

E = –Σi,j Jij σi σj

The Ising problem is then to find the spin configuration that gives you the lowest energy for the whole system – the ground state. This problem is known to be NP-hard.

If all of the interactions are antiferromagnetic, then in the case of a two dimensional square lattice the ground state is a checkerboard pattern of alternating spins. Things get interesting for other types of graph in which it is not possible to find such a simple ground state – these systems are said to be frustrated. Illustration from Geometrical Frustration (Moessner and Ramirez, 2006):

A geometrically frustrated system is one in which the geometry of the lattice precludes the simultaneous minimization of all interactions. (a) In the unfrustrated antiferromagnet on the square lattice, each spin can be antialigned with all its neighbors. (b) On a triangular lattice, such a configuration is impossible: Three neighboring spins cannot be pairwise antialigned, and the system is frustrated.

Alireza Marandi is a Professor of Electrical Engineering and Applied Physics leading the Nonlinear Photonics Laboratory at the California Institute of Technology. His team built an Ising machine out of a network of optical parametric oscillators tuned so that their phases naturally lock to either 0 or π. The machine is then programmed by coupling the oscillators together in such a way that the machine solves an NP-hard problem by minimising the frustration in the system:

The MAX-CUT problem is a problem in graph theory – how can you split a graph into two subgraphs, while cutting the maximum number of edges? It’s shown that this is an NP-hard problem.

So if you have a graph which has four nodes and all possible edges – if you split it through the middle, you’re cutting four edges, so that’s a maximum cut – but if you split the graph so there’s three nodes on one side and one node on the other, you’re only cutting three edges, so that’s not a maximum cut.

This maps to an oscillator network problem by just making a network of four oscillators and coupling them all out of phase. So if two of them have phase π and two of them have phase 0, then we have four satisfied couplings, and that corresponds to cutting four edges. So that’s how the MAX-CUT problem maps one-to-one to this oscillator network problem.

This works, and they successfully scaled this system up to one hundred oscillators – achieving better performance than D-Wave’s quantum annealer – at room temperature and for two orders of magnitude cheaper.

Harnessing DMT for computation

Reading about all this got me thinking: In order to demonstrate computation with the visual system, perhaps I could construct my own Ising machine from a network of coupled bistable stimuli? One problem was that I couldn’t see a robust way of crossing connections over one another, limiting me to simple planar graphs.

However, I’d also been reading The Symmetries of Things, which gave me an idea – what if I unrolled my graph into a lattice, and used that to tile the plane? Doing so would afford an additional benefit: I know that DMT loves tiling patterns, so perhaps any pattern I used would remain stable even while outside the fovea – permitting a larger graph and more powerful computation.

I could then deliberately frustrate the system by fixing some of the stimuli one way or another, and when viewed while on DMT the artificial depth map would propagate across the remaining unconstrained stimuli. I should then be able to read off the solution to some graph partition problem from the boundary between internally-consistent domains.

One question remained: What kind of bistable stimuli could be coupled together easily? I remained stuck on this for some time – at one point even buying a cheap kaleidoscope for visual inspiration – but I failed to make any progress and so I put this project down for a while.

Sketches exploring lattice configurations.

Earlier this year I visited Barcelona, where some friends who were interested in biohacking had come together to form a group house. We were out for a wander when I came across a magic shop, and I found myself purchasing a deck of tarot cards.

El Rei de la Màgia, Barcelona.

I was attracted to this particular deck by the geometric patterns adorning the backs of the cards. It was not until a couple of days later that I noticed the answer was right in front of me:

Fournier’s Le Tarot de Marseille.

A hexagonal lattice of triangular cupolae! So simple. I wasted no time in writing an application:

The Tilespace web application. On desktop, click or right click to set the state of different nodes to in phase or counterphase. On mobile, tap to rotate through states.

This is a visual stimulus which in conjunction with a human subject forms a 32-bit (quabit?) qualia computer. Each triangular cupola corresponds to a node in the graph. Individual nodes may have their state set to one phase or another, and different parameters like the colouring, lighting, and the global coupling constant may be adjusted:

Four nodes have their state constrained; the red and yellow nodes are fixed to one phase, while the cyan and blue nodes are fixed to the other. See if you can use your eye to trace the depth map propagation outwards from the constrained nodes. Where does it come in to conflict with itself?

When DMT is administered, I expect that an artifical depth map will be formed. The shading should cause the constrained nodes to pop into three dimensional life; and from there concave nodes will wish to make their neighbours convex and vice versa, until the entire map is fully expanded:

A depth map solution for the previous stimulus. This is a particularly awkward one. Red and blue shading is used to highlight the two internally-consistent domains.

So there we have it – an apparatus demonstrating discrete computation on the continuous domain visual field. The procedure would be as follows:

  1. Configure the application, ensuring that at least one node is fixed for each of the two possible phases.
  2. Consume DMT. I would expect around 8-12 mg to suffice – this should be about the Magic Eye level.
  3. View the stimulus, and attempt to record any depth map that forms. This could be communicated just by clicking on the nodes until they match what is seen.

Now – I haven’t tried this yet. I can think of several reasons why it might not work as well as anticipated, including priming effects and solutions being insufficiently stable to even be read. I am also yet unsure which class of graph cut I expect to be performed.

Intuitively, I expect energy minimisation in this system to result in a sparse cut – minimising the ratio of the number of edges across the partition divided by the number of vertices in the smaller half of the partition. As defined by Yury Makarychev:

Observation of a sparse cut would be sufficient to demonstrate an NP-hard problem being solved by the visual system, but perhaps not a demonstration of an NP-hard problem being solved faster than a computer. Given the simple hexagonal lattice, I was able to write a sparse cut solver in JavaScript which finds a solution pretty much instantly. If we wish to demonstrate an eerily-fast sparse cut, we are going to have to design a different apparatus.

This said, it’s possible that something else might happen entirely. What if we happen to observe that the energy minimisation process happens to optimise for symmetry, instead? I am unsure what such a result might imply.

A depth map solution which optimises for symmetry rather than sparsity.

There’s only one way to find out. In the meantime, I hope that this project can demonstrate a proof of concept of software development for the DMT headspace – and I hope it can inspire others to explore this space, too.


Upon the Mirror Sea

I recently read my way through phaseborn’s science fiction novel Upon the Mirror Sea. The book is set against the emerging field of neikotics, in which futuristic neuroimaging technology is used in conjunction with the DMT headspace to solve intractable computing problems. From the opening chapter:

It was the middle of April of my junior year. The second scanner was more reliable but somehow even louder, so when we wheeled it into a lecture hall for a demonstration, we kept the first six rows empty. Deng began by introducing me, and I peeked out of the tube to applause and general mirth. She had a magician’s stage presence, and she used it to great effect here. “No one on my team has seen the contents of this flash drive. I do not even know what kinds of files it contains. Last week I asked the cryptography department for a novel cypher that they believe would take six months to break on their best hardware. Tonight, Mona here – or perhaps, the thing that is both Mona and the machine – will solve it in six minutes.” Tonight I will saw this young woman in half.

“What you’re seeing on the projector is what Mona is seeing now on the visor,” I heard her say, as the tiles encroached and overtook. Not one or four or sixteen, but untold thousands, panchromatic pixel-dust. “As she makes contact with the computer these patterns will become more and more detailed, a map of a world that only she can see.”

And then I was gone and I was back to a standing ovation. Whatever I did in there made a lot of VCs very happy, and some of them approached me discreetly at the reception. We love Deng, they said. We all love Deng, but we’re looking for someone a little more aligned with our strategic concerns. If we gave you a lab, do you think you could rebuild it? I was so drunk that I was glowing, and I joked that I could try.

The story begins in Stanford but promptly decamps to Shanghai – now part of the deregulated Yangtze Delta Orthogonal Zone – where the protagonist Mona finds herself working in the clinic below her university, tasked with cleaning up poorly garbage collected algorithms from the minds of neikonaut high-frequency traders.

It’s an absolutely ripping piece of cyberpunk, not least because it contains a depiction of a kind of virtual reality headspace in which the psychedelic cyberspace aesthetic actually makes sense, as opposed to simply being what certain authors back in the eighties happened to like. It’s also incredibly funny.

At present phaseborn is still writing his novel, and at my end I’m yet to test my experiment, but I think he’s on the money about a lot of things. I can’t help but intuit what it might feel like to solve a particularly crunchy, difficult, frustrated configuration, labyrinthine creases spreading across my somatic field. I suspect I’d need to cultivate a fair bit of equanimity in order to pull it off, or at least iterate on my design with valence in mind.

I remain skeptical that a DMT-augmented human-machine hybrid would ever perform better than an actual Ising machine, but in the event that it does, financial incentives are such that the first most obvious application is of course to brute force SHA-256 and mint some bitcoin. I do wonder, though, what kind of bad karma running such a complex program might generate for the human component in the form of unreleased taṇhā. Perhaps in due time, we’ll find out the cactus person was right.