Connect with us

AI

Why AI Systems Are So Hard To Predict

Avatar

Published

on

Home

OPINION

Interactions and optimization make it much harder to determine when a system will fail, or even what that failure really means.

popularity

AI can do many things, but how to ensure that it does the right things is anything but clear.

Much of this stems from the fact that AI/ML/DL systems are built to adapt and self-optimize. With properly adjusted weights, training algorithms can be used to make sure these systems don’t stray too far from the starting point. But how to test for that, in the lab, the fab and in the field is far from obvious.

Until recently, most of the work involving AI has focused on improving performance and accuracy of these systems. They are expected to work within an acceptable distribution range, which is basically setting the parameters for “normal” behavior. It’s similar to the engine temperature gauge in a car. Sometimes it runs hotter or colder than at other times, but as long as it’s green, there’s no reason to pull over to the side of the road.

The challenge with AI systems is that you can’t really tell what’s going on after they are turned on. You can measure the heat and the electrical activity, but you don’t specifically know what’s going on inside the package. There is a nearly infinite number of possible interactions and permutations, and all of that is opaque. And once a system goes live, there is no way to say for certain exactly how it will behave.

This uncertainty is compounded as more systems interact, and as machines learn from other machines. But now, rather than a single device, the parameters of acceptable behavior become even murkier. The chip world is used to thinking about dependencies in fixed terms. “If this, then that.” With AI, those interactions are fuzzy because these are distributions. So it becomes, ‘If roughly this, then probably that.” And the lower the accuracy of one system, the lower the accuracy of both, and the less certain the outcome of any interaction.

Predicted behavior becomes still hazier as updates are added into these systems. Those updates can be anything from software and firmware in other parts of a system, which can alter performance, power and thermal gradients, to new algorithms in the AI system or system of systems. So even if it’s clear how they behave individually, the big challenge going forward will be how they behave together. Modifications to an algorithm can change the data flow within a system, stressing different parts of a system differently and at different times.

In some cases, that’s the point. If your phone doesn’t work, you need to be able to re-route signals the same way you can with ECC memory where extra memory cells are used to keep systems behaving as expected. The difference is that with AI systems, the re-routing is less predictable. These systems are supposed adapt to whatever is optimal for a particular user or device or application, so each system will adjust itself to the optimum performance or energy consumption based upon internal variations.

That makes it almost impossible to predict how a system will behave, and it makes it much harder to pinpoint problems when a system is in use. In theory at least, each system should reach a sufficient level of performance and power and continue to behave within the parameters set by the design team. Some circuits will age faster than others, and in certain use cases some parts of a system may be stressed more than others.

The challenge going forward will be to build tools and systems that can both measure and predict all of these possible permutations, and to build sensors and analytics into systems that can at least give engineers some idea of how the hardware is behaving. The whole industry is pushing into very murky territory, and it would be nice to at least have a flashlight.

Ed Sperling

Ed Sperling

  (all posts)
Ed Sperling is the editor in chief of Semiconductor Engineering.

Source: https://semiengineering.com/why-ai-systems-are-so-hard-to-predict/

AI

How US legal firms can and must compete with robo-lawyer services

Avatar

Published

on

Chris Knight

Most US legal firms, like their European counterparts, are steeped in tradition. Even newer firms formed by eager law graduates have their education rooted in similar structures. As legal journals and business magazines impress on the need to modernize and digitize how we work, the external threats to legal firms are growing, but how do we address them?

Automated legal services like chatbots and form creators are a threat to the legal profession, or they can be viewed as a challenge to be met. As was the case with iTunes and Spotify for music and Amazon for retail, some tivals adapted to face a new market reality, others folded or sold up, or were driven into a particular niche, while more startups arrived to compete. Whatever the market, there are plenty of ways to survive and thrive as the momentum and disruption of automation builds, as legal will find out very quickly.

In the legal profession, the adoption of digital technology for collaboration and efficiency, powered by cloud services has been mixed. But as all markets look post-COVID, there is a fresh impetus to grasp and understand the learnings from the crisis and adopt technology to make legal operations more streamlined and efficient.

Lack of awareness is no defense, with Deloitte exploring the disruption issue back in 2017 with a report on ”The case for disruptive technology in the legal profession”, highlighting the key issues of:

· The opportunity that technology creates for legal.

· The growing importance of big data and analytics in legal cases.

· The effects of technology on legal business models.

· Potential legal disrupters.

All of which remain valid today, but now the disruption is more visible, in every lawyer’s face and rising up the boardroom agenda for all firms with a large legal footprint.

1. The Messenger Rules for European Facebook Pages Are Changing. Here’s What You Need to Know

2. This Is Why Chatbot Business Are Dying

3. Facebook acquires Kustomer: an end for chatbots businesses?

4. The Five P’s of successful chatbots

But the word “disruption” is the driving force behind more radical change. Many startups and “ideas people” both from within and external to the law profession see opportunities to shake up the old order. They create new products and types of service that eliminate the high cost and slow-moving nature of most legal offerings and services.

Behind their ideas, new products are driven by the limitless power of the cloud to deliver services and scale marketing to enormous proportions. While most of them will fail to gain the much-coveted traction, those that succeed act as inspiration for more to try, while rapidly taking business from existing legal firms or providing them with the tools to compete.

The current poster child for disruptive legal tech is DoNotPay, a company founded by an English teenager, Joshua Browder, in 2015. His business started with an automated way to dispute parking tickets and expanded to the US, providing bots that help consumers with legal form filling, filing for airfare refunds, providing access to legal services and much more. Others include Zegal (legal templates), Lisa Robot Lawyer (NDAs and property contracts).

DoNotPay has blossomed into a consumer rights champion, offering virtual credit cards, student advice and has started eating further up the legal food chain with an automated contract builder and other tools. It can even send these forms as faxes to services that are stuck in their ways.

DoNotPay does away with legal jargon and complexity, and more importantly saves time

People who never knew they needed a lawyer are using DoNotBuy or the growing number of rivals servicing local, national or regional markets, without ever having to find traditional representation. Digital-native generations will use these tools and never bother Googling for “lawyer near me.” And this is only the start as automated real estate, bail bond, company creation services, business contracts, leases and other legal processes are consumed as instant services.

Others will follow the well-trodden path of digital legal services adoption, doing whatever their rivals do to keep pace through cloud-based practice management services at cost and with the usual upheaval of adopting new services. Bucking tradition, perhaps the best approach to meeting the automated services era is for firms to ask their domain experts how they can innovate and counteract or outpace those threatening to disrupt the legal landscape.

Where DoNotPay and its rivals may falter is that they are not law firms and the T&Cs state that “The information provided by DoNotPay along with the content on our website related to legal matters (“Legal Information”) is provided for your private use and does not constitute legal advice.”

A law firm can fill the breach with automated services that do provide legal advice or take the next steps that robo-firms currently do not. And creating these tools is simpler than you might think.

Putting design tools in the hands of lawyers and legal professionals to build the applications they need, from chatbots (see BRYTER’s new “lawyer’s guide to chatbots” white paper), form creators, tax checkers and other necessities gets them live in days, not months.

They enable a company to prototype and trial applications quickly to take advantage of new legal market opportunities, and then scale digital legal services to meet demand. BRYTER is already used by leading legal firms for timely issues like privacy, COVID-19, GDPR, CCPA, repapering among other matters, all helping grow digital ideas within businesses.

BRYTER’s arrival in the US should make waves

They can save time or generate revenue for the company directly, or be sold to clients as part of service packages, diversifying beyond the traditional billable hour.

BRYTER’s full-service offering provides the tools, expertise and experience to embed no-code tools as a core product within teams or legal practice groups. It took one person to build DoNotPay and it could be one of your lawyers looking to innovate or deliver savings that comes up with the next big thing that brings success to your practice by bringing an idea to life.

Source: https://chatbotslife.com/how-us-legal-firms-can-and-must-compete-with-robo-lawyer-services-e47dc1546b94?source=rss—-a49517e4c30b—4

Continue Reading

AI

Language Translation with Transformers in PyTorch

Avatar

Published

on

Mike Wang, John Inacay, and Wiley Wang (All authors contributed equally)

If you’ve been using online translation services, you may have noticed that the translation quality has significantly improved in recent years. Since it was introduced in 2017, the Transformer deep learning model has rapidly replaced the recurrent neural network (RNN) model as the model of choice in natural language processing tasks. However, Transformer models, like OpenAI’s Generative Pre-trained Transformer (GPT) and Google’s Bidirectional Encoder Representations from Transformers (BERT) models, have quickly replaced RNNs as the network architecture of choice for Natural Language Processing (NLP). With the Transformer’s parallelization ability and the utilization of modern computing power, these models are big and fast evolving, generative language models frequently draw media attention for their capabilities. If you’re like us, relatively new to NLP but generally understand machine learning fundamentals, this tutorial may help you kick start understanding Transformers with real life examples by building an end-to-end German to English translator.

In creating this tutorial, we based our work on two resources: the Pytorch RNN based language translator tutorial and a translator implementation by Andrew Peng. With an openly available database, we’ll be demonstrating our Colab implementation for how to translate between German and English using Pytorch and the Transformer model.

To start with, let’s talk about how data flows through the translation process. The data flow follows the diagram shown above. An input sequence is converted to a tensor where each of the Transformer’s outputs then goes through an unpictured “de-embedding” conversion process from embedding to the final output sequence. Note that we’ll be obtaining words one-by-one from each forward pass during inference rather than receiving a translation of the full text all at once from a single inference.

At the start, we have our input sequence. For example, we start with the German sentence “Zwei junge personen fahren mit dem schlitten einen hügel hinunter.” The ground truth English translation is “Two young people are going down a hill on a slide.” Below, we show how the Transformer is used with some insight on the inner workings. The model itself expects the source German sentence and whatever the current translation has been inferred. The Transformer translation process results in a feedback loop to predict the following word in the translation.

For the task of translation, we use the German-English `Multi30k` dataset from `torchtext`. This dataset is small enough to be trained in a short period of time, but big enough to show reasonable language relations. It consists of 30k paired German and English sentences. To improve calculation efficiency, the dataset of translation pairs is sorted by length. As the length of German and English sentence pairs can vary significantly, the sorting is by the sentences’ combined and individual lengths. Finally, the sorted pairs are loaded as batches. For Transformers, the input sequence lengths are padded to fixed length for both German and English sentences in the pair, together with location based masks. For our model, we train on an input of German sentences to output English sentences.

1. The Messenger Rules for European Facebook Pages Are Changing. Here’s What You Need to Know

2. This Is Why Chatbot Business Are Dying

3. Facebook acquires Kustomer: an end for chatbots businesses?

4. The Five P’s of successful chatbots

We use the spacy python package for vocabulary encoding. The vocabulary indexing is based on the frequency of words, though numbers 0 to 3 are reserved for special tokens:

  • 0: <SOS> as “start of sentence”
  • 1: <EOS> as “end of sentence”
  • 2: <UNK> as “unknown” words
  • 3: <PAD> as “padding”

Uncommon words that appear less than 2 times in the dataset are denoted with the <UNK> token. Note that inside of the Transformer structure, the input encoding, which is by frequency indices, passes through the nn.Embedding layer to be converted into the actual nn.Transformer dimension. Note that this embedding mapping is per word based. From our input sentence of 10 German words, we get tensors of length 10 where each position is the embedding of the word.

Compared to RNNs, Transformers are different in requiring positional encoding. RNN with its sequential nature, encodes the location information naturally. Transformers process all words in parallel, therefore requiring stronger location information to be encoded from the inputs.

We calculate positional encoding as a function of time. This function is expected to contain cyclic (sine and cosine functions) and non-cyclic components. The intuition here is that this combination will allow attention to regard other words far away relative to the word being processed while being invariant to the length of sentences due to the cyclic component. We then add this information to the word embedding. In our case, we add this to each token in the sentence, but another possible method is concatenation to each word.

Here we emphasize Transformer layers and how cost functions are constructed.

Pytorch’s Transformer module is at the core of our application.The torch.nn.Transformer parameters include: src, tgt, src_key_padding_mask, tgt_key_padding_mask, memory_key_padding_mask, and tgt_mask. These parameters are defined as:

src: the source sequence

tgt: the target sequence. Note that the target input compared to the translation output is always shifted by 1 time step

src_key_padding_mask: a boolean tensor from the source language where 1 indicates padding and 0 indicates an actual word

tgt_key_padding_mask: a boolean tensor from the target language where 1 indicates padding and 0 indices an actual word

memory_key_padding_mask: a boolean tensor where 1 indicates padding and 0 indicates an actual word. In our example, this is the same as the src_key_padding_mask

tgt_mask: a lower triangular matrix is used to process target generation recursively where 0 indicates an actual predicted word and negative infinity indicates a prediction to ignore

The Transformer is designed to take in a full sentence, so an input shorter than the transformer’s input capacity is padded. The key padding masks allow for the Transformer to perform calculations efficiently by excluding elements after sentences end. When the Transformer is used in sequence to sequence applications, it’s crucial to understand that even though the input sequence is processed at the same time, the output sequence is processed progressively. This sequential progression is configured by tgt_mask. During training or inference, the target output is always one step ahead of the target input as each recursion generates a new additional word, as shown “tgt_inp, tgt_out = tgt[:-1, :], tgt[1:, :]” configuration during training. The tgt_mask is composed as a lower triangular matrix:

Row by row, a new position is unlocked for target output, e.g. a new target word. The newly appended sentence is then fed back as the target input in this recursion.

While we do build the translation word-by-word for inference, we can train our model using a full input and output sequence at once. Each word in the predicted sentence can be compared with each word in the ground truth sentence. Since we have a finite vocabulary with our word embeddings, we can treat translation as a classification task for each word. As a result, we train our network with the Cross Entropy loss on an individual word level for the translation output in both the RNN and Transformer formulations of the task.

When we perform the actual German to English translation, the entire German sentence is used as the source input, but the target output, e.g. the English sentence is translated word by word, starting with <SOS> and ending with <EOS>. Each step, at the target output we apply argmax function over the vocabulary to obtain the next target word. Note choosing the highest probability word progressively from our network is a form of greedy sampling.

The Transformer model is very effective in solving sequence-to-sequence problems. Funnily enough, it’s effectiveness comes from processing a sentence as a graph instead of an explicit sequence. Each word at a particular position considers all other words. The Transformer powers this approach with the attention mechanism, which captures word relations and applies attention weights to words of focus. Unlike Recurrent Neural Networks, calculating the Transformer module can be done in parallel. Note that the Transformer model allows fixed length sequences for inputs and outputs. Sentences are padded with <PAD> tokens to the fixed length.

A full transformer network consists of a stack of encoding layers and a stack of decoding layers. These encoding and decoding layers are composed of self-attention and feed forward layers. One of the basic building blocks of the transformer is the self-attention module which contains Key, Value, and Query vectors. At a high level, the Query and Key vectors together calculate an attention score between 0 and 1 which scales how much the current item is being weighted. Note that if the attention score is only scaling items to be bigger or smaller, we can’t really call it a transformer yet. In order to start transforming the input, the Value vector is applied to the input vector. The output of the Value vector applied to the Input Vector is scaled by the Attention Score we calculated earlier.

Source: https://chatbotslife.com/language-translation-with-transformers-in-pytorch-ff8b32cf848?source=rss—-a49517e4c30b—4

Continue Reading

AI

“Hello World”, chatbot version — Complete example

Avatar

Published

on

The Hello World program is the typical first example you see when learning any programming language since it was first used in a tutorial to learn B (predecessor of the C language) in 1973. It is often the first program written by people learning to code. Its success resides in its simplicity. Writing its code is very simple in most programming languages. It’s also used as a sanity test to make sure the editor, compiler,… is properly installed and configured. For these same reasons, it makes sense to have a “Hello World” version for chatbots. Such bot could be defined as follows:

A Hello World chatbot is a chatbot that replies “Hello World” every time the user greets the bot

So something as this:

While this chatbot is indeed simple (compared with any other chatbot), it’s much more deceitful than its Hello World counterparts for programming languages. That’s because of the essential complexity of chatbot development. Even the simplest chatbot is a complex system that needs to interact with communication channels (on the “front-end”) and the Text Processing / NLP engine (in the “backend”), among, potentially, other external services. Clearly, creating and deploying a Hello World chatbot is not exactly your typical Hello World exercise.

Chatbots are complex systems

But don’t be scared, let me show you how to build your first chatbot with our open-source platform Xatkit. Our Fluent API will help you to create and assemble the different parts of the chatbot. Let’s see the chatbot code you need to write.

The chatbot needs to detect when the user is greeting it. This is the only intention we need to care about. So it’s enough to define a single Intent with a few training sentences. Any NLP Provider (e.g. DialogFlow or nlp.js) would do a good job with this simple intent.

1. The Messenger Rules for European Facebook Pages Are Changing. Here’s What You Need to Know

2. This Is Why Chatbot Business Are Dying

3. Facebook acquires Kustomer: an end for chatbots businesses?

4. The Five P’s of successful chatbots

To process the user greetings text, we need at least one state that replies by printing the “Hello World” text. But to keep the bot in a loop (who knows, maybe many users want to say Hi!), we’ll use a couple of them.

As we mentioned above, chatbots come with some inherent essential complexity. At the very least, they need to wait and listen to the user on some channel and then reply to the same channel. In Xatkit, we use the concept of Platform for this. In the code below, we indicate that the bot is displayed as a widget on a webpage and that it will get both events (e.g. the page loaded event) and user utterances via this platform.

And this is basically all you need for your Hello World chatbot!. Feel free to clone our Xatkit bot template to get a Greetings Bot ready to use and play with.

Of course, this is a very simple Hello World chatbot (e.g. what about if the user does not say Hi but something else?) but I think it’s the closer we can get to the Hello World equivalent you’re so used to see for other languages. Remember you can head to our main GitHub Repo for more details on Xatkit or check some of our other bot examples.

Source: https://chatbotslife.com/hello-world-chatbot-version-complete-example-ef4d39a521ed?source=rss—-a49517e4c30b—4

Continue Reading

AI

Soon, no more blood tests or probing for prostate cancer? AI claims 99% success rate using more relaxing methods

Avatar

Published

on

Scientists say they have devised a way to screen for prostate cancer using a drop of urine, a sensor, and AI algorithms. And the test takes just twenty minutes, and is 99 per cent accurate, according to results from a small-scale test.

The risk of developing prostate cancer increases for men as they get older, and the over 50s are supposed to be routinely screened for the disease. If the examination – performed either with a blood test or something… more hands on – suggests there’s a problem, the patient may undergo a biopsy, where a small amount of tissue is extracted from the prostate to confirm whether or not there are cancerous cells present. But these screening tests tend to generate a lot of false positives, leading to unnecessary biopsies.

A team of researchers led by the Korea Institute of Science and Technology (KIST) believe that prostate cancer can be screened non-invasively and quickly using just a urine sample. If high levels of PCA3 are detected, there’s a high chance of prostate cancer.

Urine tests, however, can also be inaccurate at predicting whether someone really needs a biopsy or not. Instead of looking for just PCA3, the team uses a biosensor made up of a dual-gate field effect transistor to sense the presence of biomarkers in the urine. These biomarkers cause a shift in the transistor’s reference voltage.

By measuring this change after a tiny drop of urine is placed on the biosensor’s surface, scientists can determine the concentration of the biomarkers in the fluid. Trained algorithms can take these concentration readings, and use them to predict whether or not someone has the disease.

“Basically, a biomarker is a certain substance in our body where its concentration is affected by a specific disease state,” Kwanhyi Lee – co-author of a paper describing the technology, published in ACS Nano, and a principal research scientist at KIST – explained to The Register on Tuesday.

“In our study, we chose four different biomarkers related to prostate cancer. Simply speaking, we see either an increase or decrease of biomarker concentration from cancer patients compared to healthy individuals.

eye

Study: AI designed to detect diabetic eye disease blinks in the real world, makes more work for doctors

READ MORE

“In a single biomarker based diagnosis, we can simply set the threshold to diagnose the disease. However, when there are more biomarkers, four in our case, understanding the relation between biomarker data and disease state is not easy. Considering the potential of multiple biomarker based diagnosis, it is necessary to analyze multiple biomarker data. Here, we utilized AI algorithms to learn the pattern of biomarker data so that the AI algorithm predicts the cancer.”

The algorithms were trained to look for specific patterns in the biomarker data that are common in patients with prostate cancer. If they detect the same patterns in a fresh urine sample, there’s a high chance of the disease. The team collected 76 urine samples from a mixture of healthy patients and men with prostate cancer, and used 70 per cent of them to train the algorithms and 30 per cent for testing.

Initial results show that the algorithms were able to correctly predict with at least 99 per cent accuracy whether someone had prostate cancer or not. It should be noted, however, that only 23 people were tested in the experiment so the results of this limited experiment should be taken with a pinch of salt.

After a further development of the technology, I believe that replacing the current blood test will be possible

Lee said that although the false positive and negative rates of the algorithms were low at 0.024 and 0.037 respectively, the team needed to verify their results with many more patients.

“After a further development of the technology, I believe that replacing the current blood test will be possible,” he said. “To make this happen, there are a few challenges we need to overcome. First, a validation of our approach with a much larger data set should be checked. Second, miniaturization of the sensor is needed.

“And then we need to closely work with healthcare experts on fields to monitor the performance of our sensing platform to determine replacing the current blood-based test. Personally, I think that making the sensing platform more affordable without compromising the performance is the key.”

At the moment, Lee believes the test is not yet good enough to completely eradicate the need for further biopsy tests. He hopes that one day in the future the team will develop a biosensor capable of detecting multiple biomarkers for different cancers that can be analysed with AI algorithms to diagnose patients. ®

Source: https://go.theregister.com/feed/www.theregister.com/2021/01/27/ai_prostate_cancer/

Continue Reading
NEWATLAS2 days ago

Lockheed Martin and Boeing debut Defiant X advanced assault helicopter

Blockchain4 days ago

Buying the Bitcoin Dip: MicroStrategy Scoops $10M Worth of BTC Following $7K Daily Crash

Blockchain4 days ago

Bitcoin Correction Intact While Altcoins Skyrocket: The Crypto Weekly Recap

Blockchain4 days ago

Canadian VR Company Sells $4.2M of Bitcoin Following the Double-Spending FUD

Blockchain4 days ago

MicroStrategy CEO claims to have “thousands” of executives interested in Bitcoin

Amb Crypto4 days ago

Monero, OMG Network, DigiByte Price Analysis: 23 January

Amb Crypto2 days ago

Former Goldman Sachs exec: Bitcoin ‘could work,’ but will attract more regulation

Amb Crypto4 days ago

Chainlink Price Analysis: 23 January

Amb Crypto3 days ago

Will range-bound Bitcoin fuel an altcoin rally?

Amb Crypto3 days ago

Bitcoin Price Analysis: 24 January

Amb Crypto2 days ago

Other than Bitcoin, Coinbase notes institutional demand for Ethereum as well

Amb Crypto5 days ago

Popular analyst prefers altcoins LINK, UNI, others during Bitcoin & Eth’s correction phase

Amb Crypto4 days ago

Bitcoin Cash, Synthetix, Dash Price Analysis: 23 January

Amb Crypto4 days ago

Why has Bitcoin’s brief recovery not been enough

Automotive4 days ago

Tesla Powerwalls selected for first 100% solar and battery neighborhood in Australia

Amb Crypto2 days ago

Chainlink, Monero, Ethereum Classic Price Analysis: 25 January

Amb Crypto4 days ago

Stellar Lumens, Cosmos, Zcash Price Analysis: 23 January

AI3 days ago

Plato had Big Data and AI firmly on his radar

Amb Crypto4 days ago

Why now is the best time to buy Bitcoin, Ethereum

Amb Crypto1 day ago

Bitcoin SV, Ontology, Zcash Price Analysis: 26 January

Trending