Phil 9.16.19

7:00 – ASRC GOES

This makes me happy. Older, but not slower. Yet.


  • Maryland Anatomy Board Dept of vital records 410 764 2922 – Never got called back
  • Ping Antonio about virtual crowdsourcing of opinion
  • Dissertation – write up dissertation house one-pager
  • Optimizer
    • Generating chromosome sequences.
    • Created a fitness landscape to evaluate


  • Working on breeding and mutation
  • ML Seminar
  • Meeting With Aaron M
  • Evolution of Representations in the Transformer (nice looking blog post of deeper paper)
    • We look at the evolution of representations of individual tokens in Transformers trained with different training objectives (MT, LM, MLM – BERT-style) from the Information Bottleneck perspective and show, that:
      • LMs gradually forget past when forming future;
      • for MLMs, the evolution has the two stages of context encoding and token reconstruction;
      • MT representations get refined with context, but less processing is happening.
  • Different Spirals of Sameness: A Study of Content Sharing in Mainstream and Alternative Media
    • In this paper, we analyze content sharing between news sources in the alternative and mainstream media using a dataset of 713K articles and 194 sources. We find that content sharing happens in tightly formed communities, and these communities represent relatively homogeneous portions of the media landscape. Through a mix-method analysis, we find several primary content sharing behaviors. First, we find that the vast majority of shared articles are only shared with similar news sources (i.e. same community). Second, we find that despite these echo-chambers of sharing, specific sources, such as The Drudge Report, mix content from both mainstream and conspiracy communities. Third, we show that while these differing communities do not always share news articles, they do report on the same events, but often with competing and counter-narratives. Overall, we find that the news is homogeneous within communities and diverse in between, creating different spirals of sameness.

Phil 9.14.19


Document This document describes the Facebook Privacy-Protected URLs-light release, resulting from a collaboration between Facebook and Social Science One. It was originally prepared for Social Science One grantees and describes the dataset’s scope, structure, and fields.

As part of this project, we are pleased to announce that we are making data from the URLs service available to the broader academic community for projects concerning the effect of social media on elections and democracy. This unprecedented dataset consists of web page addresses (URLs) that have been shared on Facebook starting January 1, 2017 through to and including February 19, 2019. URLs are included if shared by more than on average 100 unique accounts with public privacy settings. Read the complete Request for Proposals for more information.

Phil 9.12.19

7:00 – 4:30 ASRC GOES

  • FractalNet: Ultra-Deep Neural Networks without Residuals
    • We introduce a design strategy for neural network macro-architecture based on self-similarity. Repeated application of a simple expansion rule generates deep networks whose structural layouts are precisely truncated fractals. These networks contain interacting subpaths of different lengths, but do not include any pass-through or residual connections; every internal signal is transformed by a filter and nonlinearity before being seen by subsequent layers. In experiments, fractal networks match the excellent performance of standard residual networks on both CIFAR and ImageNet classification tasks, thereby demonstrating that residual representations may not be fundamental to the success of extremely deep convolutional neural networks. Rather, the key may be the ability to transition, during training, from effectively shallow to deep. We note similarities with student-teacher behavior and develop drop-path, a natural extension of dropout, to regularize co-adaptation of subpaths in fractal architectures. Such regularization allows extraction of high-performance fixed-depth subnetworks. Additionally, fractal networks exhibit an anytime property: shallow subnetworks provide a quick answer, while deeper subnetworks, with higher latency, provide a more accurate answer.
  • Structural diversity in social contagion
    • The concept of contagion has steadily expanded from its original grounding in epidemic disease to describe a vast array of processes that spread across networks, notably social phenomena such as fads, political opinions, the adoption of new technologies, and financial decisions. Traditional models of social contagion have been based on physical analogies with biological contagion, in which the probability that an individual is affected by the contagion grows monotonically with the size of his or her “contact neighborhood”—the number of affected individuals with whom he or she is in contact. Whereas this contact neighborhood hypothesis has formed the underpinning of essentially all current models, it has been challenging to evaluate it due to the difficulty in obtaining detailed data on individual network neighborhoods during the course of a large-scale contagion process. Here we study this question by analyzing the growth of Facebook, a rare example of a social process with genuinely global adoption. We find that the probability of contagion is tightly controlled by the number of connected components in an individual’s contact neighborhood, rather than by the actual size of the neighborhood. Surprisingly, once this “structural diversity” is controlled for, the size of the contact neighborhood is in fact generally a negative predictor of contagion. More broadly, our analysis shows how data at the size and resolution of the Facebook network make possible the identification of subtle structural signals that go undetected at smaller scales yet hold pivotal predictive roles for the outcomes of social processes.
    • Add this to the discussion section – done
  • Dissertation
    • Started on the theory section, then realized the background section didn’t set it up well. So worked on the background instead. I put in a good deal on how individuals and groups interact with the environment differently and how social interaction amplifies individual contribution through networking.
  • Quick meetings with Don and Aaron
  • Time prediction (sequence to sequence) with Keras perceptrons
  • This was surprisingly straightforward
    • There was some initial trickiness in getting the IDE to work with the TF2.0 RC0 package:
      import tensorflow as tf
      from tensorflow import keras
      from tensorflow_core.python.keras import layers

      The first coding step was to generate the data. In this case I’m building a numpy matrix that has ten variations on math.sin(), using our timeseriesML utils code. There is a loop that sets up the code to create a new frequency, which is sent off to get back a pandas Dataframe that in this case has 10 sequence rows with 100 samples. First, we set the global sequence_length:

      sequence_length = 100

      then we create the function that will build and concatenate our numpy matrices:

      def generate_train_test(num_functions, rows_per_function, noise=0.1) -> (np.ndarray, np.ndarray, np.ndarray):
          ff = FF.float_functions(rows_per_function, 2*sequence_length)
          npa = None
          for i in range(num_functions):
              mathstr = "math.sin(xx*{})".format(0.005*(i+1))
              #mathstr = "math.sin(xx)"
              df2 = ff.generateDataFrame(mathstr, noise=0.1)
              npa2 = df2.to_numpy()
              if npa is None:
                  npa = npa2
                  ta = np.append(npa, npa2, axis=0)
                  npa = ta
          split = np.hsplit(npa, 2)
          return npa, split[0], split[1]

      Now, we build the model. We’re using keras from the TF 2.0 RC0 build, so things look slightly different:

      model = tf.keras.Sequential()
      # Adds a densely-connected layer with 64 units to the model:
      model.add(layers.Dense(sequence_length, activation='relu', input_shape=(sequence_length,)))
      # Add another:
      model.add(layers.Dense(200, activation='relu'))
      # Add a softmax layer with 10 output units:
      loss_func = tf.keras.losses.MeanSquaredError()
      opt_func = tf.keras.optimizers.Adam(0.01)
      model.compile(optimizer= opt_func,

      We can now fit the model to the generated data:

      full_mat, train_mat, test_mat = generate_train_test(10, 10)
   , test_mat, epochs=10, batch_size=2)

      There is noise in the data, so the accuracy is not bang on, but the loss is nice. We can see this better in the plots above, which were created using this function:

      def plot_mats(mat:np.ndarray, cluster_size:int, title:str, fig_num:int):
          i = 0
          for row in mat:
              cstr = "C{}".format(int(i/cluster_size))
              plt.plot(row, color=cstr)
              i += 1

      Which is called just before the program completes:

      if show_plots:
          plot_mats(full_mat, 10, "Full Data", 1)
          plot_mats(train_mat, 10, "Input Vector", 2)
          plot_mats(test_mat, 10, "Output Vector", 3)
          plot_mats(predict_mat, 10, "Predict", 4)

    • That’s it! Full listing below:
import tensorflow as tf
from tensorflow import keras
from tensorflow_core.python.keras import layers
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import timeseriesML.generators.float_functions as FF

sequence_length = 100

def generate_train_test(num_functions, rows_per_function, noise=0.1) -> (np.ndarray, np.ndarray, np.ndarray):
    ff = FF.float_functions(rows_per_function, 2*sequence_length)
    npa = None
    for i in range(num_functions):
        mathstr = "math.sin(xx*{})".format(0.005*(i+1))
        #mathstr = "math.sin(xx)"
        df2 = ff.generateDataFrame(mathstr, noise=0.1)
        npa2 = df2.to_numpy()
        if npa is None:
            npa = npa2
            ta = np.append(npa, npa2, axis=0)
            npa = ta

    split = np.hsplit(npa, 2)
    return npa, split[0], split[1]

def plot_mats(mat:np.ndarray, cluster_size:int, title:str, fig_num:int):

    i = 0
    for row in mat:
        cstr = "C{}".format(int(i/cluster_size))
        plt.plot(row, color=cstr)
        i += 1


model = tf.keras.Sequential()
# Adds a densely-connected layer with 64 units to the model:
model.add(layers.Dense(sequence_length, activation='relu', input_shape=(sequence_length,)))
# Add another:
model.add(layers.Dense(200, activation='relu'))
# Add a softmax layer with 10 output units:

loss_func = tf.keras.losses.MeanSquaredError()
opt_func = tf.keras.optimizers.Adam(0.01)
model.compile(optimizer= opt_func,

full_mat, train_mat, test_mat = generate_train_test(10, 10), test_mat, epochs=10, batch_size=2)
model.evaluate(train_mat, test_mat)

# test against freshly generated data
full_mat, train_mat, test_mat = generate_train_test(10, 10)
predict_mat = model.predict(train_mat)

show_plots = True
if show_plots:
    plot_mats(full_mat, 10, "Full Data", 1)
    plot_mats(train_mat, 10, "Input Vector", 2)
    plot_mats(test_mat, 10, "Output Vector", 3)
    plot_mats(predict_mat, 10, "Predict", 4)

Phil 9.11 . 19


7:00 – 4:00 ASRC GOES

  • Model:DLG3501W SKU:6181264
  • Maryland Anatomy Board Dept of vital records 410 764 2922
  •  arXiv Vanity renders academic papers from arXiv as responsive web pages so you don’t have to squint at a PDF.
    • It works ok. Tables and cation alignment are a problem for now, but it sounds great for phones
  • DeepPrivacy: A Generative Adversarial Network for Face Anonymization
    • We propose a novel architecture which is able to automatically anonymize faces in images while retaining the original data distribution. We ensure total anonymization of all faces in an image by generating images exclusively on privacy-safe information. Our model is based on a conditional generative adversarial network, generating images considering the original pose and image background. The conditional information enables us to generate highly realistic faces with a seamless transition between the generated face and the existing background. Furthermore, we introduce a diverse dataset of human faces, including unconventional poses, occluded faces, and a vast variability in backgrounds. Finally, we present experimental results reflecting the capability of our model to anonymize images while preserving the data distribution, making the data suitable for further training of deep learning models. As far as we know, no other solution has been proposed that guarantees the anonymization of faces while generating realistic images.
  • Introducing a Conditional Transformer Language Model for Controllable Generation
    • CTRL is a 1.6 billion-parameter language model with powerful and controllable artificial text generation that can predict which subset of the training data most influenced a generated text sequence. It provides a potential method for analyzing large amounts of generated text by identifying the most influential source of training data in the model. Trained with over 50 different control codes, the CTRL model allows for better human-AI interaction because users can control the generated content and style of the text, as well as train it for multitask language generation. Finally, it can be used to improve other natural language processing (NLP) applications either through fine-tuning for a specific task or through transfer of representations that the model has learned.
  • Dissertation
    • Started to put together my Linux laptop for vacation writing
    • More SIH section
  • Verify that timeseriesML can be used as a library
  • Perceptron curve prediction
  • AI/ML status meetings
  • Helped Vadim with some python issues

Phil 9.10.19

ASRC GOES 7:00 – 5:30

  • Got a mention in an article on Albawaba – When the Only Option is ‘Not to Play’? Autonomous Weapons Systems Debated in Geneva 
  • Dissertation – more SIH
  • Just saw this: On Extractive and Abstractive Neural Document Summarization with Transformer Language Models
    • We present a method to produce abstractive summaries of long documents that exceed several thousand words via neural abstractive summarization. We perform a simple extractive step before generating a summary, which is then used to condition the transformer language model on relevant information before being tasked with generating a summary. We show that this extractive step significantly improves summarization results. We also show that this approach produces more abstractive summaries compared to prior work that employs a copy mechanism while still achieving higher rouge scores. Note: The abstract above was not written by the authors, it was generated by one of the models presented in this paper.
  • Working on packaging timeseriesML. I think it’s working!


  • I’ll try it out when I get back after lunch
  • Meeting with Vadim
    • Showed him around and provided svn access
  • Model:DLG3501W SKU:6181264

Phil 9.5.19

7:00 –

  • David Manheim (scholar)
    • I work on existential risk mitigation, computational modelling, and epidemiology. I spend time talking about Goodhart’s Law, and have been a #Superforecaster with the Good Judgement Project since 2012.
  • Goodhart’s law is an adage named after economist Charles Goodhart, which has been phrased by Marilyn Strathern as “When a measure becomes a target, it ceases to be a good measure.”[1] One way in which this can occur is individuals trying to anticipate the effect of a policy and then taking actions that alter its outcome
  • Dissertation
  • Continuing TF 2.0 Keras tutorial
    • Had a weird problem where
      from tensorflow import keras

      made IntelliJ complain, but the python interpreter ran fine. I then installed keras, and IJ stopped complaining. Checking the version(s) seems to be identical, even though I can see that there is a new keras directory in D:\Program Files\Python37\Lib\site-packages. And we know that the interpreter and IDE are pointing to the same place:

      "D:\Program Files\Python37\python.exe" D:/Development/Sandboxes/PyBullet/src/TensorFlow/
      2019-09-05 11:30:04.694327: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library cudart64_100.dll
      tf.keras version = 2.2.4-tf
      keras version = 2.2.4-tf


    • This has the implication that instead of :
      from tensorflow.keras import layers

      I need to have:

      from keras import layers

      I mean, it works, but it’s weird and makes me think that something subtle may be busted…

Phil 9.4.19

7:00 – 5:00 ASRC GOES


Phil 9.3.19 (including install directions for Tensorflow 2.0rc0 on Windows 10)

7:00 – 4:30ASRC GOES

  • Dissertation – Working on the Orientation section, where I compare Moby Dick to Dieselgate
  • Uninstalling all previous versions of CUDA, which should hopefully allow 10 to be installed
  • Still flailing on getting TF 2.0 working. Grrrrr. Success! Added guide below
  • Spent some time discussing mapping the GPT-2 with Aaron

Installing Tensorflow 2.0rc0 to Windows 10, a temporary accurate guide

  • Uninstall any previous version of Tensorflow (e.g. “pip uninstall tensorflow”)
  • Uninstall all your NVIDIA crap
  • Install JUST THE CUDA LIBRARIES for version 9.0 and 10.0. You don’t need anything else



  • Then install the latest Nvidia graphics drivers. When you’re done, your install should look something like this (this worked on 9.3.19):


Edit your system variables so that the CUDA 9 and CUDA 10 directories are on your path:


One more part is needed from NVIDIA: cudnn64_7.dll

In order to download cuDNN, ensure you are registered for the NVIDIA Developer Program.

    1. Go to: NVIDIA cuDNN home page
    2. Click “Download”.
  1. Remember to accept the Terms and Conditions.
  2. Select the cuDNN version to want to install from the list. This opens up a second list of target OS installs. Select cuDNN Library for Windows 10.
  3. Extract the cuDNN archive to a directory of your choice. The important part (cudnn64_7.dll) is in the cuda\bin directory. Either add that directory to your path, or copy the dll and put it in the Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10\bin directory


Then open up a console window (cmd) as admin, and install tensorflow:

  • pip install tensorflow-gpu==2.0.0-rc0
  • verify that it works by opening the python console and typing the following:


if that works, you should be able to have the following work:

import tensorflow as tf
print("tf version = {}".format(tf.__version__))
mnist = tf.keras.datasets.mnist

(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

model = tf.keras.models.Sequential([
    tf.keras.layers.Flatten(input_shape=(28, 28)),
    tf.keras.layers.Dense(128, activation='relu'),
    tf.keras.layers.Dense(10, activation='softmax')

              metrics=['accuracy']), y_train, epochs=5)

model.evaluate(x_test, y_test)

The results should looks something like:

"D:\Program Files\Python37\python.exe" D:/Development/Sandboxes/PyBullet/src/TensorFlow/
2019-09-03 15:09:56.685476: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library cudart64_100.dll
tf version = 2.0.0-rc0
2019-09-03 15:09:59.272748: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library nvcuda.dll
2019-09-03 15:09:59.372341: I tensorflow/core/common_runtime/gpu/] Found device 0 with properties: 
name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:01:00.0
2019-09-03 15:09:59.372616: I tensorflow/stream_executor/platform/default/] GPU libraries are statically linked, skip dlopen check.
2019-09-03 15:09:59.373339: I tensorflow/core/common_runtime/gpu/] Adding visible gpu devices: 0
2019-09-03 15:09:59.373671: I tensorflow/core/platform/] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-09-03 15:09:59.376010: I tensorflow/core/common_runtime/gpu/] Found device 0 with properties: 
name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:01:00.0
2019-09-03 15:09:59.376291: I tensorflow/stream_executor/platform/default/] GPU libraries are statically linked, skip dlopen check.
2019-09-03 15:09:59.376996: I tensorflow/core/common_runtime/gpu/] Adding visible gpu devices: 0
2019-09-03 15:09:59.951116: I tensorflow/core/common_runtime/gpu/] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-09-03 15:09:59.951317: I tensorflow/core/common_runtime/gpu/]      0 
2019-09-03 15:09:59.951433: I tensorflow/core/common_runtime/gpu/] 0:   N 
2019-09-03 15:09:59.952189: I tensorflow/core/common_runtime/gpu/] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9607 MB memory) -> physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:01:00.0, compute capability: 6.1)
Train on 60000 samples
Epoch 1/5
2019-09-03 15:10:00.818650: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library cublas64_100.dll

   32/60000 [..............................] - ETA: 17:07 - loss: 2.4198 - accuracy: 0.0938
  736/60000 [..............................] - ETA: 48s - loss: 1.7535 - accuracy: 0.4891  
 1696/60000 [..............................] - ETA: 22s - loss: 1.2584 - accuracy: 0.6515
 2560/60000 [>.............................] - ETA: 16s - loss: 1.0503 - accuracy: 0.7145
 3552/60000 [>.............................] - ETA: 12s - loss: 0.9017 - accuracy: 0.7531
 4352/60000 [=>............................] - ETA: 10s - loss: 0.8156 - accuracy: 0.7744
 5344/60000 [=>............................] - ETA: 9s - loss: 0.7407 - accuracy: 0.7962 
 6176/60000 [==>...........................] - ETA: 8s - loss: 0.7069 - accuracy: 0.8039
 7040/60000 [==>...........................] - ETA: 7s - loss: 0.6669 - accuracy: 0.8134
 8032/60000 [===>..........................] - ETA: 6s - loss: 0.6285 - accuracy: 0.8236
 8832/60000 [===>..........................] - ETA: 6s - loss: 0.6037 - accuracy: 0.8291
 9792/60000 [===>..........................] - ETA: 6s - loss: 0.5823 - accuracy: 0.8356
10656/60000 [====>.........................] - ETA: 5s - loss: 0.5621 - accuracy: 0.8410
11680/60000 [====>.........................] - ETA: 5s - loss: 0.5434 - accuracy: 0.8453
12512/60000 [=====>........................] - ETA: 5s - loss: 0.5311 - accuracy: 0.8485
13376/60000 [=====>........................] - ETA: 4s - loss: 0.5144 - accuracy: 0.8534
14496/60000 [======>.......................] - ETA: 4s - loss: 0.4997 - accuracy: 0.8580
15296/60000 [======>.......................] - ETA: 4s - loss: 0.4894 - accuracy: 0.8609
16224/60000 [=======>......................] - ETA: 4s - loss: 0.4792 - accuracy: 0.8634
17120/60000 [=======>......................] - ETA: 4s - loss: 0.4696 - accuracy: 0.8664
17888/60000 [=======>......................] - ETA: 3s - loss: 0.4595 - accuracy: 0.8690
18752/60000 [========>.....................] - ETA: 3s - loss: 0.4522 - accuracy: 0.8711
19840/60000 [========>.....................] - ETA: 3s - loss: 0.4434 - accuracy: 0.8738
20800/60000 [=========>....................] - ETA: 3s - loss: 0.4356 - accuracy: 0.8756
21792/60000 [=========>....................] - ETA: 3s - loss: 0.4293 - accuracy: 0.8776
22752/60000 [==========>...................] - ETA: 3s - loss: 0.4226 - accuracy: 0.8794
23712/60000 [==========>...................] - ETA: 3s - loss: 0.4179 - accuracy: 0.8808
24800/60000 [===========>..................] - ETA: 2s - loss: 0.4111 - accuracy: 0.8827
26080/60000 [============>.................] - ETA: 2s - loss: 0.4029 - accuracy: 0.8849
27264/60000 [============>.................] - ETA: 2s - loss: 0.3981 - accuracy: 0.8864
28160/60000 [=============>................] - ETA: 2s - loss: 0.3921 - accuracy: 0.8882
29408/60000 [=============>................] - ETA: 2s - loss: 0.3852 - accuracy: 0.8902
30432/60000 [==============>...............] - ETA: 2s - loss: 0.3809 - accuracy: 0.8916
31456/60000 [==============>...............] - ETA: 2s - loss: 0.3751 - accuracy: 0.8932
32704/60000 [===============>..............] - ETA: 2s - loss: 0.3707 - accuracy: 0.8946
33760/60000 [===============>..............] - ETA: 1s - loss: 0.3652 - accuracy: 0.8959
34976/60000 [================>.............] - ETA: 1s - loss: 0.3594 - accuracy: 0.8975
35968/60000 [================>.............] - ETA: 1s - loss: 0.3555 - accuracy: 0.8984
37152/60000 [=================>............] - ETA: 1s - loss: 0.3509 - accuracy: 0.8998
38240/60000 [==================>...........] - ETA: 1s - loss: 0.3477 - accuracy: 0.9006
39232/60000 [==================>...........] - ETA: 1s - loss: 0.3442 - accuracy: 0.9015
40448/60000 [===================>..........] - ETA: 1s - loss: 0.3393 - accuracy: 0.9030
41536/60000 [===================>..........] - ETA: 1s - loss: 0.3348 - accuracy: 0.9042
42752/60000 [====================>.........] - ETA: 1s - loss: 0.3317 - accuracy: 0.9049
43840/60000 [====================>.........] - ETA: 1s - loss: 0.3288 - accuracy: 0.9059
44992/60000 [=====================>........] - ETA: 1s - loss: 0.3255 - accuracy: 0.9069
46016/60000 [======================>.......] - ETA: 0s - loss: 0.3230 - accuracy: 0.9077
47104/60000 [======================>.......] - ETA: 0s - loss: 0.3203 - accuracy: 0.9085
48288/60000 [=======================>......] - ETA: 0s - loss: 0.3174 - accuracy: 0.9091
49248/60000 [=======================>......] - ETA: 0s - loss: 0.3155 - accuracy: 0.9098
50208/60000 [========================>.....] - ETA: 0s - loss: 0.3131 - accuracy: 0.9105
51104/60000 [========================>.....] - ETA: 0s - loss: 0.3111 - accuracy: 0.9111
52288/60000 [=========================>....] - ETA: 0s - loss: 0.3085 - accuracy: 0.9117
53216/60000 [=========================>....] - ETA: 0s - loss: 0.3066 - accuracy: 0.9121
54176/60000 [==========================>...] - ETA: 0s - loss: 0.3043 - accuracy: 0.9128
55328/60000 [==========================>...] - ETA: 0s - loss: 0.3018 - accuracy: 0.9135
56320/60000 [===========================>..] - ETA: 0s - loss: 0.2995 - accuracy: 0.9141
57440/60000 [===========================>..] - ETA: 0s - loss: 0.2980 - accuracy: 0.9143
58400/60000 [============================>.] - ETA: 0s - loss: 0.2961 - accuracy: 0.9148
59552/60000 [============================>.] - ETA: 0s - loss: 0.2941 - accuracy: 0.9154
60000/60000 [==============================] - 4s 65us/sample - loss: 0.2930 - accuracy: 0.9158
... epochs pass ...
10000/1 [==========] - 1s 61us/sample - loss: 0.0394 - accuracy: 0.9778

Phil 9.1.19

Still tired from yesterday’s adventure:


Thinking about @scottbot’s thread on In a way, the GPT-2 and other models are an arrangement of all the text that the system has incorporated. I think I’s like to go through the dictionary, one word at a time, and use that word as a seed for building a low-dimensional threaded term model that we can visually examine, in the same way that I used text from Tymora to show the “belief space” around each room. For example, here are some responses to silence:

  • Lecture, Thursday 17 June 2014, 10:30am
    In the course of our study we will observe the behaviour of animals at two distinct locations – one to an animal’s immediate (neonatal) environment, the other to two distinct environments in its home territory – the home environment in which the animal lives. We will also observe the behaviour of animals in an adjacent environment to each animal we observe in one of these new environments; one for the social or ‘prey’ species and the other for the ‘host’ species.
  • In addition to a few other notable games, like the two I mentioned earlier, the team was able to pick up several top players to form one of the premier teams in the region of Korea. At this time, the team was ranked 11th in the league of legends scene.
  • Sensing my heart beating at a frantic pace, I raised my head to look at the place where the girl’s mouth had been. A large, blue, round hole had appeared there.
  •  キャラクシー 土方の親愛神・レイラン Aamir AB Black Bird Bomb AB Bluebird Blues AB Bomb AB Chuck AB Dashing Wingman AB Green Bird Hal AB Hal AB Matilda AB Red AB Red Bird Red AB The Blues AB White Bird Matilda AB Wingman AB Yellow Bird Chuck ABE Archer Blues ABE Capt’n Bomb ABE Cleric Matilda ABE Fencer Red ABE Guard Captain Pig ABE Knight Red ABE Mage Chuck ABE Pirate Bomb ABE Priest Matilda ABE Royal Guard Pig ABE Trickster Blues ABE Wizard Chuck Abiding Sniper Dragonbound, Myr Absolute Zero Hrungnir Abyssal CyberDragon, Sadalmelik Abyssal 
  • is about what you do, not what you say. And the answer is: it’s not something you should say. In fact, I want you to make an effort to talk to others.
  • I was so excited for my wedding day, and I had to be there. My mom had an idea to hold my wedding in a different room and I made it happen. I had my brother, sister, bridesmaid, and a couple of guys wait in the front. It was so beautiful and relaxing. Thank you, thank you, THANK YOU!

My intuition is that these word sequences can be treated like sequential threads, since they are sentences/paragraphs, and have an implicit sense of time. And like like the room conversations in the temple, that there will be denser and sparser areas on the network/landscape that we might be able to map. If we can build these small pieces, we can then experiment with ways to assemble the larger quilt.

Just to reinforce this idea, I thought about using more specific terms or phrases. Here’s what we get with bird sanctuary. I’d a much more constrained landscape:

  • is open only 24 hours a day and is open on the following holidays:
  • Tower of the Winds – Cave of Wonders – Rune Isle
  • The idea of an animal sanctuary for a big-cat sanctuary is one of the most amazing things that a lot of people will ever come up with that they can’t see in the current environment of wildlife protection. 
  • an annual four-day event that promotes conservation efforts.
  • (2) Pescado Bay Nature Preserve (2) Pacific Coast Aquarium (11) Pacific Grove (1) Pacifica Harbor (1) Philadelphia Zoo (1) Philadelphia Museum of Art (1) Philadelphia World’s Fair (2) Piebald Beach (1) Pinnacle Beach (1) Placid Bay (1) Point Park and Wildlife Management area

Based on David Massad’s tweet, I think the phrases to use are news headlines, that can be compared to some sort of ground truth contained in the story.


Phil 8.30.19

7:00 – 4:00 ASRC GOES

  • Dentist!
  • Sent notes to David Lazar and Erika M-T. Still need to ping Stuart Shulman.
  • Did my part for JuryRoom (Eero Mäntyranta)
  • Dissertation – more on State
  • TF 2.0 today? (release notes)
  • Installed! Well – it didn’t blow up…
    C:\WINDOWS\system32>pip3 install tensorflow-gpu==2.0.0-rc0                                                              Collecting tensorflow-gpu==2.0.0-rc0                                                                                      Downloading (285.1MB)                                                                  |████████████████████████████████| 285.1MB 20kB/s                                                                  Collecting absl-py>=0.7.0 (from tensorflow-gpu==2.0.0-rc0)                                                                Downloading (102kB)                                                                                                |████████████████████████████████| 112kB ...                                                                       Collecting gast>=0.2.0 (from tensorflow-gpu==2.0.0-rc0)                                                                   Downloading                                                                                                      Collecting google-pasta>=0.1.6 (from tensorflow-gpu==2.0.0-rc0)                                                           Downloading (52kB)                                                                                  |████████████████████████████████| 61kB 4.1MB/s                                                                    Collecting wrapt>=1.11.1 (from tensorflow-gpu==2.0.0-rc0)                                                                 Downloading                                                                                                    Collecting grpcio>=1.8.6 (from tensorflow-gpu==2.0.0-rc0)                                                                 Downloading (1.6MB)                                                                              |████████████████████████████████| 1.6MB ...                                                                       Collecting termcolor>=1.1.0 (from tensorflow-gpu==2.0.0-rc0)                                                              Downloading                                                                                                 Collecting tf-estimator-nightly<1.14.0.dev2019080602,>=1.14.0.dev2019080601 (from tensorflow-gpu==2.0.0-rc0)              Downloading (501kB)                                                      |████████████████████████████████| 501kB ...                                                                       Collecting keras-preprocessing>=1.0.5 (from tensorflow-gpu==2.0.0-rc0)                                                    Downloading (41kB)                                                                       |████████████████████████████████| 51kB 3.2MB/s                                                                    Collecting tb-nightly<1.15.0a20190807,>=1.15.0a20190806 (from tensorflow-gpu==2.0.0-rc0)                                  Downloading (4.3MB)                                                                         |████████████████████████████████| 4.3MB 6.4MB/s                                                                   Collecting wheel>=0.26 (from tensorflow-gpu==2.0.0-rc0)                                                                   Downloading                                                                                      Requirement already satisfied: numpy<2.0,>=1.16.0 in d:\program files\python37\lib\site-packages (from tensorflow-gpu==2.0.0-rc0) (1.16.4)                                                                                                      Collecting protobuf>=3.6.1 (from tensorflow-gpu==2.0.0-rc0)                                                               Downloading (1.0MB)                                                                             |████████████████████████████████| 1.0MB 6.4MB/s                                                                   Requirement already satisfied: six>=1.10.0 in d:\program files\python37\lib\site-packages (from tensorflow-gpu==2.0.0-rc0) (1.12.0)                                                                                                             Collecting opt-einsum>=2.3.2 (from tensorflow-gpu==2.0.0-rc0)                                                             Downloading (66kB)                                                                                              |████████████████████████████████| 71kB 4.5MB/s                                                                    Collecting astor>=0.6.0 (from tensorflow-gpu==2.0.0-rc0)                                                                  Downloading                                                                                       Collecting keras-applications>=1.0.8 (from tensorflow-gpu==2.0.0-rc0)                                                     Downloading (50kB)                                                                            |████████████████████████████████| 51kB 3.2MB/s                                                                    Collecting markdown>=2.6.8 (from tb-nightly<1.15.0a20190807,>=1.15.0a20190806->tensorflow-gpu==2.0.0-rc0)                 Downloading (87kB)                                                                                  |████████████████████████████████| 92kB 5.8MB/s                                                                    Collecting setuptools>=41.0.0 (from tb-nightly<1.15.0a20190807,>=1.15.0a20190806->tensorflow-gpu==2.0.0-rc0)              Downloading (576kB)                                                                              |████████████████████████████████| 583kB ...                                                                       Collecting werkzeug>=0.11.15 (from tb-nightly<1.15.0a20190807,>=1.15.0a20190806->tensorflow-gpu==2.0.0-rc0)               Downloading (328kB)                                                                                |████████████████████████████████| 337kB 6.4MB/s                                                                   Collecting h5py (from keras-applications>=1.0.8->tensorflow-gpu==2.0.0-rc0)                                               Downloading (2.4MB)                                                                                 |████████████████████████████████| 2.4MB ...                                                                       Installing collected packages: absl-py, gast, google-pasta, wrapt, grpcio, termcolor, tf-estimator-nightly, keras-preprocessing, setuptools, markdown, werkzeug, wheel, protobuf, tb-nightly, opt-einsum, astor, h5py, keras-applications, tensorflow-gpu                                                                                                                 Running install for absl-py ... done                                                                           Running install for gast ... done                                                                              Running install for wrapt ... done                                                                             Running install for termcolor ... done                                                                         Found existing installation: setuptools 40.8.0                                                                            Uninstalling setuptools-40.8.0:                                                                                           Successfully uninstalled setuptools-40.8.0                                                                          Running install for opt-einsum ... done                                                                      Successfully installed absl-py-0.8.0 astor-0.8.0 gast-0.2.2 google-pasta-0.1.7 grpcio-1.23.0 h5py-2.9.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 opt-einsum-3.0.1 protobuf-3.9.1 setuptools-41.2.0 tb-nightly-1.15.0a20190806 tensorflow-gpu-2.0.0rc0 termcolor-1.1.0 tf-estimator-nightly-1.14.0.dev2019080601 werkzeug-0.15.5 wheel-0.33.6 wrapt-1.11.2


  • Oops: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
    Type “help”, “copyright”, “credits” or “license” for more information.
    >>> import tensorflow as tf
    2019-08-30 10:23:30.632254: W tensorflow/stream_executor/platform/default/] Could not load dynamic library ‘cudart64_100.dll’; dlerror: cudart64_100.dll not found
  • Spent the rest of the day trying to get “import tensorflow as tf” to work

Phil 8.29.19

ASRC GOES – 7:00 – 4:00

  • Find out who I was talking to yesterday at lunch (Boynton?)
  • Contact David Lazar about RB
  • Participating as an anonymous fish in JuryRoom. Started the discussion
  • Dissertation – started the State section
  • Working on Control and sim diagrams
    • Putting this here because I keep on forgetting how to add an outline/border to an image in Illustrator:


  1. Place and select an image in the Illustrator document.
  2. Once selected, open Appearance panel and from the Appearance panel flyout menu, choose Add New Stroke:
  3. With the Stroke highlighted in the Appearance panel, choose Effect -> Path -> Outline Object.
  • Anyway, back to our regularly scheduled program.
  • Made a control system diagram
  • Made a control system inheritance diagram
  • Made a graphics inheritance diagram
  • Need to stick them in the ASRC Dev Pipeline document
  • Discovered JabRef: JabRef is an open source bibliography reference manager. The native file format used by JabRef is BibTeX, the standard LaTeX bibliography format. JabRef is a desktop application and runs on the Java VM (version 8), and works equally well on Windows, Linux, and Mac OS X.
  • Tomorrow we get started with TF 2.0

Phil 9.28.19

Politics and computational sociology conference Left 6:45, got there 9:30. Left 9:00-ish, arrived home 10:00

  • Late – it took 2.75 hours to get there. I hope I can find my car…
  • Joseph Shaheen – Target Policy making under the frame of dark networks
    • What is a dark neworks framewook?
    • Oh, no real definition. There are light and gray ones too
    • Centrality is important
    • @josephshaheen
  • Sarah Shugars – The structure of reasoning, inferring conceptual networks
    • What is public opinion – an aggregation of preferences
    • Build a model of individual reasoning
    • What are the nodes – concepts
    • What are the edges – connections between concepts
    • Portrait divergence?
    • @shugars
  • Bruce Desmarais – Network Event History Analysis
    • Bolasso model constant lasso estimatino using bootstrap – sounds like principal component analysis
    • Policy diffusion over time. How do they know that the policies are the same
  • NEWS
  • Jin Woo Kim – The distorting prism of social media
    • Frequent online commenters are unrepresentative of the general public – therefore, more toxic. Feedback loop of likes and toxicity
    • Google Perspective API?
  • Yujin Kim – Polarization in online uncivil comments
    • Lingustic features – partisan language, in-out group pronouns predict incivility?
    • This study used internal NYT data where comments were rejected by the editors? And what does that mean?
  • Maurits van der Ween – Measuring the European public sphere across multiple languages
    • Measure discourse across multiple language over time
    • European identity is maginal and not developing much
    • Imagined Community – Anderson
    • What does it mean to be tightly linked by print?
    • NN translation
    • Topic modeling
  • Pavel Oleinikpc – Finding duplicate stories in local news
    • National news promote polarization due to suppression of local news
    • Need to discriminate between true local news from repackaged national segments
    • Uses closed-caption text
    • Google’s free transcription after 60 minutes per month
    • Normally, teleprompter text is fed into closed caption  unless the text is spontaneous, at which point, the quality drops greatly
    • Locality sensitive hashing?
  • Sean Fisher – Locating the local
    • Selective exposure – what environmental constraints on news exposure
    • Local news disappear and politics becomes nationalized
    • Will affect how the issue is perceived
    • 3,000 county seats in the US
    • Northeastern developed search terms?
    • No spatial correlations
    • Regression for multi factors, but local searches = local results, national search = national results
  • Andy Guess – Media Literacy <—– This guy
    • WhatsApp fueling fake news in India
    • Calls for media literacy to counter credulous thinking
    • Facebook “news tip” in 2017? Also on WhatsApp.
    • Do these work?
  • Allessandro Vechchiato – Algorithmic bias
    • News delivery Google, social, app, even newspapers is personalized
    • news value vs. entertainment value
    • How bias interacts with self-selection
    • Built news aggregator app
      • Delivers two different biased news feed
      • measure user readership behavior online
    • Bias between hard and soft news
    • Uses patient preferred samples, where users select their preferred bias, and a randomized population to compare
    • Media diets can be manipulated by algorithms that can overcome individual tastes
  • David Lazer – Searching for the truth… <- contact about LMN
    • How much do people access fake news relative to regular news
    • Fake news list Grinberg et al (2019) [repeated violaters of fact checkers]
    • News is defined using a variety of manual and automated methods
  • Sarah Dreier – Religiosity and public policy in congress
  • Eric Dunford – Gender Norms and Violent Behavior in a virtual world <
    • Uses Eve Online
    • Six million players
    • Open sandbox – very little restriction on users. Money laundering is a problem
    • 500,000 players
    • Could be used to find nomad/flock/stampede?
  • Nicolas Velasquez – Ecologies of Online Contention: From Hate to Health
    • There is some mapping in physical and network space
    • Movement from untrusted groups to trusted groups in times of uncertainty
    • Policy 4  -fracture groups into smaller groups based on subsumed differences. Fascist vs. racial supremacist
  • Alexandra Siegal – Can Celebrities reduce prejudice? The effect of Mohamed Salah on Islamophobic Attitudes and Behaviors
    • matrix completion method to predict behavior based on surrounding counties. May be useful for satellite diagnosis as well