# Unit Mechanism Learning：对象、框架与两种异质性

> Version: `UNIT-MECHANISM-HIERARCHY-2026-07-16-V8`  
> Status: canonical Chinese-first conceptual essay  
> Public projection: `../entry-site/unit-mechanism-learning/`  
> Scope: stable hierarchy and research boundary; not a paper theorem or an identifiability claim

> **Active notation contract, 2026-07-16.** The model-level primitive is `U`, whose
> realization `U=u` is a token/unit embedding. Write the shared mechanism as
> `Y(x)=f_theta(x,E;U)`; only after fixing `u` write `Y_u(x)=f_theta(x,E;u)`.
> Observation/sequence indices are bookkeeping, not unit ontology. They may
> index observations, realizations and beliefs (`y_i`, `u_i`, `Q_i`), but
> they must not replicate the model-level selector `U`. See the mandatory
> [Unit Selection notation contract](DISCOSCM_UNIT_SELECTION_NOTATION.md).

本文后续仍保留少量 indexed equations 作为 potential-outcome / longitudinal
literature bridge；它们描述 observation/event bookkeeping，不重新定义 active unit
ontology。新模型与新证明一律回到 `U`, `U=u_i`, `Y(x)`,
`Q_i(du)=q_phi(U in du|O=o_i)`。

## 先给结论

我们当前主要建模的对象是 **unit-specific mechanism**。对固定的研究
context $C=c_0$，它写成

\[
f_{u,c_0}(x,e)\equiv f(x,e;u,c_0).
\]

**Unit Mechanism Learning** 是我们形式化的学习框架：每个 observation 背后有一个
latent modeled unit；从 admissible evidence 推断该 unit 的 candidate representations，
并学习一个由 representation 调节的共享 mechanism family，从而得到不同 unit 的
unit-specific mechanisms。

**Context Mechanism Learning** 是平行的扩展方向：它研究同一 unit 的 mechanism
如何随 context 改变，以及这种变化如何支持跨环境迁移与 transport。当前研究先固定
context，专注 unit heterogeneity；Context Mechanism Learning 暂不展开。

最短的口径是：

> Unit Mechanism Learning 学习同一 context 下不同 token 如何生成 outcome；
> Context Mechanism Learning 学习同一 token 的生成机制如何随 context 改变。
> actual `u` 服务于反事实中的 same-token linkage，`q_phi(u|O)` 表达 learner
> 对它的 candidate uncertainty；$C$ 服务于迁移中的
> cross-context linkage。

## 一条完整语法，两个异质性轴

完整的 outcome-generation grammar 是

\[
Y\leftarrow f(X,E;U,C),
\qquad
f_{u,c}(x,e)\equiv f(x,e;u,c).
\]

四个角色不能合并：

- $X$ 是这一次 mechanism call 的 input；在普通 ML slice 中，看到的 $X=x$ 也先作为
  learner abduct unit 的 factual evidence；
- $E$ 是这一次 event 的 randomness；
- $U$ 是 structural law 中的 model-level unit-selection variable；actual token 的
  embedding realization 记为 $u$，learner 对它保持 candidate uncertainty；
- $C$ 是 environment、institution、domain、task 或 regime 等 context。

这条语法允许两种不同的异质性：

\[
\underbrace{f_{u_1,c_0}\not\equiv f_{u_2,c_0}}
_{\text{fixed context, unit heterogeneity}},
\qquad
\underbrace{f_{u,c_1}\not\equiv f_{u,c_2}}
_{\text{fixed unit, context heterogeneity}}.
\]

第一个方向是当前的 Unit Mechanism Learning；第二个方向是未来的 Context
Mechanism Learning。二者可以放在 **Unit/Context-Specific Mechanism Learning**
这个更大的 umbrella 下，但不应因此模糊当前主线。

这里的 \(\not\equiv\) 表示框架**允许** unit / context heterogeneity；它不要求任意两个
unit representations 或 context labels 都决定不同的 mechanism。

## 对象与框架不是同一层

在固定 context $c_0$ 下，我们真正关心的 modeling object 是一族
unit-specific mechanisms：

\[
\mathcal F_{c_0}
=\{f_{u,c_0}:u\in\mathcal U\}.
\]

每个 observation 实际来自一个 latent modeled token。observation index 只是 bookkeeping；
$U$ 的 realization $u$ 同时指这个 token/unit 及其 embedding。在声明的 context / 时间尺度内，
token 与 embedding 默认一一对应。这是一条 modeling assumption，不是 one-shot 数据已经识别了
latent coordinate system 或 actual $u$；不需要额外引入 active $I\to h(I)$ 层。

世界侧先有 $U=u^\star$。当这个 token 面对 $X=x$ 并经历 $E=e$ 时，unit outcome 是

\[
Y=f_\theta(x,e;u^\star).
\]

样本编号不参与这次计算。learner-side 只看到 predictors $X=x$，所以必须先把 $x$
当作 evidence 认识这个 token，再调用生成器。普通 factual prediction 的完整 bridge 是

\[
X=x
\xrightarrow{\text{abduction about }u^\star}
\widehat u_\phi(x)\ \text{or}\ q_\phi(u\mid x)
\xrightarrow[\text{query }x]{f_\theta}
Y.
\]

一般任务可把 factual evidence 记为 $O$，并调用直接学习的 abduction operator：

\[
q_\phi(du\mid O):=\mathcal A_\phi(O)(du).
\]

这里 \(\mathcal A_\phi\) 与 \(q_\phi\) 是同一个直接学习的 stochastic abduction interface，
不是两套不同的 sampler / posterior。`q_phi(u|O)` 表示 learner 尚不能排除哪些 candidate
representations；它不表示 physical unit 每次调用时重新获得 identity，也不表示 observation
同时属于多个 units。point abduction 则直接输出 $\widehat u_\phi(O)$。

三条路线对应三种不同的 learner commitment：

1. **Point**：$\widehat u_\phi(x)=a_\phi(x)$，把 unit 定位为一个 candidate embedding；
2. **Gaussian**：$q_\phi(u\mid x)=\mathcal N\{u;\mu_\phi(x),\Sigma_\phi(x)\}$，
   用中心与有限 covariance 表达局部 candidate uncertainty；
3. **Cauchy**：$q_\phi(u\mid x)=\prod_j\operatorname{Cauchy}
   \{u_j;m_{\phi,j}(x),\gamma_{\phi,j}(x)\}$，用重尾表达对遥远 candidate mechanisms
   保持开放。

Cauchy 的 $m_\phi$ 是 location，$\gamma_\phi$ 是 scale；它没有有限 mean / variance。
这项选择不表示“人的本质服从 Cauchy”，也不表示任何 unit 能生成任何 outcome；outcome
support 仍由 $f_\theta(x,E;u)$ 与 $E$ 决定。

在当前主 observation regime 中，每个 unit 只暴露一次 factual mechanism call：

\[
y^{(n)}=f(x^{(n)},e^{(n)};u^{(n)},c_0),
\qquad \texttt{events\_per\_unit}=1.
\]

这一行只是 actual unit 的完整 unit-specific mechanism 在已实现 input $x^{(n)}$ 上的 factual slice，
不是这个 unit 的全部 response function。Unit Mechanism Learning 在 declared support
与 shared-structure 条件下，依靠 population 中不同 units 的 input variation 与
admissible evidence 学习共享 map

\[
f(x,e;u,c_0),
\]

而不是给 $N$ 个 units 分别拟合 $N$ 个互不相关、无法泛化的函数。并且 token–embedding
一一关系不要求 response map $u\mapsto f_u$ injective：
不同 units 可以有不同 representations，却位于同一 response-equivalence class。

## 与 SCM 的关系：shared assignment 也会诱导 unit-specific slice

标准 SCM 的 outcome assignment 可写成

\[
Y=f_Y(X,\varepsilon),
\qquad
\varepsilon=(U,E),
\qquad
f_u^{\mathrm{SCM}}(x,E):=f_Y(x;u,E).
\]

第一式的 $f_Y$ 是 population-shared structural assignment；固定 $U=u$ 后，SCM 本来也
诱导 unit-specific response map。observation/event indices 若在 longitudinal extension 中出现，
只负责 bookkeeping；persistent token realization 与 event-level noise 的分解仍是 $U=u$ 与 $E$。

因此 UML 的 novelty 不是“SCM 不能表达 unit-specific $f$”。更准确的差异是：

- 把 $f_{u,c}$ 这类 unit-conditioned instances 设为 primary modeling objects；
- 把 persistent $U$、event-level $E$、admissible evidence $O$ 与 mechanism input $X$ 分开；
- 在 one-shot population 中，把由 abduction result 与 generator 合成的 predictive distribution
  $p_{\phi,\theta}(y\mid O,x)$ 设为直接可学习目标，同时明确 identity assumption 不等于
  actual latent coordinate / physical mechanism 已被 factual prediction 识别。

完整 checksum 是：
**world side 的 $U=u^\star$ → predictors $X=x$ 作为 factual evidence → point / Gaussian /
Cauchy abduction result → 用同一个 $x$ 查询 $f_\theta(x,E;u)$ → predictive outcome**。
如果要写 distribution，可用

\[
p_{\phi,\theta}(y\mid O,x)
=\int p_\theta(y\mid x,u)q_\phi(u\mid O)\,du,
\qquad
p_\theta(y\mid x,u):=\mathcal L_E\{f_\theta(x,E;u)\}.
\]

shared family (f) 与它的
unit-conditioned instances $f_{u,c}$ 描述 abduction 后如何计算 outcome。对象称
`unit-specific mechanism`，构造关系称 `unit-conditioned instance`；不用容易暗示人为定制的
`unit-tailored`。

因此层级应稳定写成：

1. **unit-specific mechanism**：主要 modeling object；
2. **Unit Mechanism Learning**：学习这族对象的一般框架；
3. **Context Mechanism Learning**：研究 context heterogeneity 的平行扩展；
4. **Unit/Context-Specific Mechanism Learning**：需要同时讨论两条轴时使用的 umbrella。

## 为什么 `events_per_unit=1` 是主设定

`events_per_unit=1` 是有意选择的 data regime，不是因为 simulator 无法生成更多结果，
也不是等待 repeated observations 来补齐的缺陷。训练数据保持

\[
\mathcal D_N=\{(O^{(n)},X^{(n)},Y^{(n)})\}_{n=1}^N,
\qquad
Y^{(n)}=f_\theta(X^{(n)},E^{(n)};u^{(n)},c_0),
\]

所以每个 unit 只贡献一个 observed factual outcome。当 $X$ 是 action、dose 或
treatment 时，这正对应 causal inference 的基本 observation pattern：我们只看见
assigned intervention 下的 $Y^{(n)}(X^{(n)})$，看不见同一个 token 在 alternative
interventions 下的 outcomes。

未观测不等于不存在。world side 用同一个 $u$ 定义这个 token 面对不同 target inputs 时的
完整 response mechanism；学习信号来自 **跨 units 的 input / intervention variation**，
以及 (\mathcal A,f) 的共享结构，而不是要求每个 unit 亲自经历多个 treatments。

Synthetic data 可以由声明的 DGP 为同一个 hidden $u$ 保留完整 alternative-input
response grid，但这份 grid 只能由 evaluator 使用。它不是额外 factual events，不能进入
training、early stopping 或 model selection。

如果现实数据确实有同一 unit 的 repeated natural events，可以另建 longitudinal 或
(N)-of-(1) protocol 来研究 within-unit persistence 与 unit/event separation；但
(K>1) 是不同的数据 regime，也不等价于观察到了 alternative interventions。

## 为什么引入 $U$：反事实需要 same-unit linkage

反事实问题不是比较两个随机抽到的人，而是追问：同一个 unit 在 alternative
input、action 或 treatment 下会怎样。要把 factual query 与 alternative-world
query 连接起来，必须有一个在两次 mechanism calls 之间保持的 unit anchor：

在 learner-side prediction 中，这表示只用 factual predictors $x^{\mathrm F}=x$ 做一次
abduction，并在改变 target input 时复用其 point / Gaussian / Cauchy result：

\[
\widehat u_\phi(x)\quad\text{or}\quad q_\phi(u\mid x)
\qquad\text{is held fixed while the query changes.}
\]

不能用 alternative $x'$ 重新计算 $\widehat u_\phi(x')$ 或 $q_\phi(u\mid x')$；那会改变
“这个 token 可能是谁”的判断，回答另一个 population prediction，而不是 same-token query。

\[
\text{factual: }Y(x)\leftarrow f_\theta(x,E;U=u^\star,c_0),
\]

\[
\text{alternative query: }Y(x')\leftarrow f_\theta(x',E^{\star};U=u^\star,c_0).
\]

两式在 world side 保持同一个 token realization $U=u^\star$。至于 $E^{\star}$ 与 factual event noise 如何 coupling，
必须由具体 counterfactual semantics 说明；不能因为固定了 $u^\star$，就静默假设所有
event randomness 也相同。

所以更严谨的说法是：

> 固定的 actual token realization $U=u^\star$ 提供 same-unit linkage，使 individual-level
> counterfactual reasoning 可以被形式化。

但 $U$ 的出现本身不等于 counterfactual effect 已经识别。还需要说明 $X$ 的
causal role、intervention semantics、support、mechanism stability 与必要的
world-linking assumptions。

## 为什么引入 $C$：迁移需要 cross-context linkage

迁移问题问的不是“这个人是谁”，而是当 environment、institution、domain、task
或 regime 改变时，哪些 mechanism 保持，哪些 mechanism 改变。

固定 unit $u$，Context Mechanism Learning 研究

\[
c_1\longrightarrow f_{u,c_1},
\qquad
c_2\longrightarrow f_{u,c_2},
\]

以及能否从已观测 contexts 学到对新 context 有效的 mechanism。它服务于
transfer learning、domain generalization 与 causal transportability，但需要额外的
cross-context data、support、invariance 或 transport assumptions。

并非任何 distribution shift 都意味着 $f_{u,c}$ 改变。如果变化只来自 unit
composition、sampling、measurement 或 input distribution，它应进入 observation /
sampling model，而不应自动写成 context-specific mechanism variation。

## 当前切片：固定 context，先研究 unit heterogeneity

当前 research program 采取一个有意识的切片：

\[
C=c_0,
\qquad
Y\leftarrow f(X,E;U,c_0)
\equiv f_U(X,E).
\]

当前问题是：能否把 predictors $X=x$ 作为 factual evidence，学习关于 actual unit 之
candidate representations 的可靠 point / Gaussian / Cauchy abduction result，使 unit-specific
mechanisms 在共享的 unit-modulated family 中保持简单、可学习？

\[
y^{(n)}
=a(u^{(n)})+b(u^{(n)})^\top x^{(n)}+\sigma(u^{(n)})e^{(n)}
\]

是一个可操作的简单 family，但不是 Unit Mechanism Learning 的定义。Cauchy-affine
同样只是当前 tractable specialization，不承担整个框架的概念新颖性。

Context Mechanism Learning 不是被否认，而是被战略性推迟：等 query 真正要求
alternative-context prediction、cross-domain transfer 或 transport 时，再引入相应的
数据与 assumptions。

## Outcome prediction 是 abduction 与 generation 的合成

普通 outcome prediction 看起来只学习

\[
\widehat p(y\mid x)
\approx p_{\mathrm{obs}}(y\mid X=x).
\]

但在当前 ontology 中，它被显式拆成

\[
X=x
\xrightarrow{\text{abduction}}
\widehat u_\phi(x)\ \text{or}\ q_\phi(u\mid x)
\xrightarrow[\text{same factual query }x]{f_\theta}
\widehat Y.
\]

同一个 $x$ 既是 identity evidence，也是 factual mechanism query；这两个角色相同数值、
不同逻辑。它们都来自 observed predictors，并不保证每个 predictor 都是 $Y$ 的 causal parent。

它不需要显式区分 outcome 是由哪个 latent modeled unit、哪次 event noise 或哪个 context
生成的。Observation / sampling process 决定哪些 events 进入数据；预测时没有被
$X$ 揭示的生成因素，则被边缘化进同一个 observational conditional law：

\[
\text{outcome generation}
+\text{observation and sampling}
+\text{marginalization}
\Longrightarrow P_{\mathrm{obs}}(Y\mid X).
\]

在当前固定 context $C=c_0$ 的研究切片中，普通 predictor 主要混合或边缘化
$U$ 与 $E$。只有当数据跨越多个 contexts 时，context composition 才会进一步混入
预测律。Unit Mechanism Learning 试图保留其中的 unit heterogeneity；Context
Mechanism Learning 则在跨 context query 真正出现时处理 context heterogeneity。

反方向通常不唯一：同一个 predictive law 可以由不同的 mechanism、unit composition
与 event-noise structure 产生。因此，prediction 是生成结构的一种观测投影，而不是
生成结构本身。

## 最终 canonical wording

中文口径：

> **Unit-specific mechanisms 是我们当前主要建模的对象。Unit Mechanism Learning
> 是我们形式化的一般学习框架：假设每个 latent modeled unit 有一个稳定、唯一的
> representation，从 admissible evidence 中推断其 candidate-representation uncertainty，
> 并学习由 representation 调节的共享 mechanism family，从而描述同一 context
> 下的 unit-level outcome heterogeneity。Context Mechanism Learning 是平行但暂未展开
> 的研究方向，它研究同一 unit 的 mechanism 如何随 context 改变，以及这种变化如何
> 支持 transfer 与 transport。actual $U=u^\star$ 提供反事实推理所需的 same-unit linkage，$C$
> 提供跨环境迁移所需的 cross-context linkage。主 observation regime 有意固定
> `events_per_unit=1`：每个 unit 只暴露一个 factual outcome，alternative-input
> responses 保持未观测；信息来自跨 units 的 input variation 与共享机制结构。**
> **One-shot 直接学习的是 reduction 后的 conditional response law，不是 actual latent
> coordinate、identity map、unit/event split 或 physical mechanism。**

English canonical wording:

> **Unit-specific mechanisms are the primary modeling objects of our current
> research. Unit Mechanism Learning is the general framework we introduce by
> positing one stable, unique representation for each latent modeled unit,
> inferring an evidence-conditioned distribution over candidate representations, and learning
> a shared, unit-modulated mechanism family whose unit-conditioned instances are
> the primary modeling objects and describe
> heterogeneous outcome generation within a fixed context. Context Mechanism
> Learning is a parallel, currently deferred direction concerned with
> context-level mechanism variation and cross-context transport. The unit
> variable provides the same-unit linkage required for individual-level
> counterfactual reasoning, whereas the context variable provides the
> cross-environment linkage required for transfer and transport.  The primary
> observation regime deliberately fixes `events_per_unit=1`: each unit reveals
> one factual outcome, alternative-input responses remain unobserved, and the
> learning signal comes from input variation across units together with shared
> mechanism structure. The reduced conditional response law is the direct one-shot learning
> target; the identity map, actual latent coordinate, or physical mechanism is not.**

## 需要守住的六条边界

1. $u$ 是 $U$ 的 token/embedding realization，不是 sample ID；identity encoding 是 assumption，不是 one-shot identification。
2. $q_\phi(u\mid x)$ 是 learner 对同一个 actual token 的 epistemic uncertainty，不是 world-side identity redraw。
3. Cauchy 有 location / scale、没有有限 mean / variance；重尾不等于任意 unit 能生成任意 outcome。
4. 反事实 query 固定 factual $x$ 的 abduction result，只把 query 改成 $x'$；引入 $U$ 仍不自动获得 counterfactual identification。
5. $C$ 不是一个吞掉所有未观测变化的容器；引入 $C$ 也不自动解决 cross-context transfer。
6. SCM 的 shared assignment 本来也可诱导 unit-specific response maps；本文主张的是
   primary object、role separation 与 one-shot target，不是新的 SCM expressivity。

这篇文章固定的是研究层级与用词。具体 Cauchy family、learnability、causal
specialization 与 context transport assumptions，应继续由各自的论文和技术页面承担。
