<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>Notebooks   </title>
    <link>http://bactra.org/notebooks</link>
    <description>Cosma's Notebooks</description>
    <language>en</language>

  <item>
    <title>Probably Algorithmically True</title>
    <link>http://bactra.org/notebooks/2003/11/17#probably-algorithmically-true</link>
    <description>




&lt;P&gt;The following is merely an amusement; it contains (at least) one fatal
error, one conclusion which is valid but phrased so as to mislead the unwary,
and one unwarranted technical assumption (which may actually be OK but I
haven't checked).  It may help if you've read the &lt;a
href=&quot;godels-theorem.html&quot;&gt;notebook on G&amp;ouml;del's Theorem&lt;/a&gt;, and/or some
actual math on that subject; likewise for &lt;a
href=&quot;http://bactra.org/reviews/kearns-vazirani/&quot;&gt;computational&lt;/a&gt; and &lt;a
href=&quot;http://bactra.org/reviews/vapnik-nature/&quot;&gt;statistical&lt;/a&gt; learning
theory.  [With thanks to Ben Wieland for correcting an embarrassing mix-up
between &lt;em&gt;truths&lt;/em&gt; and &lt;em&gt;theorems&lt;/em&gt; in my initial statement of the
theorem.  Sheesh.]&lt;/P&gt;

&lt;P&gt;Let us suppose we have a formal language &lt;i&gt;L&lt;/i&gt; and a set of axioms
&lt;i&gt;A&lt;/i&gt; in &lt;i&gt;L&lt;/i&gt;.  There are some sentences of &lt;i&gt;L&lt;/i&gt; which will be true
under any interpretation in which &lt;i&gt;A&lt;/i&gt; is true; these are the theorems
following from &lt;i&gt;A&lt;/i&gt;, and we'll call them, collectively, &lt;i&gt;T&lt;/i&gt;.  Let us
suppose further that &lt;i&gt;T&lt;/i&gt; is sufficiently powerful that it can model
ordinary (Peano) arithmetic, i.e., there is some interpretation of arithmetic
in terms of &lt;i&gt;L&lt;/i&gt; such that all the theorems of arithmetic are included in
&lt;i&gt;T&lt;/i&gt;.  Then G&amp;ouml;del's Theorem tells us that the system must be
inconsistent, or incomplete, or both.  If it is &lt;em&gt;inconsistent&lt;/em&gt;, then
there are sentences &lt;i&gt;s&lt;/i&gt; of &lt;i&gt;L&lt;/i&gt; such that both &lt;i&gt;s&lt;/i&gt; and its
negation, &lt;i&gt;~s&lt;/i&gt;, are in &lt;i&gt;T&lt;/i&gt;.  If it is &lt;em&gt;incomplete&lt;/em&gt;, then there
are sentences &lt;i&gt;s&lt;/i&gt; such that neither &lt;i&gt;s&lt;/i&gt; nor &lt;i&gt;~s&lt;/i&gt; is in &lt;i&gt;T&lt;/i&gt;.
In any given interpretation of &lt;i&gt;L&lt;/i&gt;, any such &lt;i&gt;s&lt;/i&gt; is either true or
false, but &lt;i&gt;s&lt;/i&gt; is true in some interpretations in which the axioms are
true, and false in others.  In other words, the truth of these sentences
depends on the particular interpretation, and not (just) on the truth of the
axioms.  &lt;a href=&quot;#footnote&quot; name=&quot;returnfromnote&quot;&gt;*&lt;/a&gt; Since inconsistent
formal systems are uninteresting, let's ignore them.&lt;/P&gt;

&lt;P&gt;The real substance of incompleteness can be restated in several ways.  One
is that there is no algorithmic, computable &lt;em&gt;decision procedure&lt;/em&gt; for
&lt;i&gt;T&lt;/i&gt; --- no algorithm which, given a sentence &lt;i&gt;s&lt;/i&gt; in &lt;i&gt;L&lt;/i&gt;, can
determine whether or not &lt;i&gt;s&lt;/i&gt; belongs in &lt;i&gt;T&lt;/i&gt;, and so is necessarily
true if the axioms hold.  Another is that there is no algorithmic, computable
procedure to generate all the theorems of &lt;i&gt;T&lt;/i&gt;, and no other sentences.
(To see that these two are equivalent, note that &amp;quot;Can we generate the
sentence &lt;i&gt;s&lt;/i&gt;?&amp;quot; is a decision procedure, and feeding all possible
sentences, in order, through a decision procedure is a generating procedure.)
Let's see if we can't nibble away at the decision procedure angle.&lt;/P&gt;

&lt;P&gt;Any sentence of &lt;i&gt;L&lt;/i&gt; can be assigned some natural number, called its
G&amp;ouml;del number, from which we can recover the sentence.  Now there are just
as many rational numbers between 0 and 1 as there are natural numbers, so to
each G&amp;ouml;del number there corresponds a certain fraction in the unit
interval.  A decision procedure, then, is a function &lt;i&gt;D&lt;/i&gt; from the rational
fractions to 0 (non-theorem) or 1 (theorem).  As a mathematical object,
&lt;i&gt;D&lt;/i&gt; definitely exists alright; there's no question about that.  The
content of G&amp;ouml;del's Theorem is that &lt;i&gt;D&lt;/i&gt; is not computable, which is to
say that the shortest program to compute it is infinitely long --- &lt;a
href=&quot;complexity-measures.html&quot;&gt;the Kolmogorov complexity of &lt;i&gt;D&lt;/i&gt; is
infinite&lt;/a&gt;.&lt;/P&gt;

&lt;P&gt;So, we can't actually compute &lt;i&gt;D.&lt;/i&gt; But can we learn it?  More
precisely, can we reliably learn computable approximations to &lt;i&gt;D&lt;/i&gt;?&lt;/P&gt;

&lt;P&gt;The obvious answer is &quot;yes, &lt;i&gt;D&lt;/i&gt; is just another classification
function&quot;.  Take our favorite class of (say) &lt;a href=&quot;neural-nets.html&quot;&gt;neural
networks&lt;/a&gt;, which output 0 or 1 for each (real-valued) point on the unit
interval.  Now generate random sentences of
&lt;i&gt;L&lt;/i&gt;, according to some distribution.  (You might generate unbounded random
integers, discarding the ones which are not G&amp;ouml;del numbers, and then
convert the G&amp;ouml;del numbers to rational fractions.  Or you might do
something more clever, involving the grammar of &lt;i&gt;L&lt;/i&gt;; doesn't matter.)  For
each network, there is some probability that, given a random sentence you
generate, it will mis-classify the sentence (outputting 0 when it should've
said 1, or vice versa).  Call this probability the network's &lt;em&gt;generalization
error&lt;/em&gt;.  Take the infimum over generalization errors of all the networks in
our class, and call the result &lt;i&gt;m&lt;/i&gt;.  This is the best attainable error
rate in the class.&lt;/P&gt;

&lt;P&gt;Now, draw some particular sample of sentences.  For each network, define the
&lt;em&gt;in-sample error&lt;/em&gt; as the fraction of mis-classified sentences in that
sample.  Pick out the network, call it &lt;i&gt;N&lt;/i&gt;, with the lowest in-sample
error rate.  Let &lt;i&gt;e(N)&lt;/i&gt; be the &lt;em&gt;generalization&lt;/em&gt; error of &lt;i&gt;N&lt;/i&gt;.
The fundamental theorem of statistical learning theory, due to Vapnik and
Chervonenkis, says that, as the sample size grows, &lt;i&gt;e(N)&lt;/i&gt; converges in
probability on &lt;i&gt;m&lt;/i&gt;.  So say I ask you to find me a network whose
performance comes within some arbitrary margin of approximation, call it
&lt;i&gt;E&lt;/i&gt;, of the best possible --- i.e., I get to pick &lt;i&gt;E&lt;/i&gt;, and challenge
you to find me a network whose generalization error is at most &lt;i&gt;m+E&lt;/i&gt;.
If &lt;i&gt;e(N)&lt;/i&gt; converged on &lt;i&gt;m&lt;/i&gt;, period, you could always do this by just
letting the sample size be big enough, and then handing me &lt;i&gt;N&lt;/i&gt;.
Unfortunately, the convergence is only &quot;in probability&quot;, but that means that,
by letting the sample size get big enough, you can make the chance that
&lt;i&gt;N&lt;/i&gt; does not meet my challenge arbitrarily small.  More precisely, you can
pick any confidence level &lt;i&gt;p&lt;/i&gt; you want, and then, if you just take enough
samples, the probability that &lt;i&gt;e(N) &amp;gt; m + E&lt;/i&gt; is, at most, &lt;i&gt;p&lt;/i&gt;.&lt;/P&gt;

&lt;P&gt;What this means is that, with enough random sentences, we can get a decision
procedure which is, with very high probability, almost as good as the best
decision procedure in that class of neural networks.  How good is the best
network?  Here is why I specified neural networks, rather than some other kind
of classifier (e.g., decision trees or support vector machines).  Neural
networks are well known to be universal function approximators, meaning that if
we want to approximate (essentially) any real function to arbitrarily close
tolerance, there's some neural network which will do it, provided we'll give it
enough nodes.  The function we want to approximate is &lt;i&gt;D&lt;/i&gt;, who's
generalization error would be zero, so the infimum of error rates over all
possible neural networks is, in fact, zero.  As we let the number of nodes in
our network grow, we get larger and larger classes of networks, which contain
successively closer and closer approximations of &lt;i&gt;D&lt;/i&gt;.  More complex
networks require more samples than simple ones to reach the same level of
probable approximate correctness, which in this case means probable approximate
truth, but one can still push the probability and the approximation up
arbitrarily high.  We don't know the best attainable error for any given degree
of complexity, but we don't have to --- we just have to know that it's going
down (which we do), and know the rate of convergence of the best in-sample
network to the best possible network (which only depends on the class of
networks, through a quantity called the VC dimension).&lt;/P&gt;

&lt;P&gt;So here is our final strategy (&quot;structural risk minimization&quot;) for learning
something which is probably approximately a decision procedure for a formally
undecidable theory &lt;i&gt;T&lt;/i&gt; in the language &lt;i&gt;L&lt;/i&gt;.  Start with a big sample
of random sentences in &lt;i&gt;L&lt;/i&gt;.  For each degree of neural network complexity
(one hidden node, two, etc.), find the network with the best in-sample error
rate.  Pick a confidence level &lt;i&gt;p&lt;/i&gt;, and discount the in-sample
performances by the expected degree of over-fitting, which depends on the VC
dimension and on &lt;i&gt;p&lt;/i&gt;.  Chose the network with the smallest discounted
generalization error. Then by (e.g.) Theorem 4.1 in Vapnik's &lt;cite&gt;Nature of
Statistical Learning Theory&lt;/cite&gt;, the resulting network's generalization
error converges in probability on the infimum of the error over all possible
networks, which we've just shown is zero.  Hence the network converges in
probability on &lt;i&gt;D&lt;/i&gt;, even though, at every stage, the network is a
computable function.  Q.E.D.&lt;/P&gt;

&lt;P&gt;This procedure is easily modified so as to eliminate the possibility of
either false positives (non-theorems classified as theorems) or false negatives
(theorems rejected as non-theorems), as desired.  Furthermore, it would be easy
to extended it by applying any of the various methods for combining classifiers
known in the literature, e.g., boosting.&lt;/P&gt;

&lt;P&gt;&lt;a name=&quot;footnote&quot;&gt;*&lt;/a&gt;: Yet more formally, we can state the theorem as: No
theory can be at once consistent, complete, axiomatizable and an extension of
Peano arithmetic.  Hence, if &lt;i&gt;T&lt;/i&gt; is axiomatizable (which it is, by
hypothesis), and an extension of Peano arithmetic (which it is, by hypothesis),
then it cannot be both consistent and complete.  So &lt;i&gt;T&lt;/i&gt; must be
inconsistent or incomplete.  &lt;a href=&quot;#returnfromnote&quot;&gt;(Back)&lt;/a&gt;&lt;/P&gt;
</description>
  </item>
  </channel>
</rss>