--- id: wiki-2026-0508-symbols title: Symbols category: 10_Wiki/Topics status: verified canonical_id: self aliases: [Symbolic Representation, Symbolic AI, GOFAI, Symbol Manipulation] duplicate_of: none source_trust_level: A confidence_score: 0.9 verification_status: applied tags: [symbolic-ai, neuro-symbolic, knowledge-representation, reasoning] raw_sources: [] last_reinforced: 2026-05-10 github_commit: pending tech_stack: language: python framework: scallop --- # Symbols ## 매 한 줄 > **"매 symbol 은 discrete, manipulable token — meaning 의 abstract carrier"**. 매 Newell·Simon 의 Physical Symbol System Hypothesis 의 origin. 매 2026 의 modern usage: pure symbolic AI 의 retire, neuro-symbolic hybrid (Scallop, DeepProbLog, LLM+Lean) 의 mainstream. ## 매 핵심 ### 매 Physical Symbol System Hypothesis (Newell & Simon 1976) - "A physical symbol system has the necessary and sufficient means for general intelligent action." - **Symbol**: physical pattern referring to entity. - **Expression**: composition of symbols. - **Process**: creation, modification, reproduction, destruction. ### 매 symbol vs subsymbol - **Symbol (GOFAI)**: discrete, interpretable, composable. e.g., Prolog clauses, Knowledge Graph triples. - **Subsymbol (connectionist)**: distributed, continuous, learned. e.g., transformer hidden states. - **Bridge**: tokenization, embedding-of-symbol, neuro-symbolic. ### 매 modern symbolic 사용 영역 - **Theorem proving**: Lean 4, Coq, Isabelle. LLM (DeepSeek-Prover) 의 partner. - **Knowledge Graph**: Wikidata, schema.org — RDF triples. - **Constraint solving**: Z3 SMT, OR-Tools. - **Program synthesis**: Sketch, Rosette. - **Symbolic regression**: SymbolicRegression.jl, PySR. ### 매 neuro-symbolic 2026 - **Scallop**: differentiable Datalog. - **DeepProbLog**: probabilistic logic + NN. - **AlphaProof / AlphaGeometry**: LLM proposer + symbolic verifier. - **Tool-using LLM**: Wolfram, Lean, Z3 의 call. ### 매 응용 1. **Math/Physics**: AlphaProof IMO 2024 silver — LLM + Lean. 2. **KG QA**: text2cypher / text2sparql with verification. 3. **Constraint planning**: LLM proposes, Z3 verifies. ## 💻 패턴 ### 1. SymPy symbolic math ```python from sympy import symbols, diff, integrate, solve, simplify x, y = symbols('x y') expr = x**3 + 2*x**2 - 5*x + 1 derivative = diff(expr, x) antideriv = integrate(expr, x) roots = solve(expr, x) print(simplify(derivative * 2)) ``` ### 2. Z3 constraint solving ```python from z3 import Int, Solver, And, sat a, b, c = Int('a'), Int('b'), Int('c') s = Solver() s.add(a + b + c == 30, a >= 0, b >= 0, c >= 0, And(a*b*c == 1000)) if s.check() == sat: m = s.model() print(m[a], m[b], m[c]) ``` ### 3. Lean 4 theorem (LLM-suggested) ```lean theorem add_comm (a b : Nat) : a + b = b + a := by induction a with | zero => simp | succ n ih => simp [Nat.succ_add, ih] ``` ### 4. RDF / SPARQL knowledge graph ```python from rdflib import Graph g = Graph() g.parse("dbpedia_subset.ttl") q = """ SELECT ?actor ?film WHERE { ?film dbo:starring ?actor . ?film dbo:director dbr:Christopher_Nolan . } """ for row in g.query(q): print(row.actor, row.film) ``` ### 5. Scallop neuro-symbolic ```python import scallopy ctx = scallopy.ScallopContext() ctx.add_relation("digit", (int, float)) # (digit, prob from NN) ctx.add_rule("sum(s) :- digit(a, _), digit(b, _), s == a + b") # NN provides probabilistic facts; Scallop reasons differentiably ctx.add_facts("digit", [(3, 0.9), (5, 0.85)]) result = ctx.run().relation("sum") ``` ### 6. Tool-using LLM (Wolfram-as-tool) ```python tools = [{ "name": "wolfram_alpha", "description": "Symbolic math via Wolfram Alpha", "input_schema": {"type": "object", "properties": { "query": {"type": "string"}}, "required": ["query"]} }] # Claude calls wolfram_alpha("integrate(x^2 sin(x), x)") # returns symbolic answer; Claude composes natural language explanation. ``` ### 7. Symbolic regression (PySR) ```python from pysr import PySRRegressor model = PySRRegressor( niterations=40, binary_operators=["+", "*", "-", "/"], unary_operators=["cos", "exp", "sin"], ) model.fit(X, y) print(model.sympy()) # human-readable formula ``` ## 매 결정 기준 | 상황 | Approach | |---|---| | Exact math | SymPy / Mathematica | | Logical constraints | Z3 / OR-Tools | | Theorem proving | Lean 4 + LLM proposer | | Structured KB QA | KG + SPARQL + LLM rephrase | | Pattern from data | symbolic regression (PySR) | **기본값**: 매 symbolic-only 의 X. LLM proposer + symbolic verifier hybrid. ## 🔗 Graph - 부모: [[Symbolic-AI vs Connectionism]] · [[Knowledge-Representation]] - 변형: [[Neural-Symbolic-Integration|Neuro-Symbolic-AI]] · [[Theorem-Proving]] · [[Knowledge Graph|Knowledge-Graph]] - Adjacent: [[GOFAI]] ## 🤖 LLM 활용 **언제**: symbolic system 의 natural-language interface, proof step proposal, KG query generation. **언제 X**: symbolic verification 그 자체 (LLM 의 hallucinate — Lean/Z3 의 사용). ## ❌ 안티패턴 - **Pure symbolic AI 의 modern attempt**: 매 brittleness — perception 의 connectionist 의 필요. - **Hand-crafted ontology 의 over-invest**: 매 maintenance hell. KG 의 LLM-bootstrap. - **LLM 의 symbolic answer 의 trust**: 매 verify 의 fail. 매 Lean/Z3/SymPy 의 ground. - **Embedding-only retrieval**: 매 logical relationship 의 lose — KG triples 의 hybrid. ## 🧪 검증 / 중복 - Verified (Newell & Simon Turing lecture 1976, Marcus 2020 critique, AlphaProof Nature 2024, Scallop ICLR 2023). - 신뢰도 A. ## 🕓 Changelog | 날짜 | 변경 | |---|---| | 2026-05-08 | Phase 1 | | 2026-05-10 | Manual cleanup — symbolic AI + modern neuro-symbolic hybrid |