In this section, we present formal models for semantic computing by generalizing the automata mentioned in the above section. Firstly, we consider a simple case, extending automata by equivalent concepts. Then we investigate a general situation, generalizing automata by semantically related concepts.
3.1. Probabilistic Automata under Equivalent Concepts
Suppose that is a PA. One of the limitation of a PA M is that M is restricted by finite input alphabet . Suppose ( is the set of all strings over , containing empty string ) and . For any , and are equivalent concept or synonym in semantics. For instance, and where and . M is valid with input x, but not . But the question is that in many applications, the inputs transmitted from users are unpredictable. Previously, we defined as a legal input. But in the application, users may input instead of . Because , automaton M is invalid with input . For robustness, the automaton M is supposed to have the ability to take equivalent concepts or synonyms as inputs as well.
Definition 4. Suppose Σ is an alphabet and π is the alphabet of all the possible symbols. For any , if , then b is called an equivalent concept or synonym of a in Σ, denoted as . If then . If there does not exist any equivalent concept or synonym in Σ, then where ε is empty string. Therefore, for any , there exist . Both equivalent concepts and synonyms are took as equivalent concepts in this paper.
In the case of
, the transition function
of a PA
M need to be generalized to a function
and for convenience, we still denote it as
. For
,
The language accepted by PA
M is defined as a function
: for any
,
where
, if
.
Definition 5 (DPEC). A deterministic probabilistic automaton for semantic computing under equivalent concepts (DPEC) is a seven-tuple , where
Q is a finite set of states,
Σ is a finite input alphabet,
is a internal transition function,
is the start state, with ,
is the set of accept states,
, where means there exist only one for every a,
is a generalized transition function of δ:
In the traditional perspective, is the alphabet of M and is the transition function of M. But in this paper, the transition function is called internal transition function and is called generalized transition function. Simply, by transition function of M, we mean . An input in is called an original input and an input in is called a generalized input.
Example 1 (Command order)
. For instance, we consider a sample case of command order. We consider a simple case that every time users input a command, automaton will enter a state based on probability distribution. Suppose that in PA , . . . δ is defined as:In PA M, “true” and “false” in Σ are commands input by users. means when users are in state q and input command “true”, the probability of that he will enter state p is 0.3. Others are similar. But in application, users may input “right” and “wrong” instead of “true” and “false”, because they are equivalent concepts for users. In our daily life, there are many equivalent concepts and users cannot know which are legal commands.
In order to empower M with the ability of taking equivalent concepts as commands, we rebuild PA M as a DPEC as follows. Suppose that we need to consider the additional case that users will input “wrong”
and “right”
, i.e., . For other cases, it is analogous. Define , for . Supposeand for other cases . For , is defined as: With the above extended and , when we suppose to get “true” from users, but users input “right”, PA M is invalid. However, DPEC is still valid. Similarly, we can deal with spelling error, such as “ture”. The key to do this is the semantic similarity function . If we define and , then spelling error “ture” can be taken as a legal input.
But in many cases, for some , there may exist several . This is defined as the following nondeterministic case.
Definition 6 (NPEC). A nondeterministic probabilistic automaton for semantic computing under equivalent concepts (NPEC) is a seven-tuple , where
are the same in DPEC,
,
is a generalized transition function of δ:
In the traditional perspective, is the alphabet of NPEC M and is the transition function of NPEC M.
Example 2 (Command order)
. Suppose that the designers of the PA M in above Example 1 get the feedback that users get an error report with inputs “right” and “wrong” frequently. In order to make it more convenient for users, the designers improve it as follows. In PA , Σ is redefined as . δ is redefined as:But there are so many equivalent concepts. What if some users may input “correct” instead of “right” or “true”?
In this case, we rebuild PA M as a NPEC as follows. In this case, . Define , for . Because and “correct” is equivalent to “right” and “true”, so we define . Analogously, can be defined as: With the above extended and , when we suppose to get “true” and “right” from users, but users input “correct”, PA M is invalid. However, NPEC is still valid. Similarly, we can deal with other equivalent concepts.
The key point is that the inputs transmitted from users are unpredictable. The finite input alphabet in PA M cannot take every case into account. But NPEC is competent. Based on the research on semantic computing introduced previously, we can apply their methods of semantic computing to PA M directly. Once an undefined input is transmitted to M, we find its equivalent inputs and modify , then it can be taken as a legal input. But most of the time, we can only find similar inputs instead of equivalent concepts. We leave this case to the next section.
The transition function of a DPEC or NPEC
can be generalized to a function
and for convenience, we still denote it as
:
By the above generalized transition function, we can get the robustness of a DPEC or NPEC :
Theorem 1 (Robustness). Suppose that is a DPEC or NPEC, then can take any string of symbols as an input, i.e., the transition function of a DPEC or NPEC can be generalized to a function .
Proof. For any
, if
, then
. If
then suppose
where
. If
, then
. If
, then
. If
, then
. Recall that if
, then
. Therefore
which means
can take any string of symbols
as an input, i.e., the transition function of
can be generalized to a function
. □
As analysed above, in many applications of automata, the inputs transmitted from users are unpredictable. If an automaton can take any string of symbols as an input, it can be applied to more fields. The robustness of probabilistic automata empowers it to be more stable. Intuitively, a DPEC or NPEC is a semantic expansion of PA which releases PA from a finite input alphabet.
Definition 7. The language accepted by a DPEC or NPEC is defined as a function : for any , DPEC and NPEC are semantic generalizations of PA for semantic computing. To show this relationship, we can define DPEC and NPEC in the following equivalent forms.
Definition 8 (DPEC). A deterministic probabilistic automaton for semantic computing under equivalent concepts (DPEC) is a seven-tuple , where
is a PA,
,
is a generalized transition function of δ:
Definition 9 (NPEC). A nondeterministic probabilistic automaton for semantic computing under equivalent concepts (NPEC) is a seven-tuple , where
is a PA,
,
is a generalized transition function of δ:
The language accepted by DPEC (or NPEC) and PA have the following property.
Theorem 2 (Semantic generalization). Suppose that DPEC is a semantic generalizationof PA and the language accepted by them are function and respectively. The languages accepted by them have the following properties:
- 1.
for any , ,
- 2.
for any , there exist such that .
Proof. For DPEC
and PA
M, if
, then
, for any
. Obviously,
. If
, (1) for any
,
Since
, for any
, we get
(2) For any
,
For
,
and recall that
if
. Let
, then
.
Since , by (1) we can get . Therefore, . □
Theorem 3 (Semantic generalization). Suppose that NPEC is a semantic generalization of PA and the language accepted by them are function and respectively. The languages accepted by them have the following properties:
- 1.
for any , ,
- 2.
for any , there exist such that .
Proof. For NPEC and PA M, if or , it is similar to DPEC.
For any
,
For
,
and
, therefore,
Recall that
if
. Let
, then
.
Since , by (1) we can get . Therefore, . □
The intuitive idea of the above two theorems is that because DPEC and NPEC are semantically generalized from PA M, then for an original input in , they will get the same result. For a generalized input in , if there is only one equivalent concept, they will get an equivalent result too. But if there are several equivalent concepts, the generalized input will include all the equivalent cases, then NPEC will get a bigger probability. The properties of semantic generalization can be reflected by their transition functions and the languages accepted.
An important difference between DPEC and NPEC is that a DPEC is a traditional probabilistic automaton but an NPEC
is not a traditional probabilistic automaton because it does not satisfy complete probability formula. In PA
M,
. But in corresponding NPEC
, because
, when
,
If we want to define a NPEC as a kind of traditional probabilistic automaton, the transition function needs to be adjusted as follows.
Definition 10 (NPEC). A nondeterministic probabilistic automaton for semantic computing under equivalent concepts (NPEC) is a seven-tuple , where
is a PA,
, is the number of the equivalent concepts of a,
is a generalized transition function of δ:
It is obvious that the properties of robustness and semantic generalization are still valid and by the above adjusted transition function, it is easy to get the following property.
Theorem 4 (Semantic computing). In a DPEC or NPEC , for any , .
Proof. In a DPEC or NPEC ,
for any , ,
□
The intuitive idea of this theorem is that the total probability of that a DPEC or NPEC will enter all the states with a similar input is the semantic similarity between generalized input and similar input. The main purpose of a DPEC (or NPEC) generalized from PA is semantic computing.
From the above theorems, we can get that all the generalized PA do not have the limitations coming from the fixed finite input alphabet. They explain semantic computing with computation theory, instead of implementations of semantic reasoning (e.g., ontology reasoning, rule reasoning, semantic query, and semantic search).
3.2. Probabilistic Automata under Related Concept
In the previous subsection, we suppose that for any input , there exists an . In fact, it is just an ideal case. As illustrated in bookshop example, when a PA is applied to an application, in order to handle unpredictable inputs, we rebuild it as a NPEC . When an input transmitted from users, we check the original input alphabet . If there exist a such that , then we add a to and define . But it is too hard to find a such that for every input a. In fact, most of the time, we can only find a such that . Therefore, in this subsection, we generalize DPEC and NPEC to the case .
Definition 11. Suppose Σ is an alphabet and π is the alphabet of all the possible symbols. For any , if , then b is called the most similar concepts of a in Σ, denoted as . If then . If , then . Notice that is not unique.
With the most similar concepts, we generalize DPEC and NPEC to the universal case as follows.
Definition 12 (DPRC). A deterministic probabilistic automaton for semantic computing under related concept (DPRC) is a seven-tuple , where
is a PA,
,
is a generalized transition function of δ:
Definition 13 (NPRC). A nondeterministic probabilistic automaton for semantic computing under related concept (NPRC) is a seven-tuple , where
is a PA,
,
is a generalized transition function of δ:
Obviously, DPEC and NPEC are special cases of DPRC and NPRC, that is, .
Example 3 (Command order). Recall the PA M in above Example 2. Here we consider the case that users may input “fit” instead of “right” or “true”. The term “fit” is not equivalent concept of “right” or “true”, but they are similar. Suppose . Then we can only find a similar concept for “fit” instead of an equivalent concept. So DPEC and NPEC are not valid in this case. In fact, the probability of getting a similar input is bigger than an equivalent concept.
In order to deal with similar inputs, we rebuild PA M as a DPRC as follows. In this case, . Define , for . is defined as: With the above extended and , when we suppose to get “true” and “right” from users, but users input “fit”, PA M is invalid. However, DPRC is still valid.
Suppose , then PA M need to be rebuild as a NPRC as follows. . Define , for . is defined as: Spelling errors can also be took as similar inputs analogously.
The transition function of a DPRC or NPRC
can also be generalized to a function
and for convenience, we still denote it as
:
By this generalized transition function, a DPRC (or NPRC) M inherits the robustness of DPEC (or NPEC).
Theorem 5 (Robustness). Suppose that is a DPRC or NPRC, then can take any string of symbols as an input, i.e., the transition function of a DPRC or NPRC can be generalized to a function .
Proof. The proof is similar to proof of robustness of DPEC and NPEC. □
Definition 14. The language accepted by a DPRC or NPRC is defined as a function : for any , A DPRC also inherits the relationship of accepted languages between DPEC and PA.
Theorem 6 (Semantic generalization). Suppose that DPRC is a semantic generalization of PA and the languages accepted by them are functions and respectively. The languages accepted by them have the following properties:
- 1.
for any , ,
- 2.
for any , there exist such that .
Proof. if
or
, the proof is similar to the proof of semantic generalization of DPEC and NPEC. For any
,
Since
,
, for any
. Let
.
And since , by (1), we can get □
Theorem 7 (Semantic generalization). Suppose that DPRC and NPRC are semantic generalizations of PA and the languages accepted by them are functions , and respectively. The languages accepted by them have the following properties:
- 1.
for any , ,
- 2.
for any , there exist such that .
Proof. if
or
, the proof is similar to the proof of semantic generalization of DPEC and NPEC. For any
,
Therefore, . By the semantic generalization of DPRC, we can get that there exist such that . □
The above two theorems show the relationship between the language accepted by NPRC or DPRC and the corresponding PA M. Every element of M is included in and the languages accepted by M can be taken as a part of the languages accepted by . Therefore, is a semantic generalization of M.
Example 4 (Bookshop)
. Let be a PA. Suppose that M is applied to an application of recommendation system for a book shop. When a customer inputs the name of a book and buys a book, PA M recommends a list of books, ordered by the probability of which book the customer will buy as well. Suppose that Q is the set of books, i.e.,
Σ
includes all combinations of the key words of every book’s name in Q which means Web, Ontology, Languages, Web Ontology, Web Ontology Languages, Knowledge, Representation, Knowledge Representation
. means the probability of recommending book p to a customer after this customer has bought q with input a. The value of every can be calculated by historical data which means recommendation system is based on customer’s purchasing history.But as a user, when I have to input “Web Ontology Languages”, I prefer to input “WOL”—short for “Web Ontology Languages”—because it is more efficient to input an acronym. When I have to input “Knowledge Representation” or “Artificial Intelligence”, I also prefer to input “KR” or “AI” as well.
On the other hand, as a designer, the inputs transmitted from users are unpredictable. Users may input acronyms, synonyms or equivalent concepts in semantics, even some strange symbols coming from spelling mistakes. Therefore, when defining the input alphabet Σ, we need to collect synonyms or equivalent concepts of every element of Σ, as many as we can. But when Σ is very big, it is too hard to collect all the synonyms or equivalent concepts. Another worse case is that, as the development of globalization, the users may come from any country and input symbols with any language (English, Chinese, French, and so on). For robustness and universality, as a designer, it is too hard to define a PA M with the ability to handle all those cases, because PA is restricted by a fixed finite input alphabet Σ defined previously. But a NPRC is competent for this challenge.
Hence, we rebuild PA M as a NPRC as follows. Firstly, define linguistics, represent as the set of some possible inputs. For every , define . Notice that after we have defined the way to compute semantic similarity, we only need to collect familiar equivalents and synonyms as . When an input transmitted from customers, we add a to and find based on function . Then define .
For instance, we consider a sample case. In PA , Web Ontology Languages
, p = Knowledge Representation
}. Web, Ontology, Languages, Representation, Knowledge
}. . δ is defined as:
means after a customer inputs key words “Web”
searching for a book and finally buys book “Web Ontology Languages”,
the probability of he will buy book “Knowledge Representation”
is 0.3. Others are similar. In order to deal with similar inputs, we rebuild PA M to a NPRC as follows. Suppose that we only consider the additional case that customers will input “linguistics”
and “represent”
searching for a book, that is, and , for . Supposeand for other case . For , is defined as:
With the above extended and , when an input “linguistics” that is not in Σ transmitted to automaton, PA M is invalid, but NPRC is valid.
An NPRC can be modified as a traditional probabilistic automaton as follows.
Definition 15 (NPRC). A nondeterministic probabilistic automaton for semantic computing under related concept (NPRC) is a seven-tuple , where
is a PA,
,
is a generalized transition function of δ:
The proof of
is similar to NPEC. The key to proof this is that for different most similar concepts
of
a,
After the above modification of transition function, NPRC becomes a traditional probabilistic automaton. It is obvious that the property of robustness is still valid. But recall that the main purpose of this paper is to build computational models for semantic computing. Therefore, we prefer to modify it to the following forms.
Definition 16 (NPRC). A nondeterministic probabilistic automaton for semantic computing under related concept (NPRC) is a seven-tuple , where
is a PA,
, is number of corresponding to a,
is a generalized transition function of δ:
Based on the above form of NPRC, for any DPRC and NPRC, they have the following property.
Theorem 8 (Semantic computing). For any DPRC or NPRC , for any , .
Proof. For any DPRC
and any
,
For any NPRC
and any
,
□
Therefore, in a DPRC or NPRC , for any , turn out to be the semantic similarity of two concepts: . It means the total probability of that a DPRC or NPRC will enter all the states with a similar input is the semantic similarity between generalized input and similar input.
In this subsection, we have defined different kinds of NPRC, because in different cases, we need different transition function. For an NPRC based on Definition 13, any generalized input is related to all similar inputs. But a NPRC based on Definition 15 is a traditional probabilistic automaton which satisfies the properties of traditional probabilistic automaton. For a NPRC based on Definition 16, it is a probabilistic automaton model for semantic computing.
In the above subsections, traditional probabilistic automata are generalized for semantic computing under equivalent and related concepts or words, respectively. Compared with traditional probabilistic automata, generalized probabilistic automata are more robust, because it is still valid when the input transmitted from users is not in the defined input alphabet . It explains the semantic computing from computation theory. In the following section, we will show the robustness with an application for the weather forecast.