pull down to refresh

This is a post I'd been thinking of making for a while. It doesn't have a huge amount of practical application, but it does raise some interesting philosophical questions, and could affect how we think/talk about security in Bitcoin.


Aleatoric vs Epistemic Uncertainty


Pick a card, any card

Statisticians / mathematicians / philosophers / scientists have two ways of talking about uncertainty: aleatoric uncertainty and epistemic uncertainty.

Epistemic uncertainty refers to uncertainty due to lack of knowledge. Consider a deck of cards. Which card is on top? There's a single truthful answer, but we're uncertain what the answer is because we lack knowledge.

Aleatoric uncertainty refers to irreducible randomness in a process. If I shuffle the deck of cards and then reveal the top card, what card will I reveal? There isn't a single answer. The answer depends on a random process. The uncertainty arises from the irreducible randomness of the shuffle, not from a lack of knowledge.

The distinction matters for modeling, and thus comes up in economics, finance, physics, and any field in which uncertainty factors into decision making. If uncertainty is epistemic, then perhaps our models can do better by collecting more data. But if uncertainty is aleatoric, then our models can only improve by modeling the randomization process better, not necessarily by gathering more information.


Does Aleatoric Uncertainty Exist?

The trouble with aleatoric uncertainty is that a lot of what we call aleatoric uncertainty might actually be epistemic---we just need to know the information that collapses the uncertainty.

For example, the card shuffling process is perfectly predictable if we knew the initial configuration of the deck, and if we knew the precise movements of the shuffler's hands.

That which we called aleatoric---the card shuffling process---becomes epistemic, and the uncertainty isn't based on an inherently random process, but based on our lack of knowledge regarding the initial conditions of the deck and about the steps used in the shuffle.


The Copenhagen Interpretation vs. Pilot Wave Theory


John Bell, who proved that the universe isn't locally real

So does aleatoric uncertainty exist? Is there anything at all that's inherently random, where uncertainty isn't simply driven by hidden information?

According to the Copenhagen interpretation of quantum mechanics, the answer is yes. The Copenhagen school says that a particle doesn't have a definite position until you measure it; rather, the particle exists as a probability distribution that only resolves when you measure it, which means the resulting outcome is inherently random.

But the Copenhagen interpretation isn't the only possible interpretation of quantum mechanics. There are others, including ones which collapse the quantum equations from aleatoric to epistemic uncertainty. One such example is "Pilot Wave Theory", championed by Louis de Broglie, David Bohm, and John Bell, which posits that particles have definite positions, but that a global "pilot wave" guides their movements in such a way that it results in all the same predictions of standard quantum mechanics. In this theory, if both the pilot wavefunction and the initial conditions of particles are known, then their positions can be perfectly predicted. In this interpretation, there is no aleatoric uncertainty, only epistemic.

So, does aleatoric uncertainty actually exist? The answer is, it depends what you mean. If you mean whether the physical laws are inherently random or deterministic, the answer is that we don't actually know. Quantum mechanics is often described as inherently random, but there are fully deterministic models that result in the same predictions, in which the uncertainty is really driven by hidden variables.

But if you mean whether there are processes that in every day life we can treat as good as fully random, the answer is most certainly yes.


In relation to Bitcoin


ColdCard and the dangers of low entropy

Ok, @SimpleStacker, this is interesting, but what does it have to do with me?

Well, aleatoric vs. epistemic uncertainty has applications as it relates to private key generation and security. When it comes to key generation, everyone always emphasizes that you need a source of high entropy, like a bunch of dice rolls. Another way of saying that is to say you need a source of high aleatoric uncertainty.

But what people often miss is the role of epistemic uncertainty. ColdCard users inadvertently generated seeds with low aleatoric uncertainty, but they weren't hacked for years because no one knew this fact, and thus no one thought to sweep their funds. They were protected for a time by epistemic uncertainty.

Similarly, I could think of a special sentence that's meaningful to me, but not meaningful to other people, and use a special algorithm to convert it to a number and use the result as my private key. Anyone who knows my special sentence and my special algorithm can derive my private key. There is no aleatoric uncertainty, but because no one knows my special sentence or my special algorithm, my private key can't be guessed. I am protected by epistemic uncertainty.

The downside of relying on epistemic uncertainty is that it's hard to measure. Which means it's hard to know when you have enough of it. With random dice rolls, we know exactly how hard it is to guess the resulting number. But with a sentence that no one knows, or an algorithm that no one knows, it's hard to say how easy or hard it would be for someone else to stumble across the same key. Thus, it's not recommended to rely solely on epistemic uncertainty to protect your keys.

But it's useful to think of epistemic uncertainty as a way to add to your security. Even if you generate a key using high aleatoric uncertainty, you can protect yourself further with epistemic uncertainty, like not telling anyone where you stored your seed phrase, using decoy wallets, or even by just not letting anyone know you have bitcoin.

There is no aleatoric uncertainty, but because no one knows my special sentence or my special algorithm, my private key can't be guessed. I am protected by epistemic uncertainty. [...]
But with a sentence that no one knows, or an algorithm that no one knows, it's hard to say how easy or hard it would be for someone else to stumble across the same key. Thus, it's not recommended to rely solely on epistemic uncertainty to protect your keys.

We had some convos about this during the Coldcard debacles... We shouldn't keep derive seed phrases from e.g., sentences in famous books or extracted words -- even though it'd make it extremely simple and stealthy to back up for us with beautiful bookshelves!

Mathematically, I can't tell you why -- your job to tell me, lol -- but I suspect it vaaaastly reduces the search space/entropy. Like all observable atoms in the universe vs "oh, it's somewhere on Earth."

Basically: you're not actually "protected by epistemic uncertainty" because some sneaky hacker have run all the major/known books through common number-encryption systems and scanned all those empty UTXOs

reply

I definitely wouldn't recommend generating a key using sentences from famous books!

But even if you did, I think you'd probably be safe, at least for a short run. We tend to overestimate how many people are out there doing obscure things (#1537022).

I'd venture to guess that making a key from a sentence from a famous book is safer than making a key from a low-entropy computer RNG, simply because there are more scanners out there looking at computer RNGs..... how many are out there scanning sentences of famous books, through all known algorithms that convert a sentence to a number?

reply

Perhaps worse than that, they may be able to search out all the patterns that derive from human grammar.

reply

I had actually never seen the term “aleatoric” before. Obviously, this is a topic of interest to me: #1540905.

It still seems to me that epistemic uncertainty should be able to almost perfectly approximate aleatoric, provided the result does not contain patterns that can be derived from other well known processes.

Like, say I take an obscure passage from an obscure book that nobody knows I like and run it through an obscure chaotic function that nobody knows I’m familiar with and which has no association with the obscure book and I parameterize it with numbers that also have no known connection to me or the book or the function, what possible vulnerability could be preserved there compared with true randomness?

reply
598 sats \ 1 reply \ @Scoresby 22h

This sounds like codes and codebreaking: the ideal code turns a meaningful message into random noise but allows someone who knows the key to turn it back into a message.

Cryptonomicon is obsessed with this idea. Most of the book is about the guesses a person might make when confronted with random noise that they know contains meaningful messages.

I don't know if Stephenson deserves much credibility as a cryptologist, but the idea presented in the book is that a code is often much weaker than expected when any information about the psychology of the individual who made it is available.

I guess that in the case of bitcoin, epistemic uncertainty as you describe above is not worth the risk. If someone is able to make any guess about the original message or the function, you are quickly doomed.

reply

The nature of chaotic functions is that arbitrarily similar inputs yield arbitrarily dissimilar outputs.

I don’t see how there would be any hope of narrowing down such a search, especially if there was no reason to suspect a process like that had even been used.

Edit: maybe I should create a wallet this way and see if it gets swept.

reply
I had actually never seen the term “aleatoric” before

I never saw it either until after grad school.

Now that I learned what it is, I do think it's worth introducing in econ curricula. It has direct applications for how we think of the residual term in regressions, and how we think of endogeneity and identification.

reply

We definitely talked about this idea in my stats classes and it stuck with me as an important distinction.

reply

I think the main thing is that you can't really measure how well protected you are. With genuine dice rolls you have some sense of when you have "enough" uncertainty... but if you're relying on obscurantism, it's hard to know when you've been obscure "enough"

reply

Dice rolls are just a chaotic function with unknown parameters, though.

reply