Suramya's Blog : Welcome to my crazy life…

August 21, 2020

Emotion detection software for Pets using AI and some thoughts around it (and AI in general)

Filed under: Computer Software,Emerging Tech,Humor,My Thoughts,Tech Related — Suramya @ 5:32 PM

Pet owners are a special breed of people, they willingly take responsibility for another life and take care of them. I personally like pets as long as I can return them to the owner at the end of the day (or hour, depending on how annoying the pet is). I had to take care of a puppy for a week when Surabhi & Vinit were out of town and that experience was more than enough to confirm my belief in this matter. Others however feel differently and spend quite a lot of time and effort talking to the pets and some of them even pretend that the dog is talking back.

Now leveraging the power of AI there is a new app created that analyses & interprets the facial expressions of your pet. Folks over at the University of Melbourne decided to build an Convolutional Neural Networks based application called Happy Pets that you can download from the Android or Apple app stores to try on your pet. They claim to be able to identify the emotion the pet is feeling when the photo was taken.

While the science behind it is cool and a lot of pet owners who tried out the application over at Hacker News seem to like it, I feel its a bit frivolous and silly. Plus its hard enough for us to classify emotions in Humans reliably using AI so I would take the claims with a pinch of salt. The researchers themselves have also not given any numbers around the accuracy percentage of the model.

When I first saw the post about the app it reminded me of another article I had read a few days ago which postulated that ‘Too many AI researchers think real-world problems are not relevant’. At first I thought that this was an author trolling the AI developers but after reading the article I kind of agree with him. AI has a massive potential to advance our understanding of health, agriculture, scientific discovery, and more. However looking at the feedback AI papers have been getting it appears that AI researchers are allergic to practical applications (or in some cases useful applications). For example, below is a review received on a paper submitted to the NeurIPS (Neural Information Processing Systems) conference:

“The authors present a solution for an original and highly motivating problem, but it is an application and the significance seems limited for the machine-learning community.”

If I read this correctly then basically they are saying that this AI paper is for a particular application so its not interesting enough for the ML community. There is a similar bias in the theoretical physics/mathematics world where academics who talk about implementing the concepts/theories are looked down upon by the ‘purists’. I personally believe that while the theoretical sciences are all well & good and we do need people working on them to expand our understanding, at the end of the day if we are not applying these learnings/theorems practically they are of no use. There will be cases where we don’t have the know-how to implement or apply the learnings but we should not let that stand in the way of practical applications for things we can implement/use.

To quote a classic paper titled “Machine Learning that Matters” (pdf), by NASA computer scientist Kiri Wagstaff: “Much of current machine learning research has lost its connection to problems of import to the larger world of science and society.” The same year that Wagstaff published her paper, a convolutional neural network called AlexNet won a high-profile competition for image recognition centered on the popular ImageNet data set, leading to an explosion of interest in deep learning. Unfortunately, the disconnect she described appears to have grown even worse since then.

What do you think? Do you agree/disagree?

Source: HackerNews

– Suramya

August 19, 2020

Convert typed text to realistic handwriting

Filed under: Computer Related,Computer Software,Tech Related — Suramya @ 6:45 PM

There are some tools or projects that really don’t make any practical sense but are a lot of fun to use or just impressive in how they implement technology. The Handwritten.js project by ‘alias-rahil’ is one such project. Basically what it does is take any Plain Text document and convert it into a realistic looking handwritten page. I tried it out on a few sample documents (logs) and it worked great. The programs does coredump if you try converting a 5MB file, but other than that it worked as expected.

Below is a sample file with some quotes that I converted as a test :

* Mountain Dew and doughnuts… because breakfast is the most important meal of the day

* Some days you’re the dog; some days you’re the hydrant.

* He who smiles in a crisis has found someone to blame.

* Marriage is one of the chief causes of divorce

* Earth is 98% full…please delete anyone you can.

* I came, I saw, I decided to order take out.

* F U CN RD THS U CNT SPL WRTH A DM!

* Work hard for eight hours a day, and eventually you may become a
boss and be able to work twelve.

* Quitters never win, and winners never quit, but those who never quit AND never win are idiots.

* What’s the difference between a bad golfer and a bad skydiver?

A bad golfer goes, WHACK! “Damn.”
A bad skydiver goes, “Damn.” WHACK!

* Beware of the light at the end of the tunnel. It could be an oncoming train.

* A girl is like a road. The more curves she has the more dangerous she is!

* A woman who dresses to kill probably cooks the same.

The script is fast and didn’t take more than a few seconds to process the file and create a PDF file with the output. The output for my test run is as below:


Output generated by Handwritten.js

I did also try converting a word file with the software but it didn’t take the content of the file for the conversion, instead it converted the XML & Code from the file. One suggestion for improvement I have is to enhance the script to support word files. It would be awesome if it could also convert any of the diagrams, tables etc to look like they were drawn by hand.

Maybe if I have some time I will look into this and see how easy it is to enhance the script. But no promises as I have a ton of other things I need to take complete first. 🙂

Source: Hacker News

– Suramya

August 14, 2020

Updating the BIOS to address a AMD Ryzen bug

Filed under: Computer Related,Computer Software,Tech Related — Suramya @ 5:13 PM

Over the past few months I have been infrequently seeing the following warning message in the Terminal and had been ignoring it because apparently the fix was to update the BIOS and I didn’t have the patience/time to do the upgrade at that point in time:

WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

Today I thought that I should fix the error, a bit of Google searching confirmed that I needed to update the BIOS because apparently there was a bug in the AMD Ryzen 3000 series processor that causes the onboard random number generator to always return 0xffffffff when asked to generate a Random number. Obviously getting the same number every time is not optimal even though Dilbert feels otherwise.


Random Number Generator in Accounting

AMD was notified about it last year and they released a BIOS update to fix the issue, however each Motherboard company had to validate and release the new BIOS which took time. The fix was to upgrade the BIOS and I really wasn’t looking forward to it as the last time I upgraded the BIOS it was a painful exercise involving floppy disks and cursing etc.

I looked up my BIOS version using the dmidecode command but that didn’t give me enough information to find the new BIOS version for my motherboard (‘ROG STRIX X570-E GAMING’). So I rebooted the computer and found the built in BIOS upgrade section under Tools. I decided to give it a try and see what options are available so I clicked on the Upgrade option and it gave me the option of connecting to the Internet and automatically downloading the latest version of the BIOS or installing it from a USB/Disk Drive. I selected the Network Install option and the system happily downloaded the latest version of the BIOS from the Internet and then gave me the option to Install the new version. I selected ‘Yes’ and the BIOS was upgraded.

The system had to reboot a few times for the upgrade to complete and there was a boot where the system played a bunch of beeps without anything coming up on the display which scared the life out of me but then it immediately rebooted and the display came back. After the upgrade completed I got a screen with a bunch of messages about BIOS settings needing to be reinitialized but when I went into the BIOS the settings were all there. So I rebooted and now all looks good and I don’t see any more weird error messages in the Console or the logs.

I am happy to see that the process to upgrade the BIOS is now so simple and I will be upgrading the BIOS more frequently going forward.

– Suramya

July 31, 2020

Interested in Coding using emoji’s? Check out emojicode

Filed under: Computer Software,My Thoughts,Tech Related — Suramya @ 12:12 PM

I am not the most fervent fan of emojis in the world and for the most part I have gone through the last 20+ years with about 3-4 emojis that I use on a regular basis. But I know people who communicate wholly using them and while I am ok with folks using them in personal communications I dislike them immensely in professional communications (except for the occasional smiley face). However not everyone agrees with me and there have been books published in the past using just Emoji’s and now there is a programming language that is written entirely in emoji.

Emojicode, which first appeared as a Github project back in 2016 has been around for a while now and has a fairly strong following in the tech world. I realize that I sound like one of the old men screaming ‘Get off my lawn’ but I really don’t understand why anyone would want to code in a language that uses emoji’s to define text as a serious programming language. As a joke it would be fun to learn but I can’t really imagine coming in to work one day and writing code using Emojocode for a work project.

Here’s an example of the “Hello World” program written using Emojicode.


Hello World using Emojicode

If you want to learn coding in Emojicode, you can check out their impressive documentation or do a Code Academy course on the language. Emojicode is open-source, so you can also contribute to the development via their GitHub repository.

Yes, learning new programming languages is cool, but I don’t think I will be spending the effort to learn Emojicode anytime in the near future.

– Suramya

July 30, 2020

Scientists claim to be able to detect depression in written text using Machine learning

Filed under: Computer Software,My Thoughts,Tech Related — Suramya @ 12:26 PM

Depression is brutal, it can range from feelings of sadness, loss, or anger that interfere with a person’s everyday activities to suicidal tendencies. In the past few months there have been multiple cases of famous people committing suicide because they were depressed and unable to cope with the feelings of isolation and stress brought about by the current pandemic. Unfortunately depression is not an easy thing to diagnose and there isn’t a single test to diagnose it. Doctors can diagnose it based on your symptoms and a psychological evaluation which in most cases includes questions about your:

  • moods
  • appetite
  • sleep pattern
  • activity level
  • thoughts etc

But all of this requires a person to be open about their thoughts and that can be difficult at times due to the stigma associated with mental health issues. In all of the cases I was referring to earlier the common theme from the friends & acquaintances have been about how they wish they had known that xyz was depressed and if they had then maybe they could have helped.

The problem is that people don’t always come out and say that they are depressed and sometime the signals are very faint. So its very interesting to see the various efforts that are underway to identify these symptoms earlier and get the people the help they need faster so that they don’t have to face it alone. As part of this effort scientists at Canada’s University of Alberta have created a machine learning model that uses linguistic clues to indicate signs of depression in text communications like twitter messages and have published a paper on it (Augmenting Semantic Representation of Depressive Language: From Forums to Microblogs) in the ‘European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Database’.

We discuss and analyze the process of creating word embedding feature representations specifically designed for a learning task when annotated data is scarce, like depressive language detection from Tweets. We start from rich word embedding pre-trained from a general dataset, then enhance it with embedding learned from a domain specific but relatively much smaller dataset. Our strengthened representation portrays better the domain of depression we are interested in as it combines the semantics learned from the specific domain and word coverage from the general language. We present a comparative analyses of our word embedding representations with a simple bag-of-words model, a well known sentiment lexicon, a psycholinguistic lexicon, and a general pre-trained word embedding, based on their efficacy in accurately identifying depressive Tweets. We show that our representations achieve a significantly better F1 score than the others when applied to a high quality dataset.

This is not the first study on the topic and it won’t be the last. The paper is fairly technical and from what I can understand they can identify potential signs of depression based on words used and phrasing. But am not sure how they are taking into account sarcasm and contextual clues. For example without the appropriate context things being said can be taken in many different ways and identifying the correct emotion behind the words can be tricky. When we interact in person or over phone things like body language or verbal cues give us additional context about how a person is feeling, unfortunately that is not the case with text and there is a huge potential for things to be taken out of context or in the wrong way. Another issue is how to differentiate between feelings of sadness and depression as the symptoms might be very similar.

We need human interactions, connections etc to address this issue and not another technology claiming to be a silver bullet as not everything can be solved by AI/ML and the low accuracy level on such solutions can only cause trouble down the line. Imagine such a system being implemented at workplaces, during interviews or on dating sites. If a system flagged you as a depressive then it could cost you your job, or your relationship.

What do you think?

– Suramya

July 27, 2020

Cloaking your Digital Image using Fawkes to thwart unauthorized Deep Learning Models

Filed under: Computer Related,Computer Software,My Thoughts,Tech Related — Suramya @ 3:42 PM

Unless you have been living under a rock you have seen or heard about facial recognition technologies that are actively in use in the world. You have the movie/TV version where a still image from a video feed is instantly compared to every image in the database to match a perp, then you have the real world example where there are systems that take all your social media feeds, images of yours posted anywhere as a dataset to train a system that can identify you from a video feed (not as quickly as the TV version but still fast).

So what is the way to prevent this? Unfortunately there isn’t one (or at least there wasn’t a realistic one till recently). Earlier you had to ensure that no image of yours is ever posted online, you are never caught in a security feed or traffic cam anywhere. Which as you can imagine is pretty impossible in today’s connected world. Even if I don’t post a picture of me online, my friends with whom I attended a party might upload a pic with me in the background and tag me. Or you get peer pressured to upload the photos to FB or Twitter etc.

There is not much we can do about state sponsored learning models but there are plenty of other folks running unauthorized setups that consume photos posted publicly without permission to train their AI models. These are the systems targeted by folks from the SAND Lab at University of Chicago who have developed Fawkes1, an algorithm and software tool (running locally on your computer) that gives individuals the ability to limit how their own images can be used to track them.

At a high level, Fawkes takes your personal images, and makes tiny, pixel-level changes to them that are invisible to the human eye, in a process we call image cloaking. You can then use these “cloaked” photos as you normally would, sharing them on social media, sending them to friends, printing them or displaying them on digital devices, the same way you would any other photo. The difference, however, is that if and when someone tries to use these photos to build a facial recognition model, “cloaked” images will teach the model an highly distorted version of what makes you look like you. The cloak effect is not easily detectable, and will not cause errors in model training. However, when someone tries to identify you using an unaltered image of you (e.g. a photo taken in public), and tries to identify you, they will fail.

The research and the tool will be presented at the upcoming USENIX Security Symposium, to be held on August 12 to 14. The software is available for download at the projects GitHub repository and they welcome contributions.

It would be amazing when this tool matures and I can imagine it becoming a default part of operating systems so that all images uploaded get processed by the tool by default reducing the risk of automatic facial recognition. Although I can’t imagine any of the governments/Facebook being too happy about this tool being publicly available. 🙂

Well this is all for now. Will write more later.

Thanks to Schneier on Security for the initial link.

– Suramya

March 4, 2020

Seti@home project to stop distributing new work to clients after 21 years

Filed under: Computer Software,News/Articles,Tech Related — Suramya @ 1:44 PM

Seti@home has a fond place in my heart. It has been run by the Berkeley SETI Research Center since 1999, and I think I installed it on my machine sometime around Dec 1999 or early 2000 after hearing about it from one of the News websites (possibly Slashdot). Once I had it running on my system I was pushing to get it installed on all the computers in the University computer lab as they were running 24/7 and I saw that as a wasted opportunity for furthering search for ET. I ran it constantly on my computers till about 2009 post which I switched to running Folding@home which is more focused on Science / DNA sequencing / Medical research. Seti was one of the first Distributed computing systems that I know of and the amount of data processed by computers under its umbrella is staggering.

On March 31, the project will stop sending out new work units to users and the project will instead start focusing on analyzing all the blips identified by volunteers’ machines which could be potential evidence of aliens with an eye on publishing a research paper. Once this is completed they might start pushing out work packages again but that will be a while before it happens.

“It’s a lot of work for us to manage the distributed processing of data. We need to focus on completing the back-end analysis of the results we already have, and writing this up in a scientific journal paper,” their news announcement stated.

Looking forward to reading the research paper and conclusions generated by the Seti@home program.

Source: SETI@home Search for Alien Life Project Shuts Down After 21 Years

– Suramya

March 2, 2020

Another magical AI to detect “Inappropriate photos” and block kids from taking them

Filed under: Computer Software,My Thoughts,News/Articles,Tech Related — Suramya @ 11:50 AM

In today’s iteration of people who don’t want to make the effort of raising their kids and explaining the difference between right & wrong and why something might be a bad idea we have a new “magical” AI that will automatically detect when kids are making a bad choice and stop them. I mean why should a parent make an effort to talk to their kids and help them understand what repercussions of a given choice could be wrong when you have AI to make the effort for them? This new AI is being pitched to parents and has an AI-powered “Smartphone Protection” feature that prevents users from shooting or saving “inappropriate” photos (read: naked pictures).

The official Tone Mobile press release hails the TONE e20 as the world’s first phone with an AI that “regulates inappropriate images” through an AI built into the so-called TONE Camera… If the AI recognizes that the subject of a photo is “inappropriate,” the camera will lock up; and if you somehow manage to snap a photo before the AI kicks in, the phone won’t let you save or share it.

Additionally, a feature called “TONE Family” can be set to send an alert to parents whenever an inappropriate image is detected. According to SoraNews24, this alert will contain location data and a pixelated thumbnail of the photo in question.

I give it about 24 hours from when the phone is released till folks figure out a way around it.

The other issue I have with this system is how its going to classify the pics. The article doesn’t go into technical details of how the AI works and if the classification is done locally or on the cloud. If its on the cloud then every pic taken by that phone is being uploaded to a remote server owned by a 3rd party. This is a massive risk and any breach of that server is going to have a lasting and significant impact. Trust me when I say that this server would be a target of all Black Hat hackers as soon as it goes online.

I am not going to go into whether taking nude pics is a good idea or not. Its upto the people involved to take that decision, I am not responsible for what you do with your phone. If you have to take naughty pics just ensure you follow basic rules and don’t share it with anyone you don’t trust 100%.

In summary, Dear parents: Instead of offloading your responsibilities to AI try having a frank and open conversation with your kids about why certain things might be a bad idea. It will give you better results than this snakeoil.

Source: Slashdot.org

– Suramya

September 3, 2019

AI Emotion-Detection Arms Race starts with AI created to mask emotions

Filed under: Computer Software,My Thoughts,Tech Related — Suramya @ 2:31 PM

Over the past few months/years we have been reading a lot about AI being used to identify emotions like fear, confusion and even traits like lying or trustworthiness of a person by analyzing video & audio recordings. This is driving innovations in Recruiting, Criminal investigations etc. In fact the global emotion detection and recognition market is estimated to witness a compound annual growth rate of 32.7% between 2018 – 2023, driving the market to reach USD 24.74 billion by 2020. So a lot of companies are focusing their efforts in this space as AI applications that are emotionally aware give a more realistic experience for users. However, there are multiple privacy implications of having a system detect a person’s emotional state when interacting with an online system.

So to counter this trend of systems becoming more and more aware there is now a group of researchers who have come up with an AI-based countermeasure to mask emotion in spoken words, kicking off an arms race between the two factions. The idea is to automatically converting emotional speech into “normal” speech using AI.

Their method for masking emotion involves collecting speech, analyzing it, and extracting emotional features from the raw signal. Next, an AI program trains on this signal and replaces the emotional indicators in speech, flattening them. Finally, a voice synthesizer re-generates the normalized speech using the AIs outputs, which gets sent to the cloud. The researchers say that this method reduced emotional identification by 96 percent in an experiment, although speech recognition accuracy decreased, with a word error rate of 35 percent.

In a way its quite cool because it removes a potential privacy issue, but if you extrapolate from existing research then we have the potential of bigger headaches in the future. Currently we have the capability of removing emotion from a audio recording, how difficult would it be to add emotion to a recording? Not too difficult if you go through the ongoing research. So, now we have a system that can take a audio/video recording and change the emotion from sadness to mocking or from happy to sad. This combined with the deepfakes apps that are already there in the market will cause huge headaches for the public as it would be really hard for us to determine if a given audio/video is authentic or altered.

Article: Researchers Created AI That Hides Your Emotions From Other AI
Paper: Emotionless: Privacy-Preserving Speech Analysis for Voice Assistants

Well this is all for now. Will write more later.

– Suramya

July 17, 2019

Using Machine Learning To Automatically Translate Long-Lost Languages

Filed under: Computer Software,Interesting Sites,My Thoughts,Tech Related — Suramya @ 1:25 PM

Machine Learning has become such a buzz word that any new product or research being released nowadays has to mention ML in it somewhere even though they have nothing to do with it. But this particular usecase is actually very interesting and I am looking forward to more advances in this front. Researchers Jiaming Luo and Regina Barzilay from MIT and Yuan Cao from Google’s AI lab in Mountain View, California have created a machine-learning system capable of deciphering lost languages.

Normally Machine translation programs work by mapping out how words in a given language are related to each other. This is done by processing large amounts of text in the language and creating vector maps on how often each word appears next to every other word for both source and target languages. Unfortunately, this requires a large dataset (text) in the language and that is not possible in case of lost languages, and that’s where the brilliance of this new technique comes in. Focusing on the fact that when languages evolve over time they can only change in certain ways (e.g. related words have the same order of characters etc) they came up with a ruleset for deciphering a language when the parent or child of the language being translated is known.

To test out their theory/process they tried it out with two lost languages, Linear B and Ugaritic. Linguists know that Linear B encodes an early version of ancient Greek and that Ugaritic, which was discovered in 1929, is an early form of Hebrew. After processing the system was able to correctly translate 67.3% of Linear B into their Greek equivalents which is a remarkable achievement and marks a first in the field.

There are still some restrictions with the new algorithm in that it doesn’t work if the progenitor language is not known. But work on the system is ongoing and who knows some new breakthrough might be just around the corner. Plus there is always a brute force approach where the system tries translating a given language using every possible language as the progenitor language. It would require a lot of compute and time but is something to look at as an option.

Well, this is all for now. Will write more later.

– Suramya

Source: Machine learning has been used to automatically translate long-lost languages

« Newer PostsOlder Posts »

Powered by WordPress