Black Box Modelling

In deep learning, at times the model remains opaque to the user. It is called a black box. It is not easy to decipher how the model functions and how it makes predictions. Its internal working is not known.

This criticism is often levelled against deep neural networks — they are non-transparent and their predictions are not traceable by humans.

Black Box Models

These are used in a number of industries. They are used to predict behaviour of complex systems without fully comprehending how these work. Insurance industry uses Black Box Modelling. It predicts the probability of future claims. Aviation is another industry that uses Black Box. It has to predict manpower requirements during different parts of the day and days of the week. Movies too use Black Box to predict the production cost of a new movie. In financial modelling too, these models are used.

Disadvantages

Tests run by the designer are redundant. Testing is difficult. Results could be over-estimated. These cannot be used for testing code of complex segments.

Advantages

These make predictions about complex systems.

Generative AI Scenario

Google has been into AI since the last seven years. It is an AI-first company. We have entered a new era of generative AI. ChatGPT’s introduction towards the end of 2022 got people talking about AI. Google wants all its products infused with AI. Microsoft has already put forward products powered by AI. Generative AI enables us to get content out of thin air. Generative AI models are trained on existing data sets. They, however, go beyond by taking inputs in natural language, and generate content that did not exist. All this costs Google and Microsoft a great deal. It is not yet certain how the generative models can be monetised.

. Generative AI, according to McKinsey , is algorithms that can be used to create new content, including audio, code, images, text, simulations and videos.

The answers to our queries are accurate to the extent these tools have been trained. They generate true-to-life images just in response to a text description. These could code to fulfill the purpose stated. With a mere prompt, these models can write a scholarly thesis.

There are concerns for the misuse of the technology. There are concerns for privacy. There is a need for responsible AI. Sam Altman of OpenAI wants US Congress to form regulation for AI. There are ethical issues of copyright and IP. LLMs take lot of computing power to get trained. Some express the fear that AI could become like Terminator. It takes over the world.

All said and done, AI is a useful tool having myriad of applications. Sam Altman says, OpenAI has been founded on the belief that AI has the potential to improve nearly every aspect of our life. If this technology goes wrong, It can go quite wrong.

Generative AI models so far were very energy-intensive. They run on the cloud. However, models such as Stable Diffusion from Qualcomm can run on smart phones. There could be hybrid AI that distributes processing between the edge and the cloud. The jury is still out on whether smart phones require new architecture to support generative processing.

Google’s PaLM2 AI language model has been released. It rivals Open AI’s GPT-4. One version of PALM2 runs on smart phones. It is called Gecko. If processing could be done on edge, it will ensure that data of text and images would not leave the device, thus maintaining privacy.

Responsible AI and the US

Kamla Harris the US VP, held a meeting with the CEOs of Big Tech companies to remind them about the ethical and safe products, especially the newly emerging AI. Joe Biden, the US president too dropped by. It was emphasised that the companies mitigate the current and future risks AI poses. Kamla Harris said that advances in technology have always presented opportunities and risks, and AI is no different.

AI can also threaten safely and security, infringe civil rights and privacy and erode public trust and faith in democracy.

White House promised funding for developing responsible AI. There are 25 National AI Research Institutes. The government promises them financial support of a half a billion dollars to develop responsible AI.

Geoffrey Everest Hinton’s Concern

Geoffrey Hinton, a British-Canadian scientist, quit Google after a ten year tenure to alert people about the dangers of AI. He is taken seriously since he is considered one of ‘godfathers of AI’. He developed along with LeCun and Bengio ‘a neural network’. He received 2018 Turing Award for this. It is a mathematical concept that makes it easy to extract patterns from very, very, large datasets of human language. In short, you can say that generative AI models have as their foundation the ‘neural network’. Geoffrey Hinton’s contributions of more than 200 peer-reviewed research papers make it usable.

AI Licensing

The US Congress is listening to the technology CEOs about their views on AI and what could be done to further the benefits of this technology while limiting its misuse.

OpenAI’s CEO Sam Altman expressed the view that some rules and guidelines are needed in terms of disclosure from a company that offers the AI model. Sam Altman is nervous about ‘elections’ and AI. He feels in general the US should consider licensing and testing requirements for the development of AI models. The systems could be tested before their release and publishing the results.

AI models have become more and more dexterous. They use endless data and huge capital. There are fears that the technology could do social harm. It can spread prejudice and misinformation. Some think the technology can end humanity itself.

GPT-5

GPT-4 has been released in March. 2023. At the same time, there is anticipation among users for GPT-5. GPT-4 itself is very powerful and capable. It is expected that GPT-5 may be released by December, 2023. However, Sam Altman is not for an early release. It is just possible that an intermediate model such as GPT 4.5 might be introduced, say by December 2023 before the introduction of GPT-5. It will bring multi-modal capability, i.e. analysis of both the text and images.

At present, OpenAI has to work on GPT-4’s inference time, which is very high. Besides, it is costly to run it. It has to bring code Interpreter for all paying users.

Compute efficiency is desirable in any model. GPT-5 is likely to appear in 2024. It may coincide with Google Gemini release.

GPT-5 will have AGI or Artificial General Intelligence. The inference time will be curtailed. It will bring down hallucination. Therefore, its accuracy will be much more.

GPT-4’s running cost is $0.03 per 1K tokens. GPT-3.5’s running cost is $0.002 per 1K tokens. GPT-4 has been trained on 1 trillion parameters. Google’s PalM2 model is trained on 340 billion parameters (much less than GPT-4). Bigger is not always necessarily better. The models should be compute-optimal. Here creativity is called for. GPT-5 model could be truly multi-modal — deals with text, audio, images, videos, depth data and temperature. It can interlink data streams from different modes. Facebook’s model combines data from six modalities. It can be used to create immersive content.

GPT-4 has token length of 32K tokens, costing $0.06 per K token. AI can have new applications due to long-term memory support.

AGI in GPT-5 makes it smarter than human beings. Some version of AGI can be deployed with GPT-5. It is risky to handle such a system. There should be regulation around incredibly powerful AI systems. If GPT-5 is infused with AGI, its release could be further delayed.

After the release of GPT-4 OpenAI is not very open about its operations. It is not sharing the research on training and hardware architecture. If AI or AGI is so potent it makes no sense to keep it open source. (Ilya Sutskever, chief scientist, OpenAI). GPT-4 and GPT-5 cannot afford to be open source to stay competitive. However, Facebook, as we have already observed, is making its AI models free. OpenAI may work on an altogether new model which can be open source.

GPT-5 will be pushing the AI envelope further. It may have some sort of Artificial General Intelligence. There could be a regulatory framework around this.

Hidden Layers in Artificial Neural Networks

A hidden layer in an artificial neural network is a layer between input layers and output layers.

Neural networks perform ideally on account of hidden layers. Hidden layers perform multiple functions –data transformation, automatic feature creation and so on.

In hidden layers, artificial neurons take a set of weighted inputs and produce an output through an activation function.

How many hidden layers are used? What is the purpose? If there are more hidden layers/neurons, does it improve results?

As we know, artificial neural networks (ANNs) are inspired by biological neural networks. They are represented as a set of layers — input, hidden and output. Input and output layers are easily grasped. The number of neurons in the input layers equals the number of input variables in the data being processed. The number of neurons in the output layer equals the number of outputs associated with each input.

How to know the number of hidden layers? It is a classification problem.

Depending on the data, draw a decision boundary to separate the classes. The decision boundaries are expressed as a set of lines. The number of selected lines represents the number of hidden neurons in the hidden layer.

To connect the lines created by previous layer, a new hidden layer is added. This happens every time new connections are to be created among the lines of the previous hidden layer. The number of hidden neurons in each new hidden layer equals the number of connections to be made.

In ANNs, hidden layers are required if (and only if) the data must be separated non-linearly. In CNNs, the hidden layers consist of convolutional layers and normalization layers.

It is the hidden layer where all processing happens. These allow you to model complex data thanks to their nodes/neurons.

If data is less complex (fewer dimensions or features), there could be 1 to 2 hidden layers. For complex data, 3-5 hidden layers could be used. A CNN has typically three layers.

The layers between input and output is a hidden layer. A single hidden layer makes the network shallow. In deep neural networks, there are two or more hidden layers. It is a hyper-parameter.

All the computation is done on hidden layers. These hidden layers break down the function of neural network into specific transformations of data.

A neural network (NN), without a hidden layer, is simply linear regression. Of course, there is activation function. But inverse function of that activation function could be used. It is essentially a linear regression.

The size of the hidden layer is generally between the size of the input and output, say 2/3rd of the size of input layer plus the size of the output layer.

At least two hidden layers are sufficient to train the network.

All hidden layers use the same activation function. The output layer uses a different activation function. It depends upon the type of prediction required by the model.

Godfathers of AI and Significance of AI

Hinton, LeCun and Bengio are called godfathers of AI as they have pioneered deep learning. Their contributions to AI and ML are significant. They won the Turing Award, 2018 for their work in deep learning. It is equivalent to Nobel Prize in computing.

Geoffrey Hinton recently left Google, but was a professor at the University of Toronto and a researcher at Google. Yann LeCun is a professor at NY University. Yoshua Bengio is a professor at University of Montreal and started an AI company called Element AI.

Deep learning is a subset of machine learning that uses neural networks with three or more layers. Here they mimic the behaviour of human brain. They learn from large amounts of data. The multiple layers progressively extract higher-level features from the raw input.

Machine learning (ML) is a subset of AI. It trains algorithms to make predictions or decisions based on data. Deep learning is a subset of ML. It uses neural networks with three or more layers. It is modelled on CNS. ML uses simpler concepts such as predictive models, while deep learning uses artificial neural networks (ANNs) designed to imitate the human brain in thinking and learning.

ML can be used in healthcare to predict diseases and diagnose patients. In finance, it can detect fraud and predict stock prices. In marketing, it can personalize ads and recommend products. In manufacturing, it can optimize production processes and reduce waste. In transport it can optimize routes and reduce traffic.

Deep learning can be used to create virtual assistants who understand voice commands. It can be used in autonomous cars. It can be used to develop chatbots. It can be used for facial recognition. It can be used to diagnose diseases and predict patient outcomes.

Crypto Rules by European Union

European Union States have formulated a set of rules to regulate crypto assets in May, 2023. This will pressurize the US and the UK to follow suit. The European parliament had given approval in April, 2023. The rules are expected to be rolled out from 2024.

After the fall of the crypto exchange FTX, it was necessary to regulate the cryptos. It is necessary to protect European investors and prevent the misuse of crypto industry for the purposes of money laundering and financing dubious activities.

The rules require firms to get a license if they want to deal in crypto assets. The transactions will be easily trackable. The service providers have to obtain the name of senders and beneficiaries. There would co-operation among member countries regarding taxation. The same co-operation would be extended to information exchange.

Web Crawling and Web Scraping

Web crawlers are computer programmes. They are also called bots. These index internet content and information. They crawl through websites and search engines. They download and catalogue information so obtained. When users make a search enquiry, the information is retrieved and reviewed by the crawlers. They also validate HTML code and hyper-links of websites they crawl.

Also called spiders or spiderbots, they are operated by search engines for the purpose of web indexing.

Working

First they download website’s robot.txt.file. They find new pages via hyperlinks. They add newly discovered URLs. They index every page at that URL.

Web scraping extracts data from one or more sites. In crawling, URLs are found, and links are found. If web is to be extracted, crawling and scraping can be combined. Crawling is for indexing purposes.

Tools for Web Scraping

Beautiful soap is a Python library for web scraping. It pulls data from HTML/XML files. Scrapy is web crawling through Python. Selenium is browser automation tool for testing web apps. Pandas is a Python library for data manipulation and analysis. Octopause is a modern visual web data extraction software. It can extract data from any website.

Challenges in Scraping

There are changes in structure or layout. Websites take antiscraping measures. The data quality of extracted data varies. Scraping can be illegal. It is technically challenging when one deals with huge data or complex websites.