This is the codebase for the paper Transformers Learn Transition Dynamics when Trained to Predict Markov Decision Processes.
Through the code above, we achieve the process of training and testing the probes used in the experiment. The exact process is outlined as follows:
The steps of the experiment are:
- Generate training data for the transformer by playing through Gridworld (in RL_Training_Gridworld)
- Train transformers on generated training data (in GPT/GridWorld)
- Generate embeddings using transformers (in Probe)
- Train probes on embeddings and collect data (in Probe/probe.py)
- Generate training data for the transformer by playing through Gridworld (in RL_Training_ConnectFour)
- Train transformers on generated training data (in transformer_training and transformer_training_mcts)
- Generate embeddings using transformers (in transformers_trained and transformers_trained_mcts)
- Train probes on embeddings and collect data (in Probe_training)
- Parse data (in parse_probe_data.py)