Using natural language and program abstractions to instill human inductive biases in machines
Abstract
Strong inductive biases are a key component of human intelligence, allowing peopleto quickly learn a variety of tasks.
Although meta-learning has emerged as anapproach for endowing neural networks with useful inductive biases, agents trainedby meta-learning may acquire very different strategies from humans.
We showthat co-training these agents on predicting representations from natural languagetask descriptions and from programs induced to generate such tasks guides themtoward human-like inductive biases.
Human-generated language descriptions andprogram induction with library learning both result in more human-like behaviorin downstream meta-reinforcement learning agents than less abstract controls(synthetic language descriptions, program induction without library learning),suggesting that the abstraction supported by these representations is key
Introduction
Humans are able to rapidly perform a variety of tasks without extensive experience [1].
Thismay be because of strong inductive biases towards abstract structured knowledge (e.g. hierarchies,compositionality, etc.)
[2, 3] that act as strong prior knowledge, enabling generalization to novelenvironments with little new data.
These biases present one of the most salient differences betweenhumans and neural network-based learners [4] and may be one of the keys to building artificial agentswith human-like generalization capabilities.
For this reason, there has been interest among machinelearning researchers in identifying and instilling these inductive biases into neural network-basedagents [5–7].
One emerging approach to implicitly bestowing inductive biases on neural networks is meta-learning[8, 9].
In meta-learning paradigms, an agent is trained not just on a single task but on a distributionof tasks, with the aim of acquiring the underlying abstractions that these tasks have in common.
However, since neural networks are not easily interpretable, it can be difficult to tell if the resultingneural networks actually acquired this abstract knowledge, or whether they have instead learnedstatistical artifacts correlated with abstract rules [10, 11].
What representations can give our artificial agents access to human inductive biases?
Previous workin reinforcement learning has shown that neural networks can improve performance through auxiliarytasks [12–14].
We build on this insight to construct auxiliary tasks that require reproducing differentkinds of representations, and examine what kinds of representations tend to produce agents withhuman-like inductive biases.
Human biases toward abstract knowledge might be linked to their ability to verbalize this knowledgethrough natural language [15, 16].
Human language descriptions can therefore act as a repository ofthis prior knowledge.
Recent work in machine learning has shown that neural network representationscan be shaped and structured through natural language supervision for various tasks [17 ? –22].
Abstract knowledge in humans has also been modeled by program induction [23–26], where a
[Figure]
+ +
[Figure]
model directly infers a structured programmatic representation from data.
These programmaticrepresentations are constructed from primitive atoms using symbolic rules and procedures.
Recentwork has leveraged neural networks to make this otherwise expensive and brittle process more scalable[ neurosymbolic models ; 27–29].
In these approaches, abstract knowledge is built-in explicitly intothe artificial agent using a pre-specified and built-in Domain Specific Language (DSL), which canbe restrictive.
In many situations, we would like artificial agents that are implicitly guided towardshuman-like abstract knowledge [30–33] rather than explicitly building it in, since it can be hard todetermine what specific concepts to build into a DSL for any arbitrary environment.
Therefore, inthis work, we focus on how to use representations from program induction to guide artificial agentsthat don’t have these built in concepts.
In this work, we show that language and programs can be used as repositories of abstract priorknowledge/inductive biases of humans that one can co-train with to elicit human-like biases inother related tasks.
The differences in behavior elicited by the use of different inductive biases aresubtle, so we use a recent framework from Kumar et al.
[10] to build tasks that distinguish thesesubtle differences.
The specific domain we use is meta-reinforcement learning task where the agentsequentially reveals patterns on 2D binary grids.
We find that guiding meta-reinforcement learningagents with representations from language and programs not only increases performance on taskdistributions humans are adept at, but also decreases performance on control task distributions wherehumans perform poorly.
We also show a correspondence between human-generated language andprograms synthesized with library learning .
This indicates that humans use higher-order conceptsto compress their descriptions in the same way that recent library learning approaches in programinduction add new concepts to the DSL to compress program length [24].
Finally, we show evidencethat this process of abstraction through compression in the auxiliary representation is a key driver ofhuman-like behavior in the downstream meta-learning agent, when co-trained on these representations.
Dataset and task paradigm
Our goal is to examine differences in how human-like the behavior of an agent is, as elicited bydifferent co-training objectives.
To do this, we first need a distribution that reflects human inductivebias (as well as a control which is closely matched but doesn’t directly reflect this inductive bias)– so that human-like behavior is
distinguishable. We introduce these distributions in the followingsections, as well as how we build an RL task based on these distributions.
[Figure]
[Figure]
We used the dataset collected in Kumar et al.
[11], where the authors directly sample from humans’prior expectations on two-dimensional binary grids.
These data contain the direct human priorknowledge/inductive biases and can therefore be used to study them.
They used a technique called
Gibbs Sampling with People [GSP; 34, see Fig.
2] that samples internal prior distributions by puttinghumans “in the loop” of a Gibbs sampler.
The stimulus space consisted of the space of 4 × 4 boardsgiving 16 stimulus dimensions.
Each stimulus dimension (corresponding to a tile on the board) hadtwo possible values and determined the binary color of the tile, namely, red or white.
Each GSP trialconsisted of a human participant predicting what color a single masked square in the grid shouldbe, conditional on the colors of all other squares on the grid.
The specific instructions given were“What should be the underlying color of the covered greyed tile such that the board is generated by avery simple rule?”
(Fig. 2).
Once a decision was made the resulting stimulus was passed on to a newparticipant, who repeated the task with a different masked tile.
When sampling from this distribution,the probability of each board is based on how frequently it occurred during the GSP sampling process,which reflects its probability under human priors over the space of 2D grids.
We selected the 500most probable boards to collect language and program data.
We refer to these as the ‘GSP boards’.
2.2 Constructing a matched control distribution
The control distribution of boards matches the statistics of the GSP boards but is not produced byhuman decisions (see Fig. 2).
A fully connected neural network (3 layers, 16 units each) was trainedto encode the conditional distributions of the GSP boards: a random tile is masked out, and thenetwork is trained to predict its value given the other tiles (similar to masked language models; [35]).
These conditional distributions contain all the relevant statistical information about the boards.
Thenetwork achieved an accuracy of above 99% on this task.
This network is then used to generate samples, using the exact same process as used to generatesamples from human priors using Gibbs sampling.
A board in which each tile is randomly set to redor white with probability 0.5 is initialized, and this trained network is used to predict masked outtiles.
This generates a set of boards that respect most of the statistical properties of the original GSPboards, but are generated differently and implicitly encode the priors of the conditional model (i.e. atrained neural network instead of humans) as well.
2.3 A search task for meta-reinforcement learning
Task.
These distributions of boards can be used to construct new reinforcement learning tasks.
Weuse the same task, performance measures, and agent architecture as in Kumar et al.
In this task,the agent starts with an almost fully masked out board (all greyed tiles except for one revealed red),and has to select tiles to reveal.
The revealed tiles are red or white depending on the tile colors ofa preselected underlying board.
One board with a fixed configuration of red tiles defines a singletask.
The agent’s goal is to reveal all the red tiles, while revealing as few white tiles as possible.
Theepisode ends when the agent reveals all the red tiles.
There is a reward for each red tile revealed, anda penalty for each white tile revealed.
Agents are trained on a set of boards and tested on held out test
[Figure]
B w h i t e t il e s r e v ea l ed ( z - sc o r ed ) boards.
Doing well on this task requires the agent to learn and represent the distribution over boards in its training distribution.
The primary manipulation is whether a board is generated from humanpriors or from the control distribution (that is closely matched in terms of statistics, but generatedfrom machine priors).
Learners that do better on boards that were directly sampled from people’sprior distribution on 2D grid stimuli can be said to have a human-like inductive bias, and vice versafor machine-generated boards (see Fig. 2).
Evaluation metric.
The specific metric we use to track performance is as follows.
An agent thatdoes well on the task will reveal all the red tiles while revealing as few white tiles as possible.
Wetherefore measure performance by counting the number of white tiles revealed in the episode.
Sincedifferent boards will have different number of red tiles and thus have varying levels of difficulty, wemeasure the performance relative to a “nearest neighbor” heuristic.
This heuristic randomly selectscovered tiles adjacent to currently uncovered red tiles.
We run this heuristic 1000 times on each boardand the human/agent’s number of white tiles revealed is z-scored according to this distribution.
Az-score of below 0 means that the human/agent did better than the mean performance of the nearestneighbor heuristic.
The specific value of the z-score reflects how many standard deviations thehuman/agent did better than the mean performance of the nearest neighbor heuristic.
To comparetask performance across different task distributions and models, we use a non-parametric bootstrapindependent samples statistical test to determine significance.
Baseline experiments.
The agent architecture is an LSTM meta-learner trained with reinforcementlearning.
This architecture is inspired by Wang et al.
Our LSTM meta-learner takes the fullboard x t as input, passes it through convolutional and fully connected layers and feeds that, alongwith the previous action a t − 1 and reward r t − 1 , to 120 LSTM units.
The agent had 16 possible actionscorresponding to choosing a tile (on the 4 × 4 board) to reveal.
The reward function was: +1 forrevealing red tiles, -1 for white tiles, +5 for the last red tile, and -2 for choosing an already revealedtile.
The agent was trained using Proximal Policy Optimization [PPO; Schulman et al. 37] using the
Stable Baselines package [38] for one million episodes.
We trained our agent on the distribution of the human-generated GSP samples (see Fig 2).
We thenevaluated the agent on a set of human-generated samples as well as machine-generated samples,both of which were held out of training.
Despite the fact that we did not train the agent on themachine-generated samples, the agent still performs significantly better on the control samples thanthe human samples ( p < 0 . 0001 )
(Fig.
3B), which is in stark contrast to humans who performsignificantly better on the human-generated samples ( p < 0 . 0001 ).
The fact that the meta-RL agentexhibits the opposite pattern of performance across human and machine-generated tasks (compared tohumans) suggests that the agent has learned a different representation than that used by the humans,reflecting a different set of inductive biases than that of the humans.
This is a replication of the resultsreported in Kumar et al.
[11] – using the same architectures and task structure, but here the agent istrained with PPO instead of A2C. Having established that humans and agents seem to use differentrepresentations to perform these tasks – presumably driven by differences in inductive bias – we nowconsider how to provide the agent with more human-like inductive bias(es).
Instilling human inductive biases with language and programs
3.1 Natural language representations
We collected natural-language descriptions of 500 of the most probable GSP boards from a naive groupof participants.
Each participant wrote descriptions for 25 unique boards in response to the followingprompt: “Your goal is to describe this pattern of red squares in words.
Be as detailed as possible.
Someone should be able to reproduce the entire board given your description.
You may be rewardedbased on how detailed your description is.”
Participants were randomly assigned boards such that eachboard had 9-12 descriptions from different participants.
As a control for the language data, we alsogenerated synthetic text descriptions.
Synthetic descriptions used a template that said “The reds are in:row X 1 and column Y 1 ,...,” for every red tile location ( X n , Y n ) .
We permuted the order in which thered tile locations were verbalized to generate multiple descriptions per board and mimic the multiplehuman descriptions per board for the human-generated descriptions.
To embed each description(both human-generated and synthetic) into a vector space with semantic meaning, we obtained the
RoBERTa [39] sentence embedding for each description using the SentenceTransformer package( https://www.sbert.net/ , based on Reimers and Gurevych [40]).
The SentenceTransformersmodel maps text into a 768 dimensional dense semantically meaningful vector space (i.e. text samplesthat are semantically similar are close to each other in vector space).
Reimers and Gurevych [40] dothis by using a contrastive objective on a dataset of semantically-paired text where embeddings fromthe same pair are pushed closer and embeddings from different pairs are pushed further apart.
3.2 Program representations
We used DreamCoder [24] to parse the boards from the GSP experiment into programs that cangenerate them.
Given a domain-specific language (DSL) and a way to score a program comprised of
DSL functions, DreamCoder enumerates and scores programs during its wake phase .
This process isaccelerated in two ways during the sleep phase : first, by learning a neural-network-based recognitionmodel that guides searching the space of programs during wake, and second by augmenting the DSLwith subprograms abstracted from repeated expressions in existing programs using library learning .
DreamCoder alternates between wake and sleep phases for multiple cycles.
We now describe our domain and DSL.
In this domain, the goal is to produce the target board ona 4 × 4 grid by controlling a pointer that marks locations with a pen (see Fig. 1).
The pointer stateconsists of a location on the grid, an orientation in one of the four cardinal directions, and whether thepointer’s pen is down (i.e. whether it will mark at subsequent future locations).
The DSL is comprisedof the following primitives: move which moves the pointer forward from the current location based onorientation; left , right which turn the pointer, changing its orientation; pen-up , pen-down whichchange the state of the pointer’s pen; and fork which stores the pointer state, executes a program,and then restores the agent state (except that grid locations marked in the subroutine are not reset).
The score s ( ρ | l ) of a program ρ when executed from an initial location l is the sum of several penaltiesthat encourage the program to replicate the target board faithfully in an efficient manner.
First, thereis a penalty of − 10 for each marked location that is in the target board and not in the generatedprogram’s board, and a penalty of −∞ for each location that is in the generated program’s board andnot in the target board 1 .
The program is therefore strongly encouraged to mark all the tiles that aremarked in the target, and strongly discouraged from marking additional tiles that are not in the target.
Second, there are penalties that encourage the program to replicate the target board efficiently.
Thereis a penalty of − 1 for each instance of move , left , and right when the pen was down, encouragingprograms to draw boards in few steps.
The score of a program is set as the best score achieved by theprogram starting from any initial location max l s ( ρ | l ) .
In the first sleep phase, DreamCoder trains a neural network that is used to guide program search –this recognition model does so by taking the board as input and predicting programs that are likelyto solve that board based on previous successful solutions.
The recognition model consists of a16-channel 3 × 3 convolutional layer, followed by two fully-connected layers with 64 units each, andending with a linear layer.
To generate a vector-based representation of the boards that contains theinformation necessary for program induction, we use the final hidden layer of the recognition model
[Figure]
Language
[Figure]
s t r a c t .
[Figure]
A
B
C
D
[Figure]
as the representation of the board.
This embeds each board into a dense vector, similar to the naturallanguage embedding of each board.
In the library learning sleep phase, DreamCoder grows the DSL by adding library functions basedon reused components of successful programs found during wake (see Fig.
4B for an example).
Specifically, it adds program components that minimize the description length of both the currentprogram library and each successful program, once rewritten to use this new library component.
These learned library abstractions serve to compress programs found in previous wake cycles andbetter enable the search for future programs in future wake cycles.
We execute DreamCoder with andwithout library learning to test the usefulness of program representations with abstractions.
3.3 Comparing programs and language descriptions
We first consider the descriptions we obtained from humans.
We found a wide range in the levelof abstraction in human natural language descriptions.
Some are more literal and verbose in theirdescriptions whereas others use more abstract concepts to compress their descriptions (Fig. 4A).
Onaverage, human-generated descriptions were shorter than synthetically-generated descriptions, whichlisted every red tile location (Fig. 4C).
By analogy, library-learned concepts allow for compression ofprograms (Fig. 4B).
Both human-generated language (vs synthetic) and library-learned programs (vsonly primitives) have the same effect on enabling shorter description lengths (Fig. 4C).
We further found that the description lengths in human language and library-learned programs aresignificantly correlated (Fig.
4D) across boards.
In other words, a board that is more compressibleusing human language abstractions was also more compressible with library learning over programs.
This indicates that the abstractions used by humans in language overlap with the abstractions learnedby Dreamcoder during library learning.
This correlation is not significant when comparing humangenerated language description length with description lengths of programs without library learning(Fig.
4D).
This indicates that the correlation may be due to the abstractions captured through librarylearning.
An illustrative example can be seen in Fig.
1, where the program’s used library function and the phrase "U shape" within in the human language description are actually the same concept.
We verify this further by testing for the difference between these two correlations using a nonparametric permutation test.
The correlation between human-generated language description lengthand library learning program description length is statistically significantly higher ( p = 0 . 0034 )than the correlation between human-generated description length and non-library learning programdescription length.
Not only do the representations between language and programs have correlated description lengths,but the actual representations learned can be similar as well.
We consider a sample of three relativelysimple boards in Fig.
5 and conduct a representational similarity analysis.
We find that the similaritystructure of these boards overlap across modalities – i.e they are similar between human-generatedlanguage and library-learned programs, as well as between synthetic language and primitive programs.
Conversely, these matrices don’t look very similar within modality.
That is, the matrices for abstracthuman-generated language don’t look very similar to the matrices for non-abstract synthetic language,and similarly for programs.
This indicates that modality is not the key driver of similarity inrepresentation space; rather, the level of abstraction can be more salient.
This also indicates that theprocess of abstraction changes the representation in similar ways across language and programs.
3.4 Grounding agents in language and program representations
In order to guide the agent to learn a human-like inductive bias, we introduce a task grounding termto the loss function: loss =
L PPO ( θ ) + c task L task ( ˆ ψ θ , ψ ) .
Here L PPO ( θ ) is the original PPO lossfunction, θ is the current model’s parameters, c task is a hyperparameter coefficient that weights thetask attribute loss L task , ψ is the task attribute, and ˆ ψ θ is the agent’s prediction of the task attribute.
The task attribute loss L task is the Mean Squared Error (MSE) between the agent’s predicted andactual task attribute.
This forces the agent to simultaneously predict an attribute of the hidden taskstate (i.e. the underlying board) as well as come up with the best possible action for the currentobservation (see Fig.
6A).
Like the Baseline RL agent in Fig.
3A, we trained our learners on a training set from the humangenerated boards and evaluated its performance on a held-out test set of human-generated andmachine-generated boards.
We trained different agents to predict different kinds of task embeddingsduring training (Fig.
6A) based on language (both synthetic and human-generated language) andprograms (both no library learning and library learning).
We refer to co-training on predictingthese auxiliary representations as ‘grounding’ the agent on the corresponding representation, takinginspiration from work that trains agents to associate data in one modality (i.e. text instructions) toanother (i.e. visual images) [41–43].
We also co-trained on directly predicting a flattened version ofthe underlying board stimulus, which is equivalent to co-training the agent on an autoencoder loss.
Representational Similarity (Correlation)
[Figure]
matrices (correlation matrices for respective embeddings) for a sample of human-generated boards with line motifs for human-generated language, programs with library learning synthetic language, and programs without library learning.
Abstract representations (human language, library programs) across modalities are more similar than within-modality representations (human language+synthetic language, library learning programs+non-library learning programs).
B
Human Generated (GSP) Machine Generated (Control)
P r
i m i
t i v e
P r og r a m
L i b r a r y
P r og r a m
S y n t
h e t i c
L a n g u a g e
H u m a n
L a n g u a g e
A u t o e n c o d e r
R L B a s e li n e
H u m a n 1.
A d i ff .
f
r o m c o n t r o l ( z - s c
o r e ) w h
i t e t il e s ( z - s c
o r e )
C have the agent’s encoder simultaneously predict a task
We set out to test whether grounding meta-learning agents on these task embeddings will result inthem producing more human-like performance.
We know humans perform better on GSP boardsthan control boards (Fig.
3B), while the generic meta-RL agent does the opposite.
Performingbetter on the GSP boards and worse on the control boards would therefore indicate more human-likebehavior.
To compare task performance across different task distributions or different models, we usea non-parametric bootstrap independent
We see that grounding with human-generated descriptions leads to a human-like inductivebias (Fig. 6B).
Training on this auxillary loss led to an increase in performance at the GSP boardsrelative to the baseline agent ( p < 0 . 0001 ).
The human-language grounded agent also performedsignificantly better at the GSP boards than the control boards ( p < 0 . 0001 ), just like humans do.
In contrast, this auxiliary loss significantly reduced performance on the machine-generated controlboards (as compared to the baseline agent, p = 0 . 021 ).
This indicates that the auxiliary loss didnot generically improve performance across the board, but rather improves performance selectivelyin the human-generated boards, and worsens it in the machine generated boards.
In other words, itmakes the agent more human-like .
The human-language grounded agent also does the best at thehuman-generated tasks across all models.
The autoencoder agent is substantially better on the GSP boards than the original agent ( p < 0 . 001 ).
However, its performance does not differ significantly between the human and machine-generatedtasks ( p = 0 . 252 ).
This indicates that its boost in performance relative to the original agent is notfrom acquiring a human-like inductive bias .
Similarly, we also find that grounding on syntheticdescriptions does not lead to human-like bias and instead has an effect similar to that of theautoencoder loss – it improves performance uniformly rather than selectively.
In fact, the agentusing synthetic text does better in the control distribution than the GSP distribution ( p = 0 . 0016 ),which is qualitatively similar to the performance pattern of the original agent (Fig.
3B), and distinctlydissimilar from human behavior.
We now move to examining the agents co-trained with program representations.
We found thatgrounding on library learning programs leads to a human-like inductive bias (Fig. 6B).
Specifically, although grounding on non-library program task embeddings does numerically better onhuman-generated tasks than machine-generated tasks, this difference is not significant ( p = 0 . 11 ).
This difference, however, is highly significant when grounding on library-learning program taskembeddings ( p < 0 . 0001 ).
In addition, grounding on library learning program task embeddings does significantly better at the GSP tasks than grounding on non-library learning program embeddings( p < 0 . 0001 ).
Just as grounding on human language produces more human-like inductive bias thansynthetic language, grounding on library learning programs produces more human-like inductive biasthan grounding on programs without library learning.
This points to evidence that the level of abstraction of the task embeddings influences the extentto which the agent acquires a human inductive bias , as indicated by the differences in performanceamong low (synthetic for language, no library learning for programs) and high-level (human-generatedlanguage and library learning programs) agents.
In human-generated descriptions, humans writeabout abstract concepts (e.g. lines, shapes, letters, etc).
Similarly abstract concepts can be learnedas library functions (see Fig.
4B).
The process of abstraction in language and programs allows forcompression of the respective description and induced program (Fig.
see 4C).
The embeddings ofthese representations that were compressed through abstract concepts may therefore be distillinguseful concepts into our meta-learning agent that enables it to acquire a human-like inductive bias.
Discussion
In this work, we argue that language descriptions and program abstractions can act as repositoriesfor human inductive biases that may be distilled into artificial neural networks.
To test this idea,we considered a tile-revealing task with 2D grids that were directly sampled from human priors.
We found that grounding on human-generated language and programs in library learning not onlyimproves machine performance on tasks that people perform well , but also impairs performanceon tasks that people perform more poorly .
Although the idea of co-training artificial agents onlanguage to shape their representations has been explored before, most works utilize syntheticallygenerated language descriptions [18, 21, 22].
Our work suggests that not all language is createdequal: human-generated language leads to more human-like performance than synthetic languagedescriptions. Human-generated descriptions contain information about abstract concepts (e.g. lines,shapes, letters, etc) that compress description length and are reflected in tasks directly sampled fromhuman priors and therefore better capture human inductive biases.
We also show evidence that co-training artificial agents on representations from program inductionresults in learning human inductive biases in a manner qualitatively similar to co-training on language.
Programs induced with library-learned concepts [24] are analogous to language in that adding librarylearned concepts to the initial DSL enables compression of description length just as how humans useabstract concepts to compress description length.
Just like human language, programs with libraryabstractions better enable learning of human-like inductive biases.
Program induction can sometimesbe difficult due to the combinatorial explosion of the program space [44] and the non-trivial decisionof picking a DSL.
Co-supervision of tabula rasa artificial agents using representations from programinduction can be a useful way to build agents with both the flexibility of neural networks and thehuman-like priors that program induction can provide.
Additionally, although we investigate languageand programs as separate but analogous representations that can guide the training of artificial agents,recent work has also learned joint compositional generative models over program libraries and naturallanguage descriptions [19].
An exciting direction for future work is to combine our objectives,utilizing joint program and language representations to instill human inductive biases in artificialagents.
There are some limitations to our work.
We use a constrained task paradigm on 2D grids.
Althoughthis gives us the advantage of being able to directly study samples of human and machine priors onthe task space (Fig. 2), there still must be work done to see how language and programs can influenceacquisition of human inductive biases in more scaled up, naturalistic, and real-world settings.
Thesekinds of rich environments themselves can play a role in the acquisition of human-like behaviorin artificial agents [45].
In such environments, it may be more difficult to determine the relevantabstractions necessary when implementing program induction techniques or getting humans to focuson such abstractions in their descriptions (though language can play an important role in these kindsof environments [46]).
Tackling these potential challenges when scaling up the approaches of thispaper to such environments will be exciting future work.
Strong inductive biases towards abstract structure allow humans to generalize to novel environmentswithout much experience [4].
By instilling these biases in our artificial agents, we can work towardsenabling machines to demonstrate human-like general intelligence.
A AppendixA.1 Program induction with dreamcoder
DreamCoder was run in two modes for the reported analyses: with and without library learning.
Allparameters matched between the two modes except those exclusive to library learning: 4 iterations of
DreamCoder, 10 CPUs, 2 minute timeout for program enumeration, 2 minute timeout for recognitionmodel training, and 50% of tasks used to train the recognition model were randomly sampled“dreams”.
The recognition model was trained to predict a unigram distribution over DSL primitivesand library components.
No task batching was enabled, so every task was solved at every iteration
[Table]
A.2 Details of training and hyperparameter tuning of reinforcement learning agents
The original agent’s encoder processes the board through a convolutional layer and a fully connectedlayer and passes this output into the LSTM along with the previous action and reward (see Fig.
3B).
To implement the grounding mechanism (Fig.
6A), we take the encoder’s output, and pass it throughtwo additional fully connected layers to predict the task embedding.
All agents were trained using
Proximal Policy Optimization (PPO; Schulman et al.
37 using the Stable Baselines package Raffinet al.
for one million episodes.
We performed a hyperparameter sweep separately for the agentswithout the grounding loss (i.e. original agents) and with the grounding loss, since we have to tunethe new c task weight on the grounding loss jointly.
We performed a hyperparameter sweep for: batchsize, n_steps (number of steps to run in an environment update), gamma, learning rate, learningrate schedule (constant or linear), clip range, number of epochs, the λ for Generalized Advantage
Estimate (GAE λ ), max grad norm, activation function, value loss coefficient, entropy coefficient,and grounding loss coefficient for agents with the grounding loss.
The hyperparameter sweep wasdone by sampling from the space of hyperparameter using the Tree-Structured Parzen Estimator [47].
We evaluated 200 samples of hyperparameters from the space for all agents.
Both grounding andnon-grounding agents used the same hyperparameter spaces to sweep over.
We initially did a separatehyperparameter sweep for different grounding agents, but we found in initial experiments that they allreached similar hyperparameter values and training reward after the search.
Hyperparameters wereevaluated by training on 100,000 episodes and looking at the training reward.
The environments usedduring test time (Fig.
3B and Fig. 6) were completely held-out during this process.
We trained eachgrounding agent (and the non-grounding agent) fifteen times and ran their policy fifteen times foreach held-out test task distribution (GSP and control tasks).
Training was run on a university clusterusing NVIDIA P100 GPUs with 16 GB of memory.
A.3 Human Language Description Experiment
We took 500 of the highest probability GSP boards and randomly assigned subjects 25 of the boardssuch that each subject gets a unique set of boards and each board gets 9-12 descriptions each fromdifferent people.
The prompt people were given was: “Your goal is to describe this pattern of redsquares in words.
Be as detailed as possible.
Someone should be able to reproduce the entire boardgiven your description.
You may be rewarded based on how detailed your description is.
“ We used
Prolific ( http://www.prolific.co ) for anonymous subject recruiting.
Participants were paid at arate of approximately $12 per hour (with a total study cost of $1844) and were fully anonymizedthrough the whole process.
All text data focused on just the board stimuli and did not include anypersonally-identifiable content.
The experiment contained writing about artificial grid stimuli, sopotential risks to subjects were very minimal.
Subjects gave their consent through a standard consentform at the start of the experiment (where they had to confirm that they agree and give their consent).
A.4 Broader Impact Statement
This work aims to guide artificial agents through human-like behavior.
One way in which thiswork achieves this goal is by co-training with human-generated language descriptions.
Althoughall language data collected in this study was anonymized and devoid of personally-identifiableinformation, a larger discussion is to be had in scaling this approach up while respecting the privacyand anonymity of people’s data.
Should an approach like ours be massively scaled, a conversationabout careful checks on data privacy must be had in order to prevent leakage of private information indownstream agent behaviors.
Current artificial systems are not built explicitly to exhibit human-like qualities or behavior.
Ourwork on explicitly training in human-like biases into artificial systems’ behavior can be greatlybeneficial in terms of being more easily interpretable by humans and being more easily amenable tohuman-machine collaborations.
Checklist
The checklist follows the references.
Please read the checklist guidelines carefully for information onhow to answer these questions.
For each question, change the default [TODO] to [Yes] , [No] , or[N/A] .
You are strongly encouraged to include a justification to your answer , either by referencingthe appropriate section of your paper or providing a brief inline description.
For example:
• Did you include the license to the code and datasets?
[Yes]
• Did you include the license to the code and datasets?
[No] The code and the data are proprietary.
• Did you include the license to the code and datasets?
[N/A]
Please do not modify the questions and only use the provided macros for your answers.
Note that the
Checklist section does not count towards the page limit.
In your paper, please delete this instructionsblock and only keep the Checklist section heading above along with the questions/answers below.
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes] See towards the end of thediscussion section.
(c) Did you discuss any potential negative societal impacts of your work?
[Yes] See sectionA.4 of the Appendix.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes] We discuss potential negative societal impacts in section A.4 and humandata collection in section A.3.
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[N/A]
(b) Did you include complete proofs of all theoretical results?
[N/A]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes] Code will be
available in the supplementary material for reviewers and publicly available online
(with more extensive documentation) upon paper acceptance.
(b) Did you specify all the training details (e.g., data splits, hyperparameters,
how they
were chosen)?
[Yes] See section A.2 of appendix.
(c) Did you report error bars (e.g., with respect to the random seed after running experi-
ments multiple times)?
[Yes] See figure captions and section A.2 of appendix.
(d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
[Yes] See section A.2 of appendix.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes] We cite the authors responsible for collecting the dataset and creating the task paradigm that we used.
(b) Did you mention the license of the assets?
[N/A]
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes]
Data and code will be available in the supplementary material and a well-documented
version will be publicly available upon paper acceptance.
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[Yes] See section A.3 on human data collection of appendix.
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[Yes] ee section A.3 on human data collection of appendix.
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if [Table] applicable?
[Yes] See section A.3 on human data collection of appendix.
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[Yes] See section A.3 on human data collectionof appendix.
(c) Did you include the estimated hourly wage paid to participants and the total amount [Table] spent on participant compensation?
[Yes] See section A.3 on human data collection of [Table] appendix.