8000 GitHub - al-jshen/alice: ALICE: An Interpretable Neural Architecture for Generalization in Substitution Ciphers · GitHub
[go: up one dir, main page]

Skip to content
al-jshenPublic

About

ALICE: An Interpretable Neural Architecture for Generalization in Substitution Ciphers

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

Alice: An Interpretable Neural Architecture for Generalization in Substitution Ciphers

ALICE

Alice (an Architecture for Learning Interpretable Cryptogram dEcipherment) is a transformer-based neural network designed to solve cryptograms.

Installation

From Source

git clone https://github.com/al-jshen/alice.git
cd alice
pip install -e .

Quick Start

Training a Model

  1. Prepare your configuration: Copy and modify one of the config files in configs/:
cp configs/alice_base.yaml configs/my_config.yaml
  1. Update the configuration: Edit configs/my_config.yaml to set your dataset path, W&B credentials, etc.

  2. Train the model:

python alice/train.py --config configs/my_config.yaml

Linear/non-linear probing

To train linear/non-linear probes on top of frozen model representations, run the included alice/train_probes.py script. There is an example config named configs/probe_base_linear.yaml that you can modify.

Pretrained Models

We release the checkpoints for various pretrained models at this link.

You will need to instantiate the model with the same configuration used during training.

Model Variants

Bijective Decoding

To use the bijective decoding head:

sinkhorn_decoding: true
sinkhorn_iters: 10
sinkhorn_tau: 1.0

Dynamic Embeddings

Enable dynamic embeddings:

dynamic_embeddings: true
embedding_n_layer: 2
embedding_n_head: 4

License

This project is licensed under the Apache-2.0 License. See LICENSE for details.

About

ALICE: An Interpretable Neural Architecture for Generalization in Substitution Ciphers

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0