Implementation for Learning to Perform Role-Filler Binding with Schematic Knowledge, PeerJ 2021.
This project contains code to generate, run, test, and analyze generalized schema-learning experiments using data generated by Coffee Shop World.
We write pre-defined schemas that define a story graph, in which nodes represent story states and edge weights represent transition probabilities between states. Each traversal through the story constitutes a 'frame' containing unfilled 'roles'; by substituting 'fillers' for roles we generate filled-in stories.
For instance, the story
BEGIN Ava Sit down Ava Zane Say goodbye Abe Zane END Abe
corresponds to the frame
BEGIN [subject] Sit down [subject] [friend] Say goodbye [subject] [friend] END
In this example, the filler "Ava" corresponds to the role "subject", and "Zane" fills the role "friend".
The Coffee Shop World generator constructs a specified number of stories given a schema definition. For more details, see the Coffee Shop World repo. (We use a slightly modified version, available in a separate repo).
We test networks' ability to perform role-filler binding, the ability to return the name of the filler corresponding to a queried role.
Example input: BEGIN Alice Say_hi Alice Bob Order_drink Alice coffee Order_dessert Bob chocolate END Alice ? QSubject
Please see the wiki for additional information about running the experiments from our paper.
This code is adapted from https://github.com/deepmind/dnc and https://github.com/GokuMohandas/fast-weights.