DigitALL International Women’s Day, new ChatGPT API, Romanian AI political advisor and how AI can read your mind
In addition to trunk-based development, binary search explanation and a photo of a giant yellow teddy bear
Welcome to my weekly AI insights newsletter, where I share my thoughts about AI, discuss latest digital news, as well as productivity and creativity tips for AI community. If you missed my previous editions of this newsletter you can check them out here. Additionally, you can visit my website for more of my articles, tips and tricks.
What’s on my mind?
Happy DigitALL International Women’s Day!
Happy International Women’s day for all women in tech and beyond! This year, International Women’s day, March 8, 2023, United Nations celebrated under the banner DigitALL: Innovation and technology for gender equality. This year the UN wants this day to celebrate the women who advance technology and digital education. Women have played an essential role in the digital world since the beginning of computing to the current era of virtual reality and artificial intelligence, starting from Ada Lovelace and Grace Hopper. Today, about 26% of tech related jobs are held by women and the UN is calling to bridge this gap.
Romania uses AI as a political advisor
Romanian prime minister launched an AI powered system as its political advisor, called Ion. It collects citizen’s comments thought various sources, including social media and summarises them to the ministers.
Behind the scenes it uses unsupervised model to prioritise comments, natural language processing model, clustering algorithm to group similar messages and the model that tracks changes over time.
Romanian site: https://ion.gov.ro/
Potential alternative to backpropogation: The Forward-Forward Algorithm by Geoff Hinton
In his recent paper, pioneer of deep learning, Geoff Hinton demonstrated initial investigations of the new forward-forward (FF) algorithm, which he proposes to replace both forward and backward passes of backprop by a single one only. Each layer has its own objective function, and he defined the notion of goodness. The goodness of the positive data is maximized while the goodness of the negative data is minimized. He defines Goodness as a sum of squared activities in a layer.
The downside is that FF algorithm is slower than backpropogation and does not generalise as well as backpropogation. So it may be applicable to a subset of problems at this stage, until the more generalised version is invented.
Here’s the link to the paper: https://arxiv.org/pdf/2212.13345.pdf
ChatGPT API released
ChatGPT and Whisper (speech to text model) are now available through the API. The OpenAI team reduced cost by 90% and decided to release API to public. The model released is gpt-3.5-turbo and the cost is $0.002 per 1k tokens, which is 10x cheaper than regular GPT-3.5. Additionally, developers can request dedicated instances for better control and performance.
AI can read your mind now
Researchers from National Univeristy of Singapore, The Chinese University of Hong Kong and Stanford created a model which can reconstruct images from fMRI images. Not perfect but good enough, like a memory or a dream of an image.
Here’s the link to read more: https://mind-vis.github.io/
Algorithm of the week - binary search
Binary search is one of the most imporatant algorithms in computer science and technology because it is a very efficient way to search for a specific item in a sorted list of data. It works by repeatedly dividing the search interval in half, which makes it much faster than searching through the entire list one by one. Databases, search engines and many algorithms use binary search as part of their system.
Let’s look at example of how binary search works.
Imagine you have a bunch of numbers written on cards, flipped numbers down, in sorted order. You want to find a specific number, let's say it's number 10. Instead of flipping and looking at every single card one by one, you can use binary search to find it faster.
First, you look at the middle card. If the middle card has a number higher than 10, you know that the card with number 10 must be in the first half of the list. So you can throw away the second half of the list and repeat the process with the first half.
If the middle card has a number lower than 10, you know that the card with number 10 must be in the second half of the list. So you can throw away the first half of the list and repeat the process with the second half.
You keep doing this, dividing the remaining list in half each time, until you find the card with number 10.
To give you performance comparison, if you have a deck of 1000 cards, you don’t need to do 1000 flips, you can find your number in just 10 flips, which is 100 times faster for this example and even faster as the number of cards grow!
Practical tip - use trunk-based development methodology or similar to develop code with your team
In the last edition of this newsletter, I wrote about the importance of source control in analytics development. I’ve seen, however, many analytics teams misusing source control systems (eg pushing directly to main without pull request). Today, I’d like to introduce trunk-based development methodology (TBM).
Atlassian defines trunk-based methodology as “…a version control management practice where developers merge small, frequent updates to a core “trunk” or main branch. Since it streamlines merging and integration phases, it helps achieve CI/CD and increases software delivery and organizational performance.”
The key principles of trunk-based development include:
All changes should be made on the main branch/trunk.
Changes should be small and frequent to minimize conflicts and simplify code review. As a rule of thumb, branches need to be merged at least once a day.
Continuous integration should be used to ensure code quality and helps developers with fast iterations. Fast builds are essential.
Code reviews should be mandatory for all changes and done synchronousely, so the code doesn’t wait for days.
Minimise, or even eliminate code freezes.
Many people, including myself, used gitflow methodology in the past. It works well but has some drawbacks:
gitflow usually has more longer lived branches that require more collaboration, slow down overall development and can cause merge hell
gitflow has more complex branching strategy with dedicated branches for dev/test/prod, hotfixes, etc. TBM simplifies with one single main trunk branch.
TBM encourages synchronous reviews, as oppose to gitflow, when developers have to wait for their PR to be approved
Trunk-based development can help teams to move quickly, reduce integration problems, and helps production releases flowing. However, it requires discipline, good communication and a solid CI/CD.
Quick feedback
I love feedback! I’d really appreciate if you write me a short note how I can improve this newsletter, so it adds more value to you!
My random photos of the week
In this section, I’ll be publishing some random photos from my life.
This article reflects my personal views and opinions only, which may be different from the companies and employers that I am associated with.