nunosempere.com/blog/2023/03/01/computable-solomonoff/.src/main.tex

106 lines
5.3 KiB
TeX
Raw Normal View History

2023-03-02 04:30:28 +00:00
\documentclass[12pt,authoryear]{elsarticle}
\makeatletter
\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{\centerline{\thepage}}%
\let\@evenfoot\@oddfoot}
\begin{document}
\begin{frontmatter}
2023-03-02 05:56:28 +00:00
\title{A computable variant of Solomonoff induction}
2023-03-02 04:30:28 +00:00
%% use optional labels to link authors explicitly to addresses:
%% \author[label1,label2]{}
%% \address[label1]{}
%% \address[label2]{}
\author[1]{Nu\~{n}o Sempere}
\address[1]{Quantified Uncertainty Research Institute, Mexico}
\begin{abstract}
2023-03-02 05:56:28 +00:00
I present a computable variant of Solomonoff induction.
2023-03-02 04:30:28 +00:00
\end{abstract}
\begin{keyword}
%% keywords here, in the form: keyword \sep keyword
Solomonoff \sep induction \sep computable
\end{keyword}
\end{frontmatter}
\section{The key idea: arrive at the correct hypothesis in finite time}
\begin{enumerate}
2023-03-02 05:56:28 +00:00
\item Start with a finite set of Turing machines, $\{T_0, ..., T_n\}$
2023-03-02 04:30:28 +00:00
\item If none of the $T_i$ predict your trail bits, $(B_0, ..., B_m)$, compute the first $m$ steps of Turing machine $T_{n+1}$. If $T_{n+1}$ doesn't predict them either, go to $T_{n+2}$, and so on\footnote{Here we assume that we have an ordering of Turing machines, i.e., that $T_i$ is simpler than $T_{(i+1)}$}
2023-03-02 05:56:28 +00:00
\item Observe the next bit, purge the machines from your set which don't predict it. If none predict it, go to step 2.
2023-03-02 04:30:28 +00:00
\end{enumerate}
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:
\begin{itemize}
\item 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,...,T_{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_{j-1}$ is arriving at $T_j$, and staying there forever.
\item Therefore, this process arrives at the simplest TM which describes the process generating your trail of bits in finite time.
\end{itemize}
QED.
\section{Using the above scheme to arrive at a probability }
2023-03-02 05:56:28 +00:00
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
2023-03-02 04:30:28 +00:00
$$ P\Big(b_{m + 1} = 1 | (B_0, ..., B_m) \Big) := \frac{1}{n} \cdot \sum_0^n \Big(T_i(m+1) = 1\Big) $$
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.
2023-03-02 06:06:34 +00:00
To fix this, in step 2, we can require that there be not only one Turing machine that predicts all past bits, but many of them. How many? Well, however many your compute and memory budgets allow. This would make your probabilities less janky.
2023-03-02 04:30:28 +00:00
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 use the modification just outlined.
2023-03-02 06:04:10 +00:00
\section{A downside}
2023-03-02 04:30:28 +00:00
Note that a downside of the procedures outlined above is that at the point we arrive at the correct hypothesis, we don't know that this is the case.
2023-03-02 05:41:49 +00:00
\section{An distracting epicycle: dealing with Turing machines that take too long or do not halt.}
2023-03-02 04:30:28 +00:00
2023-03-02 05:41:49 +00:00
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:\footnote{Readers might find it amusing to run gcc loop.c and check it}:
2023-03-02 04:30:28 +00:00
\begin{verbatim}
void main(){
2023-03-02 05:41:49 +00:00
while(1){
;
}
2023-03-02 04:30:28 +00:00
}
\end{verbatim}
2023-03-02 05:41:49 +00:00
But then in step 2 of our scheme, we never get to see what bits this program outputs, because it never outputs any bits.
This can easily be fixed as follows:
\begin{enumerate}
2023-03-02 05:56:28 +00:00
\item 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 =\{\}$
2023-03-02 05:41:49 +00:00
\item Run each $T_i$ for $s$ seconds.
\item If none of them predict your trail bits, $(B_0, ..., B_m)$, within the given compute budget:
\begin{enumerate}
\item eliminate the ones who make incorrect predictions.
\item keep track of programs which didn't output anything in the cache.
\item 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.
\item increase the compute budget to $s + 1$ and run each machine in the cache for one additional second
\item Repeat steps 2-3 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.}
\end{enumerate}
2023-03-02 05:56:28 +00:00
\item Observe the next bit, purge the machines from your set which don't predict it. If none predict it, go to 2.
2023-03-02 05:41:49 +00:00
\end{enumerate}
2023-03-02 04:30:28 +00:00
2023-03-02 06:08:47 +00:00
It is not clear to this author whether all Turing machine models require this epicycle.
2023-03-02 04:30:28 +00:00
\end{document}
\endinput
%%
%% End of file `elsarticle-template-harv.tex'.