Thursday, June 14, 2018

Notes on a Cosmology - Part 24b, Epilogue cont'd


One of the delights of quantum science is that it is filled with puzzles, paradoxes and surprises. In this post, I want to exposit the close connection between quantum superposition and parallel computation. At first, these might seem to be widely unrelated ideas – after all, superposition is a wave phenomenon (continuous), while parallel computation describes a discrete process. As we saw in the previous post, however, the discrete and the continuous are not so incompatible as it might seem. Often, the distinction is a matter of perspective.

The Perl programming language has become a workhorse of Linux operating systems, bundled by default into most major distributions of that operating system. Around 2000, a Perl package named Quantum::Superpositions was added to the Perl package repository. This package added several features to the language, but the two most notable for our purposes are the any() construct and the all() construct. These constructs allows a program to treat a list as though it were a single value, in one of two different ways. If you are interested in a more detailed description, the documentation is quite straightforward. The irony is that these constructs have nothing to do with simulating quantum computations – so why name the package Quantum::Superpositions?

In order to understand the rationale behind the name, we have to understand exactly what is happening in a qubit that is taking advantage of the power of quantum superposition. Physicists will often describe it in terms of parallel universes – imagine that the quantum bit is simultaneously existing in two, separate universes and, in one universe, its value is 0 and in the other universe its value is 1. In this sense, the qubit is in “two, mutually-exclusive states at once.” These kinds of mind-bending descriptions tend to make us feel either monumentally stupid or secretly skeptical. Like the story of the naked Emperor, however, we dare not air our skepticism lest we look like the only dunce in the room.

On modern computers, operating systems use a technique called “multi-tasking” to perform many, unrelated tasks in such a way that they all appear to be performed in parallel. The core technique of multi-tasking is time-slicing … if there are 100 processes running on your system, the operating system will divide each unit of time in such a way that each process is allowed to run for a small slice of time before it is forced to give up control to the next process scheduled to run. Because the CPU in a typical computer is operating at billions of cycles per second, the user cannot perceive any observable artifacts from the time-slicing. When more threads are available to the operating system (i.e. when running on a multi-core CPU), the operating system performs less time-slicing because each task can be allowed to run for a longer slice of time on each thread. Suppose we have a system with four threads, the load that each thread has is one-fourth the load that a single-threaded system would have. Thus, the system only needs to time-slice 25% as much, allowing each process to run four times as long without changing the total throughput of the system as perceived by the user. Now, suppose we have a system with eight threads. All these numbers change proportionally – each thread has 1/8th the load of a single-threaded system and we can allow each process to run eight times as long. As we increase the number of threads until we have one thread per process in the system, we reach a point at which every process can run 100% of the time because every process can monopolize a thread on the CPU without interfering with any other running process – all while maintaining the same multi-tasking guarantees that the operating-system must satisfy to the end-user.

But given the fantastic performance of time-slicing on small numbers of threads, it is obvious that a hardware system with so many threads that every process is running on its own dedicated thread would be wasteful. Most processes (and the threads they are running on) would be idle most of the time. Most of the potential computing power of a CPU with hundreds of threads would be wasted. This brings us to the problem of automatic parallelization.

To understand the problem of automatic parallelization, let’s look at the behavior of a single computer program running on the CPU (suppose it has a complete monopoly on the CPU). How can this program keep the CPU as busy as possible, especially if the CPU has multiple threads? One approach is for the program to explicitly parallelize itself, cutting up its work into blocks so that each block can be dispatched to a separate thread on the CPU. Another approach – the approach that has dominated from the advent of superscalar CPUs in the mid-1990s until today – is to allow the hardware to try to “extract” parallelism from the software, without explicit assistance from the software. This way, the software can focus on describing what it is trying to compute, and the hardware can focus on how to compute it.

How does the hardware do this? After all, the hardware has only a very low-level “machine code” view of what the software is doing. The hardware differentiates between two classes of instructions. The first class of instructions are non-branching instructions. The second class of instructions are branching instructions. Non-branching instructions always proceed in order, one after the other, like the steps in a cooking recipe. But branching instructions can “jump” to any other instruction, based on logic conditions. Branching instructions are how software implements conditional constructs like “if-then-else”. Whenever you want some part of a program to only be executed under certain conditions, you’re going to need a branching instruction to implement that functionality in the machine code.

We can use code visualization tools to look at how machine code looks to the hardware – this is called a control-flow graph. A CFG shows only the branching instructions (as vertices in the graph) while all other instructions are abstracted away as graph edges. Whenever the CPU encounters a branch it faces a conundrum – which branch should it follow? It can wait to find the outcome of the branch condition, but this wastes valuable cycles that the CPU could use to get a head-start on processing the branch path that will be taken. In order to avoid wasting cycles, the CPU performs “branch prediction”. It makes a guess as to which path will be taken and starts executing instructions down that path. Branches can be nested multiple times and the branch predictor will attempt to make a reasonable guess as to which branch path will be taken. When the branch predictor is wrong, the cost of misprediction is about the same as having waited for the branch condition to be evaluated, but when the branch predictor is right, the program is able to proceed as if there had been no branch at all.

When a CFG becomes sufficiently deep and intricate, the branch predictor is bound to make mistakes and the penalties will pile up. A modern, superscalar CPU may have as many eight available executions (EUs) units for branch-predicted instructions to proceed through – keeping all those EUs busy is the scheduler's job, a job that would be almost pointless without the branch predictor. But this general problem could be scaled up to the level of hardware threads and automatic parallelization architectures aim to do just this.

One early proposal for automatic parallelization is called eager execution. If you have two available CPU threads and you encounter a branch instruction, rather than trying to predict which path the program will take, you simply set one thread to executing one branch path and the other thread to executing the other branch path and just discard the results of the wrong path. If you have four threads you can process two branches one right after the other – with eight threads you can process three sequential branches, with sixteen threads you can process four branches, and so on.

Obviously, eager execution cannot scale to parallelizing entire programs which may easily have thousands of branch instructions. A CPU with 1,000 threads utilizing EE would waste roughly 99.9% of its processing power on branch paths that would never occur and would still only be able to perform lookahead for a handful of branches at a time. To handle this scaling problem, the idea of disjoint eager execution (DEE) – and many other similar architectures – was proposed. A CPU that implements DEE combines branch-prediction and eager-execution to process the control-flow graph in probability-order – the most probable paths are scheduled across all available threads until there are no more available threads. As the results from those paths become available, the branch-predictor is updated, pruned paths are discarded and the currently most-probable paths are again dispatched across the available threads.

Conceptually, this is an optimal utilization of a multi-threaded CPU for processing a serial program. Such a CPU, if it were built, would be utilizing all the available information about the program’s runtime behavior to make informed predictions about its future branch behavior, allowing the CPU to speculatively look ahead across dozens, maybe hundreds of branches at a time. This would allow a CPU with N threads to provide speedup in proportion to a non-trivial ratio of N.

The Quantum::Superpositions package provides us an interesting way of visualizing what is happening at the hardware level of a DEE CPU. Let’s suppose we have written a program that searches for a specific number from a list of 1,000 numbers. Assuming ideal memory performance (no cost to read or write memory), our 1,000 thread CPU could potentially locate the number we are searching for in just 1 step (each available thread gets assigned to perform one of the search comparisons). Using the any() construct from Quantum::Superpositions, our search would look something like this:

if(any(number_list) == search_number){
    print “Found it!”
}

Read: “If any number in number_list is equal to the search_number, tell the user we found it, otherwise, do nothing.” This construct suggests that there is another way of thinking of the search procedure. Suppose that the any() construct actually splits the universe into separate parallel universes until it completes. Instead of having a 1,000 threaded CPU, we would have 1,000 copies of a single-threaded CPU, each in its own parallel universe. The overall construct would exhibit the same net behavior, either way. We search through 1,000 numbers in 1 time-step. (For me, this was the “Aha”-moment. Your mileage may vary.)

More sophisticated models of branches in the CFG would assign a weight to each edge. It might even “expand” the CFG itself by duplicating the entire graph relative to branches that choose between independent weight-assignments across many edges in the graph[1]. From the point-of-view of the multi-threaded CPU, the CFG looks like a weighted spanning tree (which would be a kind of probability-tree) at any given time. But this would be equally true for our single-thread-parallel-universe CPU … some parallel universes would have more weight than others. I assert that the mathematics that describes the behavior of superposed qubits exactly corresponds to the weighted-parallel-threading CPU model I have described[2]. In short, a DEE CPU using an ideal CFG model would have exactly the same net behavior as a quantum computer processing the same CFG using a number of qubits that is logarithmic in the number of threads of our DEE CPU. Ten qubits could theoretically match performance of a 1,024-thread DEE CPU; 20 qubits could theoretically match performance of a 1.05 million-thread DEE CPU, and so on.

But hold on a moment -- where is the quantum fabric of the universe getting the CFG model from? There is no reason to believe that the quantum computer can divine what we’re trying to compute just from the quantum operators we supply for the computation. What the mathematics of quantum computation conceal is the assumption of ideal traversal of the CFG as guided by the weights on its edges – these weights would correlate to the amplitudes of each superposition state within a quantum computation. Think of each of the exponential number of states in a quantum computation as being a path through the spanning tree of the CFG – if we don’t place weights on the spanning tree, this is exactly equivalent to Eager Execution! On a computation spanning just 10 qubits, 99.9% of the computation would be wasted, and this waste factor increases exponentially in the number of qubits.

The mathematics that describes the bulk of quantum computation does not view the discarded paths as waste. Rather, it is taken as a given that Nature performs computation for free, so all we have to do is give her the problem we want to be solved and then wait while she solves it. But the practical challenges of protecting qubits from decoherence have encouraged research into a new area – quantum error-correcting codes. What I assert is this: quantum error-correcting codes are logically equivalent to the weights on a weighted CFG used in a multi-threaded DEE CPU.[2]

Let us think of every particle of matter in the Universe as though it were a tiny, single-threaded CPU, capable of performing some kind of simple functional computation. We are surrounded by a veritable ocean of such particles. If we could somehow program these particles to work together at an atomic scale, we could build a plain old classical multi-threaded CPU that could compute immense problems through sheer scale – a quadrillion such particles could easily fit within the confines of a warehouse and could compute problems at scales that are hardly imaginable for us, today. The promise of quantum computation is that we do not need to have a particle-per-thread because Nature is very clever and she uses her resources much more efficiently. Instead, we can (theoretically) obtain exponential advantage by properly preparing qubits. But once we have prepared our qubits – or so the theory goes in some quarters – Nature stops being so stingy and she will compute countless parallel Universes almost all of which will be discarded at the moment of measurement when all the possible paths through quantum state-space are discarded and only the actual path remains.

To be clear, the theory of quantum computation is correct. But the most optimistic expectations of quantum speedup (exponential in the number of qubits) do not take into account the complexities of practical quantum computation. The further we go down the path of quantum speed-up, the greater the challenges are going to be. Quantum speedup faces a law of diminishing returns, nay, it faces a difficulty curve that becomes asymptotically vertical. You can only get particles so close to absolute zero, you can only isolate so much environmental noise, you can only maintain the coherence of qubits for brief periods of time. Each of these challenges increases in difficulty at a geometric rate, in the number of qubits. Quantum error-correction is a promising path forward but, judging as an outside observer, I sense a certain aloofness among the quantum physics community, as though quantum computers are just one breakthrough away from obsoleting all prior computing technologies. It’s not that easy. Even Nature cannot escape the laws of information theory, and it is those laws that place fundamental limits on what both classical and quantum computers can do.

I propose a new way of thinking about quantum computation. I propose that quantum computation is a viable candidate for the characteristica universalis (CU), a concept that goes back to 18th-century philosopher and inventor of the calculus, Gottfried Leibniz. The idea of the CU is that there must be some language which is ideal for discussing any problem of science, mathematics or physics – a perfect language. This perfect language would enable us to think so much more clearly that it would become the language in which we think about everything, even fuzzy, complicated subjects like law, social norms, economics and politics. This ideal language would be so well-defined, Leibniz imagined, that it could be processed by a mechanical system, in much the same way that modern programming languages are mechanically processed by computers. He called the device that would process the CU the calculus ratiocinator (CR). I propose that Nature herself – in all her quantum subtlety – is the CR that Leibniz was seeking.

In summary: I assert that the Simulation Hypothesis is the case and that quantum computation is the characteristical universalis; the CU is processed by the universal simulator, which is more accurately thought of as being an instantiation of Leibniz’s reasoning machine, the calculus ratiocinator. There are no “levels” of simulation in the vein of simulation-based science-fiction, whereby we are trapped inside of an illusion or construct. Rather, the Universe, considered in its entirety, is self-simulating or co-simulating, more like a peer-to-peer network than like a centrally-controlled computation.[3]

Next: Part 24c, Finis (stay tuned)

Footnotes:

[1] – Suppose when the program starts, the user can select between one of several operating modes… the program’s behavior might be radically different in each of those modes. In that case, you would want to model each of those different modes as separate copies of the entire CFG with each having their own weight-assignments.

[2] – One caveat is that our CPU would have to be probabilistic in order for this logical equivalence to hold, not deterministic like the ordinary CPUs we are familiar with

[3] As a closing note, the astute reader familiar with quantum phenomena will notice that I have not mentioned entangled states. It is sometimes implied that entangled states illustrate that quantum computers can do things that classical computers cannot -- this is partly true because classical computers cannot exhibit specifically quantum phenomena. Nevertheless, every computational consequence of quantum phenomena can be -- and is -- simulated by classical computers, including entangled states. In short, entangled states are just one among many counter-intuitive consequences of the mathematics of quantum computers.

Saturday, June 9, 2018

Notes on a Cosmology – Part 24a, Epilogue


In the next few posts, I plan to wrap up the Notes on a Cosmology series and draw some general conclusions. The idea I want to convey is very difficult to put into words not because it is a very complicated or novel idea but because there are so many ways to miscommunicate it.

Let’s begin the project of summarizing the series by looking at one of the emerging technologies of our time: Bitcoin. The principles of Bitcoin are defined as follows:

  • 21 million coins
  • No censorship: Nobody should be able to prevent valid txs from being confirmed.
  • Open-Source: Bitcoin source code should always be open for anyone to read, modify, copy, share.
  • Permissionless: No arbitrary gatekeepers should ever prevent anybody from being part of the network (user, node, miner, etc).
  • Pseudonymous: No ID should be required to own, use Bitcoin.
  • Fungible: All coins are equal and should be equally spendable.
  • Irreversible Transactions: Confirmed blocks should be set in stone. Blockchain History should be immutable.

This may seem to be a topic far removed from the lofty ontology of the Holy Trinity and the other ideas I have covered throughout the series. But it is not so far removed. Let’s re-word the Bitcoin principles slightly (while retaining their essential properties):

  • Fixed, finite pie - no one can pad their pocket or create additional value for themselves, ex nihilo
  • Non-obstruction – everyone can engage the system without the possibility of being censored
  • Reverse-engineering is allowed – no one owns a patent on the system or can act as its central director
  • Permissionless – similar to non-obstruction; you don’t have to ask permission to participate in the system
  • Secrecy is possible within the system (if you don’t divulge your key, no one can access the associated funds)
  • Homogeneity – every part of the system follows the same rules as every other part of the system
  • Irreversibility – no take-backs

If you think about it, these properties describe another system that is very familiar to all of us, whether tech-savvy or not. This system is called the world. Look around you, and ask:

  • Is there anyone who can wave a magic wand and bring gold bars into being and make themselves rich, thusly? No. The physical pie is a fixed, finite pie.
  • Is there anyone who can obstruct you from using your own body? Sure, you can be put in jail or even in restraints. But this does not obstruct you from using your own body within those constraints, it merely encloses the extents in which your body can exist, while you remain free as ever to use your body. You could be drugged but this entails some loss of ordinary consciousness, and it is the ordinary world that I mean to examine.
  • Is there anything preventing the rules of Nature from being reverse-engineered and copied verbatim? No. You are free to reverse-engineer the very fabric of reality itself and copy it, verbatim, if you are able.
  • Must you ask anyone’s permission in order to be alive? Sure, someone might kill you if you do not do what they want. But that is not the same as having to ask permission, it just means that your existence is not unconditional and permanent.

As far as we know, it is possible to have secrets in the physical world; that is to say, no one has proved that the physical world is a holographic construct in which all facts are accessible (with sufficient energy) to every observer within that construct. The laws of the physical world are homogeneous – the speed of light on Arcturus is the same as the speed of light on Earth. Finally, all physical processes are irreversible.

It is, at once, remarkable and unremarkable that the principles of a currency that was invented to be ideal, in some sense, would happen to correlate with properties of our world. The correlation is remarkable because physics appears to be a very different kind of thing than a digital currency. But it is unremarkable in that we are physical beings – what we consider to be useful and relevant is inescapably shaped by our physical mode of being.

My purpose in mentioning the correlation between the principles of the world’s largest cryptocurrency and some of the properties of the physical world is this: even though computational systems and material systems appear to be very different, our belief in this “computational dualism” is purely our own prejudice. We see the physical world as being very different from the artificial world only because we are so used to the physical world.

I have recently done a deep-dive into the subject of artificial neural net (ANN) architectures. One of the things I have realized as a result of this study is that the relationship between discrete and continuous computation is not well understood; at least, there is some persistent confusion in the various specializations. If we were to identify one property that makes artificial neural nets so useful and flexible, it would have to be that they are end-to-end differentiable. The backpropagation algorithm is possible because differential equations work equally well going from the input to the output or vice-versa. Differential equations merely specify the differential relationships between two or more variables; they do not specify which variable “causes” or “drives” which. For this reason, we can use an iterative training method that allows us to alternately forward-propagate and back-propagate the values in any set of equations that is end-to-end differentiable (including ANNs).

The physical world has a property very similar to end-to-end differentiability – our best physical theories describe the world using complex-valued functions; we can use analytical continuation to extend these functions beyond the reach of observation. The logic of analytic continuation is this: supposing the world continues to behave at very large and very small scales in a manner that is consistent with the way it behaves at scales we can observe, then it must behave so-and-so. Note that such reasoning is not a substitute for experiment. We only resort to this kind of indirect reasoning for those scales where experiment is simply not possible with current technology. The key point is this: analytic functions are everywhere differentiable. This means that every aspect of the physical world that is described by our best theories is amenable to back-propagation!

In Part 16 of this series, I described the quantum monad. Key to understanding the idea of the quantum monad is understanding the relationship between continuous information and discrete information. Mathematics leads us to think of the discrete and the continuous as two, irreconcilably separate domains. But the physical world exhibits a unity between discreteness and continuity. Our best theories of physics describe a continuous world, a world that is everywhere differentiable – yet discrete signals abound within this world. Speech, the written word and hand gestures are all familiar examples of discrete signals. Every digital electronic computer is built using analog circuitry and yet the electronic digital computer is a physical system that almost perfectly implements idealized, discrete computation. What this tells us is that discreteness can be thought of as a matter of staying far away from boundary conditions. In digital electronics, the boundary condition is called the non-allowed region – the circuit is simply not allowed to remain at voltage levels that are not clearly “high” or clearly “low”. Any circuit that stays in this region is exhibiting undefined behavior. Note that such conditions commonly arise in real electronic circuits as the result of high-impedance states but a logic failure is likely if these high-impedance states are used as input to logic gates.

Another, less known form of electronic computation that enjoyed some popularity in the pre-PC era is called stochastic computation. The basic principle of stochastic computation is to binarize a signal, while treating the value of that signal as a ratio of its levels – if a signal is ‘1’ 70% of the time and ‘0’ 30% of the time, then the value of the signal is 0.7. Note that the mathematics that describes the signal values in a stochastic system is continuous, not discrete. The resolution of measurement is, at any given time, finite but this is a limitation that is very well-understood since physical theories must always take into account measurement error. The point is that we can build a discrete system and use continuous mathematics to correctly describe its behavior, just as we can build continuous systems and implement discrete-symbol systems within them.

An article just published in Nature has calculated that the efficiency gains of artificial neural networks built with analog circuitry are around 100-fold over the GPUs that are commonly used. Biological brains – including the human brain – are analog computers, not digital computers. We can see that there is a deep relationship between analog, discrete, noise-tolerance, power-consumption and stability. This relationship is one of tradeoffs, not a black-and-white choice between discrete or analog.

The theory of quantum computation predicts (and experiment confirms) that computations using qubits are able to harness modes of computation not available to classical computers. But here’s the punchline: the mathematics of quantum systems straddles the very same divide as the discrete-analog distinction. Is it a wave? (Continuous?) Is it a particle? (Discrete?) The correct answer: it is both. This is true of all real information and all real computation. There is no exception – all digital computers are actually just analog systems that we interpret discretely by staying far away from the boundary conditions.

The theory of computational complexity tells us how hard it is to compute the solutions to different kinds of mathematical problems. Certain problems are easy to solve. Others are very difficult. Some are provably impossible. But the domain of computational complexity theory is restricted to symbolic computation (discrete computation) – the answer to hard mathematical problems can sometimes be found very directly with analog methods. The circuits used to implement artificial neural networks are a good example of this disconnect. Digital multiplication is an O(n2) operation which basically means that the number of steps required to calculate the multiplication grows as the square of the number of digits in the numbers to be multiplied. But an analog multiplier is very simple and its time complexity is O(1) – it returns a result with a single, fixed delay regardless of the number of digits in the multiplication. The limitation is in the precision of the multiplier. The only way to get more digits of precision is to measure the output of the multiplier more precisely and experience shows that the cost of measurement grows geometrically with each additional bit of precision.

Deep Learning is just the first baby step towards something much bigger. Some people are confidently predicting that we will soon build quantum neural networks but it is difficult to imagine how we are going to do that when we are not yet even harnessing the power of analog electronic neural networks or optical neural network technologies. We know that the mathematics of classical systems (such as analog computers and digital computers) is just a special case of the mathematics of quantum systems. Despite the computational speedup that quantum computers can deliver over classical computers, there is no well-defined problem that a QC can solve that no analog or digital computer cannot solve, given enough time and resources. The difference is one of degree, not of kind. The power of quantum computers is not the result of some kind of quantum pixie-dust.

From the information theoretic point-of-view, quantum systems are nothing more or less than continuous systems that admit to discrete conventions, like the non-allowed regions in a digital logic circuit. The mathematical implications of these kinds of continuous systems are subtle and easy to miss from a purely physical perspective. When a physicist has a theory of physics, he takes this to mean that the entire evolution of the physical system is, in some sense, predictable or determined by the parameters of the theory itself (even if the theory is probabilistic, as quantum theory is). But if that physical system can compute, then its long-run evolution might be undecidable. Specifically, the long-run evolution of any physical computer that can simulate a Turing machine is undecidable, otherwise, we could build such a physical machine and use it to solve the halting problem[1].

I have often encountered confusion about the underlying basis of quantum computation, a confusion that I think it is important to dispel. A quantum computer cannot exist in two, mutually exclusive states at the same time. This is true by definition because what we mean by “mutually exclusive states” is that nothing can be in both of those states, at the same time. Quantum experiment only breaks our intuitive notions of the microscopic world, a world that we envision as consisting of tiny classical marbles hurtling unimpeded through empty space and colliding with one another like microscopic billiard balls. This intuitive notion is untenable and is thoroughly contradicted by laboratory experiment.

In Part 16, I laid out the cosmological idea of the quantum monad. The quantum monad is the idea of abolishing the veil of mystery that surrounds quantum phenomena. The problem with quantum physics is not that it is quantum; the problem with quantum physics is how we talk about it. It is one thing to have wonder and awe at the intricate patterns of the natural world. It is another thing to speak of the natural world in frankly magical language, something that frequently happens in popular discussions of quantum physics. If we mean to do science, then we must dispense with non-rational and non-causal thinking.

Let’s return to the two-slit experiment. If we perform this experiment in a shallow pool of water perturbed by a single wave source, we will find that the interference patterns produced exactly correspond to the quantum experiments. Light was thought to be a wave by many early modern physicists. So, there is no surprise here. The surprise arises when we perform the experiment with a single slit – in this case, the pattern formed by the light is not like that which we would see in a shallow pool of perturbed water. Instead, we see the light striking the back-screen in a particle-like pattern. Some early physicists (including Isaac Newton) thought that light was a particle like any other. The surprise of quantum experiment is that light behaves as either a wave or a particle. But light never behaves as both at once. It either exhibits wave-like properties, or it exhibits particle-like properties.

Of course, quantum particles exhibit many other counter-intuitive properties. If we perform the two-slit experiment by emitting a single photon (or electron) at a time, we will see the same wave-pattern on the back-screen as if we had emitted the photons or electrons all at once. Quantum theory explains this phenomenon by extending the wave-equation through both space and time. Of course, classical fluids and gases do not behave this way. Water waves interfere as they do because the countless water molecules are interfering with each other, all at once.

The analogy I assert is this: quantum systems are to classical systems as analog computation is to digital computation. This analogy is a loose one. The idea is this – discrete computation is just a convention, the only computers we can actually build are analog systems. Discrete computers get their discreteness from staying well clear of boundary conditions – nothing more. Similarly, quantum theory says that all classical systems are really just quantum systems with so many copies (nearby quantum particles in similar states) that they exhibit classical behavior.

I opened this post by discussing the principles of Bitcoin in order to make the following point: it is conceivable that all the properties we associate with the material world are what they are for computational reasons. This idea puts the Simulation Hypothesis in a new light – rather than being a reflection of a generic existential angst or nihilism, perhaps the idea that the world is a simulation has a solid basis in laws that must regulate any information system. If this is the case, then we can see every particular fact of the material world in light of a symbolic computation. I will expand on this idea in more depth in an upcoming post.

Next: Part 24b, Epilogue cont'd

----

[1] – As a pedantic point, any finite physical machine is fully computable because it has only finite memory resources; however, we can make a limiting argument to counter this… we mean by “physical computer that can simulate a Turing machine” any physical computer whose indefinite operation is merely a matter of adding more of a homogeneous physical resource, such as loading more and more tape into a mechanical Turing device.

Saturday, April 28, 2018

Toy Code - My First Neural Network


As part of my annual tradition of avoiding filing taxes by starting new side projects, I decided to write my own neural network in C code. A quick Web search turned up several beautiful neural-network libraries written in C. But I wanted something more like a worked-example than a full-fledged library. Github turned up tinn - the Tiny Neural Network (library). Tinn is pretty spiffy and a great tutorial for working out the mechanics of a simple feed-foward neural net. While it could be re-purposed to work on other datasets, it ships with the Semeion dataset.


As spiffy as tinn is, I still needed to rewrite it "in my own C" in order to be sure I understood what is happening internally. So, I wrote basic_nn (Github).


I like to include a general-purpose test harness in my one-off C projects that acts like a built-in debugger. This is the dev_prompt() function. Consult the README on Github for instructions on using the command codes at the prompt.


I had some trouble getting the network to train properly, at first, and this turned out to be an issue with not mapping the weights correctly during the forward and backward propagation phases. The update rules are very straightforward and this dataset is very small, so once I got the array indices correct (getting the right weights mapped to the right parts of the update equations), everything just snapped into place. I was able to use the debug prompt to view the internal weights and get a visual idea of what is happening internally. The mathematics of neural nets are copiously documented throughout the web so I won’t recapitulate them, here. I will try to show diagrammatically what is happening inside basic_nn, however.




When the NN is not training correctly, the entire weight space will tend to change like random static during training; or, if the array indices get transposed (oops, yes, I did that), then you can see “bands” appear in the hidden weight space when training many iterations, especially on a small training set. The image below shows the hidden states (256x32) with the erroneous bands exaggerated so they show up better visually:




But when the NN is training properly, you will see an initial change across the entire weight space and then the weights will tend to “settle”, with most weights staying the same and only a few scattered weights changing with additional training iterations. The image below shows the hidden states. The first box shows the hidden states after 20 epochs of training (one epoch passes through the entire dataset once; note that basic_nn kind of cheats in order to avoid the need to shuffle the dataset, see command-code 8 in the source-code). The second box shows the hidden states after another 10 epochs. Because you can’t visually see the difference between them, the third box shows both snapshots of the hidden state overlaid and visually subtracted so you can see the points where the two snapshots differ:





So, that’s how to write and train your own neural net in C with the Semeion dataset. Stay tuned for more episodes of Toy Code.

Sunday, December 24, 2017

Notes on a Cosmology - Part 23, The Trinity

Traditional Orthodox icon depicting Father (R), Son (L) and Holy Spirit (Top)

The Trinity and the Logos

"The Logos became flesh and made his dwelling among us. We have seen his glory, the glory of the one and only Son, who came from the Father, full of grace and truth." (John 1:14)
In the last post, we discussed the Logos as the expression of the final purpose of God. The Logos is what God is seeking, it is His ultimate aim or end. The opening of the book of John draws a clear parallel between God's creation of the world (in Genesis) and the appearance of the Logos in history. The New Testament explains that the world was created by, through and for the Son. This is not an accident. Note that God created the world by a speech act. "And God said, 'Let there be light'..." God speaks in many ways, in fact, it is not an exaggeration to say that God speaks through all things at all times (Psalm 19). Despite the apparent cacophony of the world, with its conflicting messages, God does not speak equivocally. For mortals like us, then, the question is which voice is the voice of God? The Logos! The Logos is God's final word on everything. The key observation, here, is that God does not speak through lifeless statues, rote laws or even words written on pages of paper - God speaks through a living person. He once spoke through an entire people (the Jews) but, today, he speaks through one man: Jesus Christ. Specifically, he speaks to us through the living Spirit of Jesus Christ.

It is crucial to let this idea sink in. We write messages on lifeless, material objects: paper, plaques, banners, posters, displays, and so on. We write stories and convey them through through print, film and acting. God writes messages on people and their lives, as such. This is the full meaning of God's sovereignty.
“Shall what is formed say to the one who formed it, ‘Why did you make me like this?’” Does not the potter have the right to make out of the same lump of clay some pottery for special purposes and some for common use? (Romans 9:20,21)

The Trinity and Knowledge

We can divide the ways of thinking about the world into two approaches. The first approach is to see the world as a single substance that manifests a wide variety of particularities. The second approach is to see the world as a (potentially unlimited) number of irreducible particulars upon which we impose a subjective sense of unity (conscious awareness). Because these two approaches do not appear to have any resolution, this is sometimes called the problem of the one and the many.

The Trinity is the solution to the problem of the one and the many. The light of consciousness within us is lit from the one flame of the Spirit (Genesis 2:7), yet all the varieties of particular knowledge proceed from the mind of God (Psalm 139:17-18, I Cor. 2:10). The universal is God speaking to us from within - the particular is God speaking to us from without. This fact is why separation from God is torment - it is a denial of the fact of our relation to God, a relation so intimate that it is impossible to correctly interpret any fact of reality without reference to this relation.


The Trinity and Being

Being is identity. Identity is mutually exclusive between "self" and "other." Thus, the category of being is logically dependent on that which is not-being. But if God is being, and all that he creates is an extension of himself, there is nothing besides God himself and, thus, God does not exist, that is, God cannot distinguish his own existence from non-existence.

Father and Son, together with the shared being of the Holy Spirit, exist each as "self" and "other" to one another. While God's being is, of course, one, this being must be first understood in its logical relation. And this is why we speak of God being both one and three. God's oneness and threeness is not an arithmetical fact about God. It is a logical fact that is prior to all other logical facts. Without God's oneness and threeness, there is no physics, there is no mathematics, there is no philosophy, there is no being of any kind.

Every part of God's being is existing but because Father and Son are distinct, each can point to "other" and this otherness can fulfill the role of non-being (death, destruction, desolation). In this, we see God's knowledge of both good and evil and the susceptibility of the perfectible Creation to falling. God is knowing the susceptibility of the Creation to the Fall because God is able to conceive of death without being destroyed. No created being in the perfectible state can have this knowledge because they cannot point to non-being, to something outside of themselves. Rather, their existence, being created, is logically dependent upon the unconditional existence of God.


The Trinity and Action

If God is a peerless, omnipotent being, he is alone. Thus, he would not be that being than which none greater can be conceived (Anselm) and he would not be God. Another way to put it is this: suppose God wanted to play chess. With whom would he play?

If God is peerless, he cannot act, that is, he cannot choose. The triune relationship between Father and Son - with the Holy Spirit as the shared basis of being - is the only solution to this problem. God can act because he is not alone. The Father is eternally existing with his Son. The Son is eternally existing with his Father. Both share, between them, the Holy Spirit who is coequal with Father and Son.


The Trinity and Substance

The gross features of the material world are defined by the property of mutual exclusion of objects in space. We call this property substance or matter. "Two objects cannot occupy the same space at the same time." Logically, this is a category of mutual exclusion.

Consider our state-of-being from the point-of-view of a heavenly being. Time and space are really an obstacle to action. I must travel to my destination (this takes time). I must labor to provide for the satisfaction of my wants (this takes energy). I must arrange my possessions in a way that makes them accessible (this takes space). And so on and so forth. The mind can easily conceive of the absence of these obstacles that frustrate action so that every state-of-being is immediately actualized by a mere act of will. God's state-of-being cannot be less perfect than what the human mind can easily conceive.

So, then, why is there a material world at all?

Mutual exclusion is impossible without conscious choice because there is no sufficient reason for the ephemeral objects of pure contemplation not to overlap. A non-overlapping geometry requires the application of collision-detection algorithms - such algorithms are necessarily more complex (less probable) than those which permit arbitrary overlap. The material world of substance could not exist without the conscious choice to engage in non-overlap for the purpose of interaction. The material world is substantial by agreement. In short, the material world exists, as such, by agreement between Father, Son and Holy Spirit. Their purpose in the material creation is precisely what is explained in Scripture: to create man in the image of God in a perfectible state and to provide the Redeemer who has delivered fallen man from death.


The Trinity and Causality

Descartes contemplated the possibility that we are deceived by a malicious being of unimaginable power. The famous "cogito ergo sum" was the result of this thought-experiment.

Causality-as-such is very difficult to establish on any kind of formal basis. Suppose you roll a pair of dice and you wish to know whether the outcomes of these rolls are random or whether they are being influenced by an evil trickster. You can count the outcomes of rolls and you can compare them with the probabilities of outcomes to see if they match up. For example, a pair of dice that consistently roll 7, 7, 7, 7, ... are not random and are not behaving the way we expect dice to behave, on the basis of causality. If the dice behaved this way, you could be quite sure that something was amiss.

But no matter how well-behaved the dice seem to be, you can never really know - even if you employ mathematical methods with uncomputable time! - that the results of dice throws are not being influenced somewhere by an unimaginably greater being. Even if the dice checked out - after uncomputable time - as "true random", you cannot conclude from this investigation that the next roll of the dice will be unbiased. Our sinister Cartesian demon could simply have been waiting for you to check the dice - and believe they are unbiased - before playing shenanigans with them. Stated another way, it is always possible to prove a phenomenon to be non-random, but it is never possible to prove a phenomenon to be random. Scientific claims about quantum randomness, for example, are not rigorous because no one could ever distinguish, by experiment or computation or both, a truly random source from a merely apparently random source.

Because of this, a universal conspiracy - that our senses are feeding us an incorrect picture of "the real reality", for example - cannot be ruled out. Conspiracy is the opposite of randomness; random dice do not conspire to make you lose or win at the betting table. But since we can never prove a phenomenon to be truly random - as opposed to apparently random - we can never actually rule out the possibility of universal conspiracy.

Like substance, causality is a limiting factor. Regret is only possible under the constraint of causality. A being than which none greater can be conceived has no regrets, by definition. Such a being has no use for causality and cannot be shackled by any law of causality. Causality operates for the same reason that substance exists: by agreement between Father, Son and Holy Spirit in order to create, to redeem the creation and to glorify the Father through the Son.


The Trinity and Transcendence

Contemplating the infinitude of God can leave the mind lost in a boundless ocean of limitlessness. This state of mind is equivocal and is incompatible with the presence of conscious awareness. The presence of the being of God is a result of the focus of God's mind on the Logos - His purpose for being and existence.

God's mind, conceived as an infinite, uncentered consciousness, would be necessarily equivocal. Every point of being would be equal to every other point of being. In other words, being conscious in a state of utter torment would be equivocal with being conscious in a state of utter bliss. This contradicts our working definition of God as the greatest conceivable being.

The Father's mind is univocally focused on the single end of raising the name of his Son above every other name and causing all things in heaven and earth to bow and acknowledge his Son as Lord. Thereby, the Father glorifies himself (Phil. 2:9-11). This is how it is that the Father causes that not one sheep will be lost (John 6:39). To borrow a mathematical metaphor, the mind of God is like an infinite plane with a single point that is the designated center of the plane - that point is the Logos.


Conclusion

God is light. This light is not physical light - rather, physical light is a material metaphor of the Divine light. The Divine light is conscious awareness, choice and, especially, holiness. The Trinity is the shared reality of light in God: God's awareness of all that is, God's power to choose as he sees fit, God's dispersal of all darkness that opposes his light, God's absolute perfection - a perfect creator, Father, redeemer and ruler. It is the light of God that best illustrates God's oneness without becoming entangled in irrelevant questions of arithmetic - the light of the Father, the light of the Son and the light of the Spirit are one. They are one being, with one mind, one will, one purpose and one, divine perfection.

This series began as an inquiry into the causes and conditions of existence - a cosmology. As we near the end of the series, I want to underscore that any conception of existence that is informed solely from the particulars of material world-states is woefully inadequate. Your life is a story that God is telling you. His redemption is the focal-point of that story. You cannot live apart from God's redemption, that is, you will die without redemption. The common idea of a tension between faith and reason, or between faith and science, is a wholly mistaken notion. God is not a story that we are telling each other -- we are a story that God is telling us!

Next: Part 24a, Epilogue

Friday, December 22, 2017

Lossless Compression with a Lossy Compression Ratio


Lossy compression is used on rich media - audio, images, video, and so on - to great effect. JPEG image compression can drastically reduce the file size of an image without severely degrading the quality of the image. Compression ratios of 90% or more are attainable for applications where image quality is less important. This tradeoff between data quality and file size is only possible when the type of data being compressed is noise-tolerant. A compressed image of a cat may be slightly fuzzy or have slight mis-coloration but it is still recognizable as a cat, after compression. A text file, such as a legal document or a computer program, on the other hand, must be losslessly compressed because semantic content will almost certainly be destroyed by the noise in the resulting, compressed file. For these kinds of files, we use lossless compression.

It would be nice, however, if we could achieve the filesize benefits of lossy compression, without introducing noise - can we have our lossless compression cake and eat it, too? Consider the following quote:

No one rejects, dislikes or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?

- Cicero, De Finibus

As we know, the more often a particular character or word is repeated in a text, the higher the redundancy of that text and the more compressible the text is. Can we apply a transform to this text that will render it more redundant, without losing our ability to recover the text exactly?

No one rejects, dislikes ◦◦ avoids pleasure itself, because it ◦◦ pleasure, ◦◦◦ because those who do ◦◦◦ know how ◦◦ pursue pleasure rationally encounter consequences that ◦◦◦ extremely painful. Nor again ◦◦ there anyone who loves ◦◦ pursues ◦◦ desires to obtain pain of itself, because it ◦◦ pain, ◦◦◦ because occasionally circumstances occur ◦◦ which toil ◦◦◦ pain can procure him some great pleasure. To take ◦ trivial example, which of us ever undertakes laborious physical exercise, except ◦◦ obtain some advantage from ◦◦? But who has any right ◦◦ find fault with ◦ man who chooses ◦◦ enjoy ◦ pleasure that has ◦◦ annoying consequences, or one who avoids ◦ pain that produces ◦◦ resultant pleasure?

A quick glance at the text should allow you to convince yourself that an English speaker will be able to easily reconstruct the original text with few, if any, errors. Clearly, this version of the text has higher redundancy because we have replaced 46 separate characters – drawn from a subset of the English alphabet – with 46 repetitions of a single character. Thus, this version of the text admits to a better compression ratio. Is there a way that we could ensure that the person who is trying to decode this text has reconstructed the original text? The answer is to take a hash of the original text and give this to the person trying to decode the obscured text. In this case, the CRC32 of the original text is 0x77ea20bb. If the person decoding the obscured text makes a mistake, say, by choosing “yet because” instead of “but because” for the third obscured word, the resulting CRC32 will be 0xffa9da29. So, by adding a few bytes to store the hash of the original text, we can strike out words that are easy to guess from the context and an English speaker will be able to recover the original text and convince herself that the reconstructed text is identical to the original text.

We have been careful to strike out only words that are easy-to-guess for an English speaker (from context) – but do we have to stop there? The answer is no. Let’s say we strike out a large word that cannot necessarily be guessed from the context:

No one rejects, dislikes ◦◦ avoids pleasure itself, because it ◦◦ pleasure, ◦◦◦ because those who do ◦◦◦ know how ◦◦ pursue pleasure rationally encounter ◦◦◦◦◦◦◦◦◦◦◦◦ that ◦◦◦ extremely painful. Nor again ◦◦ there anyone who loves ◦◦ pursues ◦◦ desires to obtain pain of itself, because it ◦◦ pain, ◦◦◦ because occasionally circumstances occur ◦◦ which toil ◦◦◦ pain can procure him some great pleasure. To take ◦ trivial example, which of us ever undertakes laborious physical exercise, except ◦◦ obtain some advantage from ◦◦? But who has any right ◦◦ find fault with ◦ man who chooses ◦◦ enjoy ◦ pleasure that has ◦◦ annoying consequences, or one who avoids ◦ pain that produces ◦◦ resultant pleasure?

Here, we have increased the number of struck-out characters from 46 to 58. The word that has been obscured has length 12. There are thousands of possible words that could be substituted here but, in all likelihood, only one of them will satisfy the criterion that the CRC32 hash of the resulting text block be 0x77ea20bb – the word “consequences”. Thus, we could write a program to automate a word search through the dictionary until it finds the missing word, and gives us the result.

In itself, this is not very useful. After striking out just a handful of hard-to-guess words, the time required for a brute-force search would become prohibitive – it grows exponentially with each word struck out. But we have identified a method for applying a generic “guess-and-check” algorithm to the reconstruction of an arbitrary text from an obscured text with higher redundancy. Can we make this algorithm more efficient?

In the first example, it would be quite easy to train a neural network to perform a guess-and-check algorithm to emulate the guesses of an English speaker. But if we focus on trying to recreate the mind of an English speaker, we miss the wider application of the method for the purposes of compression. Let us call the person who encodes information by increasing its redundancy the obscurer (O) and the person who tries to reconstruct the original input, with the aid of its checksum, the revealer (R). O is able to strike out the easy-to-guess words because she knows that the substitutions will be easy-to-guess for R. So, as long as this property holds – that R will easily be able to guess the substitution based on the information given by O – we have a system that can losslessly encode and decode information into a form with higher redundancy than was present at the input to the system.

We can think of the obscurer and revealer as playing a game, such as a crossword-puzzle – O is trying to construct puzzles that have as much redundancy as possible for a given degree of difficulty and R is trying to reconstruct the original input, based on the puzzle, as quickly as possible. We can implement O and R as a pair of convolutional neural networks (CNN) using Monte Carlo Tree Search (MCTS) – a construct used to great effect by Deep Mind with its Alpha Go, Alpha Go Zero and Alpha Zero game software. During training, we calculate the difficulty of each encoding/obscuring choice that O makes and we train O to prefer paths that result in greater redundancy, while avoiding paths that result in excessively high difficulty for R.

For each compression context, we choose a training corpus and train O and R. We can think of this as choosing which game O and R will play with each other. An English text game is different than a music audio file game, and so on. It is common practice in modern compression utilities to automatically change compressor based on context. For this purpose, we train a feed-forward network Q to function as the meta-compressor. During compression of a file, Q switches context as appropriate, so that O is likely to be playing the game that is best suited to increasing the redundancy of the input file for a given degree of difficulty, including, in the case of random data, the pass-through game in which the source information is passed through as-is. For each game on which O and R are trained, we can vary the difficulty parameter to allow a user to choose between quick, mild compression and slower, more aggressive compression.

Note that we do not necessarily use the CRC32 hash, this was merely chosen as an academic example. The hash should be chosen based on probability considerations, that is, it should be chosen such that the probability of collision is negligibly small for the given context. The puzzle game played between O and R uses as many hashes as are suitable for guiding the guess-and-check puzzle. The problem with obscuring random words is that the guess-and-check complexity grows exponentially with each word obscured. By choosing to obscure only words that are easy-to-guess for R and only obscuring so many words before providing a puzzle hint (hash), O can limit the difficulty of R’s task.

We can think of the game being played between O and R as building and pruning a variable-order, conditional-entropy model of the input. At each branch-point in the model, the lowest entropy (most probable) branches are liable to be discarded (obscured). Every so many branches (based on the training of O and R), a puzzle hint is given by O so that R can reconstruct (reveal) the missing branches with a reasonable amount of difficulty.

The resulting, more redundant data produced by O resembles lossy compression because the obscured information is simply discarded. Any suitable, lossless compression algorithm can be applied to the output of O. If O and R are well-trained, this should result in an improved compression ratio or, at worst, no change to the compression ratio.

Friday, December 15, 2017

Fuzzy Sets and Artificial Intelligence

Many patterns of Nature are so irregular and fragmented, that, compared with Euclid — a term used in this work to denote all of standard geometry — Nature exhibits not simply a higher degree but an altogether different level of complexity … The existence of these patterns challenges us to study these forms that Euclid leaves aside as being "formless," to investigate the morphology of the "amorphous." - Benoit Mandelbrot, as quoted in a review of The Fractal Geometry of Nature by J. W. Cannon in The American Mathematical Monthly, Vol. 91, No. 9 (November 1984), p. 594
Artificial intelligence requires a new way of thinking about both Nature and computation. Alpha Zero has demonstrated a fundamentally new form of chess playing that did not exist before. Its style of play has been described as alien, resembling neither the style of human play nor the style of classical machine play.

Fuzzy set theory (or fuzzy logic) is an alternative approach to standard set theory or "crisp" set theory. With fuzzy sets, every element in the universe of discussion has a "degree of set membership" in one or more sets. The degree of membership is a value between 0 and 1 that can, under certain conditions, be interpreted as a probability (it is a mistake to treat degree of set membership as identical with probability, however).

Let's consider the category of image-recognition - not merely machine image-recognition but the category, in general (including human or other image-recognition). Let us say we have two large sets of images T and L. T contains images of tigers shot from a wide variety of distances, angles and visual conditions. L has a similarly wide selection of images of lions.

Using T and L as our ground truth, let us randomly select an image from one or the other set and submit this image to a test subject for identification. The test subject can answer "lion," "tiger" or "unknown". When the subject answers "lion" for an image drawn from T - or vice-versa - we can say that this is an error as measured against the ground truth. But sometimes the subject will not be able to make any positive identification, no matter how carefully they attempt to do so - perhaps because the image is too fuzzy or the animal is too distant or the particular angle or image conditions cause the animal's appearance to be equivocal with the appearance of the other animal. From the perspective of the ground truth, "unknown" is always an erroneous response. But this contradicts our intuition that "unknown" is a perfectly reasonable response for cases where the image information required to distinguish an element of one set from the elements of the other (on the basis of the image alone) is lacking. In such cases, "unknown" is the correct answer and an answer of "tiger" or "lion" would be flatly incorrect or, at best, a mere guess.

Instead of categorizing answers according to the ground truth, we can allow the test subject to associate some degree of confidence with the answer - [L,1.0] is "more of an element" of L than [L,0.9]. As we submit the images to the test subject for review, two new sets - L' and T' - will be formed, describing that subject's classification of the images, along with an associated confidence parameter. This approach allows us to directly express equivocation, since the test subject may answer [L,0.5],[T,0.5] in order to classify an image as being equally a member of either set - this would have been an "unknown" in our previous arrangement. But the test subject can now express degrees of equivocation, so that [L,0.6],[T,0.4] classifies an image as slightly more a member of L than of T. Of course, any item in the universe of discourse can be fully included in more than one set, so membership is not normalized to 1.0; an answer of [L,0.1],[T,0.1] may express the test subject's doubt that either animal is in the picture at all.

But now let us introduce the liger.



Ligers are a fact of physical reality (they are a real, existing hybrid). But ligers break our L/T dichotomy. Even our fuzzy sets don't help - [L,1.0],[T,1.0] should indicate the situation where a lion and (separately) a tiger are present in the image. That is, a liger - being its own hybrid - requires its own classification, let's call it G. What I am asserting is that, at the macroscopic level of observation, reality is inherently continuous and, thus, the category of categorization itself is always liable to breakage. This is the black swan theory - no matter how complete we feel our theory is, the possibility of a black swan always exists. No matter how much we rationalize having missed the possibility of a black swan (after the fact), the fact remains that we overlooked this possibility because reality is fundamentally continuous - if there are lions (L) and there are tigers (T), there is always the possibility that there are ligers (G), a fundamentally new category that does not belong to any already-known category.

The implications go down to the foundations of math itself. Modern math is based on standard set theory. This kind of set theory is ideal for symbolic reasoning, the kind that mathematicians use almost exclusively. But note that not all reasoning must be symbolic. Here is the proof of Pythagoras's theorem. I will explain it using symbols but it is not comprehended symbolically:

The image on the left shows two gray, square regions. The long sides of the triangles are labeled a (all equal), the short sides are labeled b (also all equal). To transform the left image to the right image:
  • The red triangle stays where it is
  • The blue triangle slides all the way down
  • The green triangle slides all the way to the left
  • The yellow triangle slides to the upper-right
The hypotenuses of the triangles are, obviously, equal, and labeled c. Since these are right-triangles, the angle formed by placing the long-side and short-side of the triangles abutting on the same line must be 90 degrees, since 180-90=90. Thus, the gray region in the center of the right image is a square and its area must be c2. This is a proof of Pythagoras's theorem.

There is nothing about this proof that requires the use of symbols. You could even build a physical model of this proof, if you wanted. It is even possible to perform numerical calculation without the use of symbols. Techniques involving only a straight-edge and compass easily allow numerical calculations to be performed to a handful of significant digits.

Standard set theory - and the mathematics built on it - naturally assumes noiselessness in the symbols themselves. This means that we always recognize the symbol 3 as the number it represents and never confuse it with another number, such as the number four. It also means that there are no categories that break the syntax of our formal system - there are no ligers among the symbols of mathematics (imagine a 3 and 4 superimposed, for example).

In the real world, noiselessness is never absolute, it is always a matter of degree, based on the redundancy and other error-correcting features of the chosen encoding. In the limit, we must admit that this is even true of human mathematics. Human knowledge and human memory - even with all its external, material aids - is not perfectly noiseless.

But noisy symbols are like fuzzy sets, or ligers. We live in a Universe where absolute noiselessness is simply not in the attainable set of conditions, but where our most effective theories of reasoning and material causality are built on symbols that are supposed to be made out of noiselessness. Ligers break noiseless theories.

So, what we want is a system that ligers can't break. A liger doesn't break reality, it just makes it different when we discover one. There is no reason we cannot build formal systems that act like the material world - systems that are noise-tolerant. It is still possible to reason with a quasi-consistent system of symbols - fuzzy symbols. In fact, the world just is fuzzy symbols being interpreted by the mind-body system. In short, the mathematics of reality is fuzzy mathematics.

Unlike classical computation systems, AI systems are inherently fuzzy. They are good at fuzziness, unlike their brittle forebears. But AI systems are going to face increasing headwinds as they improve at fuzziness. The human brain can easily distinguish a lion from a tiger, even at a very young age after seeing only a tiny number of examples - and perhaps entirely schematic! Yet our brain has great difficulty performing long-division on numbers more than a handful of digits in size. This is a result of the brain's fuzzy orientation - it does not expend precious mental resources on noiselessly encoding decimal digits which would enable us to perform rapid long-division in our heads. The more fuzzy AI becomes, the more it is going to face the same obstacle - when it encounters a formal problem with high logical depth, it will need to utilize an external, classical computational process to handle this problem in the same way that the human utilizes a calculator to handle such problems.

Fuzzy sets are not exactly identical with quantum mathematics but it is tempting to wonder if it is possible to naturally represent a fuzzy set theory as a quantum system. This could even establish a correspondence between the limits of algorithmic complexity - which we have explored in previous posts - and the a priori limits of physical observation that quantum theory predicts (the Planck limits).

In this view, the reason that quantum systems act more like fuzzy sets than like crisp sets would be a consequence of the limitations of the observer (us). An observer of limited complexity can only distinguish two distinct objects up to the limit of complexity. If two objects are different but this difference can only be perceived at a level of complexity beyond that possessed by the observer, they will appear to that observer to be the same. By the same token, if two objects are the same (have the same properties) but this identity can only be perceived at a level of complexity beyond that possessed by the observer, they will appear to that observer to be different. Today, this is purely pedantic speculation. But a world in which Artificial Super Intelligence exists, this will no longer be a pedantic matter. We may end up in a world where AI is able to distinguish between things that look the same to us - no matter how much scientific instrumentation we apply; and vice-versa. Between here and there, we're going to need a robust language in which to discuss fuzziness. Such a language may look as different from traditional mathematics as the above proof of the Pythagorean theorem looks different from an algebraic proof of that theorem.

Sunday, November 12, 2017

Notes on a Cosmology - Part 22, The Logos

Suppose you woke up one morning and you looked into the mirror to find your appearance drastically changed for the better - a younger, leaner, healthier version of yourself. (If you're already young and in good shape, imagine any change that would be physically shocking but still pleasing - new hair, new eyes, different skin pigment, whatever.) After overcoming the initial shock, you go to your nightstand to find an embossed card that informs you that you have been genetically renewed through some futuristic technology and that you are no longer liable to death by aging or disease. This would be amazingly good news, of course, but it would change the priorities of your life. For example, life insurance would be worth a lot less to you but safety from physical dangers would be worth a lot more to you. If you were smart, you'd probably stop driving a car altogether since that is your #1 risk of untimely death unless you have a high-risk occupation (which you would quit immediately, if you were smart).

You would also need to dedicate more of your time to long-range planning -- very long-range planning. But, despite your best preparations, you cannot rule out the possibility that you will end up in Rocky Valentine's plight. After arranging your affairs according to the best considerations of prudence, after applying your mind and energies to achieving the most wealth consistent with ataraxia, you find yourself running out of sheer interest to live. How many times can you enjoy fried chicken? How many times can you enjoy a birthday party? A night out with friends? A night in with family? A thousand times? A million times? A billion times? As long as you managed to escape untimely death, it is possible that you will engage in these activities any finite number of times. King Solomon, reputed to be the wisest man to have lived, concluded that life - no matter how prudently or lavishly it is lived - is futile:

The words of the Teacher, son of David, king in Jerusalem: “Meaningless! Meaningless!” says the Teacher. "Utterly meaningless! Everything is meaningless.” ... 
I said to myself, “Come now, I will test you with pleasure to find out what is good.” But that also proved to be meaningless. “Laughter,” I said, “is madness. And what does pleasure accomplish?” I tried cheering myself with wine, and embracing folly—my mind still guiding me with wisdom. I wanted to see what was good for people to do under the heavens during the few days of their lives. 
I undertook great projects: I built houses for myself and planted vineyards. I made gardens and parks and planted all kinds of fruit trees in them. I made reservoirs to water groves of flourishing trees. I bought male and female slaves and had other slaves who were born in my house. I also owned more herds and flocks than anyone in Jerusalem before me. I amassed silver and gold for myself, and the treasure of kings and provinces. I acquired male and female singers, and a harem as well—the delights of a man’s heart. I became greater by far than anyone in Jerusalem before me. In all this my wisdom stayed with me. 
I denied myself nothing my eyes desired; I refused my heart no pleasure.
My heart took delight in all my labor and this was the reward for all my toil.
Yet when I surveyed all that my hands had done and what I had toiled to achieve,
Everything was meaningless, a chasing after the wind; nothing was gained under the sun.
Then I turned my thoughts to consider wisdom, and also madness and folly.
What more can the king’s successor do than what has already been done?
I saw that wisdom is better than folly just as light is better than darkness.
The wise have eyes in their heads while the fool walks in the darkness;
But I came to realize that the same fate overtakes them both.
Then I said to myself, “The fate of the fool will overtake me also. What then do I gain by being wise?”
I said to myself, “This too is meaningless.”
For the wise, like the fool, will not be long remembered; the days have already come when both have been forgotten.
Like the fool, the wise too must die! 
[Excerpts from Ecclesiastes]
The idea that immortality could turn out to be a curse because of the futility of life follows from the consideration that humans have no rational or experiential context in which to process unending life. Perhaps eternal boredom (ennui) would make unending life feel like an inescapable prison. Of course, there is euthanasia. But if you woke up one day to find out you were immortal, this might prompt you to reconsider the parameters of causality, including what would actually happen if you did attempt to end your life. Perhaps your consciousness is indestructible like many religions teach -- an ignorant and irreversible decision might have unforeseen and highly negative consequences.

In the last two posts, we shifted the discussion onto theology in order to ask the following question: Supposing God exists, how does he not become bored? How is God exempt from the tragic futility that Solomon realized is the inescapable outcome of life?

If God is the being than which none greater can be conceived, then he must be knowing the answer to this question, even if we can't find it. In other words, God must not only not be liable to ennui, he must be certainly knowing that he is not liable to ennui. God must be able to prove to himself that he is eternally interested in his own existence and activity.

We cannot hope to deduce God's highest end from first principles. Thus, we cannot deduce God's interestedness in his own existence and activity. The traditional Christian view holds that God has revealed his highest end to man, and that it is to glorify himself. In the book of Isaiah, God speaks, "For my own sake, for my own sake, I do this. How can I let myself be defamed? I will not yield my glory to another." (48:11). In the book of Philippians, Paul explains how the Father is glorifying himself in the Son, "Therefore God exalted him to the highest place and gave him the name that is above every name, that at the name of Jesus every knee should bow, in heaven and on earth and under the earth, and every tongue acknowledge that Jesus Christ is Lord, to the glory of God the Father."

The word Logos comes from the opening of the gospel of John:

"In the beginning was the Logos, and the Logos was with God, and the Logos was God. He was with God in the beginning. Through him all things were made; without him nothing was made that has been made. In him was life, and that life was the light of all mankind... The Logos became flesh and made his dwelling among us. We have seen his glory, the glory of the one and only Son, who came from the Father, full of grace and truth." 
Most translations render the Greek word λόγος as "Word", but this is not its only meaning. The word has to do with reason, justice and the verbal faculty and John's mystical language opens up the word to all its possible meanings.

In the universal Monad, the Logos is the reason, purpose or end of all things. Because God has choice, this end is not imposed upon him but, rather, is actively assented to. Yet, God is knowing the inevitability of the Logos, as well, because he is knowing his own interestedness in his existence. Thus, the Logos does not exist in a hierarchy above or below will (choice). Rather, the Logos is the unifying thread that ties together all aspects of the universal Monad.


In this series, I have been trying to build a cosmology. We have taken a detour into theology not in order to abandon this cosmology but in order to put it in a broader context and, hopefully, place it on a firmer foundation. We have asserted that all is mind, that the universal mind is unlimited, that this mind could have let down what we termed a "teleological ladder", in order to make it possible for us to ascend to a better state of being. None of these assertions relied on theological considerations. I assert that the Logos must be that teleological ladder.

This brings us to what I have termed the Architecture Hypothesis (AH), in contrast to the Simulation Hypothesis (SH). The key to understanding the SH is methodological dualism. There is the "I" which is "the mind in the VR headset", so to speak. Then there is "the reality", that is, the material world, "the VR headset" which we are positing is doing the "simulating". Viewed in this way, we cannot ignore the conditioning effect that "the reality" has upon the "I" - the primary effect upon the self of existing within the world is that it is conditioned by the world. This is an exact statement of the Buddhist teaching called conditioned existence. We become habituated to the patterns of material existence and we may become so habituated by them that we are unable to disconnect from them without being driven to insanity or some other bad end.

In the AH, the fact that the nascent self is conditioned by its environment is not overlooked. Rather, it is just the first stage in a life process that is potentially infinite. What you believe about the world is what determines whether this process is actually infinite or whether it will terminate at some point. What you believe about the world is not determined by the world itself (your conditioning) but, rather, by your innate disposition (the "I"). Your innate disposition, in turn, is a super-evolutionary aspect of reality. Reproduce-select-mutate-repeat cannot explain the innate disposition and how it is matched with its particular environment - it is the combination of these two that produces the state of conditioned existence. The world, at root, is not value-neutral yet what is possible, in the sense of the realizable states-of-affairs, is essentially unlimited. Because the nascent self cannot grasp the true, long-run consequences of its choices within an absolutely unlimited existence (say, 1 billion years from now), it is constrained for a duration. This is true for all individuals, in parallel, and it is through connection with the creator (or God, if you can accept it) that the universal architecture of mind is unveiled and recapitulated, leading eventually to true love, true unity, unlimited comprehension and eternal life. In the SH, there is non-determinism with respect to the end or purpose of all things. In the AH, there is no non-determinism with respect to the end or purpose of all things - it is laid out from the very beginning, in much the same way that a mathematical theorem is stated before its proof is written out.

Let's get a little bit more specific about the end or purpose which the Logos represents. The book of John presents Jesus as the incarnation of the Logos - the Son of God and Son of Man (which can also be read "Son of Adam"). What John is really saying is that Messiah's coming to Earth was the whole purpose of Creation. His coming was prophesied when God pronounced the curse on the Serpent. He says to the Serpent, "I will put hostility between you and the woman, and between your offspring and hers; he will crush your head, and you will strike his heel." "Her offspring" is the first reference in Scripture to this idea of the Son of Man or Son of Adam. The coming Son of Adam is the redeemer or deliverer who will break the curse and free mankind from this world of scarcity and death. In Revelation, John uses the phrase "the Lamb who was slain from the creation of the world" to describe the glorified Son of God, once again showing that this purpose was set from the very beginning. The Fall and the Messiah are two sides of the same coin - in falling from Eden, humanity became in need of a deliverer from the present hell.

In the book of Hebrews, it says, "The Son is the radiance of God’s glory and the exact representation of his being." So, the Logos is the visible, tangible representation of the invisible, inaccessible God. This is why he is called Immanuel (Isaiah 7:14), meaning, "God dwells with us." The Son of God is the immanental presence of God within the material world.

The redemption of the fallen creation is the highest expression of the glory of God. God has sent his own Son as the emissary of this fact because God's pursuit of his own glory - a being of unlimited power, presence and knowledge - is deeply unsettling. To speak about or contemplate the idea in the abstract is, perhaps, not unsettling but coming face-to-face with such a reality would be unsettling in the same way that, say, standing in the presence of an adult male lion without any protection would be. Visualizing it will probably not make your hair stand on end but actually coming face-to-face with it certainly would have at least this effect.

All other things in heaven and earth are connected to this one, over-arching purpose. The apostle Paul explains in Ephesians 1,

[God the Father] made known to us the mystery of His will... that in the fullness of the times He might gather together in one all things in Christ, both which are in heaven and which are on earth...
So, God is going to glorify himself by uniting all things under one head in Jesus Christ and he will do this by working a global miracle, explained in Philippians, "[everyone] in heaven and on earth and under the earth, and every tongue [will] acknowledge that Jesus Christ is Lord, to the glory of God the Father." To work this miracle through a mere show of force would be trivially easy for God - it would entirely fail to demonstrate the limitless bounds of God's glory. Instead, God is going to work this miracle by a combination of the preaching of the Gospel (the "foolishness of preaching" spoken of in I Corinthians 1:21) and the Apocalypse.

The prophecies of the Old Testament and New Testament are really telling the same story. At the end of all things, God is going to reveal himself to mankind like never before, an event that would not have been possible without redemption. This would not have been possible without redemption because fallen man is under God's judgment, so God's revelation of himself to fallen man without redemption would only result in eternal damnation.

"[In those days], I will pour out my Spirit on all people. Your sons and daughters will prophesy, your old men will dream dreams, your young men will see visions." (Joel 2:28)
"The earth will be filled with the knowledge of the glory of the Lord as the waters cover the sea." (Habakkuk 2:14)
"The days are coming,” declares the Lord, “when I will make a new covenant with the people of Israel ... No longer will they teach their neighbor, or say to one another, ‘Know the Lord,’ because they will all know me, from the least of them to the greatest.” (Jeremiah 31:31-34)
My name will be great among the nations, from where the sun rises to where it sets. In every place incense and pure offerings will be brought to me, because my name will be great among the nations,” says the Lord Almighty. (Malachi 1:11)
We started from a non-biblical cosmology and we have ended up in biblical prophecy. How has this leap been made? This goes back to the teleological ladder - either we have a teleological ladder (Divine revelation), or we don't. This is a question of faith. "But which sacred text is the true one?" is a category mistake under the cosmology I am presenting - if God is going to glorify himself in every nation, if the whole earth will be filled with the knowledge of God as water covers the oceans, then every cultural expression is subject to this universal revelation and can only be rightly understood in its connection to that revelation.

And now we have burst the dam of skeptical questions. "Why this Bible and not some other?" "Why this God and not some other?" "Why Christianity and not some other religion?" "Why were the ancient Jews God's special people and not some other people?" And so on and so forth. Washed away in this flood of questions, it is easy to lose sight of the Logos - the point and purpose of all things, from the Divine point-of-view. God's silence in the face of these questions is benevolently coy - the point is to drive you to ask these questions and try to find their answers.

Here is a great lecture by John Dominic Crossan, explaining the true nature of parable and how Jesus is God's parable, a parable (word) made flesh.


In the next post in this series, I will be tackling the problem of being omnimax (omnipotent, omniscient, omnipresent). You ask, "how can that be a problem?" Stay tuned...

Next: Part 23, The Trinity

Wave-Particle Duality Because Why?

We know from experimental observation that particles and waves are fundamentally interchangeable and that the most basic building-blocks of ...