168 lines
6.1 KiB
Markdown
168 lines
6.1 KiB
Markdown
---
|
||
id: wiki-2026-0508-belief-revision
|
||
title: Belief Revision
|
||
category: 10_Wiki/Topics
|
||
status: verified
|
||
canonical_id: self
|
||
aliases: [AGM Belief Revision, Belief Update, Knowledge Revision]
|
||
duplicate_of: none
|
||
source_trust_level: A
|
||
confidence_score: 0.9
|
||
verification_status: applied
|
||
tags: [logic, ai, knowledge-representation, philosophy, reasoning]
|
||
raw_sources: []
|
||
last_reinforced: 2026-05-10
|
||
github_commit: pending
|
||
tech_stack:
|
||
language: Python
|
||
framework: Prolog / answer-set
|
||
---
|
||
|
||
# Belief Revision
|
||
|
||
## 매 한 줄
|
||
> **"매 새로운 information 의 도입 시 의 existing belief set 의 minimal & rational adjustment"**. Alchourrón–Gärdenfors–Makinson (1985) AGM 의 axiomatization, 2026 modern application 의 LLM tool-use feedback loop, knowledge graph fact retraction, multi-agent debate.
|
||
|
||
## 매 핵심
|
||
|
||
### 매 3 operations (AGM)
|
||
- **Expansion** (K + φ): new fact 의 단순 의 add — consistency 의 maintain 의 X.
|
||
- **Contraction** (K − φ): φ 의 remove + minimal collateral 의 retract.
|
||
- **Revision** (K * φ): φ 의 add + consistency 의 preserve (= contract ¬φ then expand φ).
|
||
|
||
### 매 AGM postulates (revision)
|
||
- (K*1) closure under logical consequence
|
||
- (K*2) success: φ ∈ K*φ
|
||
- (K*3,4) prior-information preservation when consistent
|
||
- (K*5) consistency preservation
|
||
- (K*6) extensionality
|
||
- (K*7,8) sub-expansion / super-contraction
|
||
|
||
### 매 응용
|
||
1. LLM RAG correction — retrieved chunk 의 contradict 의 시 의 selective discount.
|
||
2. Knowledge graph 의 fact retraction — Wikidata edit 의 propagation.
|
||
3. Truth maintenance system — Prolog assertz/retract 의 reasoned.
|
||
4. Multi-agent debate — counter-evidence 의 belief 의 revise.
|
||
|
||
## 💻 패턴
|
||
|
||
### AGM revision (epistemic entrenchment ordering)
|
||
```python
|
||
from dataclasses import dataclass, field
|
||
from typing import Set, Callable
|
||
|
||
@dataclass
|
||
class BeliefBase:
|
||
beliefs: Set[str] = field(default_factory=set)
|
||
entrenchment: Callable[[str], float] = lambda b: 0.5
|
||
|
||
def expand(self, phi: str) -> "BeliefBase":
|
||
return BeliefBase(self.beliefs | {phi}, self.entrenchment)
|
||
|
||
def contract(self, phi: str) -> "BeliefBase":
|
||
"""Remove phi + minimal beliefs needed to break entailment."""
|
||
if not self.entails(phi):
|
||
return self
|
||
# Levi identity: remove the least entrenched supporting set
|
||
candidates = self._supporting_sets(phi)
|
||
chosen = min(candidates, key=lambda s: sum(self.entrenchment(b) for b in s))
|
||
return BeliefBase(self.beliefs - chosen, self.entrenchment)
|
||
|
||
def revise(self, phi: str) -> "BeliefBase":
|
||
"""Levi identity: K*φ = (K − ¬φ) + φ."""
|
||
return self.contract(f"¬({phi})").expand(phi)
|
||
|
||
def entails(self, phi: str) -> bool: ...
|
||
def _supporting_sets(self, phi: str) -> list[set[str]]: ...
|
||
```
|
||
|
||
### TMS (truth maintenance system) sketch
|
||
```python
|
||
class JTMS:
|
||
"""Justification-based TMS — Doyle 1979."""
|
||
def __init__(self):
|
||
self.nodes = {} # belief -> {in/out, justifications}
|
||
self.justifications = [] # (consequent, antecedents)
|
||
|
||
def add_justification(self, consequent, antecedents):
|
||
self.justifications.append((consequent, antecedents))
|
||
self._propagate(consequent)
|
||
|
||
def retract(self, belief):
|
||
self.nodes[belief] = "out"
|
||
for cons, ants in self.justifications:
|
||
if belief in ants:
|
||
self._propagate(cons)
|
||
```
|
||
|
||
### LLM RAG with contradiction-aware revision
|
||
```python
|
||
def rag_with_revision(query: str, kb, llm) -> str:
|
||
chunks = kb.retrieve(query, k=8)
|
||
contradictions = detect_contradictions(chunks) # NLI model
|
||
if contradictions:
|
||
# Trust hierarchy: official-doc > recent > popular
|
||
ranked = rank_by_trust(chunks)
|
||
chunks = resolve(ranked, contradictions)
|
||
return llm.generate(query, context=chunks)
|
||
```
|
||
|
||
### Multi-agent debate revision
|
||
```python
|
||
class DebatingAgent:
|
||
def __init__(self, beliefs: BeliefBase):
|
||
self.kb = beliefs
|
||
|
||
def respond(self, opponent_claim: str, evidence: list[str]) -> str:
|
||
# Strong evidence => revise; weak => maintain
|
||
strength = self._evidence_strength(evidence)
|
||
if strength > 0.7 and self.kb.entails(f"¬({opponent_claim})"):
|
||
self.kb = self.kb.revise(opponent_claim)
|
||
return f"Revised. Now accepting {opponent_claim}."
|
||
return self._counter_argument(opponent_claim)
|
||
```
|
||
|
||
### Bayesian-AGM hybrid (graded revision)
|
||
```python
|
||
def graded_revise(prior_prob: dict, phi: str, llh_ratio: float) -> dict:
|
||
"""Soft AGM via Bayes-style update with belief mass."""
|
||
return {b: p * (llh_ratio if b == phi else 1) for b, p in prior_prob.items()}
|
||
```
|
||
|
||
## 매 결정 기준
|
||
| 상황 | Approach |
|
||
|---|---|
|
||
| Crisp logical KB | AGM contract+expand |
|
||
| Probabilistic graded belief | Bayesian update |
|
||
| Tracked justifications | JTMS / ATMS |
|
||
| Streaming evidence | online graded revision |
|
||
| Defeasible reasoning | default logic / circumscription |
|
||
|
||
**기본값**: knowledge graph fact handling 의 default — AGM revision + entrenchment by source trust.
|
||
|
||
## 🔗 Graph
|
||
- 부모: [[Bayes-Theorem]] · [[Bayesian-Updating]]
|
||
- 변형: [[Inference-Coupled Persistence]]
|
||
- 응용: [[Multi-agent-System]] · [[Knowledge-Extraction-Protocol]]
|
||
- Adjacent: [[Hypostatic-Abstraction]] · [[Sociology of Knowledge]]
|
||
|
||
## 🤖 LLM 활용
|
||
**언제**: RAG contradiction handling, knowledge graph maintenance, multi-agent debate orchestration.
|
||
**언제 X**: pure prediction task — full Bayesian 의 sufficient.
|
||
|
||
## ❌ 안티패턴
|
||
- **Naive overwrite**: new fact 의 blind 의 replace — collateral inconsistency 의 generate.
|
||
- **Recency bias only**: 가장 recent = correct 의 X. trust hierarchy 의 필수.
|
||
- **Symmetric trust**: official source 와 user note 의 same weight 의 X.
|
||
- **Justification-free retraction**: dependent inference 의 stale 의 leave.
|
||
|
||
## 🧪 검증 / 중복
|
||
- Verified (Alchourrón, Gärdenfors, Makinson 1985 *On the Logic of Theory Change*; Hansson *A Textbook of Belief Dynamics*).
|
||
- 신뢰도 A.
|
||
|
||
## 🕓 Changelog
|
||
| 날짜 | 변경 |
|
||
|---|---|
|
||
| 2026-05-08 | Phase 1 |
|
||
| 2026-05-10 | Manual cleanup — AGM postulates, JTMS, RAG contradiction, multi-agent debate |
|