Please flip your device.

AI Stories · AI from Above

Visualizing Spatial Apartheid

Raesetje Sefala is a researcher who uses computer vision, data science, and machine learning techniques to explore questions with a societal impact. As a research fellow with the Distributed Artificial Intelligence Research Institute (DAIR) she has used machine learning and spatial datasets to visualize the legacy of spatial apartheid in South Africa.

This is an extended cut of the interview from AI from Above that has been edited for ease of reading.

How did townships become the focus of your AI research?

I grew up with six siblings in a township called Lebowakgomo in the Limpopo province, in the northern part of South Africa. The houses there were all uniformly sized regardless of the number of people living in them. Neighborhoods were quite packed. Your hospitals, your schools, and other public resources were overcrowded — which was not really the case for suburbs. So I’ve always wondered, “Why is this?

When I did my masters degree, I had a chance to research something I care about, and that’s the first thing that came to mind.

Before apartheid, townships were just working class neighborhoods. However, during apartheid they forced people to regroup, and only specific racial groups would live in certain townships. They were occupied by non-Europeans: Indians, black people, colored people. When apartheid ended, anyone could live where they wanted, but systemically it was still hard for you to move. During apartheid, townships were underfunded compared to suburbs. But even after apartheid ended, it looks like resources are still in the same pattern. Or this is what we wanted to investigate: Is this really happening? But then when we tried to research this, we couldn’t find datasets that demarcate townships over time. Townships and suburbs have been merged together in one class.

This is where our work stems from, because townships don’t seem to exist in official datasets anymore.

So how do you create these datasets?

Thinking about the size of South Africa, it’s quite huge. We pulled together different existing datasets. Datasets from the government define neighborhoods in a certain way according to ‘designated land use’. It doesn’t necessarily say that there are people, or whether there is development in that space. So we used satellite images and we also used a buildings dataset that shows buildings in the whole country.

Putting together datasets like that helped us begin to explore neighborhoods. To train machine learning models, we added in characteristics. Given a satellite image section that looks like this, the label is this. For another, the label is that. It looks at hundreds of thousands of these images. In the end, when given an image it hasn’t seen, it can predict what neighborhood type it most likely is.

Now imagine, as neighborhoods grow, they change. Actually, in South Africa this is quite common. Sometimes you would see open space in a satellite image one year, and then if you look in another year, you’ll see an informal settlement there. Then over time, the informal settlement evolves into some other neighborhood type. So you need to have some knowledge of what these neighborhoods are and how they evolve.

Could you do this without AI?

Without AI, you would have to coordinate a large group of surveyors to go into the field. You would have to coordinate people to go throughout the entire country, and record this information. As the country evolves, or as the number of buildings change, you would look at a previous dataset, and see how changes can be added into an updated version. This is a huge coordinated task, and that’s usually how the government do it for the census. It’s expensive. It’s labor intensive.

With AI, the potential is that we could have models that do the same task. Then we could be paying attention to evaluating the models instead. Where are they getting it wrong? How can you correct them? You could put humans in the loop, and still reduce the amount of work. But it’s not simple, given that changes are happening all the time. We would have to build models that take all this — and more — into consideration.

What outcomes do you hope would result from your work?

Well, the first policy change I would hope to see is for the government to stop labeling townships together with suburbs. Because as South Africa, we have a certain past. We need people to be empowered with information, so they can actually take it to the government, and say, “X, Y, Z is not happening, and it hasn’t been happening for this amount of time. What are you doing about it?”

I believe creating datasets like these could also help inform policies around resources in different neighborhoods. There’s a lot of inequality, but it’s difficult to grasp the extent per neighborhood. Who is affected? Is this really happening or are we imagining it? Once we have evidence, we can have policies change. Perhaps equitable budgets could be allocated to different neighborhood types when they need to upgrade or increase the capacity of resources.

When I was growing up, I suppose life was a little difficult — and unnecessarily so. I think policy changes in this direction could help alleviate some of those unnecessary challenges that a young me would have gone through. When you hear how people are living in other neighborhoods types, it’s just a different reality altogether. You always wonder, “Is it really necessary? We are all from the same country.”

You limit access to your datasets. Why is this?

Imagine if datasets like these were in the hands of insurance companies or banks. They could check in which neighborhood you are living in currently, and then determine the interest rates or premiums accordingly. So now we’re saying townships are here. We’re identifying them, and then automatically they could put a risky score to a person and marginalize them further.

That’s why we try to be gate keepers. I mean, people have a right to privacy. Even if you are trying to do good, when you have data that’s invasive like this, you have to try not contribute to anyone’s hardship. We are doing this work to empower communities, so that they can have ownership of the facts about them. We are also reaching out to NGOs to see how we can empower them with access to the data.

There is a risk of negative outcomes for certain communities, when you have datasets like these. Evaluation processes have to be rigorous. That’s also why there should be more regulations around the use of data like this. As much as we would like these datasets to be open and in the hands of people, this is the one major thing we should all be thinking about: the people behind the data points, and the people creating these algorithms.

Any final thoughts?

It would be amazing if funding around dataset creation were to increase. AI solutions are very data hungry and good models require a lot of datasets to be effective. As much as you meed money to build datasets, we also need evaluation processes that involve domain experts, or people from that place, to help evaluate for better alignment. And we need collaboration between people of different fields and perspectives to become routine.

We see a lot of datasets that are biased or that just don’t cover some groups. Decisions are being made everywhere from models that are produced from datasets like that. So it would be amazing if researchers start to think about the people behind those data points, and think about how their solutions actually affect them. AI does not help you with that. The AI just ingests whatever data you give it, and then gives you results accordingly.

You have to actually work on the dataset that you’re going to feed the AI. If you don’t have local knowledge, especially on these nuanced social problems, it can be difficult to evaluate. It’s the same with machine learning models that were trained on places like Germany, where they are rich in datasets. If you just try to use those models in other places, it’s really easy to get things wrong.

Portrait photo of Raesetje Sefala is by Hannah Yoon (CC-BY) 2022

Mozilla has taken reasonable steps to ensure the accuracy of the statements made during the interview, but the words and opinions presented here are ascribed entirely to the interviewee.