Category Archives: Python

Phil 6.10.19

ASRC GEOS 7:00 – 3:00

  • I’ve been thinking about the implications of this article: Training a single AI model can emit as much carbon as five cars in their lifetimes
    • There is something in this that has to do with the idea of cost. NN architectures have no direct concept of cost. Inevitably the “current best network” takes a building full of specialized processors 200 hours. This has been true for Inception, AmeoebaNet, and AlphaGo. I wonder what would happen if there was a cost for computation that was part of the fitness function?
    • My sense is that evolution, has two interrelated parameters
      • a mutation needs to “work better” (whatever that means in the context) than the current version
      • the organism that embodies the mutation has to reproduce
    • In other words, neural structures in our brains have an unbroken chain of history to the initial sensor neurons in multicellular organisms. All the mutations that didn’t live to make an effect. Those that weren’t able to reproduce didn’t get passed on.
    • Randomness is important too. Systems that are too similar, like Aspen trees that have given up on sexual reproduction and are essentially all clones reproducing by rhizome. These live long enough to have an impact on the environment, particularly where they can crowd out other species, but the species itself is doomed.
    • I’d like to see an approach to developing NNs that involves more of the constraints of “natural” evolution. I think it would lead to better, and potentially less destructive results.
  • SHAP (SHapley Additive exPlanations) is a unified approach to explain the output of any machine learning model. SHAP connects game theory with local explanations, uniting several previous methods [1-7] and representing the only possible consistent and locally accurate additive feature attribution method based on expectations (see our papers for details).
  • Working on clustering. I’ve been going around in circles on how to take a set of relative distance measures and use them as a basis for clustering. To revisit, here’s a screenshot of a spreadsheet containing the DTW distances from every sequence to every other sequence: DTW
  • My approach is to treat each line of relative distances as a high-dimensional coordinate ( in this case, 50 dimensions), and cluster with respect to the point that defines. This takes care of the problem that the data in this case is very symmetric about the diagonal. Using this approach, an orange/green coordinate is in a different location from the mirrored green/orange coordinate. It’s basically the difference between (1, 2) and (2, 1). That should be a reliable clustering mechanism. Here are the results:
           cluster_id
    ts_0            0
    ts_1            0
    ts_2            0
    ts_3            0
    ts_4            0
    ts_5            0
    ts_6            0
    ts_7            0
    ts_8            0
    ts_9            0
    ts_10           0
    ts_11           0
    ts_12           0
    ts_13           0
    ts_14           0
    ts_15           0
    ts_16           0
    ts_17           0
    ts_18           0
    ts_19           0
    ts_20           0
    ts_21           0
    ts_22           0
    ts_23           0
    ts_24           0
    ts_25           1
    ts_26           1
    ts_27           1
    ts_28           1
    ts_29           1
    ts_30           1
    ts_31           1
    ts_32           1
    ts_33           1
    ts_34           1
    ts_35           1
    ts_36           1
    ts_37           1
    ts_38           1
    ts_39           1
    ts_40           1
    ts_41           1
    ts_42           1
    ts_43           1
    ts_44           1
    ts_45           1
    ts_46           1
    ts_47           1
    ts_48           1
    ts_49           1
  • First-Order Adversarial Vulnerability of Neural Networks and Input Dimension
    • Carl-Johann Simon-Gabriel, Yann Ollivier, Bernhard Scholkopf, Leon BottouDavid Lopez-Paz
    • Over the past few years, neural networks were proven vulnerable to adversarial images: Targeted but imperceptible image perturbations lead to drastically different predictions. We show that adversarial vulnerability increases with the gradients of the training objective when viewed as a function of the inputs. Surprisingly, vulnerability does not depend on network topology: For many standard network architectures, we prove that at initialization, the l1-norm of these gradients grows as the square root of the input dimension, leaving the networks increasingly vulnerable with growing image size. We empirically show that this dimension-dependence persists after either usual or robust training, but gets attenuated with higher regularization.
  • More JASSS paper. Through the corrections up to the Results section. Kind of surprised to be leaning so hard on Homer, but I need a familiar story from before world maps.
  • Oh yeah, the Age Of discovery correlates with the development of the Mercator projection and usable world maps

Phil 6.7.19

7:00 – 4:30ASRC GEOS

  • Expense report
  • learned how to handle overtime
  • Dissertation. At 68 pages into the Very Horrible First Draft (VHFD)
  • Meeting with Wayne. Walked though JASSS paper and CHIPLAY reviews
  • Set arguments to DTW systems so that a specified number of rows can be evaluated to support parallelization – done: Split
  • Start clustering? Mope. Wrote up report instead

Phil 6.4.19

7:00 – 4:00 ASRC NASA GEOS

  • Continuing to read Colin Martindale’s Cognitive Psychology, a Neural Network Approach, which is absolutely bonkers for something written decades ago. Ordered two more copies.
  • JASSS Paper. Adding footnotes to figures, which is tricky.
  • Dissertation
    • Took the chapter numbers out of the file names, since these things seem to be sliding around quite a bit
  • Registered for Politics and Computational Social Science (PACSS) Conference
  • GROUP paper?
  • Waveform clustering
    • Adding noise to the float_functions class. Here’s the waveform without and with some (0.1) noise:
    • Installed fastdtw for python
    • DTW is working on the lines in the csv. Identical lines have zero distance, noise has some. Need to think about some kind of normalizing measure. Maybe divide by the number of points?
    • Need to iterate as nested loops over all the rows. Skip when i == j – done
    • Need to build a Dataframe of distances from one row to the next – done
    • Here are the two curves to compare: TwoCurves
    • And here’s the DTW result: DTW
  • Good Waikato meeting. We’ll try to run a jury next week. Also, meetings have been moved to 6:30 EST

Phil 5.31.19

7:00 – 3:00 NASA GEOS

  • Got a proposal from Panos and his group. Michael Mayo is interested in running Google’s Universal Sentence Encoder on the data
  • Defending Against Neural Fake News
    • Recent progress in natural language generation has raised dual-use concerns. While applications like summarization and translation are positive, the underlying technology also might enable adversaries to generate neural fake news: targeted propaganda that closely mimics the style of real news. 
      Modern computer security relies on careful threat modeling: identifying potential threats and vulnerabilities from an adversary’s point of view, and exploring potential mitigations to these threats. Likewise, developing robust defenses against neural fake news requires us first to carefully investigate and characterize the risks of these models. We thus present a model for controllable text generation called Grover. Given a headline like `Link Found Between Vaccines and Autism,’ Grover can generate the rest of the article; humans find these generations to be more trustworthy than human-written disinformation. 
    • Developing robust verification techniques against generators like Grover is critical. We find that best current discriminators can classify neural fake news from real, human-written, news with 73% accuracy, assuming access to a moderate level of training data. Counterintuitively, the best defense against Grover turns out to be Grover itself, with 92% accuracy, demonstrating the importance of public release of strong generators. We investigate these results further, showing that exposure bias — and sampling strategies that alleviate its effects — both leave artifacts that similar discriminators can pick up on. We conclude by discussing ethical issues regarding the technology, and plan to release Grover publicly, helping pave the way for better detection of neural fake news.
  • Retooling CHIPLAY for GROUP. Deadline is June 21
  • More JASS tweaking:
    • Switch the urls in the paper to antibubbles to anonymize – done

Phil 5.30.19

7:00 – 2:30 NASA GEOS

  • CHI Play reviews should come back today!
    • Darn – rejected. From the reviews, it looks like we are in the same space, but going a different direction – an alignment problem. Need to read the reviews in detail though.
    • Some discussion with Wayne about GROUP
  • More JASSS paper
    • Added some broader thoughts to the conclusion and punched up the subjective/objective map difference
  • Start writing proposal for Bruce
    • Simple simulation baseline for model building
    • Develop models for
      • Extrapolating multivariate (family) values, including error conditions
      • Classify errors
      • Explainable model, that has sensor inputs drive the controls of the model that produce outputs that are evaluated against the original inputs using RL
      • “Safer” ML using Sanhedrin approach
  • EfficientNet: Improving Accuracy and Efficiency through AutoML and Model Scaling
    • In our ICML 2019 paper, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks”, we propose a novel model scaling method that uses a simple yet highly effective compound coefficient to scale up CNNs in a more structured manner. Unlike conventional approaches that arbitrarily scale network dimensions, such as width, depth and resolution, our method uniformly scales each dimension with a fixed set of scaling coefficients. Powered by this novel scaling method and recent progress on AutoML, we have developed a family of models, called EfficientNets, which superpass state-of-the-art accuracy with up to 10x better efficiency (smaller and faster). EfficientNet

Phil 5.28.19

Phil 7:00 – 5:00 ASRC NASA GEOS

  • Factors Motivating Customization and Echo Chamber Creation Within Digital News Environments
    • With the influx of content being shared through social media, mobile apps, and other digital sources – including fake news and misinformation – most news consumers experience some degree of information overload. To combat these feelings of unease associated with the sheer volume of news content, some consumers tailor their news ecosystems and purposefully include or exclude content from specific sources or individuals. This study explores customization on social media and news platforms through a survey (N = 317) of adults regarding their digital news habits. Findings suggest that consumers who diversify their online news streams report lower levels of anxiety related to current events and highlight differences in reported anxiety levels and customization practices across the political spectrum. This study provides important insights into how perceived information overload, anxiety around current events, political affiliations and partisanship, and demographic characteristics may contribute to tailoring practices related to news consumption in social media environments. We discuss these findings in terms of their implications for industry, policy, and theory
  • More JASSS paper
  • Installing new IntelliJ and re-indexing
  • Discovered a few bugs with the JsonUtils.find. Fixed and submitted a version to StackOverflow. Eeeep!

Phil5.23.19

7:00 – 5:00 ASRC GEOS

  • Saw 4×3000 with David and Roger last night. The VR lab seems to be a thing. Need to go down and have a chat, possibly about lists, stories, maps and games
  • Found the OECD Principles on Artificial Intelligence. I haven’t had a chance to actually *read* any of it, but I did create a “Treaty Lit” folder in the Sanhedrin folder and put pdf versions of them. I ran my tool over them and got the following probe:
    • state cyber cybercrime agree united china mechanism
  • Putting that into Google Scholar returns some good hits as well, though I haven’t gotten a chance to do anything beyond that.
  • JASSS paper
    • Changing “consensus” to “alignment”, and breaking many paragraphs. I think the setup of the space in the introduction is better now.
  • Got caught up on NESDIS. Worked some on the slide deck, which I finally got back. Scheduled a walkthrough with T tomorrow
  • GEOS AI/ML meeting at NSOF. Still trying to figure out roles and responsibilities. I think the Sanhedrin concept will help Bruce formalize our contributions.

Phil 5.14.19

7:00 – 8:00 ASRC NASA GEOS-R

  • More Dissertation
  • Break out the network slides to “island” (initial state), “star” (radio) “cyclic star” (talk radio), “dense” social media
  • MatrixScalar
  • 7:30 Waikato meeting.
    • Walked through today’s version, which is looking very nice
    • Went over tasking spreadsheets

Phil 5.13.19

7:00 – 3:00 ASRC NASA GEOS-R

Phil 5.10.19

7:00 – 4:00 ASRC NASA GOES

  • Tensorflow Graphics? TF-Graphics
  • An End-to-End AutoML Solution for Tabular Data at KaggleDays
  • More dissertation writing. Added a bit on The Sorcerer’s Apprentice and finished my first pass at Moby-Dick
  • Add pickling to MatrixScalar – done!
    def save_class(the_class, filename:str):
        print("save_class")
        # Its important to use binary mode
        dbfile = open(filename, 'ab')
    
        # source, destination
        pickle.dump(the_class, dbfile)
        dbfile.close()
    
    
    def restore_class(filename:str) -> MatrixScalar:
        print("restore_class")
        # for reading also binary mode is important
        dbfile = open(filename, 'rb')
        db = pickle.load(dbfile)
        dbfile.close()
        return db
  • Added flag to allow unlimited input buffer cols. It automatically sizes to the max if no arg for input_size
  • NOTE: Add a “notes” dict that is added to the setup tab for run information