"torch_harmonics/examples/models/sfno.py" did not exist on "b91f517c2b06f2de356612a895c94ca0ee1b63b7"
README.md 2.6 KB
Newer Older
1
2
3
4
![No Maintenance Intended](https://img.shields.io/badge/No%20Maintenance%20Intended-%E2%9C%95-red.svg)
![TensorFlow Requirement: 1.x](https://img.shields.io/badge/TensorFlow%20Requirement-1.x-brightgreen)
![TensorFlow 2 Not Supported](https://img.shields.io/badge/TensorFlow%202%20Not%20Supported-%E2%9C%95-red.svg)

5
6
7
8
9
10
# Learning to Protect Communications with Adversarial Neural Cryptography

This is a slightly-updated model used for the paper
["Learning to Protect Communications with Adversarial Neural
Cryptography"](https://arxiv.org/abs/1610.06918).

11
12
13
14
15
16
17
18
19
> We ask whether neural networks can learn to use secret keys to protect
> information from other neural networks. Specifically, we focus on ensuring
> confidentiality properties in a multiagent system, and we specify those
> properties in terms of an adversary. Thus, a system may consist of neural
> networks named Alice and Bob, and we aim to limit what a third neural
> network named Eve learns from eavesdropping on the communication between
> Alice and Bob. We do not prescribe specific cryptographic algorithms to
> these neural networks; instead, we train end-to-end, adversarially.
> We demonstrate that the neural networks can learn how to perform forms of
20
21
22
> encryption and decryption, and also how to apply these operations
> selectively in order to meet confidentiality goals.

Charles Reid's avatar
Charles Reid committed
23
This code allows you to train encoder/decoder/adversary network triplets
24
25
26
27
28
and evaluate their effectiveness on randomly generated input and key
pairs.

## Prerequisites

29
The only software requirements for running the encoder and decoder is having
Charles Reid's avatar
Charles Reid committed
30
TensorFlow installed.
31

Charles Reid's avatar
Charles Reid committed
32
Requires TensorFlow r0.12 or later.
33
34
35
36
37
38

## Training and evaluating

After installing TensorFlow and ensuring that your paths are configured
appropriately:

39
40
41
42
```
python train_eval.py
```

43
44
45
46
47
48
49
50
51
52
53
54
This will begin training a fresh model.  If and when the model becomes
sufficiently well-trained, it will reset the Eve model multiple times
and retrain it from scratch, outputting the accuracy thus obtained
in each run.

## Model differences from the paper

The model has been simplified slightly from the one described in
the paper - the convolutional layer width was reduced by a factor
of two.  In the version in the paper, there was a nonlinear unit
after the fully-connected layer;  that nonlinear has been removed
here.  These changes improve the robustness of training.  The
55
initializer for the convolution layers has switched to the
Charles Reid's avatar
Charles Reid committed
56
57
`tf.contrib.layers default` of `xavier_initializer` instead of
a simpler `truncated_normal`.
58
59
60
61
62

## Contact information

This model repository is maintained by David G. Andersen
([dave-andersen](https://github.com/dave-andersen)).