This piece describes an approach I am working on for an upgrade to SuperDroidBot “Anna” and a sharable brain service I am working on. This is obviously only ONE approach to getting a robot to have a concept of truth.
What is Truth?
In this system, “Truth” is a probability distribution defined by a Mean, a Standard Deviation, and a count of observations (N). The mean truth represents the average degree to which a memory is correlated with absolute truth of 1. It is a “correlation coefficient”, or “r” in stats. I represent truth as percentages in my examples (-100% to 100%).
Let’s take the following statement, heard for the VERY FIRST time by a robot…
Observation #1: Jane is beautiful.
This might result in the following values for truth.
N=1, Mean=85%, StdDev=20%
The mean and standard deviation are arbitrary for the first observation, but take on meaning and usefulness as additional observations are made.
What is Memory?
Memory is organized as a set of “Atoms”, each atom represents a memory. Among many other things, a memory could be a word, a person, a place, a concept, or an association of some kind. Each atom has its own “Truth”.
Natural Language Quantifiers
For a given observation, the specific words used have an effect on the truth value.
- Jane is beautiful - Value = 85%
- Jane is somewhat beautiful - Value = 60%
- Jane is very beautiful - Value = 90%
- Jane is always beautiful - Value = 100%
- Jane is not beautiful - Value = -85%
- Jane is never beautiful - Value = -100%
I call each of the underlined words a "Quantifier". I maintain a list of quantifiers in the database that hold the mean truth and standard deviation for each of these quantifiers. For example, “never” would have a value of -100%, while “always” would have a value of 100%.
Learning From Multiple Observations
What happens when the robot hears the same or similar statements multiple times?
Observation #N: Jane is beautiful.
Lets say that before this observation, truth was stored as:
N=5, Mean=81%, StdDev=14%
Truth would then be recalculated as (the next section provides the formulas for the recalculation):
N=6, Mean=82%, StdDev=13%
In this example, the mean went slightly up, and the standard deviation went slightly down. If people are in common agreement generally that Jane is beautiful, the mean will converge on some value like (85%) and the standard deviation will shrink.
Performing Logic with Multiple Truth Values, Synonyms, Negatives
Often a logical chain of several atoms needs to be evaluated. Consider the following example:
Jane is beautiful. Mean = 85%
Beautiful is the same as pretty. Mean = 85%
Is Jane pretty?
a. Answer “Yes” if result is greater than some truth threshold, say 60%.
b. Result = 85% * 85%= 72% 72% > 60%, so answer “Yes”
One can see from the math above, that if more synonyms were used in the atom chain, the truth result would get smaller, and the statement would no longer pass the threshold to be outright true. I plan on having ranges for truth every 10% or so, with different English answers for each, so that answers like “Likely”, or “Possibly” might come out for statements that are close to true but don’t quite meet the threshold (60% in this example).
An example with a negative…
Jane is beautiful. Mean = 85%
Beautiful is the same as pretty. Mean = 85%
Pretty is the opposite of ugly. Mean = -85%
Is Jane ugly?
a. Answer “No” if result is less than some truth threshold, say -60%.
b. Result = 85% * 85%* -85% = -61%
These are greatly simplified examples, as many algos process many different chains of atoms at the same time and process dozens or hundreds of truths to get an answer to a single question.
A tangent, but I should be able to calculate a confidence in the result based on the combined standard deviations and sample sizes…just haven’t figured out how yet.
Giving Qualitative Answers for Quantitative Questions
In the previous example, the result was 72%. Ideally, the spoken answer would vary according to the result and the confidence in the result, so answers to Yes/No questions would have answers that reflect uncertainty ranges, as in the following examples:
- High Correlation Answers: Definitely, Without a Doubt
- Medium Correlation Answers: Probably, I believe so, I think so, Yes
- Low Correlation Answers: Maybe, Possibly, Could Be
- Little or No Correlation Answers: I am not sure, Your guess is as good as mine, Who knows?
Getting a Robot to be Open Minded
Having an open mind means taking new information into account. If each new observation is allowed to be processed, then the summary statistics are recalculated with each new observation, which means a new N, Mean, and StdDev. If new data is trustworthy, then this is ok, but what if it is not? Perhaps some skepticism over time is beneficial.
Getting a Robot to be Open-Minded but Skeptical – Having a B.S. Detector
Skeptical means being selective about what new observations are allowed to be processed. My intention is to filter out new observations that seem to conflict too much with previous experience.
- Be open minded when N < 10.
- Filter out readings from sources that are not trusted.
- Filter out new observations that are more than 2 standard deviations from the mean.
- For facts that not in debate, the standard deviation will shrink over time, so outliers don’t have to be very far away to be “rejected”.
Truth for concepts where there is no consistent truth
For concepts where there is a great variance of opinion (like the weather or whether a given rock band plays good music), the mean will tend to converge on a value that is in the middle (-50% to +50%), and the standard deviation will tend to be a lot larger. This widening of the normal curve will result in fewer values being “rejected”.
Getting a Robot to Give Verbal Feedback that Information is Accepted or Rejected
There are basically a few common circumstances. For each of these cases, I have or intend to have a list of possible responses from which I choose a verbal answer at random.
- A fact is heard for the first time - Possible Responses: “I was not aware of that”, “That’s interesting”, “That’s new to me”, “Ok”, “Got it”
- A fact is learned that is already known - Possible Responses: “I know”, “I’ve heard”, “So I’ve heard”, “Tell me something I don’t know”
- A fact is heard from a trusted source that conflicts with prior learned information (falls outside some threshold – 2 standard deviations) - Possible Responses: “I don’t believe you”, “I doubt it”, “Are you sure?”, “That doesn’t sound right to me.”, “Stop kidding around.” In extreme cases, this could even result in “I think you are full of crap.”, “I think you are lying”.
- A fact is heard from an Untrusted Source - I am considering having the robot reject the new data (not recalculate truth distribution), but give passive aggressive B.S. type responses to humor the speaker like “Interesting”, “Hmmm” “Yawn”, “Whatever”, “If you say so”, “Whatever floats your boat”, “Hard to say”
Getting a Robot to Determine Whether a Source Is Trusted
Trustworthiness is just another correlation. Each time a new observation that comes in, the observation should be tested to see if it agrees or conflicts with existing data.
If the fact check is found to be sufficiently true, truth would be recalculated for the given source (a particular human being for example), giving the source credit by using a 100% as a new value to add to the truth stats.
If the fact check is found to be sufficiently false, truth would be recalculated for the given source, taking some truth away from the source by using a -100% as a new value to add to the truth stats.
Using “R Squared” – The Coefficient of Determination
Because the mean is also a correlation (r), we can calculate the coefficient of determination and use it for some simple tests. If “R Squared” values are fairly low (0-50%), this would mean that the truth being evaluated is questionable, as the correlation (positive or negative) is weak. In regression, R squared is supposed to describe the percentage of variance explained by the given factor. I think this will turn out to be useful later.
Getting a Robot to Derive its Own Truth Instead of Being Told Truth by Humans
Because truth is a correlation coefficient in this model, and correlations can be calculated from any two series of data with the same number of items, then a robot could derive truths on its own from sensor data or other sources. I have started by getting the robot to be able to remember data series verbally and calculate and verbalize correlations. The next step is to get it to “learn and remember” a meaning from the result. Some examples:
- A stream of light sensor data could be correlated with a stream of temperature sensor data. A robot might calculate that light level is 80% correlated with temperature level, and effectively derive and learn a “truth” that when the light is higher, the temperature is likely higher.
- A robot could compare a football team’s “Running Yards Allowed Per Game” with whether it won/lost and determine “Giving up yards against the run is highly correlated with losing”. The goal would eventually be to have the robot hear that a given team gave up 200 yards on the ground and say “So they lost didn’t they?” That is a long way off.
Getting a Robot to Answer Questions About its Own Logical Conclusions
I have not figured out how to do it yet, but I have two primary goals:
- Get the Robot to be able to explain its own reasoning by asking “Why?” or “Why do you think that?”…I’d like it to be able to answer “Jane is pretty because pretty is the same as beautiful, and I have heard many times that Jane is beautiful.”
- Get the robot to answer in qualitative and quantitative terms how confident it is about its logic. So I can ask “Are you sure?” …and it could say “I am fairly confident of that.”