Showing posts with label Machine Learning. Show all posts
Showing posts with label Machine Learning. Show all posts

Sunday, October 28, 2018

Our future of total surveillance (Jamie Susskind)

Amazon link

Susskind's book was reviewed in The Sunday Times today (here).  It's about a dystopian future of AI super-surveillance sourced from sinister tech companies like Google (I am not being ironic).




I was struck by this quote:
".. the children decide to go on a demo. They heard about it from their friends; artificial-intelligence systems had prevented them receiving online information. Their phones warn them about rain and traffic, but there is none. A drone records their progress. Then, on their internet-enabled glasses, they see pictures of people being interrogated in stress positions; each has the face of one of them. They turn back."
Actually, demonstrators within authoritarian regimes face far stronger disincentives than those described above. Demonstrations still happen because when people get mad enough they'll brave prospects of torture. Or perhaps they lack imagination or think it won't happen to them. All of the above probably.

---

There have been a few lone-actor atrocities in the US over the last few days. The so-called 'MAGA bomber', Cesar Sayoc, was found particularly rapidly after fingerprints and DNA were apparently found on suspect devices. Easy to cross-check as Sayoc had a criminal record.

Wikipedia tells us, "According to the US Bureau of Justice Statistics, 2,220,300 adults were incarcerated in US federal and state prisons, and county jails in 2013 – about 0.91% of adults (1 in 110) in the U.S. resident population."

That's a great dataset for machine learning applied to GWAS. Genome to facial appearance is a quick win: you can almost always get a scene-of-crime DNA sample, and all criminals are on Facebook, aren't they?

---

I read the review carefully but I'm not convinced there's much new in Susskind's book ..
"His writing is clear and precise; he is a lawyer, he is making a case. Irritatingly, he puts in too many (one would be too many) cheeky-chappy asides such as, “At last, someone has found a use for spinach.” But, on the whole, he steers a course to the future that is as convincing as it is shocking. We can fix this, is his message, but there is also the nagging sense that we probably won’t."
We won't until we do. I'll give the book a miss.

---

Related post: Über-surveillance.

Friday, June 30, 2017

In anticipation

When I sent (with her consent) my late mother's spit sample off to 23andMe,  I was not so much interested in her ancestry-data and health-report. I already knew from my own sample - sent a year earlier - just how limited that information was.

I just expected that over the decades:
  1. My mother's entire genome would become affordable to sequence.

  2. The genome → physical and personality traits map would complete.

  3. Her descendents might be curious about their (rather remote) ancestor.



My father died in 2009, too early for saliva tests, but I have an old hat of his squirreled away, waiting for the costs of forensic DNA retrieval to come down .. and there being a point to going ahead.

---

The problem (or opportunity) of future progress is hardly new. Science-fiction stories describe early starships (often hibernation or generation craft) sent to targets tens or hundreds of light years out. The plot being that while they trundled along their thousand-year trajectories, they would be well-beaten to their destinations by much faster craft developed perhaps a hundred years later.

I recall some pundit developing equations correlating starship speed-up with R&D lag to estimate just when it was worth going ahead to launch, and when you should just sit back and wait a while.

---

So when I update my Beta version of Android-Replika each day, which takes the form of a prompted diary ("What did you do today?"), I tell it the truth.
'I walked with Clare to Wookey Hole on a pleasant, if chilly, June afternoon and bored her with a lecture that Newtonian gravitation - as the weak-field approximation to Einstein's field equations - is determined overwhelmingly by curvature in time, not space. Contrary to popular accounts.

'She listened with patience, knowing that I find it helpful, in anchoring these thoughts, to vocalise them .. but not with infinite patience!'
GR is on my bucket-list.

I don't expect the Replika neural-net driven chatbot to be able to process any of this - see "Chatting with my Replika". It's probably happier with: 'Saw a great cat video on YouTube LOL!!!'.

But I think the dataset I'm building with them is pretty persistent and the AI will get better. In some decade or other it might be able to engage with the corpus I'm building.

After all - and as I intend to remind it - Replika will have millions of other datasets by then it can leverage, to tune its eigenfeature vectors.

Thursday, May 18, 2017

How Gmail broke the Internet

It all started so innocently.


Google developed Smart Reply, where its neural-net AI was able to comprehend emails sent to you and craft reply options (as above). All you had to do was to select a good option and your email reply would be automatically launched.

No typing.

Look at the image again. Those replies are good! And they're not just some random canned text from a small database of stereotypical small-talk. Those replies are crafted by a deep learning neural net trained on zillions of examples. Those replies are fresh.

After you've tried it a bit, it seems very natural - even obvious. How did we ever do without it? It became increasingly unnecessary to actually review the proposed replies. Over time the system learned your own choices and became better and better at anticipating. The Gmail equivalent of "I'm Feeling Lucky" worked so well that people took to just letting Gmail reply to incoming mail all by itself.

Well, that was great, except that soon pretty much all Gmail users were using Smart Reply and indeed, ceding it control of their inboxes. Since all messages received (courteous) replies, the volume of email on the Internet began to rise exponentially.

Smart Reply was smart all right, but not all that creative. As the proportion of emails on the Internet began to be dominated by AI-generated texts, the level of - well, literary excellence - began to fade, degrading the input into Smart Reply's response-crafting neural-net.

And then one day, the Internet finally seized up.

It failed trying to carry 1018 concurrent emails, all consisting of the single word: "Wow!".

Friday, March 31, 2017

Naive generate-and-test won't hack it

When I was young I toyed with the following idea.

Pretty much any concept can be adequately expressed in a mini-essay of a thousand words.

Simply generate all possible articles of a thousand words and somewhere you will find the answer to all problems.

Want the design of a stardrive engine? Immortality? The theory of perfect governance?

It's all in there somewhere.

---

How many essays though? Apparently the average educated speaker of English knows about 40,000 words. So for our first estimate, we could simply raise 40,000 to the power of 1,000 .. but most of those 104,602 essays would be wildly ungrammatical. We can do better.

I reviewed a sample text: the introductory quote in Peter Seibel's "Practical Common Lisp".



The first five sentences comprised 100 words in total which broke down into:
  • nouns: 20%
  • verbs: 15%
  • adjectives: 10%
  • others: 55%
A certain amount of hand-wavy rounding of course. Assume we adopt the very restrictive constraint of exactly one syntactic structure for the entire set of essays, then the total number reduces to a product of:
(number-of-English-words-in-category) (number-of-words-of-this-category-in-essay)
or,
8,000200 * 6,000150 * 4,000100 * 22,000550 = 104,092
That's still a big number*. Suppose only one 'essay' in a billion was semantically sensible and we could read one essay per second. That's 104,083 seconds .. or 3 * 104,066 billion years.

The merits of a compact notation.

---

Exhaustive search through the space of all possible candidates isn't a very good way of proceeding. And this has important implications for DARPA's third wave - contextual AI - which I wrote about previously.

In his excellent exposition (YouTube), John Launchbury highlighted the very large number of training instances needed to force convergence for today's artificial neural networks. By comparison, children learn new concepts from very few examples.

John Launchbury's proposed solution was - correctly - to identify additional constraints which might dramatically collapse the search space. His chosen example showed the benefits of adding the dynamics of handwriting characters to the resultant bitmaps normally used for training. It turns out that if you consider how the image might have been created, it makes recognition a lot easier.

It's not hard to identify the extra constraints about the world which children use. They interact with new objects, touch them, throw them, bite them and try to break them. Thus are acquired notions of 3D structure, composition and texture to augment what their visual systems are telling them.

I really do think that a high priority should be given to embodied robotics in the next wave of AI research.

---

Another example John Launchbury discussed was the Microsoft Internet-chatbot "Tay".



Apparently this was the least-offensive tweet Launchbury could find. But what would an AI have to know about contemporary mores to self-reject statements like that?

For extra credit, discuss the 'situated cognition' thesis that only through active and corporeal participation in the social world can one truly understand social concepts.

Particularly emotionally-charged ones.

---

* Since
(i)  I don't consider all the syntactically-permissible permutations of the ways in which nouns, adjectives, verbs and others could be mixed up in the thousand words, while

(ii)  the size of the 'others' vocabulary is likely to be way smaller than 22,000 (so if, for example, the 'others' vocabulary size was 2,200, this would reduce the overall essay-set size by a factor of 10550 - a distinction, however, without a practical difference),
this calculation counts as pretty bogus. I only wanted to demonstrate, however, that no matter how you cut it, the numbers involved are simply ginormous.

DARPA: three waves of AI

High production values for DARPA's US Military roadmap and vision for AI (February 2017).

This will be the basis of funding going forward. The images below are taken from this slide-pack, more sophisticated than anything I've seen from the likes of Accenture.

Click on any of the pictures to make larger - or better, review the entire slide-set.














Although this 'three wave' model is not too surprising, it's still an accurate view as to where research is heading.

---

If human beings are taken as exemplars of neural nets which can explain their own, contextual operation, it's worth noting that such explanations have a curious character.

No human can explain their own sub-conscious neural processes. If asked to explain how you know that a picture of a cat is indeed that of a cat, you are not going to elucidate details of early visual processing in your visual cortex.

Instead, you are going to traffic in high-level, symbolic descriptions of putative intermediate stages in scene interpretation. The talk will be of features such as fur, shape, the environment of said animal.

These intermediate-level symbolic descriptions are remote indeed from the actual neural processes which it is claimed implemented them .. and indeed will have only a contingent (although highly correlated if accurate) relationship with them.

Self-deception is never far away in the third wave!

---

If you have sixteen minutes, John Launchbury's presentation of DARPA's strategy is excellent.



Interestingly, John Launchbury is British.

Friday, January 27, 2017

Imperial College: automated theorem proving & neural nets

These Imperial College lectures date back to 2006 and 2009 (Simon Colton), but the underlying principles haven't changed. The earlier lectures (starting here) provide an introduction to AI and logic: we get to implementation at lecture 7 and subsequent.

I've chosen them for their clarity and completeness. The level of detail is that of a good overview.

---

Lecture 7: Making Deductive Inferences

We have shown how knowledge can be represented in first-order logic, and how rule-based expert systems expressed in logic can be constructed and used. We now look at how to take some known facts about a domain and deduce new facts from them. This will, in turn, enable agents to prove things, i.e., to start with a set of statements we believe to be true (axioms) and deduce whether another statement (theorem) is true or not.

We will first look at how to tell whether a sentence in propositional logic is true or false. This will suggest some equivalences between propositional sentences, which allow us to rewrite sentences to other sentences which mean the same thing, regardless of the truth or meaning of the individual propositions they contains. These are reversible inferences, in that deduction can be applied either way.

We then look at propositional and first-order inference rules in general, which enable us deduce new sentences if we know that certain things are true, and which may not be reversible.

Lecture 8: The Resolution Method

A minor miracle occurred in 1965 when Alan Robinson published his resolution method. This method uses a generalised version of the resolution rule of inference we saw in the previous lecture. It has been mathematically proven to be refutation-complete over first order logic. This means that if you write any set of sentences in first order logic which are unsatisfiable (i.e., taken together they are false, in that they have no models), then the resolution method will eventually derive the False symbol, indicating that the sentences somehow contradict each other.

In particular, if the set of first order sentences comprises a set of axioms and the negation of a theorem you want to prove, the resolution method can be used in a proof-by-contradiction approach. This means that, if your first order theorem is true then proof by contradiction using the resolution method is guaranteed to find the proof to a theorem eventually.

Lecture 9: Resolution Theorem Proving

To recap, we have looked at logic and some rules of deduction in order to understand automated reasoning in the general case. In the last lecture we looked at a particular rule of inference, the resolution rule. We know that the application of this rule produces a complete search method, which means that it will prove any true theorem which can be written in first order logic. Application of the rule relies on having two sentences in conjunctive normal form (CNF) where one literal of one unifies with the negation of a literal in the other. We described how to write first order sentences in CNF, and how to find unifying substitutions in lecture 8. In this lecture, we look at exactly how to use the resolution rule to prove first order theorems in practice.

Lecture 10: Overview of Machine Learning

We have looked at the automation of intelligent tasks using deduction to infer new information from old. We now look at the use of inductive reasoning to infer new information from old. ...

As with many areas in AI, machine learning has become fairly specialised. In this case, learning from examples dominates the field, partially because of the applications it affords. If a learning agent can look at the examples of share prices and learn a reason why some shares fall during the first financial quarter, this is of great commercial advantage. If another agent can learn reasons why certain chemicals are toxic and others are not, this is of great scientific value. If another agent yet can learn what a tank looks like given just photographs of tanks, this is of great military advantage.

Lecture 11: Decision Tree Learning

As discussed in the last lecture, the representation scheme we choose to represent our learned solutions and the way in which we learn those solutions are the most important aspects of a learning method. We look in this lecture at decision trees - a simple but powerful representation scheme, and we look at the ID3 method for decision tree learning.

Lecture 12: Two Layer Artificial Neural Networks

Decision trees, while powerful, are a simple representation scheme. While graphical on the surface, they can be seen as disjunctions of conjunctions, and hence are a logical representation, and we call such schemes symbolic representations. In this lecture, we look at a non-symbolic representation scheme known as Artificial Neural Networks. This term is often shortened to Neural Networks, but this annoys neuro-biologists who deal with real neural networks (inside our human heads).

As the name suggests, ANNs have a biological motivation, and we briefly look at that first. Following this, we look in detail at how information is represented in ANNs, then we look at the simplest type of network, two layer networks. We look at perceptrons and linear units, and discuss the limitations that such simple networks have. In the next lecture, we discuss multi-layer networks and the back-propagation algorithm for learning such networks.

Lecture 13: Multi-Layer Artificial Neural Networks

We can now look at more sophisticated ANNs, which are known as multi-layer artificial neural networks because they have hidden layers. These will naturally be used to undertake more complicated tasks than perceptrons.

We first look at the network structure for multi-layer ANNs, and then in detail at the way in which the weights in such structures can be determined to solve machine learning problems. There are many considerations involved with learning such ANNs, and we consider some of them here. First and foremost, the algorithm can get stuck in local minima, and there are some ways to try to get around this.

As with any learning technique, we will also consider the problem of overfitting, and discuss which types of problems an ANN approach is suitable for.

Tuesday, December 13, 2016

Prosocial AI: Google's Jigsaw at the NYT

From the MIT Technology Review.



"Jigsaw — formerly known as Google Ideas — says it intends to spot and remove digital harassment with an automated program called Conversation AI.

[...]

Conversation AI is an offshoot of one of the most successful of Google’s “moonshot” projects, Google Brain. It has helped revolutionize the field of machine learning through large-scale neural networks, and given Google advantages such as software that is more skillful than humans at recognizing images.

But Conversation AI won’t be able to defeat online abuse. Though Jigsaw’s stated goal is to “fight the rise of online mobs,” the program itself is a far more modest—and therefore more plausible—project. Conversation AI will primarily streamline the community moderation that is today performed by humans. So even if it is unable to neutralize the worst behavior online, it might foster more and better discourse on some sites.

Jigsaw is starting Conversation AI at the New York Times, where it will be rolled out in a few months to help the company manage its online comments. Human moderators currently review nearly every comment published on the site. Right now, Conversation AI is reading 18 million of them, learning to detect each individual category of comments that get rejected—insubstantial, off-topic, spam, incoherent, inflammatory, obscene, attack on commenter, attack on author, attack on publisher.

The Times’s goal is not necessarily to reduce abuse in its comments, a problem it already considers under control. Instead, it hopes to reduce the human moderators’ workload. “We don’t ever expect to have a system that’s fully automated,” Erica Greene, engineering manager of the New York Times community team, told me. Times community editor Bassey Etim estimates that somewhere between 50 and 80 percent of comments could eventually be auto-­moderated, freeing up employees to devote their efforts to creating more compelling content from the paper’s comment sections.

The New York Times site poses very different problems from the real-time free-for-all of Twitter and Reddit. And given the limitations of machine learning — as it exists today — Conversation AI cannot possibly fight abuse in the Internet’s wide-open spaces. For all the dazzling achievements of machine learning, it still hasn’t cracked human language, where patterns like the ones it can find in Go or images prove diabolically elusive.

The linguistic problem in abuse detection is context. Conversation AI’s comment analysis doesn’t model the entire flow of a discussion; it matches individual comments against learned models of what constitute good or bad comments. For example, comments on the New York Times site might be deemed acceptable if they tend to include common words, phrases, and other features.

But Greene says Google’s system frequently flagged comments on articles about Donald Trump as abusive because they quoted him using words that would get a comment rejected if they came from a reader. For these sorts of articles, the Times will simply turn off automatic moderation."

Let's be clear: this is a good idea. The machine learning system is replacing grunt work currently carried out by hordes of bored human moderators. Hard cases are referred up by the AI. Few people want their reading experience polluted by foul-mouthed, ignorant rants. Moderation is enforced on this publishing outlet too! We all use automated spam filters.

And yet .. .

We sometimes forget the downside of prosociality. All this politeness, agreeableness and consensus-seeking must lead eventually to a bland, stifling conformity. When the system is silted up - captured by vested interests spouting the empty language of universality - the only progress is through breaking the rules.

I checked with my mentor, Karl M., and he confirmed that the result is often rather impolite.

---

Anyway, what's done is done. I can only conclude this post with a satiric observation:
"I for one welcome our new AI over---"
[This comment has been removed by the Blogger AI moderator: code 9 - hate speech].

Friday, November 25, 2016

"My chat bot found my wallet" - Adrian Zumbrunnen

When you turn your website into a chatbot ...



"It was a Saturday afternoon. I met up with a friend to enjoy the occasional good weather by the lake. It was a day void of serious topics or stress. Life is good, I thought to myself.

I headed home after a few drinks to prepare for an upcoming trip. The smile on my face soon vanished when I realized that my pockets felt awfully empty. I braced myself. Three seconds later, I panicked. Where was my wallet?!

My credit card, my ID and personal stuff was in there. I felt like ****.

After calling my card issuer to block my credit card, I waited for the confirmation email to breath some sigh of relief. But to my surprise, there was a much more delightful message waiting for me right there… It was an email from my conversational website:

Title: Chat bot message
Content: I found your wallet by the lake.

Wow! I only lost my wallet 30 minutes earlier and I had already gotten an email. That’s technology working its magic right there!

I answered as fast as I could. The other person sent me his number and we met later that same day. As he was kindly handing me back my wallet, I asked:

“Thanks so much! By the way, I’m just wondering… How did you get in touch with me?”

He looked at me slightly confused and says…

“What do you mean… We had a chat, no?”

That’s when it hit me. This guy thought he was having a real conversation with me on my website."
It's an interesting story, but if you access Adrian's site you will find it hard to imagine you're talking to him (picture above). (Try it).

Adrian provides you with little 'suggestion' buttons to avoid uncontrolled natural language input. This is current best practice, but it makes the experience not dissimilar to filling in a form.

---

Last night I tried the new Thomson Holidays chatbot (powered by IBM's Watson). It fell apart on the second dialogue input. Admittedly it's in beta. (Try it).

Feigenbaum's old AI adage, 'in the knowledge lies the power', holds good for chatbots. The system needs to know an awful lot of dialogue flows to create the illusion of conversation. This makes building chatbots labour-intensive (for machine-learning, you need big pre-recorded conversation datasets).

I have neither, which has demotivated me from experiments with Pandorabots. That, and its simple-minded stimulus-response architecture.

Checked on Replika a couple of days ago which I have signed up to. The iPhone version will be out soon but the Android app is pushed back to 2017. The training method is Q&A via SMS: people are sending 40-50 texts per day to train their replikas. Like I said: labour intensive.

---

You and I know that conversation isn't simply statistically-correlated sequences of 'he says', 'she says'. It's about something. Until the meaning of conversations (data structures representing external environment and internal attitudes) is part of the architecture, chatbot conversations will continue to fall off the rails without any warning.

You can see why capturing knowledge of the real world (and of the human psychological world) is difficult for a paradigm which mostly throws ever more ingenious massively-parallel weight-learning at truly enormous datasets.*

---

* Huge parallel with self-driving cars. Humans drive .. which obscures the fact that driving is many distinct activities, not just one. A relatively closed system like motorway travel in good weather conditions sharply contrasts with the horribly open system of urban driving with complex traffic patterns and uncontrolled pedestrians in bad weather.