第126章 Cognitive Element
认知元素
上一章建立了 Multivariate Perception(多元感知)。
机器面对现实对象时,并不是接收到一个单独的数据,而是同时获得:
Position
Orientation
Distance
Velocity
Contact
Force
Fragility
Obstacle
Hand State
...
这些不同维度的数据共同形成:
Current Perception
但是,一个更加基础的问题随之出现:
Current Perception 进入认知系统以后,究竟以什么形式被机器保存、处理和组合?
如果直接把整组感知数据称为“对象”,那么机器实际上跳过了一个非常重要的中间层。
因此,本章建立:
Perception
↓
Cognitive Element
即:
认知元素,是现实信息进入机器认知系统以后形成的最基础认知单位。
126.1 从 Perception 到 Element
感知不是认知元素。
这是本章首先需要明确的区别。
例如机器通过传感器观察到一个鸡蛋:
Camera
+
Depth Sensor
+
Force Sensor
+
Position Sensor
得到:
Position = (120, 80, 30)
Orientation = ...
Distance = 35cm
Velocity = 0
Contact = TRUE
Force = 0.8N
Fragility = HIGH
这些数据首先构成:
Perception
但认知系统并不应该永远以整个 Perception 作为不可分割的数据块进行处理。
系统需要将其中具有独立认知意义的信息抽取出来:
Position
Velocity
Contact
Force
Fragility
Orientation
Distance
于是:
Perception
↓
Element Extraction
↓
Cognitive Elements
例如:
Element:
type = Position
value = (120,80,30)
以及:
Element:
type = Velocity
value = 0
以及:
Element:
type = Contact
value = TRUE
因此:
Perception 是一次感知形成的整体状态,而 Element 是从感知状态中分离出来、能够独立参与认知运算的信息单位。
126.2 Cognitive Element 的定义
可以定义:
Cognitive Element =
Type
+
Value
+
State
+
Source
+
Time
+
Confidence
最基本形式可以表示为:
E = (T, V)
其中:
T = Element Type
V = Element Value
例如:
E1 = (Position, 120,80,30)
E2 = (Velocity, 0)
E3 = (Contact, TRUE)
E4 = (Force, 0.8N)
E5 = (Temperature, 36.5°C)
进一步扩展:
E =
{
type,
value,
state,
source,
timestamp,
confidence
}
这样,Element 就不再只是一个普通变量。
它成为:
具有认知语义的数据单位。
126.3 为什么普通 Data 不等于 Cognitive Element
机器系统中已经存在:
Data
Variable
Value
Signal
Measurement
Feature
为什么还需要提出:
Cognitive Element
因为这些概念解决的问题不同。
例如:
36.5
只是一个:
Value
如果定义:
Temperature = 36.5°C
它成为一个:
Measurement
而如果进入认知系统:
Temperature
=
36.5°C
+
Sensor
+
Time
+
Confidence
+
Context
它就可以成为:
Cognitive Element
因此:
Data
↓
Meaning
↓
Cognitive Element
认知元素的关键不是“数据更复杂”。
而是:
数据获得了可以参与认知过程的结构和语义。
126.4 Element 的最小结构
为了建立一个可工程实现的认知系统,不能把 Element 定义得无限复杂。
因此可以建立一个最小模型:
Element
{
type
value
}
例如:
{
type: "position",
value: [120,80,30]
}
或者:
{
type: "contact",
value: true
}
或者:
{
type: "pressure",
value: 0.8
}
这是:
Minimal Cognitive Element
然后根据系统需要增加:
source
timestamp
confidence
state
relation
形成:
Extended Cognitive Element
这种设计非常重要。
因为:
认知系统首先需要定义最小认知单位,然后再向其增加属性,而不是一开始建立一个不可控制的巨大数据结构。
126.5 Cognitive Element 的类型
现实世界产生的信息具有不同性质。
因此认知元素可以按照信息类型进行分类。
1. Spatial Element
空间元素:
Position
Distance
Depth
Size
Area
Volume
例如:
Position = (100,50,20)
Distance = 30cm
2. Motion Element
运动元素:
Velocity
Acceleration
Direction
Trajectory
Movement
例如:
Velocity = 2m/s
Direction = LEFT
3. Shape Element
形状元素:
Edge
Contour
Shape
Size
Curvature
例如:
Shape = Oval
Edge = Detected
4. Contact Element
接触元素:
Contact
Collision
Touch
Grip
Attachment
例如:
Contact = TRUE
5. Force Element
力元素:
Force
Pressure
Torque
Tension
Compression
例如:
Pressure = 0.8N
6. Thermal Element
热元素:
Temperature
Heat
ThermalGradient
例如:
Temperature = 36.5°C
7. Acoustic Element
声音元素:
Sound
Frequency
Amplitude
Direction
Duration
例如:
Frequency = 800Hz
Amplitude = ...
8. Visual Element
视觉元素:
Brightness
Color
Edge
Texture
Pattern
Motion
这些元素可以来自视觉感知系统。
9. State Element
状态元素:
Open
Closed
Moving
Stopped
Broken
Stable
Unstable
例如:
DoorState = OPEN
126.6 Element 不是 Object
这是整个认知架构中非常重要的一条边界:
Element ≠ Object
例如:
Position
Velocity
Force
Temperature
Contact
都不是完整对象。
它们只是描述对象的不同认知元素。
例如:
Egg
可以由:
Shape
+
Position
+
Orientation
+
Velocity
+
Contact
+
Force
+
Fragility
共同描述。
因此:
Elements
↓
Object Representation
对象不是最底层。
对象是更高层的认知结构。
126.7 Element 是 Object 的组成基础
可以建立:
Element
↓
Element Group
↓
Object
↓
Object State
↓
Object Model
例如:
Position
Orientation
Shape
Color
Weight
Contact
Fragility
组合:
Object
│
┌────────┼────────┐
↓ ↓ ↓
Shape Position Force
↓ ↓ ↓
Oval Table 0.8N
机器并不是直接“看到一个鸡蛋”。
更准确地说:
Sensors
↓
Perception
↓
Elements
↓
Relations
↓
Object
因此:
对象是认知系统通过元素及其关系构建出来的,而不是认知系统最底层天然存在的单位。
126.8 Element 与 Feature 的区别
机器视觉中经常使用:
Feature
例如:
Edge Feature
Corner Feature
Texture Feature
Color Feature
Cognitive Element 与 Feature 有相似之处,但并不完全相同。
Feature 通常回答:
数据中有什么可计算的特征?
Cognitive Element 则回答:
这个信息是否能够作为认知过程中的独立单位存在?
例如:
Edge
可以是视觉 Feature。
但进入认知系统以后:
Edge
+
Position
+
Direction
+
Object Association
就可以成为认知元素。
因此:
Feature
↓
可能成为
↓
Cognitive Element
并不是:
Feature = Cognitive Element
126.9 Element 必须具有 Identity
如果系统不断产生:
Position
Position
Position
Position
那么机器必须能够区分它们。
因此一个实际的 Cognitive Element 应该具有:
Element ID
例如:
E1001
E1002
E1003
形成:
E1001
type = Position
value = (120,80,30)
E1002
type = Velocity
value = 0
E1003
type = Contact
value = TRUE
这样认知系统就能够进行:
Create
Update
Compare
Delete
Track
Relate
126.10 Element 必须具有时间
现实世界不是静态数据库。
同一个元素会变化:
Position(t1)
Position(t2)
Position(t3)
例如:
Position = (100,50,20)
随后:
Position = (102,50,20)
再随后:
Position = (105,50,20)
如果没有时间:
Position = 105
机器不知道:
这是当前值,还是过去值?
因此:
Element
+
Timestamp
构成:
Temporal Cognitive Element
这也为后面的:
State
Change
Event
Prediction
Learning
提供基础。
126.11 Element 必须具有来源
不同传感器可能产生不同数据。
例如:
Camera → Position
Lidar → Position
GPS → Position
三个系统都可能产生:
Position
但它们并不一定相同。
因此:
Element
{
type: Position
value: ...
source: Camera
}
与:
Element
{
type: Position
value: ...
source: Lidar
}
是两个不同的认知证据。
因此可以进一步建立:
Source
↓
Perception
↓
Element
126.12 Element 的 Confidence
机器感知永远可能存在不确定性。
例如:
Object = Egg
Confidence = 0.97
或者:
Position Confidence = 0.82
因此:
Element
+
Confidence
使机器能够区分:
Known
与:
Possibly Known
这对于认知系统非常重要。
因为机器不应该简单地把:
Sensor Output
全部当成:
Truth
而应该保存:
Value
+
Confidence
形成:
Evidence
126.13 Element 的 State
元素本身也可能具有状态。
例如:
Contact
不是简单的:
TRUE
它可能经历:
Unknown
↓
Detected
↓
Active
↓
Released
↓
Inactive
同样:
Position
可以具有:
Stable
Changing
Uncertain
Lost
因此:
Element
=
Value
+
State
使元素成为一个能够随时间变化的认知单位。
126.14 Element 的生命周期
认知元素不是永久存在的。
它可以经历:
Created
↓
Observed
↓
Updated
↓
Confirmed
↓
Changed
↓
Invalidated
↓
Removed
例如:
Contact = TRUE
随后:
Contact = FALSE
系统不应该简单删除历史信息。
而应该记录:
Contact Element
发生了:
State Change
因此:
Element
↓
Element State
↓
Element Change
最终可以产生:
Event
126.15 Element 与 Event
Event 不是 Element。
例如:
Contact = TRUE
是:
Element
而:
Contact Changed
是:
Event
可以表示:
Previous Element
↓
Change
↓
Current Element
即:
Element(t1)
↓
Difference
↓
Element(t2)
↓
Event
因此:
Element
是状态信息单位,
而:
Event
是状态变化单位。
这一区分对于后面的:
Temporal Cognition
Event Cognition
Cognitive State Machine
非常重要。
126.16 Element 与 Relation
单个元素只能表达有限的信息。
例如:
Position = (100,50,20)
它本身并不能告诉机器:
这个位置属于什么?
因此需要:
Element
+
Relation
例如:
Position
↓ belongs_to
Egg
或者:
Contact
↓ between
Hand ↔ Egg
或者:
Position
↓ relative_to
Table
于是认知结构逐渐形成:
Element
+
Relation
↓
Structured Cognition
126.17 Element → Object 的形成
可以进一步定义对象形成过程:
Perception
↓
Element Extraction
↓
Element Set
↓
Relation Detection
↓
Object Construction
例如系统获得:
Shape = Oval
Position = (120,80,30)
Color = White
Velocity = 0
Contact = TRUE
Force = 0.8N
Fragility = HIGH
然后发现:
Shape
Position
Color
Force
Fragility
之间具有稳定关系。
系统于是形成:
Object O1
其内部:
O1
├── Shape
├── Position
├── Color
├── Velocity
├── Contact
├── Force
└── Fragility
所以:
Object 是 Element 的组织结果。
126.18 Element → State
对象形成以后,还可以产生对象状态:
Object
↓
Current Elements
↓
Current State
例如:
Egg
Position = Table
Velocity = 0
Contact = TRUE
Force = 0.8N
形成:
Egg State =
Stable
如果:
Velocity > 0
则可能形成:
Egg State =
Moving
因此:
Element
↓
State
是认知系统中的重要转换。
126.19 Element → Decision
更高层的认知过程可以继续建立:
Elements
↓
Object
↓
State
↓
Evaluation
↓
Decision
例如:
Fragility = HIGH
Force = INCREASING
Velocity = DOWNWARD
形成:
Risk = HIGH
随后:
Decision = Reduce Force
因此最终形成:
Perception
↓
Element
↓
Object
↓
State
↓
Evaluation
↓
Decision
↓
Action
这与传统“输入 → 黑箱模型 → 输出”的系统有本质区别。
WSaiOS 的认知过程可以被拆解为可观察、可追踪的结构。
126.20 Cognitive Element 的核心工程模型
综合前面的定义,可以建立:
CognitiveElement
{
id
type
value
state
source
timestamp
confidence
}
进一步加入:
relations[]
形成:
CognitiveElement
{
id
type
value
state
source
timestamp
confidence
relations
}
例如:
{
id: E1001,
type: Position,
value: {
x: 120,
y: 80,
z: 30
},
state: Stable,
source: DepthSensor,
timestamp: T10001,
confidence: 0.96
}
这已经可以成为一个真正的工程数据结构。
126.21 Cognitive Element 的层级
认知元素本身还可以形成不同层级。
Level 1:Raw Element
直接来自传感器:
Temperature = 36.5
Pressure = 0.8
Distance = 30
Level 2:Perceptual Element
经过感知处理:
EdgeDetected
ObjectBoundary
MotionDetected
ContactDetected
Level 3:Semantic Element
具有更高语义:
Fragile
Stable
Moving
Open
Broken
Level 4:Cognitive Element
进入完整认知体系:
Fragility
+
State
+
Context
+
Relation
+
Confidence
于是形成:
Raw Data
↓
Perceptual Element
↓
Semantic Element
↓
Cognitive Element
这为后续建立:
Semantic Cognition
Object Cognition
State Cognition
提供基础。
126.22 Element 不是越大越好
认知元素设计中存在一个重要原则:
Element 必须足够小,才能独立处理;又必须足够有意义,才能参与认知。
如果太小:
0.0001
这样的数据没有独立认知意义。
如果太大:
Entire Scene
又失去了元素的基本属性。
因此:
Cognitive Element
必须位于:
Raw Data
↓
Element
↓
Object
↓
Situation
之间的合理尺度。
126.23 Cognitive Element 的基本原则
可以建立七条基本原则。
原则一:独立性
Element 应能够作为独立的信息单位存在。
原则二:可识别性
Element 应具有明确类型。
原则三:可更新性
Element 应能够随着现实变化而更新。
原则四:可追踪性
Element 应能够追踪来源和时间。
原则五:可组合性
多个 Element 可以组合成为 Object。
原则六:可关联性
Element 可以通过 Relation 与其他 Element 建立关系。
原则七:可失效性
过时或错误 Element 必须能够被标记为:
Invalid
Expired
Lost
Uncertain
这七条原则共同定义了:
Cognitive Element Architecture
126.24 从数据系统到认知系统
传统数据系统通常是:
Input
↓
Database
↓
Query
↓
Output
而认知系统需要:
Reality
↓
Perception
↓
Element
↓
Relation
↓
Object
↓
State
↓
Evaluation
↓
Decision
↓
Action
↓
Feedback
其中:
Element
承担一个非常关键的角色。
它把:
感知数据
转换为:
可参与认知运算的结构化信息。
因此可以把它理解为:
现实世界与机器认知世界之间的第一层结构化接口。
126.25 Cognitive Element 的完整链条
到这里,可以得到:
Reality
↓
Sensor
↓
Signal
↓
Perception
↓
Cognitive Element
↓
Relation
↓
Object
↓
Object State
↓
Situation
↓
Evaluation
↓
Decision
↓
Action
↓
Feedback
其中:
Signal
描述机器获得了什么信号。
Perception
描述机器当前感知到了什么。
Element
描述感知中有哪些独立的认知单位。
Object
描述这些元素组合出了什么对象。
State
描述对象当前处于什么状态。
Situation
描述多个对象及其状态形成了什么现实情境。
于是,认知结构开始真正建立起来。
126.26 本章核心定义
最终可以给出 WSaiOS-ICAI 对 Cognitive Element 的定义:
Cognitive Element 是现实信息经过感知系统进入机器认知空间后形成的、具有明确类型、值、状态以及可追踪属性,并能够独立参与关系构建、对象形成、状态判断、推理与决策的最小结构化认知单位。
形式化表示:
CE =
(Type
+
Value
+
State
+
Source
+
Time
+
Confidence)
而认知系统的基本构造过程可以表示为:
Perception
↓
Cognitive Elements
↓
Relations
↓
Objects
↓
States
↓
Situations
↓
Cognition
因此,本章真正建立的不是一个新的数据结构名称,而是一个重要的认知层级:
Reality
↓
Perception
↓
┌────────────────┐
│ Element │
└────────────────┘
↓
Relation
↓
Object
↓
State
↓
Situation
↓
Cognition
Cognitive Element 是 WSaiOS-ICAI 从“感知数据”进入“机器认知”的第一块基石。
而一旦 Element 被建立,下一个问题便自然出现:
一个 Element 单独存在时只有局部意义,那么多个 Element 之间究竟如何形成稳定的认知结构?
这将进入下一层:
Cognitive Element
↓
Cognitive Relation
即 第127章:Cognitive Relation——认知关系。