Wednesday, August 8, 2012

Reality as a Verbal Game

Today, in the early 21st century, many people are already familiar with the idea that we have no proof that the world external to our mind actually exists. There is no way of proving that what I think of as “myself” is not actually just a disembodied brain in a vat full of chemicals with signals fed in by some aliens’ computer making me think that I have a body that is taking part in an inert material world. Alternatively, perhaps I am just a piece of software running in a giant supercomputer executing a simulation game. We can’t prove that such an outlandish alternatives to common sense reality are false.

However, that should not mean that there is nothing we can be certain about; phenomenological knowledge should be safe. When Descartes in his Meditations (1641) famously provided that “I think therefore I am”, this can be understood as asserting that we may not know that the tree before me exists or not, but I do know that I am undergoing an experience of seeing the tree or believing that I see the tree or being presented to in a tree-like manner. Phenomenological knowledge is awareness of the sense-data without actually any commitment to any external reality as the source of that data and certainly not to the nature of that reality. So I know that “I am seeing a red ball” even if I don’t know that it is a red ball that I am seeing. The outlandish alternatives that opened this section do not undermine the sense-data statements; they are compatible with these statements.

However, this solution too, has proven not to stand the test of time. There are numerous problems with a phenomenological foundation. Sellars (1956) is one of the highlights of the arguments that undermined the sense-data foundation. Even if some facts are “given”, such as the experience of red, these facts are sub-lingual and useless as a basis for logical inference. Other philosophers (for example, Putnam 1990) focus on the fact that any sentence that you assert about the experience will include words that you would retract if an “expert” corrected you. In fact, language as a whole is a culture-created entity that plays a very large part in the creation of the sentence that you finally assert about what you see. So, one can neither assert that it is true that there is a red ball before me, nor can a person assert that it is true that “I am having an experience such that it seems to me that I am seeing a red ball”.

All we are left with is (what seems to be) the psychological fact that a sense-data assertion such as “I am seeing a red ball” is an assertion that one typically would not want to retract. However, there is little point in putting too much importance in the psychological fact itself. Rather, it would be best to present the whole thing as a game about sentences in the English language. The rules of the game are such that sentences such as “I am seeing a red ball” or “the dial I see is pointing roughly to 3” should only be changed if one really has no choice. On the other hand, there are other sentences in the game, that are prime candidates for change. 

Quine (1951) presents the tantalizing image of a web of belief. Rather than get involved in the complexity of the “belief” concept, the concept used here will be a web of textual assertions. The sum of the knowledge of a system is represented only in terms of sentences and some basic rules of inference that can act on the sentences. The knowledge system in question, could be, for example, the totality of an individual’s knowledge. Of course, an individual also has commitments that may be sub-verbal which cannot be expressed as sentences. However, while not denying the existence of these non-verbal assertions, they are not included in the system for now. At most, they may be seen as the cause of the addition of specific assertions into the web of sentences. 

Returning to the game, there is a player of the game and there is a database or web of sentences or wfs’s (see the last post on pre-logic). The rules of the game mark some sentences as sense-data sentences. These will having a high change cost. However, the player may add other sentences at will. These will have initially a very low cost to add or change or delete. The new sentences may be simple fact-like assertions or they may be procedures, like inference rules, for changing other sentences in the database. As before, it is important not to confuse the intrinsic inference rules of the system which by the rules of the game may not be changed and these non-intrinsic rules which are added by the player. The sense data sentences change over time by some other, seemingly external, factors. The aim of the game is for the player to create calculations using the low change-cost sentences such that new sentences are created that are identical to the sense-data sentences. 

Once a high degree of success is found in predicting the sense-data sentences, it will be found that changing some sentences has an effect on a large number of other sentences of the web. Therefore, if such a highly connected sentence is changed many other sentences will have to be adjusted if the sense data sentences are going to continue to be predicted successfully. In the light of this, a change that requires so much work is also to be considered high cost. Therefore sense-data sentences are not the only ones that have high change-cost.

The game is entirely syntactic. If strings such as “true” or “false” are useful in creating successful predictive calculations, then they will be used but they will have no special significance. One may speak of strings having meaning but this will be no more than an indication of the fact that these words participate in the reference/retrieval mechanism of the intrinsic inference rule of the system. (The intrinsic inference rule is the rule that defines how to play the game itself. It was explained in a different context in the post on Pre-Logic.)

Since there is no semantics involved, there is no differentiation between valid rules of (non-intrinsic) inference and invalid rules. Of course, it could be that inventing one rule (call it MP, for Modus Ponens) will eventually result in a high degree of sense-data predictability whereas some other rule (call it AC, for Affirming the Consequent) will be found to be entirely useless. In that case MP will play a central role in almost all prediction calculations and therefore any attempt to replace it will require massive changes throughout the web; changes that may or may not succeed in achieving the same levels of prediction. If that is so, MP will have a very high change cost, higher even than sense-data sentences. MP may even be useful for calculating results in thought experiments of what might be possible as opposed to what actually is observed. People might even speak of MP as being “necessarily true”. It might be. However, MP’s utility is a sufficient explanation of its high change-cost. Therefore any attempt to assign any greater significance to MP cannot benefit from data actual or even (imagined) possible. 

What is required in order to succeed at predicting sense-data is the creation of complexity. The intrinsic inference rule must allow for creation of calculations, processes or laws that produce complex, intricate and repeatable results. Just as Conway’s Game of Life can create extremely complex patterns developing over time with just a handful of very simple rules, so Wittgen can (as well as many other systems). Once there is a way of generating complexity, it should not be surprising that it is possible to create procedures that track the transformations that sense-data sentences make over time.

If one views the human mind past and present, individual and collective, and common-sense as well as advanced science, as participating in a game as just described, an interesting result emerges. The rules of the game did not allow the player of the game to change in the sense-data sentences (except under extreme circumstances). Nevertheless, they are not only seen to change but, it turns out relatively simple and unified systems of calculation can predict and track those changes1. These sentences are the given2. Just as there are processes that track these givens, there are processes that fail to track these givens. Thus, even if there is no truth or semantics to the system, there is no sense of “anything goes”. Only fanatic attention to the details of the given and herculean efforts at finding successful predictive procedures will result in a moderate degree of success at tracking the given. If there is a “reality” then it is the fact that the given, the sentences not under the control of the game, do change and they change in regular, predictable ways. Perhaps there is another meta-“reality” behind this “reality”, but nothing said so far seems to require postulating this meta. 

Sellars may be right about the fact that there is no “truth” to the given or that the sub-verbal truth cannot participate in inference. However, it does not seem to matter. Sense-data need not be true. There is no need for truth, validity in inference or semantics in order to explain the success of common sense or advanced science. It is sufficient that we play a game that commits to make the goal that of predicting some sentences, taken as given, rather than ignoring or modifying these sentences3. 

References:

Descartes, R., 1641/1996, Meditations on First Philosophy, translated by John Cottingham, Cambridge: Cambridge University Press, 1996.

Sellars, W., 1956, Empiricism and the Philosophy of Mind, Herbert Feigl and Michael Scriven, eds., Minnesota Studies in the Philosophy of Science, Volume I: The Foundations of Science and the Concepts of Psychology and Psychoanalysis. University of Minnesota Press, pp. 253-329

Quine, W. V., 1951, ‘Two Dogmas of Empiricism’, Philosophical Review, 60:20-43

1  There is little point in arguing that the player may be generating the sense-data sentences unconsciously. The question of what or who is generating the sense-data sentences does not concern the discussion. The only issue is the law-like behavior of the permutations of the sense-data sentences. To see this, imagine that your individual subconscious or perhaps the collective subconscious is some super-mathematician capable of calculating all the values experimental data should have and putting it in our way for discovery. Then it would turn out that this mathematician is the matrix-master supercomputer. There is no reason to call it a sub-faculty of the player.

2 Note, the use of the word given here is different from that of Sellars’. Sellars uses the word in an absolute, externally defined  sense and argues that it cannot be applied to sentences. Here the word is used only as a label for the subset of sentences, which, in accordance with the rules of the game, have an extremely high change cost by virtue of being understood as sense-data descriptions of internal experience.

3 There are both similarities and differences between the ideas presented here and Kant’s phenomenal-nomological divide, Putnam’s Internal Realism, Rorty’s views, coherence theories of truth and many more. Mapping the location of these various views is beyond the intention of this essay, which is to present a philosophical underpinning for Wittgen.


An Assembly Language for the Brain

This is not a real post. It's just a thought that occurred to me while I was corresponding with someone called Mariya Mykhailova on the subject of esoteric programming languages.

Here's the idea. What I am searching for in Wittgen could be called "An Assembly Language" of the brain or the mind.

Assembly language, in programming terms, is a very low level programming language that reflects, quite intimately, the core structures of the way a computer works. Often, other, higher level languages that conform to abstract programming paradigms quite different from that of the computer hardware itself, will be initially written in Assembly language. For example, a computer language such as C, is considered quite low level but higher than Assembly. C's structure reflects quite well the way simple serial microprocessors actually operate but it will be the same language even if it is implemented on machines with rather differing hardware. Higher-level languages such as LISP, reflect symbolic paradigms quite disconnected from almost any computer as it is actually built. So when writing a LISP compiler or interpreter, the core may be written in C. The core of the C compiler, in turn, may be written in Assembly language.

We can look at a brain as computer. With the exception of consciousness, this seems to be quite a plausible concept. There is no question that the brain can perform cognitive and reasoning functions that look quite different from the core functions that the underlying wetware are built to perform. Similarly, a numeric sequential computer can simulate massively parallel symbolic functions or even a large neural network. Nevertheless, despite this extraordinary flexibility on the part of such complex systems as brains and silicon computers, there is a significance to the question, what is the nature of the underlying hardware, what are the core functions out of which the more advanced simulations can emerge.

Wittgen is an attempt to discover the assembly language of the brain. It is a stab at creating a programming language that achieves the twin goals of any assembly language. On the one hand it must closely reflect what the underlying hardware does. On the other hand, it must be expressive enough so that it can be used to build higher level abstractions. 

I said in the post entitled Bio-Neurological Motivation that the if we open up the brain, all we find are neural networks and other associative-memory-like structures. We find no serial computer architecture of the kind we might expect in sequential formal logical reasoning of the type that we are so proud of. That is not quite true. In theory neural networks could be so arranged as to build any piece of electronics built out of silicon. The formal reason for this is that, as any "hello world" example (the computer world's paradigm for introductory example) of neural networks will show, it is easy to create a six neuron arrangement that can implement an electronic XOR gate. It is even easier to create a NOR gate. Now it is a well known theorem of electronics that a NOR operation is provably "functionally complete", meaning that a combination of NOR gates alone can create every possible logical gate. Therefore in theory you could build the latest microprocessor out of millions of these tiny neural networks. Nevertheless, it is not practical, and every indication is that the brain does not work like that. Moreover, in that arrangement, the system would probably never be trainable. 

We therefore return to the original motivation. We know that the core function of the reasoning brain is that of an associative memory in its static form and a neural network in its dynamic adaptive form. So the reason that Wittgen was designed the way it was, was to capture that core function as the central two functions: Writing the association (assign) and retrieving the association (retrieve). In that sense Wittgen is an assembly language for the brain. Now, what is left to do is to show how all the rest of the structures of reason can be plausibly implemented in terms of this underlying assembly language.

Monday, August 6, 2012

Pre-Logic, Syntax and Semantics


Wittgen, like most, though not all, programming environments, is pre-logical. 

In this post I intend to explain what “pre-logical”  means and to demonstrate that it applies to Wittgen. I will discuss the difference between syntax and semantics in the context of logic as well as where the concepts of “true” and “false” come in.

In standard descriptions of formal logic you start with a formal system which is comprised of the following elements:

  1. An alphabet, a finite set of characters which can be combined, for example, to form text strings. Typically this will be the letters of the alphabet plus the digits but in some special cases it might be only 0 and 1. It can be also be extended to other elements such as electric charges, spin states of electrons etc. Assume an alphabet of any character you could type on a computer keyboard for now. Any combination of elements from the alphabet will be referred to as a string.
  2. A grammar, which is a set of rules that  either generate or define acceptable strings from the alphabet.  When used to define acceptability, it either rejects or accepts the string. A accepted string can be referred to as a well-formed string or formula (wfs or wff). A grammar might define, for example, that any string may be accepted but that if it has parentheses, there must be one and only one closing parenthesis for every open one and the close must follow the open. Thus a string which has an unclosed parenthesis, is unacceptable or not a wfs, even though it is composed only from elements listed in the alphabet.
  3. A set of acceptable strings as defined by the grammar (wfs’s).  This will be referred to as the current database. The initial strings of the database can be called the axioms.
  4. A set of rules, the inference rules, that can be applied to any wfs of the database which produces one or more new wfs’s that are added to the database. An inference move on a database is the application of one or more inference rules on zero, one or more wfs’s on condition that any wfs used is part of the database. An inference move on a database creates a new database (which might be, though is not usually, identical to the original database).
  5. A legal database is the initial database (the axioms), a database that results from the initial database by applying any inference move on the initial database or a database that results from any inference move on a legal database. A legal inference move is the application of an inference move to legal database. A legal wfs is a wfs that appears in at least one possible legal database.

It is more common to use the word “valid” instead of the word “legal” but this uncommon terminology is used to avoid confusion when, later, valid and invalid rules of inference are discussed.

A formal system may be viewed dynamically or statically. A static approach asks only whether a specific wfs is a legal wfs. A dynamic approach sees the formal system as a process executing legal inference rules sequentially. A static approach, while looking for a yes or no answer to the legality of a wfs, requires a proof method which means finding some sequence of inference moves that results in a database that contains the wfs in question. 

The dynamic perspective suffers from the apparent need for a cognitive, or at least selection-enabled, agent that will choose which of the possible inference moves to execute; there is often more than one  alternative because there may be more than one rule or more than one wfs to select for application.

On the other hand, the dynamic perspective does not really need the concept of legality; it is inherent in the process. If you observe the database at any step in the dynamic process, it will automatically be a legal database.

Wittgen provides a significant restriction relative to the full formal system described here. This still means that it falls within the definition of a formal system but it is a specialization of it. Wittgen does not provide a choice regarding which inference move to make. For any given Wittgen database, there is only one inference move that can be applied. The first assign in the Doing Now variable is the only legal move. Thus for any given database, there is only one database that can result from the next inference move. This removes the agent problem just mentioned for the dynamic perspective on formal systems. Note that Wittgen also allows for a situation where there is no legal inference move. This occurs if the Doing Now variable is empty.  (This is the equivalent of a <halt> in computer science terms). A final database is a database that allows no legal inference move from it. 

Wittgen also requires an extension of a formal system as normally defined. Typically, formal systems only envision adding wfs’s to the database; they do not explicitly allow for changing strings or removing them. However, there seems little reason not to allow for this extension. The system is still a formal syntax-only system. Wittgen inference moves may change strings by assigning new content to old variables. (The formal system of temporal modal logic may also allow for such inference operations.)

Combining the possibility for changing wfs with the concept of a final database allows for one more definition. A legal final wfs is a wfs that is found in a final database. 

A formal system as described so far suffers from the fact that the grammar, the inference rules and the concept of legality require definitions specified in some other language or formal system. Call this formal system in which the rules are defined FS2. Now FS2 will have its own grammar and inference rules which will have to be defined in FS3.  There follows an endless sequence or recursion of formal system definitions. This shall be referred to as the rule definition regression problem. 

There is a possible response to this problem - even if it is not a solution. There are two possible perspectives on Wittgen; one abstract and one physical. In the abstract perspective a Wittgen database is just a set of strings that develops step by step according to formal rules. However, instead of a abstract perspective, one can view Wittgen as a physically embodied system. Strings are composed of symbols (not necessarily in one-to-one correspondence with elements from the alphabet) which are physical patterns arranged in space or even in some mental layout.  As mentioned before, physical patterns could be arrangements of matter, color, electric charges or something more exotic. There is a physical system or a set of pattern, there is also a machine or the laws of physics that act on these patterns. The grammars are physical limitations on the way the patterns can be arranged. The inference rules are just the way the machine operates on the physical patterns or the way the laws of physics require the patterns to segue from one configuration to another.

It is easy to find examples of physical systems that incorporate physical patterns which follow a strict set of rules of how one pattern segues into the next. Even a seemingly immobile rock contains ever-changing electron configurations which might answer to this description. However, if we search for physical systems that could embody the specific inference rules of Wittgen, the human brain, ANNs and suitably configured computers are all plausible candidates. For example, the patterns of electronic charges in the circuits of a computer which we interpret as 0s and 1s are the symbols of a physical embodiment of a formal system. The processor of a computer, once built in a certain way, responds to these symbols by transforming them in a deterministic manner. These transformations are the inference rules of the formal system. A suitably configured computer will implement the Wittgen inference rule.

Such physical embodiments do not suffer from the rule definition regression problem. The inference rules, or perhaps, more correctly, the transformation rules are not themselves expressed in any formal language. They are an empirically observed reality. An associative memory system, once built, will simply retrieve when given the retrieve instruction and assign when given the assign instruction. This may be determinate, observable and thus just a hard-nosed fact. Of course, the actual behavior depends on the actual configuration of memory at any time, but the fundamental factness of the transformation rules remains. Philosophically speaking, this position raises questions of its own (induction, reliability of observation and culture-dependence of the descriptive terms among them), but, given an unquestioned scientific naturalism, the physical embodiment perspective provides an answer to the regression problem. We may return to this issue in later posts. 

Everything discussed so far describes a formal system. A formal system is not yet a logic. For a formal system to be a logic, the formal system must be assigned an interpretation, a meaning or a model. One of the tasks of most interpretations (in the formal sense here) is to assign truth values to the wfs’s - both those of the initial database (the axioms) and those of any legal database. The formal system is purely syntactic. The application of the interpretation or meaning is the process of applying semantics to the syntactic system. Once there is semantics, one can speak of the the rules of inference as propagating “truth” from premises to conclusions by means of the inference rules. Thus an argument, viewed as a syntactic development from one legal database to another by means of the syntactic rules of inference, may be more than merely legal; it may aspire to be valid. In order for an argument to be not only legal but valid, there is a further stipulation that the rules of inference themselves be valid. If the premises of the argument are true and the argument is valid, the conclusions must be true.

Rules of Inference that are valid are rules that propagate truth from premises to conclusions.

Thus semantics introduces:

  1. Interpretation to wfs’s and, arguably, to sections of wfs’s (words). 
  2. Values of true and false assigned to wfs’s. (This is often part of the interpretation.)
  3. Selection of a small set of inference rules out of the the universe of possible inference rules as valid, truth preserving inferences.


Logic requires both a formal system and semantics. Sometimes, logic is seen as focused on only the question of valid inference rules. In that case a specific logic aims to discover what, for a given alphabet, grammar and inference rules would count as a valid argument regardless of the interpretation or meaning of most, but not all, of the words in the wfs’s.

While Wittgen can be used as the syntactic process behind such a logic, it is designed with other intentions in mind. Wittgen, taken by itself, is purely syntactic. (Again, so are most computer languages, programming environments and virtual and real computers.) The intention is that no semantics be added at all. The term “true” and “false” may still be used, but in a different way to the one described for logic. Instead “true” and “false” can be seen as purely syntactic components, as part of the strings of a particular system implemented in Wittgen. They have no meaning. They are just strings. Thus I might have one assertion:
    object on the mat::=cat}
and another:
  cat is the object on the mat:=true}
However, “true” here is just another string. It is not intrinsically the opposite of “false”. If I want to make make it the opposite of false in some sense, I could add further assignments such as:
    statement is true:=
        Doing Now:=
            @Return Doing Now}
            }
        }
    Make False:=
        Doing Now:=@statement is @@test}}}}
        Doing Now:=
            @test}:=false}
            Doing Now:=@Return Doing Now}}
            }
         }      


To use these lines you create assertions such as:
    test:=cat is the object on the mat}
    Doing Now:=@Make False}}

Then, if the database already contains an assertion such as, 
    cat is the object on the mat:=true}

These lines form a procedure that when, say, “cat is the object on the mat” does not refer to “true”, makes it refer to “false”. If the statement does refer to “true”, it just goes back to what was being executed before the test. But “true” and “false” are just strings that the procedures operate on. Syntactically, that is what all words are, the data of procedures. They are not special meanings that are assigned to strings.

This same example that demonstrates that “true” and “false” can be just arbitrary strings is also a demonstration of the fact that Wittgen can be used to create rules of inference. “Make False”, in the last example, is such an inference rule. However, one must differentiate between the intrinsic rule of inference, the rule of inference that defines Wittgen, and a rule of inference created using text strings in Wittgen’s language. Consider the following Wittgen code:
    MP A->B true:=
        Doing Now:=
            @x} is @B}:=true}
            }
        }
    MP:=
        Doing Now:=
            @MP A->B @@x} is @A}}}
            }
        }

This code is a standard Modus Ponens framework. It means that if A implies B (If A then B or A->B) and A is true, B is true. It is used as follows:
    x:=Socrates}
    A:=Greek}
    B:=Wise}
    Doing Now:=@MP}}

This code snippet supplies the assertion “All Greeks are Wise” or “∀x[Greek(x)->Wise(x)]” and runs the “proof” by making one call to the inference rule Modus Ponens. Thus if the database has been previously provided the assignment:
    Socrates is Greek:=true}
a new assignment will be made equivalent to:
    Socrates is Wise:=true}

Thus MP is an inference rule that exists only if the database includes it. The intrinsic inference rule, the inference rule that defines Wittgen itself, on the other hand, defines rather than is defined using Wittgen. The intrinsic inference rule, in the perspective of an abstract system, requires symbols to define it within a different formal system. In the physical embodiment perspective the intrinsic rule is just an empirical fact (assuming there are any such). However, even non-intrinsic inference rules are guaranteed to operate.  1

In the world of logic, as opposed to formal systems, Modus Ponens is a valid rule of inference.

However, consider AC which stands for Affirming the Consequent:
    AC A->B true:=
        Doing Now:=
            @x} is @A}:=true}
            }
        }
    AC:=
        Doing Now:=
            @AC A->B @@x} is @B}}}
            }
        }
If the inputs are provided as before indicating the assertion that “if x is Greek, x is Wise”, but the database contains:
    Socrates is Wise:=true}
calling AC will create the following assignment:
    Socrates is Greek:=true}

AC is considered an invalid rule of inference or a formal fallacy. However, Wittgen is unconcerned for the difference between MP and AC. It is a formal system, it specifies syntax but not semantics. Wittgen is, in this sense, pre-logical. As is, some claim, the human mind.

In this sense Wittgen is pre-logical. As it stands, it is a purely syntactic, formal system. It would require layers of semantics, meaning, interpretation, ascription of validity to a subset of the possible inference rules before it can be used as a logic which can talk about “true” and “false” in a meta-syntactic sense.

Being pre-logical is an important aspect of Wittgen. It allows Wittgen to be a tool for exploring and understanding syntactic systems. Ultimately, it may be used to question whether meaning and semantics are really required in modeling our reality.



1 Note that the intrinsic rule is a form of Modus Ponens in a restricted sense of applying to strings themselves but not what they might be used to refer to. Thus if there has been an assignment such as:
a:=b}
and this is interpreted to mean the premise “a->b” or “if a then b” then,
Doing Now:=
conclusion:=@a}
}
will necessarily (for some meaning of necessarily) result in an assignment equivalent to
conclusion:=b}
Thus “if a then b” and “a” results in “b”. However, this cannot be used as a more general inference because you cannot treat a and b as variables as we did for A and B in the previous case. You cannot write:
a:=Socrates is Greek}
b:=Socrates is Wise}
and then call
a:=b}

Sunday, June 24, 2012

Wittgen's Bio-Neurological Motivation


This post and the following posts will discuss the motivation for the creation of Wittgen and advantages that may arise through using it and thinking along the lines of its paradigms. 

One of the tidbits of wisdom of the computer industry, attributed to Alan Perlis in 1982, says:. “Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy”. Wittgen is not intended to be a Turing tar-pit. There seems little point in using it for general purpose standard applications.

Wittgen belongs to a family of programming languages, environments, virtual or real computers conceived of with a tiny instruction set. Gilreath and Laplante (2003) provide a detailed description of the One Instruction Set Computer (OISC). Wittgen has only two instructions and one special variable. The retrieve instruction has one argument - the entire string it contains - whereas the assign instruction takes two: the content to assign and the variable name.

There are a number of ways of creating a turing-complete programming system from two instructions. The design of Wittgen is based on the fact that both the human brain and your mind clearly seem to include these two. In fact, it is questionable whether the brain, for example, contains anything other than the ability to store a memory and retrieve a specific memory based on some key or some other form of memory instigator. (This assertion is exclusive of task-specific areas of the brain such as vision processing.) If the brain is a computer, or at least the part of it that is capable of discursive reason or other interesting intellectual achievements, then it is important to understand how these capabilities are achieved. If the brain is a two-instruction computer based on assign and retrieve, then Wittgen should be a very interesting experiment.

The current understanding of the human brain sees it as a network of some 1011 neurons. The biological neural network is often modeled using Artificial Neural Networks (ANNs). There are a large variety of such models. The details of the communication between Neurons are continuously being discovered. For example, Baslow (2009) shows that frequency-encoded language is used. This certainly paints a more complex picture than the simple weighted aggregation envisioned by early ANNs. Nevertheless, it may be a terrible simplification, but the functionality of a neural network taken as a whole is that in response to a specific input pattern, it will produce an output pattern. This may be seen as a fixed key-value response except that the response (a) can be learnt and (b) can be robust in the face of noise or input pattern incompleteness.

Traditionally there has been a conflict between advocates of ‘connectionist’ architectures and symbolic or classic computer architectures. Connectionist is a term that includes ANNs but also includes technologies that bear little resemblance to biological neural networks. More recently there has been an attempt to combine the connectionist and symbolic systems. At first this approach was referred to as “Hybrid” but in the last few years the term of choice seems to be Neuro-Symbolic Computing. Sun (1997) and Bader and Hitzler (2005) provide surveys of the research being conducted into these hybrids. Examples are Garcez et al. (2009) that explore the implementation of modal and other logics as ANNs and Siegelmann (1994) and Neto et al. (2003) that create programming languages that are designed to be compiled into neural networks.

Neural-symbolic research addresses the question, among others, of how symbolic systems might be implemented in a neural network implementation as opposed to a von Neumann architecture. The brain seems to be only a (set of) neural network(s). On the other hand, there certainly is some symbolic processing going on. Discursive reasoning, conscious planning, mathematical manipulation and language use seem to be the manipulation of symbolic tokens according to symbolic inference rules (logical or otherwise). Moreover, all this symbolic activity seems to take place in a sequential manner. Certainly, when considering these activities using internal intuitive reflection, they take place in some chronological order; one step at a time. How does the neural network of the brain produce such sequential symbolic capabilities?

This question was already recognized in Rumelhart et al. (1987). The model described there is of a sequence of neuronal activations where at each step an input pattern is fed to a neural net putting it into an excited state, then the net finds the corresponding output pattern, it settles into an energy minimum before another input pattern is provided thus initiating the next step. The input and output can be symbolic tokens and the sequence of activations corresponds to what we imagine is discursive thinking. There is, therefore, no symbolic processor as such, but nevertheless sequential thinking is a sequence of associative memory symbolic lookups.

Wittgen, approximately, uses this model. When Wittgen code is running, the effect is a sequence of associative memory lookups. If you write Wittgen code to do formal logic, say, then the formal logic is implemented in a sequence of associative memory operations. Therefore Wittgen provides a plausible model for how formal logic - a sequential symbolic process - can be executed by an ANN or a brain. This is because it is well understood how a neural network can implement associative memory. Wittgen, provides more than just a plausible model for human symbolic reasoning. It is not just an hypothesis for how reasoning in general might happen; it is a working language in which plausible models can be built for how humans think about specific problems. If used correctly, it can be used to explore how logic, arithmetic, planning, hypothesis formation, debate, strategy and many more fields that form part of what we understand as human reasoning.

Wittgen in its current form does not actually need a neural net to function. While neural nets are very capable of implementing an associative memory, there are other, well known technologies both in software (hash tables for example) or hardware (CAM chips) that can implement the core key-value lookup. Such technologies are extremely fast (a few nanoseconds) while the human neural network seems to take a significant fraction of a second (1-100ms intuitively) to retrieve a single symbolic memory. Nevertheless, since associative memory is a plausible bio-neurological option, it forms the core of the language.

It is possible to create long procedures with tens of items in Wittgen. Similarly, it is possible to create nested retrieve instructions with tens of retrieve levels. However, if the goal is plausible modeling of human reason, this should be avoided. Procedures can always be made very short, with at most two steps - one which does some assign and the other that refers to the next procedure to execute. By following these guidelines it is possible to create processes that are very psychologically plausible. The human mind is capable of storing a very large number of items in memory, each triggered by a different key. However, it is very difficult to remember accurately a long train of steps or to remember exactly step one is up to. (This changes when a page with writing or a scratch pad is used.)

Seen as a model of human symbolic reasoning, the flow of the calculation is controlled by the fact that the only item that the subject must keep track of actively is “Doing Now” which is simply the thought: what am I doing now. All the rest is responsive rather than proactive. For example: “What I am doing now is adding whatever’s in (the top number) to whatever’s in (the bottom number)”, “What I am doing now is adding 5 to 3”, “adding 5 to 3 is 5 plus 3”, “answer is 8”, “What was the next step?” “next step is remember whatever’s in (the answer) as the sum” and finally “the sum is 8”. Thus, following Rumelhart et al.’s model, there is a sequence of simple memory access activation states with no complex serial flow controller guiding the process.

Why then, the need for a neural net, biological or artificial? Isn't the associative memory a sufficient explanatory mechanism? The answer is that without changing the core “syntax” of the model, a neural net can replace an associative memory and extend its power. Firstly, a neural net can learn. As the programmed procedure is activated, the connection between initial starting point and final result can become stored. Thus alternatives to the full calculation arise which are equivalent to “knowing the answer right away”. For example, we could write a multiplication procedure that works on adding the first number to itself as many times as is specified by the second number. However, once I do 7 x 6 the hard way lots of times, I might simply learn that 7 x 6 = 42. It seems very intuitive that this is the way we learn and increase proficiency at whatever we practice repeatedly.

Secondly, a neural network, while learning, might miss certain differences between similar examples. Missing these differences can present a significant advantage. While associative memory will always keep “apples” as a separate string from “oranges”, if the outcome of apples and oranges is often the same, a neural network learning process might easily apply results learned from apples to oranges. One could say that it failed to learn the significance of the difference between the two or one could say that it has learned to create analogies between the two. Search algorithms, when applied to significant quantities of data suffer from the fact that the complexity is O(nD) where D is the dimensionality of the problem. By failing to distinguish between cases that need not be distinguished, one could say that the dimensionality is being collapsed.

Thirdly, outside experience may create the memory assignments. Wittgen includes the ability to assign content to a variable but the database/memory need not start empty nor is there a reason that some other process may not also be writing to memory. The content of memory, the collection of assignments may include associations that neural networks are classically known for. For example, the database may include a neural net trained extensively on good chess moves. The net thus recognizes patterns and excellent moves given specific situations or partial situations (where some of the information, such as where pawns are on the other side of the board, is considered irrelevant). In that case the role of a Wittgen program is to build the fragmentary one-move response knowledge into a play flow. Wittgen is the glue or wires that turns static associative knowledge into a sequentially ordered strategy. Again, it does this without introducing specialized serial hardware or components.

These three considerations are the reason the neural network basis for Wittgen is not simply replaced by associative memory. That does not mean that for performance reasons, the actual implementation of Wittgen might use an associative memory technology that is not a neural network.

This post has presented what may be called the neural network motivation for Wittgen. The next few posts will explore the philosophical aspects of the language. These for another motive for the design of Wittgen.

----

References:

d’Avila Garcez, Arthur; Lamb, L. C; Gabbay D. M., (2009) Neural-Symbolic Cognitive Reasoning. Cognitive Technologies. Springer-Verlag, ISBN 978-3-540-73245-7, 2009.

Bader, Sebastian; Hitzler, Pascal, (2005). "Dimensions of Neural-symbolic Integration - A Structured Survey". arXiv:cs/0511042v1

Baslow, Morris H. (2009). "The Languages of Neurons: An Analysis of Coding Mechanisms by Which Neurons Communicate, Learn and Store Information." Entropy 2009, 11, 782-797; doi:10.3390/e11040782

Gilreath, William F.; Laplante, Phillip A. (2003). Computer Architecture: A Minimalist Perspective. Springer Science+Business Media. ISBN 978-1-4020-7416-5

Neto, J. P. ; Siegelmann H. T.; Costa J. F. (2003). "Symbolic processing in neural networks." Journal of the Brazilian Computer Society, 8(3)

Rumelhart, D.E.; Hinton, G.E.; McClelland, J.L.; Smolensky P., (1987). "Schemata and Sequential Thought Processes." In D. E. Rumelhart, J. L. McClelland, and the PDP Research Group (Eds.). Parallel Distributed Processing, Vol, 2: Psychological and Biological Models. Cambridge, MA: MIT Press.

Siegelmann, Hava T., (1994). "Neural Programming Language." AAAI-94 Proceedings.

Sun, R., (1997). "An Introduction to Connectionist Symbolic Integration." R. Sun and F. Alexandre. (eds) Connectionist Symbolic Integration. Lawrence Erlbaum Associates, Hillsdale, NJ, 1997

Tuesday, June 12, 2012

Using Wittgen To Do Logic

This post will continue introducing Wittgen by way of giving usage examples. However, this time, the focus is some of the components of human reason: logic and arithmetic. It also tackles the question of how a language with just two instructions that is missing almost all the elements common to all programming languages can still do anything its bigger brothers and sisters can.

One might imagine that the most basic construct that a programming language needs is the conditional branching operator: the “if” statement. It is not missing; it is simply that the retrieve can do the job on its own. Let’s say you want to terminate a loop when the variable Num is equal to 0. In a classic programming language you would write something like:

if (Num == 0) {
        do this ...
}
else {
        do that ...
}

Assume there is in Wittgen’s memory, a variable that is called “stop when 0”. If there is an assign in the loop such as: 

        Doing Now:=@stop when @Num}}}

First Wittgen evaluates @Num}. If this is “0”, the right side becomes “@stop when 0}”. If, say, Num is “2” then the right side becomes “@stop when 2}”. Now there is a variable called “stop when 0” but there is no variable called “stop when 2”. “stop when 0” might contain an assign to Doing Now that would do whatever we wanted to do if "Num" was "0". On the other hand, “stop when 2” does not exist, so any assign involving it would fail. We thus have a simple mechanism that implements the conditional execution construct. One might even argue that this memory assign operation is more fundamental than the “if” operation. Here is an interesting possibility: What we think of as “if” is just a choice between different memory access options.

The If construct is one of the most basic components of logic. Symbolic logic as a whole will be discussed in later posts but by now it should seem plausible that the remaining constructs are also implementable as Wittgen code. Now what about basic arithmetic?

How would you make Wittgen do addition of two numbers of arbitrary length? Computers do this very fast while human beings are billions of times slower. How do we human being do addition? We spend years learning some basic single digit addition. So we memorize, for example, that 3+4 is 7, that 8+5=13 etc. Then we painstakingly learn procedures that teach us to write one number on one line and the second number on the second line with the digits lined up in the correct columns. Then, starting with the first column on the right we add the digits using the single digit additions we've memorized. If the answer has two digits we write down the first digit and put the second digit in the next column in a “carry” row. We do column after column this way until there are no more digits in the current working column. It’s very slow and very inefficient but it’s the way we learn to add arbitrarily large numbers.

If you want Wittgen to do addition, the right way to go about it, is to make it do addition the way humans do it. The code can be found on the Wittgen Sourceforge web site: http://sourceforge.net/projects/wittgen/

Can Wittgen do anything any other language can do? Technically, yes. Wittgen can be used to create a Universal Turing Machine - a Turing Machine that can implement a Turing Machine. This proves the standard Computer Science theoretical capability. This says nothing about what kinds of program are easier to write in which language and certainly not whether specific programming languages create mindsets that are appropriate for creative thinking regarding tough problems. A Turing Machine implementation will hopefully be up on the Wittgen Sourceforge Web site soon.

That concludes the all-too-brief usage section for now. It may only have been a taste, but talking about why Wittgen was created in the first place has been delayed for too long. So what follows in the next few posts is some Cognitive Science and philosophy. Once that's done we can get back to expanding on the art of programming Wittgen.

Tuesday, June 5, 2012

Using Wittgen

This post and the next one will present some simple examples showing how to use Wittgen. The purpose is to make the language definition easier to understand. More advanced examples will come later, but for now the goal is simply to understand what the language is.

Motivations for the creation of Wittgen and its structure will be explained in later posts. However, for now, it is important to emphasize that the motivation is not the creation of a high level language so that standard programming problems can be solved in a small number of highly intuitive code lines. It is also not designed as a low level language so that the code should run as fast as possible. In fact, simple problems, may take more code to program and, performance may be ridiculously worse than in typical environments - particularly for maths.

The first, introductory program has already been presented. (It is traditional to introduce programming languages  using “hello world!”). The next program is designed to produce an infinite series of a’s. It will demonstrate the use of Doing Now as well as how to create a simple loop.


1 prog1:=

2 say:=@say} a}
3 Doing Now:=@prog1}}
4 }
5 say:=a}
6 Doing Now:=@prog1}}


Ignore the line numbers, they should not be included in the source. They are here only to make explaining the code easier. 

How does the code above work? There is an intuitive way to think of this. Imagine a game with one rule and one box. The box starts off containing one letter a. The one rule in the game goes like this: “Whatever is in the box, add another “a” to the box and then do this rule again.” Such a procedure is natural and easy for a human being.

That is what the code above does. The rule and the box are held in memory. The box is the variable called “say” and the rule is the variable called “prog1” which refers to the text from line 2-4 inclusive. 

Now, the full details of how Wittgen actually processes this short piece of code will be presented:

To start Wittgen the entire text is assigned to the variable Doing Now. Wittgen’s memory will now contain one variable called Doing Now whose value will be the text string:

        “prog1:=say:=@say} a}Doing Now:=@prog1}}}say:=a}Doing Now:=@prog1}}”

From then on the program will continue until the next time Doing Now needs to be executed and there is no assign to perform.

The first assign is the text from line 1 to 4 inclusive. The first step that Wittgen will take is to set Doing Now to:

        “say:=a}Doing Now:=@prog1}}”

and now it must create a new variable called prog1 and assign to it a text:

        “say:=@say} a}Doing Now:=@prog1}}}” 

Now here is an interesting point. There are two retrieve instructions in this text string; @say} and @prog1}. Why were they not evaluated before assigning the text string to prog1? The answer is that both of these are inside assign statements. @say} is part of the assign say:=@say} a} and is therefore left as is. Similarly, @prog1} is part of the assign Doing Now:=@prog1}}. We are not up to doing those assigns because we are still doing the outer assign. The result is that the whole string is assigned without replacement to prog1.The first assign is done. Wittgen’s memory can be represented by the following table:


Doing Now
say:=a}Doing Now:=@prog1}}
prog1
say:=@say} a}Doing Now:=@prog1}}


The first assign to Doing Now from line 5. This is a simple assign to a new variable called "say". The memory now looks like:

Doing Now
Doing Now:=@prog1}}
prog1
say:=@say} a}Doing Now:=@prog1}}
say
a

Now Doing Now has only one assign left - the assign of line 6 in the original code. Wittgen needs to evaluate the string “@prog1}” and then assign it to Doing Now. This requires retrieving the value of prog1 which is the second entry in the table here. Careful attention must be paid to the order here. Before the evaluation is done the assign is removed from Doing Now, so Doing Now now refers to an empty text. However, the execution of the assign instruction will put a new value in Doing Now. So that at the end of the assign, Doing Now has a new activity. The memory will now look as follows:

Doing Now
say:=@say} a}Doing Now:=@prog1}}
prog1
say:=@say} a}Doing Now:=@prog1}}
say
a


Doing Now now has two assigns to do. The first is line 2 of the original code and the second is line 3. The first assign evaluates “@say} a” by retrieving the value of say, which happens to be “a”, and therefore replacing @say} with an a to get the new string “a a”. This value is now put in the variable say. The memory now looks like:


Doing Now
Doing Now:=@prog1}}
prog1
say:=@say} a}Doing Now:=@prog1}}
say
a a

Doing Now looks exactly the way it looked two steps ago. The difference is that now the value of say is “a a” and not “a”. Therefore in two steps time say will have the value “a a a”. Wittgen will run forever, making say have more and more a’s.

The explanation was a little lengthy but actually all that the code does is “Whatever is in the box, add another “a” to the box and then do this rule again.”. It was important to explore what is actually going on in memory during execution and how each of the instructions works.

The next post will go through a few more examples. After that it will be time to explain why Wittgen was designed the way it was and how all this relates to cognition and philosophy.

Friday, June 1, 2012

Wittgen now available in Sourceforge

I have uploaded a simple implementation of Wittgen to Sourceforge.

It can be accessed from:

http://www.sourceforge.com/p/wittgen

Of course, Wittgen is so simple that you may be of the opinion that there is no need to provide an implementation. After all, with a map class, you could just build it yourself.

Nevertheless, the code is provided as well as a little IDE that lets you step through assign by assign. The code is written in C++ using Qt. I have tested it in Linux.

There  are also a few trivial examples there that I hope to provide explanation for in subsequent posts.

Any feedback will be appreciated.