fix: formatting

This commit is contained in:
NunoSempere 2023-03-01 23:48:28 -06:00
parent 57cbb1e9ec
commit 6dcb410ee5
2 changed files with 84 additions and 8 deletions

View File

@ -0,0 +1,76 @@
<h1>A computable version of Solomoff induction</h1>
<p>Thinking about <a href="https://nunosempere.com/blog/2023/02/04/just-in-time-bayesianism/">Just-in-time Bayesianism</a> a bit more, here is a computable approximation to Solomonoff Induction, which converges to the Turing machine generating your trail of bits in finite time. <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> <!-- Note: to correctly render this math, compile this markdown with /usr/bin/markdown -f fencedcode -f ext -f footnote -f latex $1 where /usr/bin/markdown is the discount markdown binary https://github.com/Orc/discount http://www.pell.portland.or.us/~orc/Code/discount/ --></p>
<h3>The key idea: arrive at the correct hypothesis in finite time</h3>
<ol>
<li>Start with a finite set of turing machines, ({T_0, &hellip;, T_n})</li>
<li>If none of the (T_i) predict your trail bits, ((B_0, &hellip;, B_m)), compute the first (m) steps of Turing machine (T<em>{n+1}). If (T</em>{n+1}) doesn&rsquo;t predict them either, go to (T_{n+2}), and so on<a href="Here">^1</a></li>
<li>Observe the next bit, purge the machines from your set which don&rsquo;t predict it. If none predict it, GOTO 2.</li>
</ol>
<p>Then in finite time, you will arrive at a set which only contains the simplest TM which describes the process generating your train of bits. Proof:</p>
<ul>
<li>Let (T_j) be the simplest machine which describes the process generating your trail of bits. Then by virtue of it being such, all TM machines ({T_1,&hellip;,T<em>{j-1}}) are not the simplest machine generating your trail of bits. Meaning that at some point, they predict something distinct from your trail of bits, meaning that at some point step 2. of the process above discards them. In particular, the step after discarding (T</em>{j-1}) is arriving at (T_j), and staying there forever.</li>
<li>Therefore, this process arrives at the simplest TM which describes the process generating your trail of bits in finite time.</li>
</ul>
<p>QED.</p>
<h3>Using the above scheme to arrive at a probability</h3>
<p>Now, the problem with the above scheme is that if we use our set of turing machines to output a probability for the next bit</p>
<p>[ P\Big(b_{m + 1} = 1 | (B_0, &hellip;, B_m) \Big) := \frac{1}{n} \cdot \sum_0<sup>n</sup> \Big(T_i(m+1) = 1\Big) ]</p>
<p>then our probabilities are going to be very janky. For example, at step ( j - 1 ), that scheme would output a 0% probability to the correct value of the next bit.</p>
<p>To fix this, in step 2, we can require that there be not only one turing machine that predicts all past bits, but multiple of them. What multiple? Well, however many your compute and memory budgets allow. This would make your probabilities less janky.</p>
<p>Interestingly, that scheme also suggests that there is a tradeoff between arriving at the correct hypothesis as fast as possible—in which case we would just implement the first scheme at full speed—and producing accurate probabilities—in which case it seems like we would have to use a tweak</p>
<h3>A distracting epicycle: dealing with Turing machines that take too long or do not halt.</h3>
<p>When thinking about Turing machines, one might consider one particular model, e.g., valid C programs. But in that case, it is easy to consider programs that do not halt, like:<a href="Readers">^2</a></p>
<p><code>
void main(){
while(1){
;
}
}
</code></p>
<p>But then in step 2 of our scheme, we never get to see what bits this program outputs, because it never outputs any bits.</p>
<p>This can easily be fixed as follows:</p>
<ol>
<li>Start with a finite set of live turing machines, ({T_0, &hellip;, T_n}), a compute budget ( s ) and an empty cache of programs which take too long ( C ={} )</li>
<li>Run each ( T_i ) for ( s ) seconds.</li>
<li>If none of them predict your trail bits, ( (B_0, &hellip;, B_m) ), within the given compute budget:
<ul>
<li>eliminate the ones who make incorrect predictions.</li>
<li>keep track of programs which didn&rsquo;t output anything in the cache.</li>
<li>attempt to compute the first ( m ) steps of Turing machine (T_{n+1} ) with ( s ) seconds of compute. If it makes correct predictions, keep it in the set of live machines, otherwise move it to the cache.</li>
<li>increase the compute budget to ( s + 1 ) and run each machine in the cache for one additional second</li>
<li>Repeat step 2 until you have one program which has predicted past bits within your compute budget. Eventually this program must exist, since the Turing machine which is producing your trail of bits is by construction computable and non-halting.\footnote{Or at least, it hasn&rsquo;t halted before producing the number of bits that you have seen so far.}</li>
</ul>
</li>
<li>Observe the next bit, purge the machines from your set which don&rsquo;t predict it. If none predict it, GOTO 2.</li>
</ol>
<p>
<section id='isso-thread'>
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
</p>

View File

@ -45,14 +45,14 @@ But then in step 2 of our scheme, we never get to see what bits this program out
This can easily be fixed as follows:
1. Start with a finite set of live turing machines, \(\{T_0, ..., T_n\}\), a compute budget \( s \) and an empty cache of programs which take too long \( C =\{\} \)
1. Run each \( T_i \) for \( s \) seconds.
1. If none of them predict your trail bits, \( (B_0, ..., B_m) \), within the given compute budget:
2. Run each \( T_i \) for \( s \) seconds.
3. If none of them predict your trail bits, \( (B_0, ..., B_m) \), within the given compute budget:
- eliminate the ones who make incorrect predictions.
- keep track of programs which didn't output anything in the cache.
- attempt to compute the first \( m \) steps of Turing machine \(T_{n+1} \) with \( s \) seconds of compute. If it makes correct predictions, keep it in the set of live machines, otherwise move it to the cache.
- increase the compute budget to \( s + 1 \) and run each machine in the cache for one additional second
- Repeat step 2 until you have one program which has predicted past bits within your compute budget. Eventually this program must exist, since the Turing machine which is producing your trail of bits is by construction computable and non-halting.\footnote{Or at least, it hasn't halted before producing the number of bits that you have seen so far.}
1. Observe the next bit, purge the machines from your set which don't predict it. If none predict it, GOTO 2.
4. Observe the next bit, purge the machines from your set which don't predict it. If none predict it, GOTO 2.
<p>
<section id='isso-thread'>