The BGL2015 Visualizer application is a graphical interface for a biobehavioral selectionist neural network, specifically the one described in this article:
Burgos, José E., García-Leal, Óscar (2015). Autoshaped choice in artificial neural networks: Implications for behavioral economics and neuroeconomics. Behavioural Processes, 114, 63-71.
The neural network model comes from the field of behavior analysis, and is intended to faithfully follow the general principles of operation of the brain, and produce behaviors that adhere to the principles of behavior analysis.
Both the app and its source are available via GitHub.com at:
Or see the full repository at:
This application should be considered an “artist’s sketch” used to try out ideas, and to learn more about both neural networks and more about the details of developing for MacOS (versus iOS). This is an initial step in creating an application that will support creation and editing of neural nets, the experimental procedures to run them, capture of data, various types of plots, and some built-in data analysis.
While learning about this particular brand of neural network I tried with great difficulty to visualize the “learning process” from a pristine, naive, network time step by time step through to the final state. Looking at the black and white static network schematics in the articles, I realized that an animated schematic that reflected the neural network states at each time step would be a very useful tool. As would a graph of the input stimuli and the dependent variables of the experiment including each time step.
Session Creation: You can generate any number of runs of the experimental procedure.
Session Replay: You can replay the recorded session, step by step. Note that the graph of independent/dependent variables at the top, the table of the same data on the left, and the animated schematic of the network all play in synch with one another.
Animated Schematic: But of course the most fun is the animation of the network diagram (Figure 1 in Burgos & García-Leal, 2015). Inactive neural groups are light gray. As their activation level increases, their “axons” get thicker and darker, as do the outlines of the neural units. Connections are represented as circles on neural units; as their weights increase they grow and get darker. The lines representing the diffuse discrepancy signals from the hippocampus and ventral tegmental area (VTA) similarly get larger and more richly colored as signal levels increase.
The source code
By the time I started the app, I had hand assembled a few versions of the Burgos & García-Leal experiment. Not hard, but not pleasant. Then there was the coding of the experimental procedures. Then there was the data capture. Then there was the issue of data display and data analysis.
Then I realized that few behavior analysts would have the software development skills to use a toolkit consisting of an API or suite of API’s. Rather, to make this particular type of behavior modeling assessable to most behavior analysts who might be interested, a system consisting of a suite of integrated editors and “runners” would be required.
Though few behavior analysts have a high level of software development skill, some do, and others would like to improve their programming skills. A secondary goal of this app, and all future applications and software frameworks, is to provide behavior analysts, or anyone else, with working example code and frameworks.
The source code is released under the Apache Version 2 license, which is generally considered one of the least restrictive commonly used licenses.
One caveat: the code is barely documented.. I may only document it as questions arise from those trying to use it.
Another caveat: the code “is what it is”, a learning prototype. I will probably never do much to it or with it again. Some of the code may reappear in the larger editor-based system, but because of the ad hoc nature of much of the code, probably not much of it will.
The source code is Swift 3.
The Burgos & García-Leal 2015 article is paywalled; you can only see the abstract for free (I recommended reading the abstract). If you don’t have access to the full article, and don’t want to buy it, there are some free articles will probably give you enough information to understand what is going on.
Here is a great primer for this type of neural network:
Donahoe, John W., Burgos, Jose E., Palmer, David C (1993). A Selectionist Approach to Reinforcement. Journal of the Experimental Analysis of Behavior, 60, 17-40.
This is the article that, roughly, served as the basis for the Burgos & García-Leal experiment:
Picker, M., Choice as a dependent measure in autoshaping: sensitivity to frequency and duration of food presentation. Journal of the Experimental Analysis of Behavior, 37, 393-406.
Also see my About page.