Saturday, March 23, 2019

I retired from Capital One yesterday

With deep gratitude for a great company and a great job, I retired from my role as manager of the UIUC machine learning team and Master Software Engineer. Capital One has deep machine learning talent so check them out if you are looking for ML work.

Thanks especially to my team for being interesting to work with and for the kind going away gift of locally made Go Ban board, bowls, and Go stones. A wonderful gift. I will miss you all!

When my family and friends hear me talk about retirement they do so with great skepticism since I have retired several times already! That said, I feel like kicking back and finishing my current book project and perhaps do limited consulting work after I travel a bit to see family and friends.

Sunday, February 10, 2019

Full circle from one laptop to rule them all to specialized function specific devices

For about 25 years my digital life was wrapped tightly around whatever personal laptop I had. Since for most of that time I worked as a remote consultant (except for gigs at Singapore-based Ola Search, Google in Mountain View, and currently at Capital One in Urbana, Illinois) my personal laptop also covered work activities. There was something close and comforting about having one digital device that I relied on.

Digital life is very different now. Because of concerns about ‘always being online’ and not paying enough attention to the non-digital world, I favor just wearing an Apple Watch and leaving my iPhone at home. The Apple Watch is just adequate enough for phone calls, messaging, and on rare occasions email and is not anything I spend any real time paying attention to. I can spend the good part of a  day shopping, walking in a park, eating out, or perusing books in a library and just spend a few minutes paying attention to my watch. A huge improvement to cellphone addiction!

For work, I have dedicated secure devices for getting my work done - the definition of purpose-specific.

For home use, I have a powerful GPU laptop from System76 that I only use for machine learning and experiments I am doing fusing ‘classic’ symbolic AI with functional components that are just wrappers for deep learning models.

Also for home use I have a MacBook that is primarily used for long writing sessions when I am working on a book project. Example code for my books tends to be short and pendantic so that development lives on the MacBook also.

I depend on my iPhone when I travel to stay organized and to have local copies of required digital assets, including on-device cached Netflix movies, Audible audio books, and Kindle books.

Lastly, the device that I spend more time on than any other (except for work devices) is my iPad on which I do close to 100% of my web browsing, almost all of my reading, enjoying entertainment, and lots of light weight writing like this blog post and editing and small additions to my current book project.

If I count all cloud-based compute infrastructure for work as one huge virtual device, the count for the digital devices I use every week weighs in at eight devices. When I retire from my job at Capital One later this spring that device count falls to five devices - still really different than the old days of having one laptop for everything.

Looking ahead to the future, perhaps only 5 or 10 years from now, I expect device profiles used by typical consumers to change a lot - mostly being one personal device that is always with you and then many different peripheral and possibly compute devices in your living and working environments that are shared with other people. I think there are three possibilities for what the one personal device may be:

  1. A smartphone 
  2. Something like an Apple Watch
  3. Something like a one-ear only AirPod like device

Whatever the profile is for your personal digital device, it will securely be connected to all shared devices (e.g., smart TVs, shared keyboards and monitors, shared tablets of all sizes, smart cars, home entertainment centers, the cell phone network infrastructure, point of sale devices in stores, etc.).

Tuesday, February 05, 2019

AWS Neptune Graph Database as a service

Fascinating to see Amazon AWS supporting graph databases with their Neptune service - I have been working as a machine learning practitioner at Capital One (I manage a machine learning team there) but in a previous life, I worked with the Knowledge Graph when I was a consultant at Google and I have written a few semantic web/linked data books.

As a side project at home I have been looking into Knowledge Graph building tools so Amazon;s new offering looks useful! I like that they support both SPARQL and and Gremlin for queries.

Sunday, January 27, 2019

Our humanity vs. technology and corporatism

My wife and I enjoyed a performance of Sleeping Beauty by the Russian National Ballet Theater last Wednesday night at a theater on campus at UIUC. Every time I enjoy art, company of family and friends, reading a good book, cooking and enjoying a meal, etc. I appreciate being a human (i.e., a somewhat evolved great ape) and my physical and social life.

I view technology as a fairly neutral force in our lives. I judge technology on how it improves peoples' lives, health, the health of our planet, and generally how well it supports civil society. As technologists, we get value from being paid for our work and thus helping to support ourselves and our families and to spend money in our local economies (supporting local businesses and directly or indirectly hiring people working in our communities.) We also benefit from any pleasure we get learning new things while working. There are obvious bad aspects of technology and these bad aspects are mostly aligned with corporatism.

Whether or not you believe in big government or small government, I argue that an important function of government is to provide some checks and balances to corporations. Corporations by design are systems for making money for owners/shareholders. While this can positively affect society there are too many cases where things go wrong: lobbying and perverting democratic systems of government, extracting too much value out of local communities, and centralizing economic power and control - killing off smaller and potentially better rivals.

As technologists I think we can find a good balance between earning a good living to support ourselves, family, and community and also as much as possible choosing to work for organizations and projects that have a net benefit to overall society. I look at this in a way that is analogous to a "carbon tax" for technologies we create and use. Let's call it a "technology value tax" where we try to at least make our work "carbon neutral."

Thursday, January 24, 2019

Ocean Protocol Meetup

Originally posted January 9, 2019

I hosted a meetup.com meeting today to talk about Ocean Protocol, other data sources for machine learning, and lead a group discussion of startup business ideas involving curating and selling data. The following is from a handout I created from material on the Ocean Protocol web site and other sources:

Data Trumps Software

Machine learning libraries like TensorFlow, Keras, PyTorch, etc. and people trained to use them have become a commodity. What is not a commodity yet is the availability of high quality application specific data.

Effective machine learning requires quality data

  • Ocean Protocol https://oceanprotocol.com - is a ecosystem based on blockchain for sharing data that serves needs for both data producers who want to monetize their data assets and for data consumers who need specific data that is affordable. This ecosystem is still under development but there are portions of the infrastructure (which will all be open source) already available. If you have docker installed you can quickly run their data marketplace demonstration system https://docs.oceanprotocol.com/setup/quickstart/.
  • Common Crawl http://commoncrawl.org - is a free source of web crawl data that was previously only available to large search engine companies. There are many open source libraries to access and process crawl data. You can most easily get started by downloading a few WARC data segment files to your laptop. My open source Java and Clojure libraries for processing WARC files are at https://github.com/commoncrawl/example-warc-java
  • Amazon Public Dataset Program https://aws.amazon.com/opendata/public-datasets/ - is a free service for hosting public datasets. AWS evaluates applications to contribute data quarterly if you have data to share. To access data sources search using the form at https://registry.opendata.awsto find useful datasets and use the S3 bucket URIs (or ARNs) to access. Most data sources have documentation pages and example client libraries and examples.

Overview of Ocean Protocol

Ocean Protocol is a decentralized data exchange protocol that lets people share and monetize data while providing control, auditing, transparency and compliance to both data providers and data consumers. The initial Ocean Protocol digital token sale ended March 2018 and raised $22 million. Ocean Protocol tokens will be available by trading Ethereum Ether and can be used by data consumers to purchase access to data. Data providers will be able to trade tokens back to Ethereum Ether.

Terminology

  • Publisher: is a service that provides access to data from data producers. Data producers will often also act as publishers of their own data.
  • Consumer: any person or organization who needs access to data. Access is via client libraries or web interfaces.
  • Marketplace: a service that lists assets and facilitates access to free datasets and datasets available for purchase.
  • Verifier: a software service that checks and validates steps in transactions for selling and buying data. A verifier is paid for this service.
  • Service Execution Agreement (SEA): a smart contract used by providers, consumers, and verifiers.

Software Components

  • Aquarius: is a service for storing and managing metadata for data assets that uses the off-chain database OceanDB.
  • Brizo: used by publishers for managing interactions with market places and data consumers.
  • Keeper: a service running a blockchain client and uses Ocean Protocol to process smart contracts.
  • Pleuston: an example/demo marketplace that you can run locally with Docker on your laptop.
  • Squid Libraries: client libraries to locate and access data (currently Python and JavaScript are supported).

Also of interest: SingularityNET

https://singularitynet.io is a decentralized service that supports creating, sharing, and monetizing AI services and hopes to be the world’s decentralized AI network. SingularityNET was started by my friend Ben Goertzel to create a marketplace for AI service APIs.

Internet As Entertainment Vs Information Vs Knowledge

Originally posted December 8, 2019

We can look forward to a future where the economy wrapped around tech advances overshadows conventional industries like agriculture and manufacturing. Given this context I am disappointed but not surprised that on international math tests students in the USA continue to fall behind their counterparts in the rest of the world.
Why is this when there are so many opportunities to learn both in school and as a lifetime pursuit?
Given the transformational effect of the Internet on society in general and in particular the economy, I think we are seeing the effects of different peoples’ perception and use of the Internet as a source of entertainment vs. source of information vs. source of knowledge.

Mark’s Hierarchy of Internet Use

Simplifying this discusion, in increasing order of personal value and value to society, Internet use falls in three broad use cases:
  • Internet as a source of entertainment: there is real value in engaging with friends and family together playing online games and enjoying at anytime ‘binging’ on Netflix.
  • Internet as a source of information: this is a real economic driver as we look to web search engines for directions for fixing our cars, finding what an compiler or runtime error message means and how other people have fixed the coding problem, find a template for giving a presentation at work, finding salary ranges for your job in the city you live in, etc.
  • Internet as a source of knowledge: knowledge is ‘digested’ and processed information usually based on experience and interactions with other people. The highest value sources of knowledge on the web are quality online courses taught by the top people in a field of study, videoed conversations by industry or academic ‘thought leaders’, etc. In other words, using the Internet to access the thoughts and knowledge of the brightest people on the planet.
Let’s go back in time to the 1800s to look at the American essayist, lecturer, philosopher, and poet Ralph Waldo Emerson. I like to think of Emerson as Internet or Web version 0.01. In the 1800s wealthy people had libraries and could tap into current knowledge and philosophies but for the common person, a yearly visit of Emerson to your town gave you an opportunity to hear a well thought out digest of currently modern thought and news. The benefit for Emerson was not only the money he was paid for his lectures but also the stories he heard and the conversations he had gave him new ‘material’ to work with. It was a virtuous circle. For the people in a town they not only heard news and information but also knowledge of how the world worked (at least according to Emerson) and potentially changed the way they looked at their own lives and ambitions.
Fast forward to present times: we have great conversations between thought leaders (a good example being Lex Fridman’s artificial general general intelligence course at MIT that is comprised of interviews) and often realtime video feeds of talks given at international conferences. While I am an avid reader (I read about one book a week), I like to hear people talk, even better on a video feed.

How can Information Collecting Software Agents Tap into knowledge? A path to AGI?

Current state of the art for automatically collecting concrete information of the web continues to rapidly improve, noteworthy projects using deep learning sequential models for language modeling, question answering systems, and most recently the BERT project solves difficult natural language processing (NLP) tasks like coreference detection (also known as anaphora resolution), predicting the probability of one sentence following another during discourse, predicting missing words in a sentence, text classification, translation between languages, etc.
While current state of the art allows collecting and using information from the Internet, how can information collecting software agents tap into knowledge, like discussions between top technologists? I think this is a step towards developing artificial general intelligence (AGI) with a very incomplete set of sub-goals being:
  • Identify the experts in the world for any specific technology
  • Collect written works, lectures, and debates and conversations with other experts
  • Build models for both raw information experts know and also their analytic and thought processes.
Yeah, it is the third step that might take decades or even a hundred years. While my personal interests are in NLP and knowledge representation, the other crucial part of building AGI technology is physical embodiments. Robots! I think that the deep models for functioning in a physical world can for the foreseeable future be worked on independently from NLP and general knowledge processing, but once these problems are solved, the achieving AGI will be a form of transfer learning by building joint models using pre-trained living in the physical world models combined with separately trained knowledge models.
It is early days for deeplearning but one lesson can learned by looking at public models in so-called ‘model zoos’ (for example, for TensorFlow, PyTorch, the Julia framework Flux, etc.) and noticing that current advanced capability models are generally no longer simple linear models but rather have complex architectures of sub-models that are trained jointly. Although I expect major “non deep learning” breakthroughs towards AGI using Bayesian Graph Models and other techniques not yet invented, the real lesson from deep learning is that complex predictive and functional behavior is achieved by combining models so I expect AGIs to use many different technologies, probably developed fairly independently, and then trained and tuned jointly.

Using Trained Keras Weights In Racket Scheme Code

Originally posted September 8, 2018

I am interested in using pre-trained deep learning models as functional components in functional languages like Scheme and Haskell.
I want to share a simple experiment that I wrote that uses Keras to train a model on the Wisconsin cancer data set (that I have used in the last three years in two books I have written in example programs), saves the weights in CSV files, and then uses those weights in a Racket Scheme program. There are two github repos:
Sample run:
$ racket neural.rkt 
** weights loaded **
shape of w2:
64
64
(number correct: 139)(number wrong: 12)(accuracy: 92.05298013245033)

Centralized Vs Distributed Systems Publishing And Owning Our Own Content

Originally posted August 25, 2018

I read a good article on Centralized Wins. and Decentralized Loses. this morning and I commented on Hacker News:
I wish it weren’t true but for right now I agree with the author, including what it might take to tip the balance: “1. Complete deterioration of trust such that avoiding the centralization of power becomes a necessity. 4. The decentralization community manages to create clearly superior applications as convenient and reliable as centralized providers.“
I was eager to use GNU Social, and after some use for a year, my host shut down. I just opened another Mastadon account but haven’t started using it yet. Also, the value of centralized services like Twitter is the really interesting people I follow. Social media is best when used as an advertising and directory service for content we put on our own blogs and web sites, but even that seems to be less common.
I really enjoyed the Decentralized Web Conference June 2016, but it also made me slightly sad that fighting back against centralized web, political, corporate, etc. centralization is an uphill fight.
Sometime network power laws suck.

Fightly back against centralization: owning and publishing our own content

It is a source of some frustration for me that so many people I know don’t take the effort to own their own domain and maintain their own web site and blog. Owning your own content and “publishing” platform has many long tail advantages. What these advantages are depends a lot on what your business and personal interests are. For me, owning my own content and personal brand has made the following possible:
  • Platform to promote the books I write
  • I have found interesting work (mostly remotely living in the mountains in Sedona Arizona) when the following companies reached out to me to do work for them: Google, Capital One, CompassLabs, Disney, SAIC, Americast, PacBell, CastTV, Lutris Technology, Arctan Group, Sitescout.com, Embed.ly, and Webmind Corporation.
Ideally kids would learn in school how to have a web presense they control, in addition to tech training. I would say that maintaining a proper web presense is like knowing how to drive a car but I would guess that many kids today will never learn to drive a car. But they should learn to properly use the web for their own benefit.

Hybrid Artificial Intelligence Systems

Originally posted August 19, 2018

Even though I specialize in deep learning at work I sceptical about achieving AGI (artificial general intelligence) using only neural networks (of any architecture). My friend and two time colleague Ben Goertzel has been working on a hybrid approach to AGI in the OpenCog organization with a large team for many years.

AIsentience.net

In my personal-time project AIsentience.net, I have been working on my own hybrid general AI framework for a number of years. Common Lisp is still my favorite language for research programming and the latest edition of my book Loving Common Lisp, or the Savvy Programmer’s Secret Weaponcontains a section on using Armed Bear Common Lisp With DeepLearning4j. ABCL is implemented in Java and while not as performant as SBCL it offers interop with Java libraries like DeepLearning4j. For now, I am happy enough being able to train specific deep learning models for word2vec, seq2seq, and summarization and write functional wrappers around these models for easy access in Common Lisp code. Probably not a popular opinion but I also believe that symbolic systems (rules) and Bayesean graph representation and inferencing are (probably) necessary parts of an AGI development platform.
I use TensorFlow and Keras at work but I have experimented sufficiently with DeepLearning4j for several years and it is fine for my purposes. I did also experiment using Google’s unofficial Haskell bindings for TensorFlow and seriously considered using Haskell for my side project AIsentience.netbut, frankly, I have much more experience using Common Lisp. For people with more Haskell experience, Haskell is a fine language for research programming.

My Summer in Illinois

It has been a year since Carol and I moved to Urbana/Champaign Illinois and I started a job at Capital One managing a machine learning team at the UIUC Research Park. Living in a university town is great - lots to do, but we still look forward to returning to our home in Sedona Arizona in (about)a year. I have spend 90 minutes on the phone this weekend with old friends in Sedona and look forward to seeing them again in person.
In addition to work I have re-started a very old hobby: playing the game of Go. I had not played a serious tournament game since 1980 but after starting to play at a local club at the university I spent a week in Williamsburg Virginia in July playing in the US Go Open Tournament. I am starting study with a professional Go player who runs the American Yunguseng Dojang - The online Go School.

My Emacs setup for Org mode, flyspell, and git

Originally posted June 2, 2018


I do much of my work in SSH shells to remote servers and while I have used Emacs for about 30 years I don’t usually take too much time and effort customizing it. I have recently started using Org mode at work (I am a Master Software Engineer at Capital One and manage a Deep Learning team) and at home. Today after enjoying a Saturday morning gym workout I decided to improve my Emacs setup and this blog article is documentation that I will use in the future for reference. If it saves you some time or gives you useful ideas, even better!
I wanted to enable flyspell (which is installed with any current Emacs distribution) for all text modes, and that includes Org mode files. I added the following to my .emacs file:
(add-hook 'text-mode-hook 'turn-on-visual-line-mode)

;; flyspell                                                                                                   
(dolist (hook '(text-mode-hook))
  (add-hook hook (lambda () (flyspell-mode 1))))
I like to augment the Aspell spelling dictionary with words I commonly use that are not in the default dictionary. As an example, I am going to configure Aspell with a custom dictionary and add the word “Keras” and “TensorFlow: by creating a file ~/.aspell.en.pws that contains:
personal_ws-1.1 en 0
Keras
TensorFlow
Now when your local Emacs runs Aspell, flyspell will pick up the words in your custom dictionary.
I love Org mode, especially with SrSpeedBar, to quickly navigate and use Org to organize my day, take project notes, etc.
I like to use SrSpeedbar when in window mode (i.e., when running Emacs locally in its own window) but not inside a terminal or SSH session. I add the following to my .emacs:
(load "~/.emacs.d/sr-speedbar.el")
(require 'sr-speedbar)
(setq
    speedbar-use-images nil
    speedbar-show-unknown-files t
    sr-speedbar-right-side t)
(when window-system
  (sr-speedbar-open))
(setq sr-speedbar-width 40)     ;; doesn't work for me
(setq sr-speedbar-max-width 50) ;; doesn't work for me
I usually run package-list-package to find and install Emacs packages but I load sr-speedbar.el from a downloaded source file.
I sometimes use magit for using git inside my Emacs environent but I usually just run git on the command line.
Magit is probably already installed with your Emacs but if not you can use package-list-package (or however else you manage Emacs packages) to instal it.
So far I have not customized my magit setup at all, not even any key bindings. I use M-x magit- followed by the tab character to see possible completions. Usually I just use M-x magit-status to review version histories. Magit is a deep tool and I am getting used to it slowly, learnig features as I need them.