Category Archives: Simulation

Phil 4.3.20

Temp is up a bit this morning, which, of course, I’m overreacting to.

Need to get started on State information from here: https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-states.csv

Generated some favicons from here: https://favicon.io/favicon-generator/, which, of course we didn’t use

Getting close to something that we can release

GOES:

  • Update Linux on laptop and try Influx there. Nope. The laptop is hosed. hosed
  • Grabbing another computer to configure. I mean, worst case, I can set up the work laptop as an Ubuntu box. I’d love to know if Influx would work FIRST, though. Looks like I have to. My old dev box won’t boot. Backing up.
  • Installed Debian on the work laptop. It seems to be booting? Nope:
  • I guess we’ll try Ubuntu again? Nope. Trying one more variant.
  • Trying lubuntu. It uses different drivers for some things, and so far hasn’t frozen or blocked yet. It works!
  • And now the Docker version (docker run –name influxdb -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-beta) works too. Maybe because the system got upgraded?
  • 11:00 IRAD Meeting
    • Send note about NOAA being a customer for simulated anomalies for machine learning

Phil 3.31.2020

I need to go grocery shopping today. A friend of mine has come down with the virus. He’s in his 30’s, and I’m feeling vulnerable. I went down to the shop and dug up my painting masks. Turns out I have a few, so that’s what I’m going shopping with. Here’s why, from the NY Times:

When researchers conducted systematic review of a variety of interventions used during the SARS outbreak in 2003, they found that washing hands more than 10 times daily was 55 percent effective in stopping virus transmission, while wearing a mask was actually more effective — at about 68 percent. Wearing gloves offered about the same amount of protection as frequent hand-washing, and combining all measures — hand-washing, masks, gloves and a protective gown — increased the intervention effectiveness to 91 percent.

Podcast with BBC’s misinformation reporter: https://podcasts.apple.com/gb/podcast/the-political-party/id595312938?i=1000470048553

 

  • A friend of mine who works in Whitehall has told me that the army are going to be on the streets this week arresting people who don’t listen to this podcast. If that sounds familiar, you’ll be aware that this crisis has already been fertile ground for disinformation. Marianna Spring is a BBC specialist reporter covering disinformation and social media. In this fascinating interview, Marianna reveals how disinformation and misinformation gets so widely shared, why we share it, how to spot it, what the trends are, how it differs around the world and so much more. This is a brilliant insight not just into the sharing of inaccurate information, but into human behaviour.

 

D20

  • Changed the calculations from the linear regression to handle cases where the virus is under control, like China – first pass is done
  • Have the linear regression only go back some number of weeks/months. I’m worried about missing a second wave
  • Need to add a disclaimer about the quality of the predictions is dependent on the quality of the data, and that we expect that as poorer countries come online, these trends may be erratic and inaccurate.
  • Add an UNSET state. The ETS will only set the state if it is UNSET. This lets regression predictions to be used until the ETS is working well – done
  • I think showing the linear and ETS mean prediction is a good way to start including ETS values
  • Found the page that shows how to adjust parameters: https://www.statsmodels.org/stable/examples/notebooks/generated/exponential_smoothing.html

GOES

  • Try to create an image from the stored tar
  • Start setting up InfluxDB2

IRAD Meeting at 2:00

ML Group at 4:00

  • Put together a list of potential papers to present. No need, I’ll do infinitely wide networks
  • Had just a lovely online evening of figuring out how to use some (terrible!) webex tools, and trying to figure out Neural ODEs. It was an island of geeky normalcy for a few hours. This may be a more comprehensible writeup.

Phil 3.20.20

Yesterday, I looked at the confirmed cases from this dataset. Today, I thought I’d look at the death rates. These are actually from yesterday. Maybe I’ll update at the end of the day. Everything is in a logarithmic scale because it’s impossible to tell the difference between one crazy exponential rate and another (It may be small-world power law as well, as per here). This is also with China excluded:

I mean, that’s not a good picture. I can see why California went on full non-essential lockdown today – we seem to be on the same trajectory as Iran, assuming the difference in slope is not related to manipulated or poorly-gathered information. South Korea, as per reports, really has appeared to adjust the trajectory. Note though, that the adjusted curve still seems to be exponential, but at a lower value.

My sense right now is that the economic impacts (however those would be charted) are going to look similar, with some kind of time delay that relates to spare capacity, like savings. My sense is that this is going to be bigger than the 2008 financial meltdown, but maybe in some kind of slow motion?

Since I can work from home, and work on government contracts, I’ve been sending money to food banks and similar charities. Hopefully, the best ways to contribute will become clear as the situation settles into the new “normal”. For some more thinking on the economic impact, there’s a short interview with John Ioannidis, who wrote in this article:

One of the bottom lines is that we don’t know how long social distancing measures and lockdowns can be maintained without major consequences to the economy, society, and mental health. Unpredictable evolutions may ensue, including financial crisis, unrest, civil strife, war, and a meltdown of the social fabric. 

“A fiasco in the making? As the coronavirus pandemic takes hold, we are making decisions without reliable data” – StatNews, 3/17/2020

I tend to agree that the world at large is focusing on one, large immediate problem when it needs to be focusing on two large immediate problems. And that’s probably too much to expect.

8:00 – 4:30 ASRC GOES

  • More interesting use of ML to enhance simulations: NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
    • We present a method that achieves state-of-the-art results for synthesizing novel views of complex scenes by optimizing an underlying continuous volumetric scene function using a sparse set of input views. Our algorithm represents a scene using a fully-connected (non-convolutional) deep network, whose input is a single continuous 5D coordinate (spatial location (x,y,z) and viewing direction (θ,ϕ)) and whose output is the volume density and view-dependent emitted radiance at that spatial location. We synthesize views by querying 5D coordinates along camera rays and use classic volume rendering techniques to project the output colors and densities into an image. Because volume rendering is naturally differentiable, the only input required to optimize our representation is a set of images with known camera poses. We describe how to effectively optimize neural radiance fields to render photorealistic novel views of scenes with complicated geometry and appearance, and demonstrate results that outperform prior work on neural rendering and view synthesis. View synthesis results are best viewed as videos, so we urge readers to view our supplementary video for convincing comparisons.
  • Let’s see if we can get InfluxDB working in Docker and start to generate and store data
  • I found a wonderful thing! It looks like you can change the default settings for where applications and their data are saved! Here’s a screenshot of where in the settings:

Phil 3.19.20

I found the data sources for the dashboard in the previous few posts. Yes, everything still looks grim:

So rather than working on my dissertation, I thought I’d take a look at the data for the last 9(!) days in Excel:

This is for the USA. The data is sorted based on the cumulative total of new cases confirmed. If you look at the chart on the right, everything is in line with a pandemic in exponential growth. However, that’s not the whole story.

I like to color code the cells in my spreadsheets because colors help me visualize patterns in the data that I wouldn’t otherwise see. And one of the things that really stands out here is the red rows with one yellow cell on the left. These are all cases where the rate of confirmed new cases dropped to zero overnight. And they’re not near each other. They are in WA, NY, and CA. Is this a measuring problem or is something going right in these places?

Maybe we’ll find out more in the next few days. Now that I know how to get the data, I can do some of my own visualizations that look for outliers. I can also train up some sequence-to-sequence ML models to extrapolate trends.

One more thing. I had heard earlier (Twitter, I think?) that Vietnam was handling the crisis well. And it looks like it was, but things are back to being bad:

Ok, back to work

8:00 – 4:30 ASRC PhD, GOES

  • Working on the process section – done!
  • Working on the TACJ bookend – done! Made a new figure:
  • Submitted to Wayne. Here’s hoping it doesn’t fall through the cracks
  • Neuroevolution of Self-Interpretable Agents
    • Inattentional blindness is the psychological phenomenon that causes one to miss things in plain sight. It is a consequence of the selective attention in perception that lets us remain focused on important parts of our world without distraction from irrelevant details. Motivated by selective attention, we study the properties of artificial agents that perceive the world through the lens of a self-attention bottleneck. By constraining access to only a small fraction of the visual input, we show that their policies are directly interpretable in pixel space. We find neuroevolution ideal for training self-attention architectures for vision-based reinforcement learning tasks, allowing us to incorporate modules that can include discrete, non-differentiable operations which are useful for our agent. We argue that self-attention has similar properties as indirect encoding, in the sense that large implicit weight matrices are generated from a small number of key-query parameters, thus enabling our agent to solve challenging vision based tasks with at least 1000x fewer parameters than existing methods. Since our agent attends to only task-critical visual hints, they are able to generalize to environments where task irrelevant elements are modified while conventional methods fail.

Phil 3.18.20

7:00 – 5:00 ASRC GOES

Today’s dashboard snapshot (more data here). My thoughts today are about supression and containment, which are laid out in the UK’s Imperial College COVID-19 report. The TL;DR is that suppression is the only strategy that doesn’t overwhelm healthcare. Suppression is fever clinics, contact tracing, and enforced isolation, away from all others (in China, this was special isolation clinics/dorms). This has clearly worked in China (and a town in Italy), though Hong Kong and Singapore seem to be succeeding in different (more cultural?) ways. The thing that strikes me is that suppression is just putting a lid on things. The moment the lid comes off, then infections start up again? I guess we’ll see over the next few months in China.

There appear to be vaccines in (human already!) testing. Normally, there is an extensive evaluation process to see if the treatment is dangerous, but that was sidestepped during the AIDS crisis (the parallel track policy). I wonder if at risk populations (People older than 70?), will allowed to use less-tested drugs. My guess is yes, probably within a month.

  • Finished all the dissertation revisions and made a document that contains only those revisions. Need to make a change tableand then send (full and revisions only) to Wayne today.
    • Whoops! No I didn’t. After putting together the change table, I realize there are still a few things to do. Dammit!
  • Update SDaaS paper as per John’s edits
  • Phone call with Darren at 2:00
    • Start a google doc that has all the parts of a proposal, plus a good introduction.
    • Also the idea of sims came up again as ways to define, explain, train ML, and test a problem/solutions
  • AIMS meeting at 3:00

Phil 3.12.20

7:00 – 6:00 ASRC GOES

Phil 3.10.20

7:00 ASRC PhD

  • Good chat with Aaron M last night. I’ve incorporated comments into the new chapter
  • Put together a Saudi #corona doc
  • Meeting with Don today at 1:00
  • ML group in Hampden today

GOES

  • More SDaaS paper. Maybe finish first draft today?

Phil 2.6.20

7:00 – 4:00  ASRC GOES

Direct Fit to Nature: An Evolutionary Perspective on Biological and Artificial Neural Networks

  • Evolution is a blind fitting process by which organisms become adapted to their environment. Does the brain use similar brute-force fitting processes to learn how to perceive and act upon the world? Recent advances in artificial neural networks have exposed the power of optimizing millions of synaptic weights over millions of observations to operate robustly in real-world contexts. These models do not learn simple, human-interpretable rules or representations of the world; rather, they use local computations to interpolate over task-relevant manifolds in a high-dimensional parameter space. Counterintuitively, similar to evolutionary processes, over-parameterized models can be simple and parsimonious, as they provide a versatile, robust solution for learning a diverse set of functions. This new family of direct-fit models present a radical challenge to many of the theoretical assumptions in psychology and neuroscience. At the same time, this shift in perspective establishes unexpected links with developmental and ecological psychology.

 

  •  Defense
    • Discussion slides
      • contributions – done
      • designing for populations 1 & 2- done
      • Diversity and resilience- done
      • Non-human agents- done
      • Reflection and reflex- done
      • Ethical considerations- done
      • Ethics of diversity injection
      • Ethics of belief space cartography
  • GOES
    • Status report
  • Get signature from Aaron at 7:30

Phil 1.24.20

7:00 – 5:00 ASRC GOES

  • SUBMITTED MY DISSERTATION!
  • GOES
  • GSAW
    • Finish slide deck. Due Feb 3
  • 4:00 white paper meeting
    • Sent some abstracts out to the group
    • Technical Interchange Meeting (TIM) March 31 – April 2, 2020 Building 6000, Myer Auditorium

Phil 1.16.20

Optuna: An open source hyperparameter optimization framework to automate hyperparameter search

  • Medium writeup. It looks like this is Bayesian, and is better than hyperopt?

7:00 – 5:00 ASRC GOES

  • Dissertation
    • Starting to add Wayne’s comments
    • Finished the intro, starting motivation
  • NSOF Meeting with Isaac & Bruce
    • Still looking at the optimal scenario to use the current simulators (running over a weekend) to generate data
    • Data sets are used to train and evaluate, then progressively simplified until they can no longer recognize the source data. This will let us estimate the fidelity of the simulations we need.
  • JuryRoom meeting. Looking into adding UX faculty. Meeting is expanding to 6:00 – 8:00

Phil 12.24.19

ASRC PhD 6:30 – 9:30

  • The Worldwide Web of Chinese and Russian Information Controls
    • The global diffusion of Chinese and Russian information control technology and techniques has featured prominently in the headlines of major international newspapers.1 Few stories, however, have provided a systematic analysis of both the drivers and outcomes of such diffusion. This paper does so – and finds that these information controls are spreading more efficiently to countries with hybrid or authoritarian regimes, particularly those that have ties to China or Russia. Chinese information controls spread more easily to countries along the Belt and Road Initiative; Russian controls spread to countries within the Commonwealth of Independent States. In arriving at these findings, this working paper first defines the Russian and Chinese models of information control and then traces their diffusion to the 110 countries within the countries’ respective technological spheres, which are geographical areas and spheres of influence to which Russian and Chinese information control technology, techniques of handling information, and law have diffused.
  • Wrote up some preliminary thoughts on Antonio’s Autonomous Shuttles concept. Need to share the doc
  • Listening to World Affairs Council, and the idea of B-Corporations came up, which are a kind of contractual mechanism for diversity injection?
    • Certified B Corporations are a new kind of business that balances purpose and profit. They are legally required to consider the impact of their decisions on their workers, customers, suppliers, community, and the environment. This is a community of leaders, driving a global movement of people using business as a force for good.
    • Deciding to leave this out of the dissertation, since I’m more focussed on individual interfaces with global effects as opposed to corporate legal structures. It’s just too tangential.
  • Dissertation
    • H3 conclusions – done!

 

Phil 12.5.19

ASRC GOES 7:00 – 4:30, 6:30 – 7:00

  • Write up something for Erik and John?
  • Send gdoc link to Bruce – done
  • apply for TF Dev invite – done
  • Schedule physical! – done
  • Dissertation – more Designing for populations
  • Evolver
    • Comment EvolutionaryOptimizer – almost done
    • Comment ModelWriter
    • Quickstart
    • User’s guide
    • Comment the excel utils?
  • Waikato meeting with Alex and Panos

Phil 11.8.19

7:00 – 3:00 ASRC GOES

  • Dissertation
    • Usability study! Done!
    • Discussion. This is going to take some framing. I want to tie it back to earlier navigation, particularly the transition from stories and mappaemundi to isotropic maps of Ptolemy and Mercator.
  • Sent Don and Danilo sql file
  • Start satellite component list
  • Evolver
    • Adding threads to handle the GPU. This looks like what I want (from here):
      import logging
      import concurrent.futures
      import threading
      import time
      
      def thread_function(name):
          logging.info("Task %s: starting on thread %s", name, threading.current_thread().name)
          time.sleep(2)
          logging.info("Task %s: finishing on thread %s", name, threading.current_thread().name)
      
      if __name__ == "__main__":
          num_tasks = 5
          num_gpus = 1
          format = "%(asctime)s: %(message)s"
          logging.basicConfig(format=format, level=logging.INFO,
                              datefmt="%H:%M:%S")
      
          with concurrent.futures.ThreadPoolExecutor(max_workers=num_gpus) as executor:
              result = executor.map(thread_function, range(num_tasks))
      
          logging.info("Main    : all done")

      As you can see, it’s possible to have a thread for each gpu, while having them iterate over a larger set of tasks. Now I need to extract the gpu name from the thread info. In other words,  ThreadPoolExecutor-0_0 needs to map to gpu:1.

    • Ok, this seems to do everything I need, with less cruft:
      import concurrent.futures
      import threading
      import time
      from typing import List
      import re
      
      last_num_in_str_re = '(\d+)(?!.*\d)'
      prog = re.compile(last_num_in_str_re)
      
      def thread_function(args:List):
          num = prog.search(threading.current_thread().name) # get the last number in a string
          gpu_str = "gpu:{}".format(int(num.group(0))+1)
          print("{}: starting on  {}".format(args["name"], gpu_str))
          time.sleep(2)
          print("{}: finishing on  {}".format(args["name"], gpu_str))
      
      if __name__ == "__main__":
          num_tasks = 5
          num_gpus = 5
          task_list = []
          for i in range(num_tasks):
              task = {"name":"task_{}".format(i), "value":2+(i/10)}
              task_list.append(task)
          with concurrent.futures.ThreadPoolExecutor(max_workers=num_gpus) as executor:
              result = executor.map(thread_function, task_list)
      
          print("Finished Main")

      And that gives me:

      task_0: starting on  gpu:1
      task_1: starting on  gpu:2
      task_0: finishing on  gpu:1, after sleeping 2.0 seconds
      task_2: starting on  gpu:1
      task_1: finishing on  gpu:2, after sleeping 2.1 seconds
      task_3: starting on  gpu:2
      task_2: finishing on  gpu:1, after sleeping 2.2 seconds
      task_4: starting on  gpu:1
      task_3: finishing on  gpu:2, after sleeping 2.3 seconds
      task_4: finishing on  gpu:1, after sleeping 2.4 seconds
      Finished Main

      So the only think left is to integrate this into TimeSeriesMl2