Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Source excerpts: Shannon, PLN, pattern surprise, typed metagraph folding and safe program rewrites

**Date:** 2026-10-12. **Status:** first-hand paper distillation and counterexamples, not experimental results on SAG. **Companion:** [D-SAG-5](../.claude/plans/sag-reflexive-cognition-from-1509-v1.md), prior #1497/#1498 paper distillations.

## Houlsby et al., 2011: Bayesian Active Learning by Disagreement

**Primary:** https://arxiv.org/pdf/1112.5745 , Eq. (2), printed p3.
**Paper's equation:** I(theta; y | x,D) = H(y | x,D) - E_theta[H(y | x,theta)].
**Extract:** predictive entropy combines unresolved model uncertainty with outcome noise. BALD subtracts conditional outcome entropy under the model posterior. The paper studies a Bayesian GP classifier; it does **not** establish a PLN, ONA or CE64 scheduler.

**Synthetic red test:** candidate A: every model predicts Bernoulli 0.5. Candidate B: half predict 0, half predict 1 deterministically. Both aggregate predictive entropy values are 1 bit. Under the stated equal-weight model ensemble, BALD-like model information is 0 vs 1 bit. Raw Shannon H(f) cannot tell them apart. Without a calibrated model-posterior meaning of theta and p(y), never call H(NARS frequency) epistemic information gain.

## Geisweiller and Goertzel, 2019: inferential surprisingness in hypergraphs

**Primary:** https://doi.org/10.1007/978-3-030-27005-6_6 ; https://agi-conf.org/2019/wp-content/uploads/2019/07/paper_27.pdf , §§3–5; implementation candidates https://github.com/opencog/miner and https://github.com/trueagi-io/hyperon-miner .
**Extract:** compare an empirically supported pattern with a model-based/independence estimate; second-order distributions and a Jensen–Shannon-based discrepancy avoid treating every raw frequency difference as equally significant. Shared variables violate naive products of marginal pattern frequencies. This is neither pure Shannon maximization nor a finished general-purpose EIG estimator.

**SAG transfer:** #1509's label-vs-typed-identity MDL counterexample is a high-value source fixture. Two fields called hours in distinct concept/seal spaces are not one repeated method. A miner that extracts a false reusable pattern from labels fails before scoring.

## Goertzel, 2020: Folding and Unfolding on Metagraphs

**Primary:** https://arxiv.org/pdf/2012.01759 , §2 printed p5, §5.1 p13, §6 history-aware morphisms.
**Extract:** typed metagraphs permit an edge target connected to a whole edge (index zero) or to a specific typed port; those cannot be silently conflated in an SPO projection. Catamorphism must respect the empty, edge, Beside and typed Connect constructors, not merely return a matching scalar. A shortest-path length and an ordered shortest-path edge list are distinct outputs. Histomorphism/futumorphism needs intermediate history available *during* the computation.

**SAG transfer:** a typed Quack count is not a metagraph recursion-scheme proof. A legal partial lowering may count a bounded population. A whole-edge/port ambiguity, inaccessible intermediate history or inability to construct output expressions is an explicit typed refusal.

## Goertzel, 2021: Patterns of Cognition

**Primary:** https://arxiv.org/pdf/2102.10581 , printed p4 and §5.2.
**Extract:** formal equivalence between recursive decision processes and a metagraph fold/unfold assumes that the graph does not change during the fold. Mutual associativity of the relevant combination operations is also a stated requirement for parts of the approach. The paper does not prove live self-modifying metagraphs have those properties.

**SAG transfer:** stable MethodKey does not imply stable read snapshot. Pin a source revision and graph version k, append k+1 and replay. Alter evidence overlap and u8 rounding and compare both bracketings. If results differ, a blanket parallel-fold equivalence claim fails, though an explicitly order-sensitive computation can remain valid.

## Jøsang, 2007: evidence fusion and fission

**Primary:** https://arxiv.org/pdf/0712.1182 , §3 and fission sections.
**Extract:** independent observations can support cumulative fusion, while observations derived from common experience demand a dependence-aware rule. Fission is an inverse operation under assumptions on the underlying belief model. Subjective Logic and NARS are different truth formalisms.

**SAG transfer:** removing a contributor and recalculating a conclusion is a stronger epistemic ablation than merely deleting its graph node. Replaying or copying one receipt does not add evidence. If compressed confidence omits dependence and weights, refuse exact fission.

## Willsey et al., 2021: egg equality saturation

**Primary:** https://arxiv.org/abs/2004.03082 ; DOI https://doi.org/10.1145/3434304 .
**Extract:** e-graphs compactly encode many equivalent expressions and equality saturation explores rewrites before extracting a cost-ranked candidate, under explicitly chosen language, semantics and rewrite rules. It does not automatically prove side-effect, NULL, bag/set or source-claim equivalence.

**SAG transfer:** egg can be an external reference for *tiny, pure* H1-like rewrites; SAG is not an e-graph. The current H1 has a measured negative performance gap; neither a cost model nor source-syntax factoring proves the fused SIMD terminal exists. Correctness and authority must be hard constraints, not penalty scores.

## High-signal separation

- Entropy of defined outcome distribution != uncertainty of a source claim != surprisingness of model mismatch != MDL redundancy != cost of an executed query.
- Named attention/appraisal policies are independent of all those scores.
- A proposed code optimization is only a hypothesis until semantic proof, measurements on representative hardware/workloads and human authorization.
- The appropriate null result is "no advantage from this policy or lowering under fair budget", not an AGI headline.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Source excerpts: NARS/ONA and Hyperon as a grounded self-model, not a homunculus

**Date:** 2026-10-12. **Status:** primary paper extracts / source-grounded questions, not LG runtime parity. **Parent:** #1509. **Companion:** [D-SAG-5](../.claude/plans/sag-reflexive-cognition-from-1509-v1.md). Paraphrases, not large verbatim quotations.

## Wang, Li, Hammer, 2018: Self in NARS

**Primary:** https://doi.org/10.3389/frobt.2018.00020 , §§3.3–3.5 and §4.3.
**Extract:** self-related knowledge can arise from processing *internal* experiences using the same general reasoning machinery as external experiences. Mental operations include considering and doubting. System- and event-level satisfaction affect finite resource allocation and priority. This is a proposed functional emotion/self-control account with incomplete self-knowledge, **not** empirical proof of a experiencing homunculus or consciousness.

**SAG transfer:** separate the observed compiled Program, independent evidence, derivation receipt and *the act of attending to that receipt*. A fact-only graph and a graph with a new episode-significance edge should retain identical historical observation bytes. A reflective trace-only arm that cannot answer "why?" is a useful negative control. A new priority policy must not change the recorded compiler verdict.

**Falsifier:** two derivations yield same final truth but different premises; the explanation should distinguish them. Copy one observation to two hypothesis layers: confidence must not increase. Revisit the event: no additional source ID. Suppress mental/appraisal policy and compare usefulness with identical budgets.

## Hammer and Lofthouse, 2020: OpenNARS for Applications

**Primary source repo:** https://github.com/opennars/OpenNARS-for-Applications at snapshot dc4efd0abd520cdb79bf53bfa3c285ebb24f2e8a. README links to their AGI 2020 paper *OpenNARS for Applications: Architecture and Control* and Lofthouse's 2019 ALANN description. First-hand C entry points: src/Cycle.c, PriorityQueue.c, Memory.c, Stamp.c, Truth.c, Decision.c, Inference.c, NAL.c.

**Extract from the implementation description:** ONA was designed as a new C-based platform, not a fork of the research OpenNARS implementation. It applies event-driven attention, finite queues and concept usefulness to select work; procedural reasoning uses anticipations about outcomes. This makes its event queue a promising *control* reference, not an oracle equivalent to PLN or Shannon.

**SAG transfer:** compiler refusal, changed seal or stale test can be a bounded attention event; the proposal chooses what to investigate next, not what is true. Compare urgent rare change vs popular repeated concept. Do not mix queue priority and evidence frequency.

**Falsifier:** with identical candidate budget and evidence, a priority policy that starves high-impact rare compiler regressions loses to FIFO; copying the same event must not become multiple independent stamps.

## Goertzel et al., 2023: OpenCog Hyperon

**Primary:** https://arxiv.org/pdf/2310.18318 , printed §3.1.3 p22, §4.3.4 pp61–63, §4.3.10 pp72–73, §4.4.2 pp74–77, §4.6 pp80–82.

**Extract A, reflective self-understanding (§4.3.10):** AtomSpace can serve as subject and substrate for its own reasoning and mining operations, but the paper explicitly warns this representational possibility **does not by itself confer deep self-understanding**. Feedback between modest self-knowledge and smarter procedure learning is a research aspiration.

**SAG falsifier:** ask method -> program -> primitive -> certificate; an unsupported two-hop transition must be visible as an insufficiency, not implemented via an invisible second engine. Only the actual compiled program may certify a compiled-tier edge.

**Extract B, inference control (§4.3.4, pp61–63):** authors propose learning what reasoning-step sequences work in what contexts and synthesizing new ones. Programmable interception is discussed as research direction. For LG, store a witnessed rule/step and test learned selection vs a frozen control; do not claim deployed synthesis on the basis of prose.

**Extract C, MicroPsi/Psi emotion (§4.4.2):** subsystems' urgency, importance, competence, experienced uncertainty, selection threshold and arousal interact as parameters shaping control. The paper contemplates machine appraisals unlike familiar human emotional categories. Figure 18 (printed p75) illustrates a regulator graph, not an empirical demonstration of our four names.

**SAG ablation:** Emberglow, Steelwind, Woodwarm and Velvetpause can be optional *operational* policy names. Same truth/evidence budget, change only scheduler/appraisal, measure useful discoveries and failure costs. Overpersistence, familiarity bias, noise fixation and endless deferral are deliberate adversaries.

**Extract D, GOLEM self-modification (§4.6):** meta-level improvement should be tested and reversible. Goal evolution and long-term safety are unsettled. This research PR is not permission to apply any candidate.

## Epistemic needs, dignity in disagreement, and significance: provenance-grade hypotheses

The Maslow pyramid analogy is an *operator-originated framing*: an agent with traceable knowledge, a limited uncertainty budget and stable identity may have more room to explore. It is not a mathematical reduction from Maslow to CE64. "Transcendence" is a philosophical possibility, not a benchmark.

Disagreement: a proposition's evidence, source reliability and relational respect are separable. Source A and B may disagree fiercely about P without either person's other claims being discredited. This is a proposed governance invariant, not a psychological finding extracted from Wang's work.

Reappraisal: a thought brushing awareness at k+1 can cause a new significance/attention edge to an episode at k. The historical fact at k remains unchanged. This is a model of *interpretation*, not an independent new observation, and must not cause confidence inflation.

**Countertest:** A's statement P is refuted by a test, and B's opposing claim survives. Keep unrelated independently verified A claims. If a source-wide trust penalty appears automatically, reject this policy. For Velvetpause, a deadline with sufficient evidence must still permit decision; permanent indecision is a failed controller.
51 changes: 51 additions & 0 deletions .arxiv/2026-10_sag1509_source_oracles_falsifier_matrix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# D-SAG-5 pinned sources, executable oracles and refusal matrix

**Date:** 2026-10-12. **Status:** repository locations and primary papers checked, but **NO NEW EXPERIMENT WAS EXECUTED**. Source URL or headline is not a green test. Read [.claude/knowledge/FIRST-HAND-SOURCE-LAW.md](../.claude/knowledge/FIRST-HAND-SOURCE-LAW.md) before a future implementation.

## Repositories at research snapshot

| Source | Commit SHA at inspection | Why here |
|---|---|---|
| [lance-graph #1509](https://github.com/AdaWorldAPI/lance-graph/pull/1509) | 42fa2a347cda22eaaa327bba514f2029cc9daa82 (merge to main) | current MethodTable -> SoftwareGraph -> Quack one-hop and H1 negative performance |
| [ONA](https://github.com/opennars/OpenNARS-for-Applications) | dc4efd0abd520cdb79bf53bfa3c285ebb24f2e8a | Cycle, PriorityQueue, Memory, Stamp, Truth, Decision C source |
| [modern PLN](https://github.com/trueagi-io/PLN) | 4405956947c4b53c7ff01bd565aa3b114bc970a1 | lib_pln.metta, truth formulas and scheduler |
| [PeTTa](https://github.com/trueagi-io/PeTTa) | 1d19a1da1ad8ba6327d660abd65433a0e341c23f | MeTTa runner, separate from native Hyperon |
| [Hyperon](https://github.com/trueagi-io/hyperon-experimental) | 3f76dc460da6961f57f69f6c3e550c59c74ada83 | Rust atom kinds, matcher, non-determinism, dependent types and spaces |
| [classic AtomSpace](https://github.com/opencog/atomspace) | c8d633bf272b838c2132c21b7c8ddf169a18dd22 | historic typed hypergraphs/Frames, not Hyperon |
| [classic ECAN](https://github.com/opencog/attention) | 96107652e1cf72747e69fcd2a20ffb6edba562d2 | historical attention baseline, not Shannon-EIG implementation |
| [Hyperon Miner](https://github.com/trueagi-io/hyperon-miner) | e955479bca1603597529d175cc22ac1583c67e15 | frequent/subpattern and surprisingness fixtures |
| [AdaWorldAPI/ruff](https://github.com/AdaWorldAPI/ruff) | 9407c748812454bcadfff2d3c89cf942bf66f5de | Python lint/format diagnostics only; **not** a Rust code-equivalence oracle |

Root licenses need per-file review: modern PLN and Hyperon root licenses state MIT; classic AtomSpace and attention have AGPL text with OpenCog linking exceptions. Do not copy source merely because this ledger links it.

## Compact falsification matrix

| Topic | Oracle or independent baseline | Negative / red fixture | Gate |
|---|---|---|---|
| typed SAG identity | real prepared MethodTable and tests/awareness.rs | same label different ClassId/seal, wrong compiled tier | exact graph answers and verified origin |
| self source snapshot | git SHA + compiled Program + certificate | stale Debug/FNV digest/toolchain/reading | stale reported, no implicit current evidence |
| multi-hop | independent scalar CALLS closure | A->B->C from one-hop only | legal relation carrier or typed refusal |
| local model context | direct source with full answer, rg/file text | omitted negative evidence, stale SHA, unverifiable claim | exact source/answer, measured token+time, no zero-token claim |
| NARS stamps | pinned ONA or OpenNARS where rules applicable | identical evidence across two hypothesis layers | no confidence inflation; independent cases still count |
| significance | version-k immutable event | new k+1 relationship falsely rewrites fact at k | fact stable, reinterpretation traceable |
| Shannon/BALD | analytic 0 vs 1 bit toy with defined model | equally high raw H noisy and epistemic candidates | no false claim that H(f) is calibrated |
| policy/appraisal | FIFO and frozen no-meta, same budget | noise, deadline missed, trusted stale path | improved useful results and no truth-law drift |
| respectful contradiction | two claims and independent supporting tests | refute one claim -> global source trust penalty | claim-level revision independent of person relation |
| MeTTa | upstream b4_nondeterm.metta | four combinations collapse into a 2-row mask | exact multiplicity or typed refusal |
| metagraph fold | typed constructor scalar law, pinned k | port 0 != port n; k changes during fold | laws and snapshot parity or named gap |
| optimize | compiled H1 plus scalar row oracle | NULL/overflow/bag/set mismatch; nonexistent fused terminal | no automatic applied modification |
| decision | independently checked proof, human approval event | graph self-issues verified tier or code write | deny by default, rollback when separately authorized |

## Reviewer decisions (OPEN)

- Which source-bound token/context question should be the first minimal probe?
- May D-SAG-1-4 / D-CMH-G1-4 introduce a relation carrier in a future authorized PR, or does first-wave SAG explicitly refuse every two-hop question?
- Which source/event receipts can be durable under mailbox ownership and D-SAG-1-6?
- Which truth law, inference oracle and independent evidence base does each policy use? No silent PLN/NARS conversion.
- What model distribution does BALD use, and how is its prediction validated? If unknown, call it a heuristic, not EIG.
- Which (if any) of the four named functional policies is worth measuring; what time/compute budget and kill threshold are approved?
- How are human approval and code correctness proof represented as different facts?
- What token/cost reduction threshold is set *before* the first run?
- What licenses and exact runtime commits permit independent fixture execution?

**No empirical win has been asserted by this documentation PR.**
9 changes: 9 additions & 0 deletions .claude/board/INTEGRATION_PLANS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 2026-10-12 (5) — sag-reflexive-cognition-from-1509-v1 — source-backed SAG self-querying, cognition/attention controls and safe optimization proposals → .claude/plans/sag-reflexive-cognition-from-1509-v1.md

**Status:** PROPOSAL D-SAG-5-0..10. Only D-SAG-5-0 documentation is in this PR, based on merged #1509.

- Reuses shipped MethodTable/SoftwareGraph/Quack one-hop behavior, compiler tiers, source seals and H1 cost/refusal ledger. Two-hop, persistence and applying optimizations remain blocked or queued.
- Source-indexed .arxiv excerpts connect Wang/ONA internal events, Hyperon reflexive reasoning and affective modulators, BALD vs noise, Miner surprise, metagraph fold laws, evidence fusion/fission and egg rewrite certificates.
- Claude Code prompt demands exact source/answer parity, context-token measurement, independent epistemic and attention ablations, and explicit refusal on unsupported semantics. Functional Emberglow, Steelwind, Woodwarm and Velvetpause labels authorize no CE64 bit change.
- No runtime feature, second IR, self-certified result, automatic code mutation, new opcode or schema is created.

## 2026-10-12 (4) — software-awareness-graph-v1 — the software's own methods, programs and evidence as graph rows → `.claude/plans/software-awareness-graph-v1.md`

**Status:** MEASURED for one concept's methods (D-SAG-1-0..3 and D-SAG-1-5 in the PR); D-SAG-1-4 and D-SAG-1-6 queued.
Expand Down
Loading
Loading