Tuesday, June 20, 2017

Every once in a while, imagine starting over

Here’s a suggestion for when you’re working on a long, complicated project. Every once in a while, work through the thought experiment of starting your project over. Re-examine every aspect on a fundamental level, relating the complicated abstractions and mental shortcuts to your basic guiding principles. Given everything you learned in the course of the project so far, would you do it the same way again if you started from the very beginning?

This thought experiment could have many different outcomes. When you started the project, you guessed at the right direction, but the benefit of hindsight may suggest a better way. Parts of the project may be kept around only because of the sunk cost fallacy. Maybe you’ve learned more about what the requirements really are. Maybe it’s time to kill this project and start a new one. Maybe the project is too long or too complicated and should be broken down into several smaller projects. Maybe your plans for the rest of the project need to change. Or maybe you can have more complete confidence in your current approach. Most likely you will find at least a few small things to tweak.

Let me give you a hypothetical example. Suppose that you have a software system with two threads: one that produces data objects and one that consumes them. You do extensive performance profiling and find that both threads run too slowly, so you spend some time speeding up both threads. Eventually, you speed up the consumer thread until it only takes 12 CPU instructions per incoming data object. If you were under time pressure to deliver a critical patch, then you’d be happy with your optimizations and you would ship what you had. But if you thought through what you would do if you were to start over, then you would probably decide that using a consumer-producer multithreading architecture is the wrong strategy entirely because a single thread is good enough.

Around the start of 2013, when I was working on my PhD, I was wandering in circles around a particular problem: I wanted to discover the conditions required for a pair of Q-learning agents to learn to take turns in a simulated context. I parameterized the agents’ reward functions and tried to discover a pattern that would compactly describe how to incentivize turn taking. I went down a few blind alleys: genetic algorithms, linear decompositions and staring blankly at a simple visualization of the problem. Eventually, I realized that game theory is the correct approach for analyzing this kind of multi-agent scenario. At that point, I revised the entire plan for my PhD so that the next part was focused almost entirely on game theory.

Most of your time must go to detail work, so when is it time to step back and look at the big picture? Unfortunately, you probably won’t reach an epiphany moment where you know its time to rethink the project, like I did with my PhD. No tree will scream “this is the wrong part of the forest.” At the start of this essay, I suggested that you imagine starting over "every once in a while,” but a definite schedule may be helpful. How about 1 January each year? Or the first day of each month? What projects are you working on now? Do you have one where you’ve focused exclusively on details for a long time? Maybe now is the time to imagine starting that project over

Tuesday, April 25, 2017

The Anti-Jefferson Bible

"The Life and Morals of Jesus of Nazareth" by Thomas Jefferson, also known as the "Jefferson Bible," is a cut-and-paste work derived from the New Testament gospels, where the life and teaching of Jesus is (sort of) preserved but the miracles are taken out. In this essay, I consider how the Jefferson Bible could be compressed using the canonical gospels as a codebook, and I present a new sacrilegious work, jointly derived from the canonical gospels and the Jefferson one: The Anti-Jefferson Bible, a satirical book with all the gospel verses that Jefferson excluded and only those verses.
Painting of Thomas Jefferson by Rembrandt Peale
I first encountered the Jefferson Bible when my grandpa sent me a print copy of the book, along with a few other pseudo-Christian humanist titles. I found the Jefferson Bible rather boring, because my familiarity with the canonical gospels caused the book to have a low per-page entropy. That is, I already knew the story; the only interesting part was seeing what Jefferson chose to leave out. But just how much information is there in the Jefferson Bible?

The Jefferson Bible is a redaction of the King James Bible, taking verses exclusively from the four gospels: Matthew, Mark, Luke and John. These books are in the public domain and you can download them from Wikisource:
When I transmit a message, I can compress that message more if the recipient of my message already shares some information with me. For example, if I know that my grandpa has a copy of WinZip, then I could sent him a file that uses the zip compression format, which uses fewer bits. Frequently, when we encode something, we just assume that the other end knows the format because we chose ubiquitous file formats: we have pre-shared knowledge of the encoding. I will estimate an upper bound on how much information Jefferson contributed to the world based on the information required to encode the Jefferson Bible, given the King James Bible as pre-shared knowledge. Copies of the King James Bible are much more common than copies of the Jefferson Bible, which half-justifies this approach.

Matthew, Mark, Luke and John comprise 3778 verses in the King James Bible. For each verse that Jefferson copied in whole, I will consider that he has added a full 12 bits of information: enough to choose a verse in the canonical gospels. The Jefferson Bible includes some verses only in part; I will encode those verses as straight ASCII, at 7 bits per character. The Jefferson Bible has 1028 verses: 450 from Matthew, 94 from Mark, 338 from Luke and 146 from John. Actually, some verses in the Bible are exact copies of other verses, so alternative counts are possible.1 Thirty-eight verses are partial matches. With this encoding the Jefferson Bible requires 29520 bits or 3.6 kilobytes. If we encode all 116037 characters with ASCII, then we require 812259 bits or 99 kilobytes. My scheme achieves a 3.6% compression ratio. All this is to say: Thomas Jefferson did not add much information to the corpus of human knowledge in his humanistic redaction!

The figure below graphs the relationship between verses in the Jefferson Bible and where those verses are found in the canonical Gospels. Observe that much of the graph gently slopes upward: most verses in the Jefferson Bible are followed by their successor in the canonical Gospel. I could have compressed the Jefferson Bible even further if I choose a more clever encoding scheme that made use of this knowledge!


Wikipedia tells us that "Jefferson's condensed composition is especially notable for its exclusion of all miracles by Jesus and most mentions of the supernatural, including sections of the four gospels that contain the Resurrection and most other miracles, and passages that portray Jesus as divine.” In an attempt to quantify Jefferson’s tendencies, I computed the relative frequencies of each word that appears, both in the canonical gospels and in the Jefferson Bible. Some words are much more likely to occur in the Jefferson Bible, than in the canonical gospels, while others are much less likely in the Jefferson Bible. Below is a table listing 140 words:
  • the 60 words that have the greatest increase in frequency in Jefferson Bible (relative to the canonical Gospels),
  • 20 words that occur with almost equal frequency
  • and the 60 words that have the greatest decrease in frequency in the Jefferson Bible (relative to the canonical Gospels).

More likely in Jeffferson Bible Almost equal More likely in canonical gospels
yeorwouldlittleprophetnamethe
forservantlikewiseourknowwordof
oneyougoodcommandmentmultitudeupwas
hissheepsocupbelievednowthey
notwentotherseethhealedinson
yourshaltmorefeedingherhathand
thyPhariseesthinecandlestickchristsayingme
beevileyevipersdevilouthe
thouaretalentsmurderdisciplesspiritJesus
tointoputpowerssentpeopleGod
theethenfirstdoorsmightcomewere
asayjudgeAlphaeusseensawwe
givehousehypocritesforsookbeholdshipthat
thereforeservantsheadtemptedfulfilleddevilsfather
allneitherprayfieldswrittenfrombelieve
iffeetonprophesymyseasee
willcertainscribesbeheadedwhichwhilethem
alsonorfaithfultrusteyesbegatJohn
havecalledbutphysicianmanysaidsaith
antwohimselfforsakenIspeakworld

We see that ‘believed,’ ‘fulfilled,’ and ‘healed’ are more likely in the canonical Gospels, while all the words that are more likely in the Jefferson Bible are plain and devoid of spirituality-related meaning, like ‘one,’ ’thy,’ and ‘give.’ Interestingly, ‘prophet’ is more likely in the canonical gospels, but ‘prophesy’ occurs with roughly equal frequency in both.

We have a window to Jefferson's heart in what he left out. Presumably, he could have written a short essay describing how the gospels are useful for learning morals but that the miracles can’t be trusted. Instead we have the Jefferson Bible, which, in some sense, is a polemic against the supernatural in Christianity that pretends to replace the gospels. Regardless of whether or not Jefferson is right to reject the supernatural on a factual level, his approach is ridiculous. To satirize the Jefferson Bible, I produced the “Anti-Jefferson Bible”, which includes all the verses in the canonical gospels that are not present in the Jefferson Bible. Where the Jefferson Bible included part of a verse, then the Anti-Jefferson Bible includes the remainder, even when that remainder is not a complete sentence.

From a technical literary perspective, the Jefferson Bible is a gospel harmony. An early gospel harmony was Tatian’s Diatessaron; modern attempts include various Bibles that are reordered ‘chronologically.’ Jefferson’s work is most akin in form to the heretic Marcion, who introduced his own canon list which included a version of Luke’s gospel that was edited to fit his gnostic theology. There are no new heresies! The Anti-Jefferson Bible is not a thoughtful gospel harmony, and given copies of the Jefferson Bible and the King James Bible, the entropy of the Anti-Jefferson Bible is tiny indeed. I make no claim that the Anti-Jefferson Bible has novel information. My work’s highest possible hope is to highlight the absurdity of Jefferson’s redaction.

Notes

1. Because the gospels have redundancy, we can compress them, too. Matthew and Luke seem to draw heavily from Mark, as well as from a hypothesized source, Q. I’m curious as to the entropy of the gospels themselves, which would be a useful point of reference here.

Friday, March 13, 2015

The data loss argument for free software

When I was in high school, I experienced the abject pain of data loss. I owned a hard disk. I put things I cared about on the hard disk. The hard disk died. I had no backup. I (mostly) learned my lesson. I haven't experienced data loss of that scale (gigabytes) since.

Recently, I encountered a different kind of data loss-like experience. Some of my data was made with Cakewalk SONAR, a proprietary Windows program that has its own binary data format for some of the data. In an effort to keep a tidy house, I got rid of my old Windows XP computer, leaving me without the ability to easily open my old SONAR files. It's not strictly data loss. I still have all the bytes and I could, relatively easily, get a Windows computer and install SONAR. Honestly, the data isn't that important to me.

Closed proprietary data formats are a data-loss risk. Or at least, if they are not as popular as Microsoft Word.

Thursday, December 4, 2014

Nash and the Straw Man

Arguers should enter their opponents' worldviews fully in order to make generous counterarguments. Furthermore, a thinker should refine his or her argument for some position by summarising how that argument would win a infinitely long hypothetical debate between the two sides where the arguments for both sides improve with the progression of the debate.

Figure 1: The Scarecrow from 'The Wizard of Oz,' played by Ray Bolger.

I present a geometric model for understanding the internal consistency of worldviews to motivate the necessity to make deeply reasoned arguments.  Being wrong is normal. If we wish to honestly argue for the truth, then we must not only avoid the straw man fallacy but we must avoid arguing against internally inconsistent worldviews by making arguments that are so refined as to be the Nash equilibrium of the debate. I describe how the game-theoretic concept of a Nash equilibrium gives us a way to reflect on deficiencies in arguments and a program for arguing honestly, generously, and logically. I present an example of how people argue poorly against post-modernism and I conclude with questions for further reflection.

1 Worldview Internal-Consistency Space


Figure 2: Sometimes changing a worldview to be more like the truth can make that worldview less internally consistent. (Arbitrary units.)

Suppose that we could measure the internal consistency of every possible worldview. Now imagine we drew a graph of the internal consistency of different worldviews plotted against different beliefs. Figure 2 gives you an idea of what I'm talking about. Worldviews vary along more than one dimension, so the graph that we imagine can have a multi-dimensional worldview-space. This surface of the internal consistency of different worldviews has multiple local maxima, like Figure 2 but definitely with more than two maxima. These local maxima are the points in worldview-space that people naturally gravitate towards because those are the most refined and internally consistent worldviews in that neighbourhood of worldview-space.

A scholarly man living in the universe of Figure 2 might start with a worldview value of 0.5 but he will eventually change his worldview until he reaches the peak around 1. This is because he will examine his worldview and find slight inconsistencies, internal contradictions, or parts that are contradicted by his continued experience, and he will modify his beliefs. Once he reaches the worldview value of 1, his progress will be slowed because he will start finding fewer contradictions in his own beliefs and his experience will usually confirm his existing worldview.1

To make this a little less abstract, let's consider that the x-axis of Figure 2 is a measure of how Catholic you are.  If you're a Protestant, then your worldview is near 1. If you're a Roman Catholic, then you worldview is near 4. For argument's sake, I've described Catholicism as the more consistent worldview overall, but in reality it may be the opposite. Notice that if you start Catholic and become slightly more Protestant, your worldview becomes less internally  consistent. Both Catholicism and Protestantism are local maxima of internal consistency. For example, a Protestant might criticise a Catholic for praying to saints. If you start with a Protestant worldview and you add prayer to the saints as an extra, then your worldview becomes less consistent. Therefore, the Protestant will tend to make only a shallow critique of Catholicism because he is likely to ignore the interconnectedness of Catholic beliefs and the reasons behind the Catholic practices. As far as I understand, apostolic succession leads to the papal authority then the papal authority and some ideas from the Deuterocanonical books lead to the practice of praying to saints. So the Protestant, who rejects apostolic succession, cannot make an in-depth critique of prayer to saints without attacking its underlying logic.

People subtly cause the inconsistencies in their worldview to disappear. Apparent contradictions in a worldview can be viewed as differences in language use, unknowns, or mysteries. An inconsistency that disappears with a clever change in viewpoint might be an inconsistency that has been veritably eliminated or it might be one that has been carefully hidden away behind a façade of rhetorical smoke and mirrors. For example, Christians consider the doctrine of the Trinity to be a mystery: God is one, but also three, in some way that exceeds our ability to comprehend. Muslims argue that the Trinity is evidence of a contradiction: If God is one, then He cannot also be three. To the agnostic, the Trinity is an unknown: 'Is God one? Three? How about we compromise on two?' To call something an unknown is safe; to call out a pair of ideas as being contradictory is bold.

Including mysteries in our worldview can be worrying. Are we actually glossing over a contradiction? Maybe someone is getting us to believe a contradiction so that they can control us. Maybe we are trusting some higher authority (Nature, God, the Data or whatever) and we expect that further study, revelation or investigation may lead us to a more intellectually comfortable position.2

2 Being Wrong is Normal


When we argue, at least we should criticise ideas that someone actually holds. This is the essence of the straw man fallacy: when Alice argues against Bob, Alice must faithfully represent and successfully defeat Bob's actual position. If Alice weakens Bob's position before defeating it, then she has only defeated a 'straw man.'

By considering the distribution of people's actual beliefs in worldview internal-consistency space, we can appreciate how it comes to be that being wrong about something is normal. People are stupid. If we accept the idea that truth is singleton, then we have to get used to billions of people being wrong. In the future, many of today's popular, respected and trusted ideas will be shown to be wrong.

Therefore, I suggest a higher standard for non-straw man argumentation based on generosity: when searching for truth, one should only argue with the most locally-consistent ideas. If a worldview can be refined from within, then we should allow the adherents of that worldview to modify their view until it is maximally internally consistent. Alice makes a straw man error of the higher standard if she does not strengthen Bob's position before defeating it.

This principle is more about how to think rather than how to convince. Naturally, we will sometimes have to argue against obviously deficient worldviews because people really hold those views. But hopefully, we will be able to devote most of our efforts to composing thoughtful, honest, and logical arguments to convince wise women and men.

3 Nash and the Straw Man


Figure 3: Veritas, the Goddess of Truth.

Intellectual honesty and generosity require us to attack only the best and maximally internally consistent version of an opponent's argument. Anything less is attacking a straw man in the sense of the higher standard present in Section 2. Arguments can be considered as a competitive games with truth as the utility function and lines of reasoning as the agents' actions. A good argument is one at the Nash equilibrium. If one of the arguers comes out with a greater share of the truth when both play their part in the Nash equilibrium, then that arguer has won the argument. Perhaps the argument could lead us to truths that surprise us because no one thought of them before the argument.

How would we produce an argument at the Nash equilibrium? Each side would argue a position, then would refine their position to be more internally consistent, probably taking into account some new information from the other side. By repeating this process an infinite number of times, the argument for each side would be maximally internally consistent, but may be different to the original position for that side. This way, neither side could improve their argument against the other side without the other side changing their position.

There could be more than one way to refine a worldview into maximally internal consistency. For example, if we start with a worldview from Figure 2 with a worldview value of 2, then, depending on the path we chose, we could end up at the local maximum around 4 or at the local maximum around 1. In general, an argument could settle to more than one possible Nash equilibrium. This non-uniqueness is an intrinsic property of the Nash equilibria of games.

4 A Defence of Post-Modernism


To give a more concrete example of how I believe we should argue, let us consider how modernists sometimes attack post-modernism. What is post-modernism?  Here are some definitions I've seen and my opinion of them:
  1. 'What's true for you is not true for me.'  Yes, for opinion statements, like 'I like bananas.' But what about statements like 'the sky is blue on 16 November 2014 at 10am at these GPS coordinates...'? Indeed, some statements must be true for all of us, if they are true at all.
  2. 'There is no absolute truth.' This idea is self-contradictory.3
  3. 'It is poisonous to consider yourself to be the bearer of any definite, universal truth.' What if the truth were really poisonous? Also, what if you really do bear some universal truth?
Definitions 1 and 2 are ones that I've heard Christians use specifically to attack post-modernism. Definition 3 is one that I distilled from my memory of a real conversation I had with someone in 2005. I've yet to meet someone who really took these sorts of post-modernism to their fullest logical ends. (The guy I talked to in 2005 made a lot of money off the fact that the world hold lots of universal truths.) Modernists seem to construct a post-modernism that is inconsistent and extreme, so that they can easily defeat 'post-modernism.'

A more internally consistent version of post-modernism agrees with absolute, universal truths, and tempers modernism with increased sensitivity for uncertain situations where people hold a diversity of opinions. That post-modernism realises that each of us must make up his or her own mind about what is true and that we have to be careful when we design social systems that affect people with heterogeneous beliefs.

By removing the obvious contradictions in post-modernism, we immunise post-modernism against its most obvious countering arguments. The modernist must refine his or her argument, perhaps by observing that the removal of authority causes individuals to be susceptible to deception by self-interested parties. For example, oil companies stand to lose from public policy addressing global warming, so they are motivated to spread deception and to encourage people to 'make up their own mind' about global warming rather than accepting the consensus of science as authoritative. The postmodernist might counter with mention of the costs of accepting authority figures in general, which are numerous and well known to students of 20th century history. Ultimately, the debate would converge to identifying and logically addressing real problems with modernism.

5 Conclusion and Questions


I present a geometric model for comparing worldviews. When searching for truth, avoid arguing against common worldviews because of the prevalence of error.

Instead, I suggest a higher standard for argumentation than merely avoiding the straw man fallacy: only argue against a worldview that is a local maximum in worldview internal consistency space.
If two arguers each allow the other to infinitely refine his or her argument, then the debate will converge to the Nash equilibrium where neither side can improve his or her argument further. In that case, both sides will be arguing for a local maximum in worldview internal-consistency space.

I went part way to applying this idea by showing how some common arguments against post-modernism are easily countered by small changes in what is meant by postmodern.

  • How much inconsistency do you permit in your own understanding of the world? Maybe we don't have enough time to eliminate insignificant inconsistencies from our worldview.
  • What constitutes a contradiction? If there is a contradiction in your worldview, then what should you do?
  • What do you do with mysteries? Should you allow them? Should you distrust a viewpoint that leaves nothing to mystery?
  • What is the maximally-consistency, Nash equilibrated post-modernism? 
  • Which worldview is the global maximum of internal consistency? Is that also the worldview that exactly matches reality?
  • By examining your own worldview, you can climb the gradient of internal consistency until you reach a local maximum. But usually some parts of our worldview are difficult to escape. How can you find the worldview with the global maximum of internal consistency (or the one that exactly matches reality)? 

6 Postscript


This essay firmly identifies me as a hedgehog, in the Ribbonfarm sense that I weakly hold strong views. Because I have limited knowledge and experience in the world of foxes (who strongly hold weak views), I must dilute my conclusions to say that my proposed method for thinking may only apply to hedgehogs. (Venkat also mentions the germ of the idea that I described here. I guess that illustrates the difference between the amateur and the professional blogger.)

Notes


1 In reality, people are also subject to confirmation bias which causes them to interpret new evidence as confirming their existing beliefs.

2 The best response to a persistent mystery may be to sit in awe and write poems.

3 Geeky version: Go to the functional programmer, you sluggard, and learn what it means to treat functions and data equally. Now, add this to your intellectual test suite: test ideas on themselves, when the datatypes can be made to agree.

Wednesday, June 25, 2014

We Are Half Barbarian

One prevalent myth is that we are thoroughly civilised. Bur really we are quite barbaric. The multi-millennial process of putting brutality and ignorance behind us is but half completed. We will be known as unsophisticated and narrow minded in the future.

Disabusing oneself of myth leads to mild nihilism until the novel void is appropriately filled. What is the rational, civilised cure to the horrible realisation that I am a hot-headed brute, an ignorant Scythian?

Take a long-term view of Science.

The current theories will be supplanted by others. Some studies will be contradicted. Some will be confirmed. Science may be our best methodology for knowledge acquisition so far, but it is still in its infancy. Statistical studies are highly fragile. Maybe that's because statistics is just over a hundred years old.

Respect the past, including elders and tradition.

Some things progress (like technology), but other things are relatively static (like the structure of human brains). Some ideas survive because they really are robust. What do you do when grandma contradicts Science? It's not always safe to go with Science. Some domains are more suited to ancient wisdom than to the latest intellectual craze.

Be suspicious of static governance but allergic to revolution.

All the violent revolutionaries were wrong for their violence, but right that governments need change. Changes to governments need to flow gradually out of an abundance of courtesy. The United States constitution, for example, desperately needs modification. But the process of modification must be civil, unlike the war that produced that constitution in the first place.

Defend against major and catastrophic regressions.

I said that civilization was half done, but the story could blast to a nuclear end tomorrow. Progress is not inevitable and will not be monotonic. My thesis errs optimistically, but intentionally, to inspire the hope requisite for action. We must defend society against regressions and maintain existing good systems all while we try to improve. Unfortunately, novelty frequently exposes us to new risks. So defend, maintain and innovate. 

Find ways to treat people better. 

Both personally and systemically throughout society. Innumerable smart, 'nice' people were party to slavery, misogyny and oppression in the past. Few could see past the social constructs of their time and fewer had the power to make those changes. More change is coming, so grab every loose thread of society's straitjackets and pull until the unfortunate win.

Peter