isi-vista / adam

Abduction to Demonstrate an Articulate Machine
MIT License
11 stars 3 forks source link

Contrastive learner matching/updates are slightly non-deterministic #1140

Open spigo900 opened 2 years ago

spigo900 commented 2 years ago

The contrastive learner's graph matching logic, thus its updates, are slightly non-deterministic in that they arbitrarily take the first available match. That means the exact updates to be applied in some edge cases could be nondeterministic. In practice I think this isn't a problem.

Here's an example of the issue.. Suppose pattern P_A has a feature alpha that could match to either of two things in graph A, say observed features x and y. If x is in the difference of graph A against graph B, and y is not, then whether we update the node weight for alpha depends entirely on whether the graph matching algorithm "decides" to match it to x or y which in turn probably depends on an arbitrary relative ordering of those nodes.

In practice this scenario isn't a problem for two reasons. First, we only have one object in each scene. Second, so far an object won't have multiple of the same feature type.

This could become more of a problem however if we were to try and generalize using "super-nodes" (#1136), e.g. "red OR green," "table OR chair" etc.

spigo900 commented 2 years ago

Wrote this up because I noticed this TODO. That should get linked here eventually.