9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
6.2 KiB
6.2 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-probability-and-logic-fusion | Probability and Logic Fusion | 10_Wiki/Topics | verified | self |
|
none | A | 0.85 | applied |
|
2026-05-10 | pending |
|
Probability and Logic Fusion
매 한 줄
"매 unify symbolic logic (rules, KGs) with probability (uncertainty) — and now neural networks". 1990s-2010s 의 Statistical Relational Learning (SRL) 의 lineage: PRMs, MLNs, ProbLog, Bayesian networks + FOL. 2020s 에 neuro-symbolic 으로 reborn (DeepProbLog, Scallop, Logical Neural Networks, Differentiable Theorem Provers). 2026 currently driving verifiable LLM reasoning.
매 핵심
매 problem statement
- Logic alone: brittle to noise, uncertainty, exceptions.
- Probability alone: no compositional / relational structure.
- Neural alone: opaque, no symbolic guarantees.
- Goal: compositional + uncertain + learnable.
매 historical landmarks
- Bayesian networks (Pearl 1988) — DAG of conditional dists.
- PRMs (Friedman et al 1999) — BNs over relational schemas.
- Markov Logic Networks (Richardson & Domingos 2006) — FOL formulas with weights.
- ProbLog (De Raedt et al 2007) — probabilistic Prolog.
- PSL (Bach et al 2017) — soft logic with hinge-loss inference.
- DeepProbLog (Manhaeve et al 2018) — neural predicates inside ProbLog.
- Scallop (Li et al 2023) — differentiable Datalog for ML.
- Logical Neural Networks (Riegel et al 2020 IBM).
매 representations
- MLN: weighted FOL formulas → ground Markov network.
- P(world) ∝ exp(Σ w_i × #true_groundings(F_i)).
- ProbLog: Prolog clauses with probabilities
0.7::burglary. - PSL: soft truth values in [0,1], conjunction = Lukasiewicz t-norm.
- DeepProbLog:
nn(mnist_net, [X], Y, [0..9]) :: digit(X, Y).
매 modern (2024-2026) directions
- LLM + verifier (Lean, Coq, Z3): generate → check → repair. AlphaProof, AlphaGeometry style.
- Differentiable logic: gradients through soft-logic for end-to-end training.
- Neuro-symbolic agents: LLM generates programs, symbolic engine executes.
💻 패턴
Markov Logic Network (PRACMLN-style)
# Formulas with weights
formulas = [
(1.5, "Smokes(x) => Cancer(x)"),
(1.1, "Friends(x,y) ^ Smokes(x) => Smokes(y)"),
]
# P(world) ∝ exp(Σ w * count_true_groundings)
# Inference: MC-SAT or Gibbs sampling over ground atoms.
ProbLog example
0.1 :: burglary.
0.2 :: earthquake.
alarm :- burglary.
alarm :- earthquake.
0.7 :: john_calls :- alarm.
query(burglary).
evidence(john_calls, true).
DeepProbLog (neural predicate)
# Recognize MNIST digits and add them
network = MNIST_Net()
nn(mnist_net, [X], Y, [0,1,2,3,4,5,6,7,8,9]) :: digit(X, Y).
addition(X, Y, Z) :- digit(X, A), digit(Y, B), Z is A + B.
# Train: end-to-end gradient flows through neural digit predicate
# from supervision on (image1, image2, sum_label).
Pyro probabilistic program (Bayesian + structure)
import pyro, pyro.distributions as dist, torch
def model(data):
# Latent disease probability
p_disease = pyro.sample("p_disease", dist.Beta(1., 9.))
for i, (test, outcome) in enumerate(data):
d = pyro.sample(f"d_{i}", dist.Bernoulli(p_disease))
# logical rule: P(test+ | disease) = 0.95, P(test+ | not disease) = 0.1
p_test = 0.95 * d + 0.1 * (1 - d)
pyro.sample(f"t_{i}", dist.Bernoulli(p_test), obs=test)
LLM + Z3 verifier (2024-2026 pattern)
from z3 import Solver, Int, And, sat
def llm_solve_with_check(problem):
code = claude.complete(f"Translate to Z3 Python: {problem}")
s = Solver()
exec(code) # populates s
if s.check() == sat:
return s.model()
else:
return claude.complete(f"Z3 returned UNSAT. Repair: {code}")
PSL soft-logic rule
# Lukasiewicz t-norm: A ^ B = max(0, A + B - 1); A => B = min(1, 1 - A + B).
# Rule: similar(p,q) ^ likes(p, x) => likes(q, x) [weight 5]
# Inference: minimize Σ w_i * max(0, body - head) over continuous truth values.
Scallop differentiable Datalog
import scallopy
ctx = scallopy.ScallopContext(provenance="difftopkproofs")
ctx.add_relation("digit", (int, float), input_mapping=[(0,), (1,), ...])
ctx.add_rule("sum(a + b) = digit(_, a), digit(_, b)")
# Plug into PyTorch; gradients flow through proof structure.
매 결정 기준
| 상황 | Approach |
|---|---|
| Discrete random variables, known structure | Bayesian network (pgmpy) |
| First-order rules + data | MLN / ProbLog |
| Soft constraints, large scale | PSL |
| Neural perception + symbolic reasoning | DeepProbLog / Scallop |
| LLM reasoning correctness | LLM + Z3/Lean verifier |
| Complex generative model | Pyro / PyMC |
기본값: For neuro-symbolic 2026 — Scallop 또는 LLM+verifier; for pure SRL, ProbLog.
🔗 Graph
- 부모: Knowledge-Representation · Logic
- 변형: Bayesian-Network
- 응용: Neural-Symbolic-Integration · Knowledge-Graphs
🤖 LLM 활용
언제: domain with both structured rules and uncertainty, verifiable LLM reasoning, knowledge-graph completion w/ noise. 언제 X: pure pattern recognition (use NN), purely deterministic logic (use Prolog/Datalog).
❌ 안티패턴
- MLN at scale: grounding explodes; use lifted inference or PSL.
- Probabilities as confidence scores: must reflect actual frequencies / coherent priors.
- Mixing neural and symbolic without gradient story: end-to-end requires differentiable bridge.
- Ignoring computational cost: many SRL inferences are #P-hard.
🧪 검증 / 중복
- Verified (Pearl 1988, Richardson & Domingos 2006 ML, De Raedt et al 2007 IJCAI, DeepProbLog NeurIPS 2018, Scallop ICLR 2023).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — full SRL → neuro-symbolic timeline + 2026 LLM+verifier |