Skip to content

Conversation

Copy link

Copilot AI commented Feb 8, 2026

For changes to the core ggml library (including to the CMake build system), please open a PR in https://github.com/ggml-org/llama.cpp. Doing so will make your PR more visible, better tested and more likely to be reviewed.

Description

Extends OpenCog cognitive architecture with two foundational capabilities: adaptive learning through Hebbian updates and temporal reasoning for event sequences.

Hebbian Learning

Implements "neurons that fire together, wire together" for embedding adaptation:

// Strengthen semantic connections through co-activation
ggml_opencog_hebbian_update(atomspace, dog_id, pet_id, 0.1f);

// Propagate learning through graph structure
ggml_opencog_hebbian_update_link(atomspace, inheritance_link_id, 0.15f);

// Maintain numerical stability
ggml_opencog_normalize_embedding(atomspace, atom_id);

API: 3 functions (hebbian_update, hebbian_update_link, normalize_embedding)

Temporal Reasoning

Adds time interval support with temporal relations and queries:

// Associate events with time
ggml_opencog_set_time_interval(atomspace, breakfast_id, 8000, 8500);
ggml_opencog_set_time_interval(atomspace, work_id, 9000, 17000);

// Temporal relations
bool ordered = ggml_opencog_happens_before(atomspace, breakfast_id, work_id);
bool contained = ggml_opencog_happens_during(atomspace, lunch_id, work_id);

// Query by time
auto events = ggml_opencog_get_atoms_at_time(atomspace, 10000);
auto morning = ggml_opencog_get_atoms_in_interval(atomspace, 7000, 9000);

// Sequential inference
auto inferred_tv = ggml_opencog_temporal_induction(link1_tv, link2_tv);

API: 10 functions for time intervals, queries, relations, and inference
Atom types: Added TIME_NODE, SEQUENTIAL_LINK, SIMULTANEOUS_LINK, AT_TIME_LINK

Changes

  • Extended ggml_opencog_atom with time_interval field
  • Increased GGML_OPENCOG_ATOM_TYPE_COUNT from 5 to 9
  • Added temporal cleanup in ggml_opencog_remove_atom
  • Comprehensive test coverage (11/11 tests pass)
  • Example programs: opencog-hebbian.cpp, opencog-temporal.cpp

Implementation Notes

  • Time intervals use int64_t millisecond timestamps
  • Hebbian learning uses symmetric embedding updates with configurable rate
  • Temporal induction reduces confidence along inference chains (uncertainty propagation)
  • Memory managed via smart pointers; temporal data cleaned up in atom removal

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 8, 2026 18:18
Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Co-authored-by: drzo <15202748+drzo@users.noreply.github.com>
Copilot AI changed the title [WIP] Proceed with next steps in the project Add Hebbian learning and temporal reasoning to OpenCog architecture Feb 8, 2026
Copilot AI requested a review from drzo February 8, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants