AI4All Day 4: More on Python, Natural Language Processing, Ethics in AI

Nidhi Parthasarathy
3 min readAug 20, 2022

--

Nidhi Parthasarathy, Thursday - June 30th, 2022

Deeper in Python

Day 4 began with a continuation of the overview and introduction to Python from Roya Firoozi and Keiko Nagami. They talked about algorithms, functions, and libraries. On algorithms, we discussed a simple sorting algorithm and the importance of breaking a problem into a series of steps. We then talked about organizing the code into a series of building blocks called functions.We went over libraries, starting with the math library (and square root and pi functions) and then moving over to more data science specific libraries like numpy, matplotlib, and pandas.

We talked about creating arrays and vectors in numpy and various operations on those as well as common functions (np.as_array, shape, size, dtype, zeros, ones, sqrt, etc). We talked about visualizations with matplotlib plt function (scatter, histogram, streamplot, etc) and then we discussed pandas for data manipulation and analysis on data frames. We also discussed other machine learning specific libraries like sklearn, pytorch, and tensorflow and briefly learnt about modules for model training, prediction, model selection, etc.

In the next session, at the cohort level, we applied these concepts through exercises in our code labs, including some extended concepts around slicing arrays and visualizing data.

Learning about Natural Language Processing (NLP)

The afternoon session featured a talk from Chris Manning (professor of CS and Linguistics at Stanford) on Natural Language Processing (NLP). He went over how humans used language to communicate and discussed how his work focused on how computers communicate with humans.

AI assistants using natural language processing [source]

He talked about neural networks and deep learning for speech recognition and the challenges with the difficulties and ambiguities in language translation (e.g., cops arrested a man with a knife — did the cops have the knife or the man?). He talked about word2vec and GPT3 (a big neural word prediction machine) and how they worked. We also had a nice interactive discussion on how often we all used machine speech recognition in our lives and potential issues specific to younger people.

Ethics in AI

The next session was a talk on “Ethics in AI” from Yoav Schlesinger (Director of AI ethical practice at Salesforce). He started with reintroducing some of the other concepts we had heard about in earlier meetings about biases in AI learning. His case study of how an AI model came up with different risks for different demographics was very educational in helping us understand how biases translate to real-world recommendations. He discussed the “responsible AI development lifecycle” across five key elements: clarifying the scope and assumptions, intentionally reviewing who will be impacted and who would be excluded, actively testing for bias (I liked the idea of creating an “ethical red team” to test for AI ethics. His point on getting feedback was also similar to what Ariam mentioned about having diverse opinions.), bias mitigation and retraining during development, and finally putting in place post-launch assessments and continuing to get feedback even after the product is in the hands of users.

Virtual Social

We ended the data with a virtual networking session. I got to play “Mafia” with a new set of other students and made some new friends. It was really fun!

Continue reading for day 5.

--

--

Nidhi Parthasarathy
Nidhi Parthasarathy

Written by Nidhi Parthasarathy

Highschooler from San Jose, CA passionate about STEM/technology and applications for societal good. Avid coder and dancer.

No responses yet