A Logical Model of Intelligence

— An introduction to NARS

Pei Wang


NARS (Non-Axiomatic Reasoning System) is a project aimed at the building of a general-purpose intelligent system, i.e., a "thinking machine" (also known as "AGI"), that follows the same principles as the human mind, and can solve problems in various domains.

The research results include a theory of intelligence, a formal model of intelligence based on the theory, and a computer implementation of the model.


1. Major Design Decisions

1.1. Objective: Intelligence as a principle

The design of NARS is based on the belief that the essence of intelligence is the principle of adapting to the environment while working with insufficient knowledge and resources. Accordingly, an intelligent system should rely on finite processing capacity, work in real time, open to unexpected tasks, and learn from experience.

This working definition interprets "intelligence" as a form of "relative rationality", since the validity of a conclusion is evaluated according to the available knowledge and resources of the system at the moment, rather than according to an objective reality or some absolute criteria. Even when a solution is provided by the system for a given problem, the system still has insufficient knowledge and resources for this problem, since it may change its solution if new evidence or more processing time becomes available.

This working definition of intelligence is consistent with our understanding of intelligence in general, and it also gives the field of Artificial Intelligence a proper identity, since defined in this way, AI is clearly different from computer science, cognitive psychology, and other related fields.

1.2. Strategy: A multi-layer reasoning system

To realize this form of intelligence in a computer, NARS takes a unified approach, that is, the system depends on a single core technique to carry out various cognitive functions and to solve various problems. This approach has the advantage of simplicity and consistency. The system can still use other techniques as plug-in tools to improve its performance when carrying out specific tasks.

NARS is built in the framework of a reasoning system, with a logic part and a control part. The former consists of a formal language for knowledge representation, a semantic theory of the language, and a set of inference rules; the latter consists of a memory structure and a control mechanism.

The reasoning framework has the advantage of being domain-independent, and combining the justifiability of individual inference steps and the flexibility of linking these steps together in a context-sensitive manner in run time.

To make the extremely complicated design process tractable, NARS is designed in layers, where each new layer extends the sets of grammar rule and inference rule, as well as adding details in the memory/control mechanism.

1.3. Technique: A non-axiomatic reasoning system

NARS is fundamentally different from traditional reasoning systems, mainly because of its assumption of insufficient knowledge and resources. The mathematical logic came from the study of theorem proving in mathematics, where the domain knowledge is summarized in axioms, the inference rules are truth-preserving, and the resource cost of an inference process is ignored, as far as it is finite. The logic of NARS is named "Non-Axiomatic Logic" (NAL), because none of the knowledge it processes (as premise or conclusion) can be considered as "axiom", as with a fixed truth-value. Instead, the system's beliefs are summaries of the system's experience, and are always revisable.

In NARS, a "term" names a "concept" that represents a recurring pattern in the system's experience, and a "statement" represents the substitutability of one term to another. Each statement is "true" to a degree, indicating the evidential support the statement gets from available evidence. An inference rule specifies how new statements can be derived from certain existing statements. The memory and control mechanism of the system attempt to use the time-space resources of the system in the most efficient way by dynamically distributing the resources according to the experience of the system and the current context. The overall architecture and working cycle of NARS is explained here.

NARS is adaptive to its experience, and therefore is situated and embodied. Its beliefs summarize the system's experience (rather than describe the world as it is), and its concepts represent patterns in the experience (rather than denote the objects in the world). Its inference rules are valid, because each conclusion is supported by the evidence provided by the premises (rather than because they derive absolute truth from absolute truth). The system is rational, because its conclusions are the best the system can find under the current knowledge and resources restriction (rather than because they are always absolutely correct or optimal).


2. Language and Logic

The logic part of NARS is NAL (Non-Axiomatic Logic), which is defined on a formal language Narsese. NAL is designed incrementally with multiple layers. At each layer, NAL and Narsese are extended to have a higher expressive power, a richer semantics, and a larger set of inference rules, so as to increase the intelligence of the system.

To establish a solid semantic foundation for NAL, an Inheritance Logic, IL, is introduced first. This logic uses a categorical language, an experience-grounded semantics, and a few syllogistic inference rules. It describes how a statement can be formed by an inheritance copula (or a variant of it) linking one term to another term, and how the relation can transit from given statements to derived statements. Since IL assumes sufficient knowledge and resources, it is not non-axiomatic, but helps the designing of NAL by specifying its boundary conditions. At each layer, the extension of grammar rules and inference rules first happens in IL and then the results are further extended in NAL.

The major content of each layer is briefly summarized in the following:

Roughly speaking, in the above NARS hierarchy, Layer 1 establishes the simplest non-axiomatic logic in the framework of term logic, with lessons learned from several non-classical logics (including inductive logic, probabilistic logic, fuzzy logic, relevance logic, non-monotonic logic, etc.); Layer 2-4 adapt ideas from set theory to specify compound terms; Layer 5 and 6 introduce certain functions of propositional logic and predicate logic, respectively; Layer 7-9 borrow ideas from logic programming to extend the reasoning framework to procedural knowledge and sensorimotor mechanism. However, as a whole NAL does not belong to any above logical system.

The reasoning process in NARS uniformly carries out many cognitive functions that are traditionally studied as separate processes with different mechanisms, such as learning, perceiving, planning, predicting, remembering, problem solving, decision making, and so on.


3. Control and Implementation

3.1. Task, belief, and concept

In the simplest case, NARS communicates with its environment in Narsese. The system's experience consists of a stream of input sentences, and each of them is a task to be processed. A task can be a piece of knowledge to be absorbed, a question to be answered, or a goal to be achieved. As a real-time system, NARS accepts new tasks at any moment, with any content and time request.

A task is processed by interacting with the beliefs of the system in an inference process. Beliefs are knowledge summarized from previous experience. Besides directly solving questions and goals, forward inference derives new beliefs, and backward inference derives new questions and goals.

Tasks and beliefs are clustered into concepts, according to the terms appearing in them. A concept is an entity named by a term, and refers to all the tasks and beliefs that are directly associated with that term.

3.2. Dynamic resource allocation

At any moment, in NARS there are usually many tasks being processed concurrently, with different priority. In each inference step, the involved concept, task, and belief are selected according to their priority values, which summarize many factors and are adjusted from time to time. The system dynamically allocates its time-space resources among the tasks and beliefs, to achieve a high expected overall efficiency, judged according to the past experience.

NARS solves each problem in a case-by-case manner, according to the knowledge and resources available at the moment, rather than following a predetermined algorithm. Similarly, a problem being solved by NARS does not have a fixed computational complexity, but may change from situation to situation.

3.3. Computer implementation

NARS can be fully implemented using the available computer hardware and software.

Several prototypes of NARS have been implemented, and NARS is currently an open-source project, where the logic part is mostly implemented, and the control part is in its preliminary form. The current development focuses on the control mechanism and input/output channels.

Topics that are also under consideration include extensive testing, knowledge acquisition, system augmentation or customization, and practical applications.


References on NARS

Brief introductions: Comprehensive descriptions: Further information: