# 学习 Unit-Level Response Function

> Version: `UNIT-LEVEL-RESPONSE-FUNCTION-LEARNING-2026-07-16-V8`  
> Status: technical note; clarified default model and extension boundary  
> Public projection: `https://research.wehub.us/blog/hcgm/discussions/unit-level-response-function-learning/`

## 摘要：先 abduce possible units，再预测 response

一个 observation 实际来自**一个** latent modeled unit。当前 active ontology 不把
observation index 提升为 unit 变量：模型级 unit-selection variable 是 $U$，一次
realization $U=u$ 就是一个 token/unit 及其 embedding。共享机制先写成

\[
Y(x)=f_\theta(x,E;U),
\qquad
Y_u(x):=f_\theta(x,E;u).
\]

数据行号、sequence position 与 event index 都只是 bookkeeping。$U$ 的 realization $u$
同时指 token/unit 及其 embedding；默认 token 与 embedding 一一对应，而不是 one-shot 数据
已经识别 latent coordinate：

本页后续出现的 observation/event 下标仅是 bookkeeping 或 literature bridge；active
ontology 始终回到 `U`, `u`, `Y(x)=f_theta(x,E;U)`。

也就是说，token–embedding one-to-one 是 ontology / modeling assumption，不是 one-shot 数据
已经识别出的 latent coordinate；可逆重参数化仍可给出另一套等价坐标。$I\to h(I)$ 若在
历史或外部文献中出现，只是可选 encoding bridge，不是 active canonical 第一层。

由于 actual `u` 不可见，factual evidence 并不会确定它是哪一个 token，而只给出
candidate representations 的 learner-side abduction uncertainty：

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

因此最自然的叙事是：

1. 先对 evidence 做 abduction，判断 actual token 可能对应哪些 candidate embeddings；
2. 对每个 candidate $u$，直接调用 $Y_u(x)=f_\theta(x,E;u)$；
3. 综合这些生成结果，得到 reader-facing predictive distribution：

\[
p_{\phi,\theta}(y\mid O,x_\star)
=
\int p_\theta(y\mid x_\star,u)\,q_{\phi}(u\mid O)\,du.
\tag{1}
\]

其中 $p_\theta(y\mid x,u)$ 只是 $f_\theta(x,E;u)$ 对 event noise $E$ 诱导的
distribution，不是另一个需要学习的模型。更直观的 end-to-end sampling 写法是

\[
\widetilde u\sim q_\phi(u\mid O),
\qquad
\widetilde E\sim p_E,
\qquad
\widetilde Y=f_\theta(x_\star,\widetilde E;\widetilde u).
\]

如果 outcome 没有统一 density，严格含义仍可无损地写成

\[
\Pr_\theta\{Y(x)\in A\mid U=u\}
=\Pr_E\{f_\theta(x,E;u)\in A\}.
\]

ordinary factual prediction 默认 $O=X=x$ 且 $x_\star=x$：同一个数值 $x$ 一方面是
abduction evidence，另一方面是 unit mechanism 的 factual query。它们是两个逻辑角色，不要求是两组不同变量。

abduction result 有三条基本路线：

\[
\begin{array}{lll}
\textbf{Point:}&\widehat u_\phi(x)=a_\phi(x),
&\text{直接定位一个 candidate embedding};\\[2pt]
\textbf{Gaussian:}&q_\phi(u\mid x)=\mathcal N\{u;\mu_\phi(x),\Sigma_\phi(x)\},
&\text{局部、轻尾且具有有限 moments};\\[2pt]
\textbf{Cauchy:}&q_\phi(u\mid x)=\prod_j\operatorname{Cauchy}
\{u_j;m_{\phi,j}(x),\gamma_{\phi,j}(x)\},
&\text{重尾、全局开放的 candidate-mechanism uncertainty}.
\end{array}
\]

Point 假设 evidence 足以给出一个 usable unit estimate；Gaussian 承认不确定性，但仍把 plausible
units 组织在一个有限 covariance 的局部邻域中；Cauchy 则不让“离典型个体很远”本身成为快速
排除 candidate mechanism 的理由。Cauchy 有 location / scale，没有有限 mean / variance。
但 full support 不意味着任何 individual 都能生成任何 outcome；那仍由 $f_\theta$ 与 $E$ 的
support 决定。

因此可以同时说：

> **我们学习 shared unit-response family；把 predictors $X=x$ 当作 factual evidence 对
> same actual token 做 point / Gaussian / Cauchy abduction；再把同一个 $x$ 作为 factual
> query 送入 generator，预测 $Y$。**

本页的 current default tractable setting 是：

\[
\boxed{
\text{neural Cauchy abduction}
+
\text{bilinear unit response}
+
\text{exact distributional reduction}
}
\]

这是当前默认工作模型，不是框架定义。Cauchy、continuous $U$、bilinear mechanism 与 closed-form reduction 都可以被替换；替换后需要重新承担相应的统计、计算与识别义务。

---

## 1. 先把 actual unit、candidate unit、query 与 prediction 分开

训练数据写成

\[
\mathcal D_N=\{(O^{(n)},X^{(n)},Y^{(n)})\}_{n=1}^N.
\]

这些对象承担不同职责：

| 对象 | 职责 |
|---|---|
| $U=u$ | 该 observation 背后的 token/unit embedding realization |
| $Y(x)=f_\theta(x,E;U)$ | model-level shared mechanism；固定 $u$ 后得到 token slice |
| $O$ | factual evidence；普通 regression 默认 $O=X=x$ |
| `q_phi(u|O)` | 对 actual `u` 的 learner-side candidate distribution；不是 physical identity 重抽 |
| $X=x$ / $x_\star$ | $x$ 同时是 ordinary factual evidence 与 factual query；$x_\star$ 可为 alternative query |
| $Y^{(n)}$ | 第 $n$ 行 observation 的 factual outcome |

默认 observational regression 取 $O=X=x$，但这不合并两条路径：

\[
x
\xrightarrow{\text{abduction}}
\widehat u_\phi(x)\ \text{or}\ q_\phi(u\mid x),
\qquad
(x,u,E)\xrightarrow{f_\theta}Y.
\]

真实 event 背后只有一个 token；`q_phi(u|O)` 描述学习者尚不能排除哪些 candidate embeddings，
不是说这个 event 同时属于多个 units。当前 continuous Cauchy default 因而对应连续的
latent modeled-unit space，而不是在一张有限人员名册上随机抽 ID。

若要对同一 unit 做 alternative-input query，应固定 factual $x$ 形成的 abduction result，只改变 query：

\[
p_{\phi,\theta}(y^\star\mid X=x,x_\star)
=
\int p_\theta(y^\star\mid x_\star,u)
q_\phi(u\mid X=x)\,du.
\tag{2}
\]

不能把 `x_star` 偷换成新的 evidence 并重新计算 `q_phi(u|x_star)`；point 路线也不能改成
`u_hat_phi(x_star)`。那会回答另一个 population conditional-composition 问题，而不是同一 factual
token 的 response query。世界侧的 actual token 没变；learner side 也应保持由 factual $x$
得到的同一个 abduction result。

## 2. 当前默认模型：复杂 abduction，双线性 unit response

### 2.1 Neural stochastic abduction

abduction network 从 evidence 直接输出 Cauchy location 与 positive scale：

\[
(m_{\phi,U}(O),\gamma_\phi(O))=g_\phi(O),
\]

\[
q_\phi(du\mid O)
=
\prod_{j=1}^d
\operatorname{Cauchy}
\{du_j;m_{\phi,U,j}(O),\gamma_{\phi,j}(O)\}.
\tag{3}
\]

$g_\phi$ 可以是复杂神经网络。这里的 $q_\phi$ 是直接学习的、关于 actual latent
unit 之 candidate representations 的 abduction distribution；除非另行声明 prior、evidence
likelihood 与 Bayes construction，否则不把它无修饰地称作 exact posterior。它也不是
function posterior：function-space uncertainty 只会在后面通过 $u\mapsto[x\mapsto f_\theta(x,E;u)]$
push forward 派生出来。

式 (3) 的 $m_{\phi,U}(O)$ 是 Cauchy location 参数，不是 mean；$\gamma_\phi(O)$ 是 scale，
不是 standard deviation。Cauchy 没有有限 mean / variance。

### 2.2 Shared bilinear unit-response family

当前 first tractable family 采用

\[
Y
=
\alpha+\beta^\top x+a^\top U+x^\top BU+\sigma E,
\qquad
E\sim\operatorname{Cauchy}(0,1).
\tag{4}
\]

固定一个 candidate representation $u$ 后，它决定一条 unit-specific affine response：

\[
r_u(x)
=
(\alpha+a^\top u)
+
(\beta+Bu)^\top x.
\tag{5}
\]

所以 $u$ 同时调制 intercept 与 slope；所有 units 又共享同一组 $(\alpha,\beta,a,B)$。我们不是为每个 sample 独立拟合一条任意函数，而是在跨 unit 数据中学习一个 low-complexity、unit-modulated family。

Token–embedding one-to-one 不要求 response map
$u\mapsto[x\mapsto p_\theta(y\mid x,u)]$ 也 injective。不同 units 可以有不同 representations，却在目标
support 上决定相同的 response function：

\[
u\sim_R v
\iff
p_\theta(\cdot\mid x,u)=p_\theta(\cdot\mid x,v)
\quad\text{for all }x\in\mathcal X_{\mathrm{target}}.
\]

这一区分很重要：unit identity、unit representation 与 response-equivalence class 是三个层次。

“fixed-$u$ 对 $x$ 线性”本身还不足以得到下面的 Cauchy closed form。式 (4) 更强：固定 $x$ 后，response 对 $U$ 也 affine，并且 $U_j$ 与 event noise 采用声明过的独立 Cauchy construction。

### 2.3 Exact reduced response

令

\[
g(x)=a+B^\top x.
\]

由 Cauchy 的 affine stability，

\[
Y\mid O=o,X=x
\sim
\operatorname{Cauchy}\{m_Y(o,x),s_Y(o,x)\},
\tag{6}
\]

其中

\[
m_Y(o,x)
=
\alpha+\beta^\top x+g(x)^\top m_{\phi,U}(o),
\tag{7}
\]

\[
s_Y(o,x)
=
\sigma+
\sum_{j=1}^d|g_j(x)|\gamma_{\phi,j}(o).
\tag{8}
\]

ordinary factual prediction 再令 $o=x$。注意 $m_Y$ 是 Cauchy location（也是 median 与 mode），不是不存在的 mean；$s_Y$ 是 scale，不是 standard deviation。

尽管每条 fixed-unit response 对 $x$ 是 affine，最终 $m_Y(x,x)$ 与 $s_Y(x,x)$ 仍可高度 nonlinear / heteroscedastic，因为 $m_{\phi,U}(x),\gamma_\phi(x)$ 来自神经网络。

## 3. 为什么这样分配复杂性？

### 3.1 为什么 abduction 可以复杂，而 response 保持简单？

这个不对称是有意的 modeling bet：

> 从有限、高维、含噪 evidence 反演“actual unit 的哪些 candidate representations 仍然 plausible”是困难的 inverse problem；条件于任一 candidate representation，forward response 应当能够落在一个简单、共享、可检验的 family 中。

它带来四个具体好处：

1. **Representation linearization。** 神经网络负责从 evidence 定位能让 downstream unit response 线性化的 candidate coordinates；线性约束施加在 fixed-unit mechanism，而不是 population predictor。
2. **One-shot sharing。** 每个 unit 只有一次 factual target，无法独立拟合一条任意函数；共享的 bilinear family 让其他 units 的数据能够约束当前 response。
3. **可读的 heterogeneity。** $\alpha+a^\top u$ 与 $\beta+Bu$ 分别给出 unit-modulated intercept 与 slope；observable slope geometry 还受到 $\beta+\operatorname{col}(B)$ 的低秩约束。
4. **解析 reduction。** 对 $x$ 与 $U$ 的 double-affine structure 能与 Cauchy law 精确合成，不引入 latent Monte Carlo variance。

这是 inductive bias，不是“真实世界的所有 causal mechanisms 都线性”的主张。若数据需要 nonlinear response，应该扩展 mechanism，并明确为更高 flexibility 支付的识别与计算代价。

### 3.2 为什么当前选 Cauchy，而不是 Gaussian？

Cauchy 的理由是两项性质的组合：

1. **Affine stability 与简单 scale algebra。** independent Cauchy coordinates 经过 affine mechanism 后仍是 Cauchy，location 与 scale 可按式 (7)–(8) 精确传播。
2. **Heavy-tail robustness candidate。** Cauchy negative log likelihood 对大 residual 只呈 logarithmic growth；其 location score 在极端 residual 下会衰减，而 Gaussian squared-error score 会继续增长。
3. **Globally open abduction。** 如果 factual predictors 尚未排除一个遥远的 candidate unit
   mechanism，Cauchy 不会像 Gaussian 那样仅因其离中心较远就指数级压低它。这对应“个体
   mechanism uncertainty 不必被平均个体附近的有限 covariance 困住”的建模直觉。

但必须同时写出边界：

- Gaussian **同样**在 affine transformation 下 closed form；解析性本身不是 Cauchy 独有的优势；
- Gaussian 有有限 moments，在 light-tailed、well-specified 数据中可能更高效、更容易解释；
- Cauchy 没有普通 mean / variance，不能无条件用 conditional mean、MSE 或标准 CATE 语言描述 target；
- globally open candidate support 不是 outcome universality：任何给定 $u$ 能生成哪些 outcomes，
  仍由 $f_\theta(x,E;u)$ 和 event-noise support 限制；
- 当前 corrected Causal Regression 稿件只支持特定 corruption setting 下的 robustness signal，并明确要求把 Cauchy loss、architecture 与 unit factorization 分开比较；它不支持“Cauchy universally superior”或“Cauchy 更 causal”的结论。

所以更准确的选择原则是：

> **Cauchy 是当前 heavy-tailed、affine-tractable default；Gaussian 是必须保留的 light-tailed matched alternative。哪一个更好，应由 calibration、tail behavior 与任务损失决定。**

先前 Causal Regression 投稿使用 $Y=f(U,\varepsilon)$ 的 no-explicit-input setting。它提供了“expressive representation + linear Action + Cauchy propagation”的早期 rationale，但只是式 (4) 在 mechanism input 退化后的特殊研究设定，不能反过来定义一般 unit-response function。

## 4. 我们究竟预测什么？

### Factual prediction

\[
p_{\phi,\theta}(y\mid X=x)
=
\int p_\theta(y\mid x,u)q_\phi(u\mid X=x)\,du.
\]

这里同一个 $x$ 先作为 evidence 进入 $q_\phi$，再作为 query 进入 $p_\theta$。这是 factual
likelihood 直接约束的对象，也是普通预测的输出。point 路线把积分替换成
$p_\theta(y\mid x,\widehat u_\phi(x))$。

### Same-unit、单个新 query 的 prediction

\[
p_{\phi,\theta}(y^\star\mid X=x,x_\star)
=
\int p_\theta(y^\star\mid x_\star,u)q_\phi(u\mid X=x)\,du.
\]

这里 actual token 固定；learner 固定 factual $x$ 所给出的同一个 point / Gaussian / Cauchy
abduction result，只改变 $x_\star$。对每个 candidate $u$ 重新调用 generator 后再综合；
stochastic 路线不要求先选出一个确定 unit。

### Formal appendix view：function-space law 与 joint realized outcomes

如果确实要表达“哪些 unit-response functions 与 evidence 相容”，可以把 selection law push forward：

\[
\mathcal Q_{\phi,\theta}(d\mathcal F\mid O)
=
\bigl(u\mapsto[x\mapsto p_\theta(\cdot\mid x,u)]\bigr)_\#q_\phi(du\mid O).
\tag{9}
\]

这是派生的 function-space view，不是普通 prediction 必须输出的对象，因此读者面不以 kernel
记号开场。若 $u\mapsto[x\mapsto p_\theta(\cdot\mid x,u)]$ 非 injective，pushforward 会自然合并
response-equivalent candidate units，也因此不能从 function law 反推出完整 identity code。

若要生成一条跨多个 queries coherent 的 sampled response function，语义上应让同一个 candidate `u` 贯穿这些 queries；若还要得到 joint realized outcomes `Y(x_1),...,Y(x_m)`，则必须进一步声明 event-noise / cross-world coupling。各 query 的 marginal response laws 本身不能决定这个 joint law。

## 5. One-shot 能支持什么 claim？

每个 sampled unit 在训练中只贡献一个 factual target event：

\[
\#\{(X^{(n)},Y^{(n)})\text{ factual target events for observation }n\}=1.
\]

因此数据最直接支持的是 composed prediction $p_{\phi,\theta}(y\mid O,x)$，而不是唯一 latent
coordinate 或真实 physical response curve。Token–embedding 一一关系可以作为 ontology assumption，
但 one-shot fit 并不识别坐标系或 actual $u$。至少要分开三层验收：

| 层次 | 可以检查 | 不能自动推出 |
|---|---|---|
| Conditional response | NLL、CRPS、quantile / interval calibration、tail behavior | 已恢复真实 $U$ |
| Candidate-unit abduction | stability、known-latent simulation、invariance / anchor tests | 已定位 actual unit 或分解唯一 |
| Response function | evaluator-only curve、alternative-input oracle、function distance | causal / counterfactual identification |

只观察 factual diagonal $p(y\mid O=x,x)$ 时，off-diagonal
$p(y\mid O=x_{\mathrm{obs}},x_\star)$ 是由 shared family 与 support 支撑的结构外推。要把
$x_\star$ 称作 intervention 或 counterfactual，还需额外的 treatment semantics、
exchangeability / design、positivity、stability 与 coupling assumptions。

## 6. 与其他方法是什么关系？

这条线不是靠“以前没人允许 unit-specific functions”来成立。更准确的学术位置是把已有组件组合成一个明确 contract：**one latent unit + evidence-conditioned abduction uncertainty over candidate representations + candidate-specific response evaluation in a shared family + reduced conditional prediction**。

| 方法家族 | 最近的结构关系 | 关键差别 / 可借鉴处 |
|---|---|---|
| [Varying-coefficient models](https://doi.org/10.1111/j.2517-6161.1993.tb01939.x) | observed modifier 决定 intercept / slope | deterministic point-representation special case；通常不推断 actual unit identity |
| [Random coefficients / mixed effects](https://doi.org/10.2307/2529876) | known subject / group 下的 unit-specific coefficients 与 shrinkage | 常依赖 identity label 或 repeated outcomes；最接近经典的 subject-specific latent-effect inference |
| [RECaST](https://www.jmlr.org/papers/v25/22-1369.html) | 用 Cauchy random effect 校准 source model 到 target population，并构造 predictive uncertainty | Cauchy-specific 的组件级近邻；其 random effect 表示 source/target mapping ratio，不是 evidence 对 latent unit identity 的 candidate abduction |
| [Mixtures of experts](https://papers.nips.cc/paper_files/paper/1990/hash/432aca3a1e345e339f35a30c8f65edce-Abstract.html) | gate 混合简单 experts | 离散 $U$ 时计算形状接近；expert 通常是 response type，不自动等于一个 latent unit |
| Amortized latent-variable inference | neural encoder 输出 $q_\phi(u\mid O)$ | 最接近 candidate-representation abduction machinery；这里不默认 prior + KL + exact posterior 语义 |
| [Neural Processes](https://arxiv.org/abs/1807.01622) / Hypernetworks | evidence / task code 直接诱导 function 或 function distribution | function posterior / generator 可是 primary object；这里 primary stochastic object 在 unit-representation space，function law 是 pushforward |
| Direct conditional density estimation | 直接学习 $p(y\mid O,x)$ | 必须保留的 observational benchmark；可检验 unit factorization 是否增加价值 |
| HTE / dose-response / SCM | treatment-indexed response 与 counterfactual semantics | 只有加入识别和 world-linking assumptions 后才成为 causal specialization |

当 $q_\phi$ 足够灵活且训练只看 factual diagonal 时，这个模型在 observational prediction 上可能与 neural varying-coefficient model、continuous mixture of linear experts 或 direct conditional predictor 等价。可辩护的新意必须落在 explicit candidate-unit abduction contract、same-unit query、可检验的 shared geometry，以及明确的 claim gates 上，而不是“每个 unit 有一条函数”本身。

## 7. 默认设定不是最终答案

框架真正固定的是以下层次：

\[
U=u\quad\text{(actual token realization)},
\qquad
X=x\mapsto \widehat u_\phi(x)\ \text{or}\ q_\phi(u\mid x),
\qquad
u\mapsto[x\mapsto f_\theta(x,E;u)],
\qquad
p_{\phi,\theta}(y\mid x)=\int p_\theta(y\mid x,u)q_\phi(u\mid x)\,du.
\]

当前 Cauchy-bilinear setting 是第一个便于分析、实现和证伪的 default。后续可以替换：

| 维度 | 当前默认 | 可扩展候选 | 新义务 |
|---|---|---|---|
| Unit identity contract | $U=u$ 同时指 token/unit 及其 embedding，默认一一对应 | response-equivalence types、nonminimal identity codes、set-valued representation | 定义 unit / equivalence；区分 ontology 与 identification |
| Candidate-representation abduction | point / factorized Cauchy 主路线 | Gaussian、Student-$t$、mixture、flow、implicit sampler | calibration、tail / multimodality 与 reduction method；分清 location/scale 与 moments |
| Unit space | continuous $U\in\mathbb R^d$ | discrete types、hybrid discrete-continuous | label switching、component collapse、type semantics |
| Response family | bilinear / fixed-$u$ affine | shared basis、splines、GLM、monotone or neural mechanisms | complexity control 与 stronger function-level evidence |
| Reduction | analytic Cauchy | Gaussian analytic、quadrature、Monte Carlo | numerical error、sampling variance 与 reproducibility |
| Unit state | static response-relevant $U$ | stable identity + dynamic state / context | temporal ordering 与 state transition |
| Observation regime | one factual target per unit / episode | repeated measures、multi-view evidence、designed interventions | 重新定义 unit、episode 与 claim strength |

两个重要提醒：

- Student-$t$ 的 affine projection 可以保持 Student-$t$，但与独立 Student-$t$ event noise 相加通常不再同族；不能直接复制 Cauchy 的 scale 公式。
- nonlinear response 最好先从 shared basis
  \[
  r_u(x)=\sum_{k=1}^K c_k(u)\psi_k(x)
  \]
  开始，而不是在 one-shot 数据上立即给每个 unit 一张任意 MLP。

<details>
<summary><strong>Seed · 暂不展开：同一物理实体出现多条 records</strong></summary>

若 history 含有同一稳定 response function 在其他 queries 上产生的 outcomes，它们就是 additional evaluations，不能只因被送进 encoder 就继续称该 function 为 one-shot。若 history 只是 admissible pre-query evidence，可进入 $O$；若 context 改变了 response function，则需要定义 unit-in-context episode。这里保留为后续 temporal / longitudinal extension。

</details>

<details>
<summary><strong>Seed · 暂不展开：什么能识别 unit factorization？</strong></summary>

仅靠 factual response fit 通常只能约束 composed prediction $p_{\phi,\theta}(y\mid O,x)$，不能唯一恢复 $q$、
latent coordinates 或 unit / event scale split。即使 ontology 假设 token–embedding 一一对应，
可逆重参数化与 response-equivalent units 仍然存在。可能需要 repeated measures、multi-view
proxies、environments、interventions、anchors 或明确的 invariance restrictions。不同证据设计支持不同强度的结论。

</details>

<details>
<summary><strong>Seed · 暂不展开：更好的 selector 与 response family</strong></summary>

Gaussian、Student-(t)、mixtures、flows、discrete types，以及 spline / GLM / nonlinear shared mechanisms 都是竞争候选。升级标准不是“更 flexible”，而是能否在 matched comparison 中改善 calibration、tail behavior、same-unit query quality 或 function-level recovery，同时保留可解释的 claim boundary。

</details>

<details>
<summary><strong>Seed · 暂不展开：joint curve 与 cross-world coupling</strong></summary>

共享 $U$ 只给出一部分跨-query dependence；joint realized outcome curve 还需要 event noise 如何 coupling。若 query 是 intervention，则还需 causal identification。当前主线只定义 single-query marginal 与 function-space law，不替数据选择 coupling。

</details>

---

## 最短版本

> 一个 observation 实际来自一个 latent modeled unit。Evidence $x$ 经复杂 neural abduction
> 给出它可能对应哪些 candidate units / representations；每个 candidate $u$ 决定一条 bilinear
> family 中的 affine unit-response function；prediction 综合这些 candidate responses，得到
> conditional response，而不是选出一个 unit 或返回一条 unit function。Unit 与 representation
> 的一一关系是 modeling assumption，Cauchy-bilinear 是 tractable default，都不是 one-shot
> 数据自动识别出的最终真相。
