├── .gitignore ├── README.md ├── figures └── methodology.png ├── programs ├── conll │ ├── conll_ner.py │ ├── conll_ner_embeddings.csv │ ├── conll_ner_embeddings.py │ ├── conll_ner_weights.csv │ └── conll_notebook.ipynb ├── rasp │ ├── double_hist │ │ ├── double_hist.py │ │ └── double_hist_weights.csv │ ├── dyck1 │ │ ├── dyck1.py │ │ └── dyck1_weights.csv │ ├── dyck2 │ │ ├── dyck2.py │ │ └── dyck2_weights.csv │ ├── hist │ │ ├── hist.py │ │ └── hist_weights.csv │ ├── most_freq │ │ ├── most_freq.py │ │ └── most_freq_weights.csv │ ├── reverse │ │ ├── reverse.py │ │ └── reverse_weights.csv │ └── sort │ │ ├── sort.py │ │ └── sort_weights.csv ├── rasp_categorical_only │ ├── double_hist │ │ ├── double_hist.py │ │ └── double_hist_weights.csv │ ├── dyck1 │ │ ├── dyck1.py │ │ └── dyck1_weights.csv │ ├── dyck2 │ │ ├── dyck2.py │ │ └── dyck2_weights.csv │ ├── hist │ │ ├── hist.py │ │ └── hist_weights.csv │ ├── most_freq │ │ ├── most_freq.py │ │ └── most_freq_weights.csv │ ├── reverse │ │ ├── reverse.py │ │ └── reverse_weights.csv │ └── sort │ │ ├── sort.py │ │ └── sort_weights.csv └── trec │ ├── trec.py │ ├── trec_embeddings.csv │ ├── trec_embeddings.py │ └── trec_weights.csv ├── requirements.txt ├── scripts ├── classification.sh ├── classification_short.sh ├── classification_standard.sh ├── conll.sh ├── conll_standard.sh ├── dyck.sh ├── induction.sh └── rasp.sh ├── setup.py └── src ├── __init__.py ├── decompile.py ├── models ├── __init__.py ├── programs.py └── transformers.py ├── run.py └── utils ├── __init__.py ├── analysis_utils.py ├── code_utils.py ├── data_utils.py ├── logging.py └── metric_utils.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/README.md -------------------------------------------------------------------------------- /figures/methodology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/figures/methodology.png -------------------------------------------------------------------------------- /programs/conll/conll_ner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/conll/conll_ner.py -------------------------------------------------------------------------------- /programs/conll/conll_ner_embeddings.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/conll/conll_ner_embeddings.csv -------------------------------------------------------------------------------- /programs/conll/conll_ner_embeddings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/conll/conll_ner_embeddings.py -------------------------------------------------------------------------------- /programs/conll/conll_ner_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/conll/conll_ner_weights.csv -------------------------------------------------------------------------------- /programs/conll/conll_notebook.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/conll/conll_notebook.ipynb -------------------------------------------------------------------------------- /programs/rasp/double_hist/double_hist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/double_hist/double_hist.py -------------------------------------------------------------------------------- /programs/rasp/double_hist/double_hist_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/double_hist/double_hist_weights.csv -------------------------------------------------------------------------------- /programs/rasp/dyck1/dyck1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/dyck1/dyck1.py -------------------------------------------------------------------------------- /programs/rasp/dyck1/dyck1_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/dyck1/dyck1_weights.csv -------------------------------------------------------------------------------- /programs/rasp/dyck2/dyck2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/dyck2/dyck2.py -------------------------------------------------------------------------------- /programs/rasp/dyck2/dyck2_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/dyck2/dyck2_weights.csv -------------------------------------------------------------------------------- /programs/rasp/hist/hist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/hist/hist.py -------------------------------------------------------------------------------- /programs/rasp/hist/hist_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/hist/hist_weights.csv -------------------------------------------------------------------------------- /programs/rasp/most_freq/most_freq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/most_freq/most_freq.py -------------------------------------------------------------------------------- /programs/rasp/most_freq/most_freq_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/most_freq/most_freq_weights.csv -------------------------------------------------------------------------------- /programs/rasp/reverse/reverse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/reverse/reverse.py -------------------------------------------------------------------------------- /programs/rasp/reverse/reverse_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/reverse/reverse_weights.csv -------------------------------------------------------------------------------- /programs/rasp/sort/sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/sort/sort.py -------------------------------------------------------------------------------- /programs/rasp/sort/sort_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp/sort/sort_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/double_hist/double_hist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/double_hist/double_hist.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/double_hist/double_hist_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/double_hist/double_hist_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/dyck1/dyck1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/dyck1/dyck1.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/dyck1/dyck1_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/dyck1/dyck1_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/dyck2/dyck2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/dyck2/dyck2.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/dyck2/dyck2_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/dyck2/dyck2_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/hist/hist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/hist/hist.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/hist/hist_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/hist/hist_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/most_freq/most_freq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/most_freq/most_freq.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/most_freq/most_freq_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/most_freq/most_freq_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/reverse/reverse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/reverse/reverse.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/reverse/reverse_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/reverse/reverse_weights.csv -------------------------------------------------------------------------------- /programs/rasp_categorical_only/sort/sort.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/sort/sort.py -------------------------------------------------------------------------------- /programs/rasp_categorical_only/sort/sort_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/rasp_categorical_only/sort/sort_weights.csv -------------------------------------------------------------------------------- /programs/trec/trec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/trec/trec.py -------------------------------------------------------------------------------- /programs/trec/trec_embeddings.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/trec/trec_embeddings.csv -------------------------------------------------------------------------------- /programs/trec/trec_embeddings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/trec/trec_embeddings.py -------------------------------------------------------------------------------- /programs/trec/trec_weights.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/programs/trec/trec_weights.csv -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/classification.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/classification.sh -------------------------------------------------------------------------------- /scripts/classification_short.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/classification_short.sh -------------------------------------------------------------------------------- /scripts/classification_standard.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/classification_standard.sh -------------------------------------------------------------------------------- /scripts/conll.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/conll.sh -------------------------------------------------------------------------------- /scripts/conll_standard.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/conll_standard.sh -------------------------------------------------------------------------------- /scripts/dyck.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/dyck.sh -------------------------------------------------------------------------------- /scripts/induction.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/induction.sh -------------------------------------------------------------------------------- /scripts/rasp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/scripts/rasp.sh -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/setup.py -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/decompile.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/decompile.py -------------------------------------------------------------------------------- /src/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/models/programs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/models/programs.py -------------------------------------------------------------------------------- /src/models/transformers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/models/transformers.py -------------------------------------------------------------------------------- /src/run.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/run.py -------------------------------------------------------------------------------- /src/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/utils/analysis_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/utils/analysis_utils.py -------------------------------------------------------------------------------- /src/utils/code_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/utils/code_utils.py -------------------------------------------------------------------------------- /src/utils/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/utils/data_utils.py -------------------------------------------------------------------------------- /src/utils/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/utils/logging.py -------------------------------------------------------------------------------- /src/utils/metric_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/princeton-nlp/TransformerPrograms/HEAD/src/utils/metric_utils.py --------------------------------------------------------------------------------