1. 噪声分布与最大似然估计的关系
- 噪声类型:矩阵机制中,噪声 η = r ~ − A x \eta = \widetilde{\mathbf{r}} - \mathbf{Ax} η=r −Ax 服从 拉普拉斯分布 η ∼ Lap ( Δ A / ϵ ) \eta \sim \text{Lap}(\Delta_\mathbf{A}/\epsilon) η∼Lap(ΔA/ϵ)。
- 拉普拉斯分布的密度函数:
f ( η i ) = ϵ 2 Δ A e − ϵ ∣ η i ∣ / Δ A . f(\eta_i) = \frac{\epsilon}{2\Delta_\mathbf{A}} e^{-\epsilon |\eta_i| / \Delta_\mathbf{A}}. f(ηi)=2ΔAϵe−ϵ∣ηi∣/ΔA.
其对数似然函数为:
log f ( η ) = 常数 − ϵ Δ A ∥ η ∥ 1 . \log f(\eta) = \text{常数} - \frac{\epsilon}{\Delta_\mathbf{A}} \|\eta\|_1. logf(η)=常数−ΔAϵ∥η∥1.
最大化似然等价于 最小化 ∥ η ∥ 1 \|\eta\|_1 ∥η∥1,即最小化 ∥ r ~ − A x ∥ 1 \|\widetilde{\mathbf{r}} - \mathbf{Ax}\|_1 ∥r −Ax∥1。
2. 非负约束的必要性
- 原始数据特性:数据库 x \mathbf{x} x 由非负整数组成(如人口计数)。
- 伪逆解的缺陷:最小二乘解 x ^ = A † r ~ \widehat{\mathbf{x}} = \mathbf{A}^\dagger \widetilde{\mathbf{r}} x =A†r 可能包含负数,违背实际意义。
- 后处理目标:找到非负且与噪声数据最接近的估计值 x ‾ ≥ 0 \overline{\mathbf{x}} \geq 0 x≥0。
3. 优化问题的数学形式
最终的优化问题为:
x ‾ = arg min x ^ ≥ 0 ∥ r ~ − A x ^ ∥ 1 . \overline{\mathbf{x}} = \arg \min_{\widehat{\mathbf{x}} \geq 0} \|\widetilde{\mathbf{r}} - \mathbf{A}\widehat{\mathbf{x}}\|_1. x=argx ≥0min∥r −Ax ∥1.
其含义如下:
- 目标函数( ∥ ⋅ ∥ 1 \|\cdot\|_1 ∥⋅∥1):最大化拉普拉斯噪声下的似然概率。
- 约束条件( x ^ ≥ 0 \widehat{\mathbf{x}} \geq 0 x ≥0):确保估计值符合现实意义。
4. 具体示例说明
场景:
- 数据库 x = [ x 1 , x 2 ] \mathbf{x} = [x_1, x_2] x=[x1,x2] 表示城市和农村人口,真实值 x = [ 100 , 200 ] \mathbf{x} = [100, 200] x=[100,200]。
- 策略矩阵 A = [ 1 1 1 − 1 ] \mathbf{A} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} A=[111−1],查询总人口和城乡差。
- 噪声响应 r ~ = [ 303 , − 101 ] \widetilde{\mathbf{r}} = [303, -101] r =[303,−101]。
步骤:
-
最小二乘解:
x ^ = A † r ~ = [ 101 , 202 ] . \widehat{\mathbf{x}} = \mathbf{A}^\dagger \widetilde{\mathbf{r}} = [101, 202]. x =A†r =[101,202].
结果非负,可直接接受。 -
若噪声导致负值:
假设 r ~ = [ 300 , 150 ] \widetilde{\mathbf{r}} = [300, 150] r =[300,150],则:
x ^ = A † r ~ = [ 225 , 75 ] . \widehat{\mathbf{x}} = \mathbf{A}^\dagger \widetilde{\mathbf{r}} = [225, 75]. x =A†r =[225,75].
仍为非负,无需优化。 -
需优化的情况:
若 r ~ = [ 290 , 90 ] \widetilde{\mathbf{r}} = [290, 90] r =[290,90],则:
x ^ = A † r ~ = [ 190 , 100 ] . \widehat{\mathbf{x}} = \mathbf{A}^\dagger \widetilde{\mathbf{r}} = [190, 100]. x =A†r =[190,100].
若出现负数(如 x ^ = [ 150 , − 50 ] \widehat{\mathbf{x}} = [150, -50] x =[150,−50]),需通过优化问题修正。
5. 总结
- L1 范数 vs L2 范数:
- 拉普拉斯噪声的 最大似然估计 对应 L1 范数最小化。
- 高斯噪声的 MLE 对应 L2 范数最小化(如最小二乘)。
- 非负约束:
- 强制估计值 x ‾ \overline{\mathbf{x}} x 符合现实数据的非负性。
- 优化问题意义:
- 在满足实际约束(非负)的前提下,最大化观测到噪声数据的概率。