Files
myWiki/concepts/gambling-gibbs.md

53 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Gambling Gibbs"
created: 2026-06-25
updated: 2026-06-25
type: concept
tags: [mcmc, gibbs-sampling, llm, decision-making, betting]
sources:
- "[[large-language-gibbs]]"
---
# Gambling Gibbs
**Gambling Gibbs** 是 Large Language Gibbs 框架中的一种判别式核变体,通过将接受/拒绝决策转化为**赌博gamble**来利用 LLM 的判别能力。与 [[barker-gibbs|Barker Gibbs]] 不同,它不需要 LLM 输出校准过的概率——只需要一个二值的"下注/不下注"决策。
## 核心机制
1. **提议**:从均匀分布中抽取候选值 X_i'
2. **定价**:随机采样赌注金额 V ~ U[0, 100]
3. **展示**:向 LLM 展示a当前值 + 候选值b如果候选值"更合理",下注 $V 将获得 $100
4. **决策**LLM 决定是否下注greedy decoding 单 token
5. **接受**:如果 LLM 下注 → 接受候选值
## 理论基础
LLM 应该只在以下条件下下注:
```
V/100 < q^*(X_{-i}, X_i') / (q^*(X_{-i}, X_i) + q^*(X_{-i}, X_i'))
```
这恰好恢复 Barker 接受概率。关键洞察LLM 的内部信念关于 plausibility 不需要被显式校准——可以通过赌博行为隐式地引出。
## 优势
- **无需校准概率**:仅需二值决策,使用 greedy decoding
- **避免概率失真**:指令微调模型的生成概率可能不可靠,但二值判断通常更鲁棒
- **理论保证**:在合理假设下,接受概率等价于 Barker Gibbs
## 与 Barker Gibbs 对比
| 维度 | Barker Gibbs | Gambling Gibbs |
|------|-------------|----------------|
| 输出格式 | 偏好选择Option 1/2 | 赌博决策Bet/No Bet |
| 概率要求 | 需要 log-prob 计算 | 仅需 greedy token |
| 理论基础 | Barker 规则 | 期望收益最大化 |
| 解码方式 | 需要概率输出 | greedy decoding |
## 参考
- [[large-language-gibbs]] — 提出 Gambling Gibbs 的论文
- [[barker-gibbs]] — 相关判别式核
- [[llm-mcmc]]