Skip to content
STEGASURAS: STEGanography via Arithmetic coding and Strong neURAl modelS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore the first commit Sep 3, 2019 Update Sep 10, 2019 the first commit Sep 3, 2019
requirements.txt the first commit Sep 3, 2019


STEGanography via Arithmetic coding and Strong neURAl modelS

This repository contains implementations of the steganography algorithms from "Neural Linguistic Steganography," Zachary M. Ziegler*, Yuntian Deng*, Alexander M. Rush.

There is a breaking change in pytorch 1.2, make sure to use pytorch 1.0 as in requirements.txt.

Online Demo

Our online demo can be found at

Language model

Experiments in the paper use the medium (345M parameter) GPT model via pytorch_transformers. For compute reasons the default in this code base is the small version but the medium or large versions can be used by changing the model_name parameter of get_model.


The steganography algorithms implemented are:

  1. Our proposed arithmetic coding-based algorithm
  2. The Huffman algorithm from RNN-Stega: Linguistic Steganography Based on Recurrent Neural Networks
  3. The binning algorithm from Generating Steganographic Text with LSTMs

An example of encoding and decoding a message is in The algorithm used is determined by the mode parameter.

You can’t perform that action at this time.