# A和B的推导

$$A(\delta|w)$$是$$L(w+\delta) - L(w)$$的下界：

令：\
$$f\_i$$：$$f\_i(x,y)$$

## $$A(\delta|w)$$的推导

证明：

$$
L(w+\delta) - L(w)
\= \sum\_{x,y}\tilde P(x,y)\sum\_{i=1}^n\delta\_if\_i - \sum\_x\tilde P(x) \log \frac{Z\_{w+\delta}(x)}{Z\_w(x)}
$$

当a>0时，$$-\log a \ge 1-a$$，得：

$$
(1) \ge \sum\_{x,y}\tilde P(x,y)\sum\_{i=1}^n\delta\_if\_i + \sum\_x\tilde P(x)(1-\frac{Z\_{w+\delta}(x)}{Z\_w(x)})
\= \sum\_{x,y}\tilde P(x,y)\sum\_{i=1}^n\delta\_if\_i + \sum\_x\tilde P(x) - \sum\_x\tilde P(x)\frac{Z\_{w+\delta}(x)}{Z\_w(x)})
$$

根据$$\tilde P(x)$$可知$$\sum\_x\tilde P(x)=1$$，得：

$$
(2) = \sum\_{x,y}\tilde P(x,y)\sum\_{i=1}^n\delta\_if\_i + 1 - \sum\_x\tilde P(x)\frac{Z\_{w+\delta}(x)}{Z\_w(x)})
$$

根据【？】，得：

$$
(3) = \sum\_{x,y}\tilde P(x,y)\sum\_{i=1}^n\delta\_if\_i(x,y) + 1 - \sum\_x\tilde P(x)\sum\_yP\_w(y|x)\exp \sum\_{i=1}^n\delta\_if\_i(x,y)
$$

即$$A(\delta|w)$$

## $$B(\delta|w)$$的推导

**一次只优化其中一个变量**$$\delta\_i$$**，而固定其它变量**$$\delta\_j,i \neq j$$，得：\
【？】是一只优化一个$$w\_i$$还是一个$$\delta\_i$$？ 【？】如果是只优化一个$$w\_i$$，为什么不能直接假设其它$$\delta\_j=0$$？\
【？】如果是只优化一个$$\delta\_i$$，为什么算法6.1步骤2-(b)只更新一个$$w\_i$$？

后面的推导不难，只是这一块没想通，就不往下记了。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://windmising.gitbook.io/lihang-tongjixuexifangfa/option/10.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
