Juan Gilbert standing in a hallway with a wall art installation behind him, in February 2013.

Computer scientist Juan Gilbert has been working to make his field more diverse.

Juan Gilbert felt alone as he pursued a PhD in computer science in the 1990s. It was a familiar sense that had followed him throughout his university years, as a student from modest means and the first of his family to pursue higher education.

But there was something else that weighed on him during his doctoral training at the Ohio State University in Columbus, one of the largest academic institutions in the United States. Despite the size of the university, there were no people who looked like him in the computer-science graduate programme or among the department’s faculty members.

“I didn’t see another Black person in computer science until more than a decade after high school,” says Gilbert.

He contemplated leaving the field entirely until a Black professor at another university encouraged him to find another programme instead.

Gilbert transferred to the University of Cincinnati in Ohio, where he built a community of other Black PhD students. But his ‘a-ha’ moment came when he joined the computer-science faculty at Auburn University in Alabama, where there was one other Black faculty member and two Black PhD students in the department. It clarified something for him he feels should have been obvious: all across the country, there were Black PhDs just like him who were struggling with isolation just like him, enduring microaggressions just like him and fighting the urge to quit, just like him.

With that realization, he pledged to help create a more supportive and inclusive computer-science environment for Black students, and has continued that work as chair of the Department of Computer & Information Science & Engineering at the University of Florida in Gainesville. He thinks that vision is why the university ranks top in terms of the number of computer science PhDs awarded to Black students, and why it boasts the largest proportion of Black computer-science faculty members at any predominantly white institution in the United States.

Why diversity matters

There are diversity gaps in computer science and in science, technology, engineering and mathematics (STEM) subjects in many countries. The problem is particularly acute in the United States, which spends much more than any other country on research and development and is home to many of the largest technology companies. Despite being a global leader in computer science, the United States has long struggled to increase diversity in this area.

Computer occupations make up one of the fastest-growing employment sectors in the United States, and the US Bureau of Labor Statistics projects that the number of jobs in this area will increase three times faster than the average — and faster than many other fields in STEM. But Black, Latino and Indigenous people remain under-represented in computing jobs. Black and Hispanic people make up almost 13% and 18% of the US workforce, but they hold only 7% and 8%, respectively, of the jobs in computing. (The US government considers ‘Hispanic or Latino’ an ethnicity and that people of Hispanic or Latino origin may be of any race.)

The diversity gap is growing at universities. For bachelor’s degrees, the primary degree granted by US universities, the proportion of computer-science degrees going to Black students has dropped from more than 11% in 2013 to less than 9% in 2020 (see ‘Computing losses’).

Computing losses: graph that shows the drop in the proportion of Black students obtaining bachelor's degrees in computer science

Source: Natl Sci. Foundation

That’s a problem, says Gilbert, because computer science is now so fundamental to everything.

“Computing is in health, transportation, education, finance, you name it — computing is there,” he says. “And recent reports have found that, when you have a lack of diversity, computing implementations can have a bias that disproportionately affects certain [marginalized] people in a very dramatic way.”

That belief also drives Shaundra Daily, an electrical and computing engineer at Duke University in Durham, North Carolina. “When you leave people out of the thought, design, development and policy — and all the pieces that are important to make sure that we have equitable technologies — you end up with technology either not helping or effectively harming minoritized populations,” she says.

Algorithms are perhaps the clearest example. They are supposed to make predictions or complex decisions about everyday life without the taint of human emotion or prejudice, say computer-science specialists.

Portrait of Shaundra Daily.

Shaundra Daily aims to change the student environment to encourage broader participation.Credit: Duke University

“All data science is political,” says James Mickens, a computer scientist at Harvard University in Cambridge, Massachusetts. “A lot of engineers and non-engineers think that math, science and engineering are somehow detached from values or, because we’re dealing with numbers, the decisions are morally neutral. That’s just not true.”

Based on who builds algorithms, how they’re developed and how they’re used, they can and sometimes do replicate the very biases that they were designed to overcome, says Mickens.

Beyond the issue of algorithmic bias, businesses are finding financial reasons for increasing diversity along gender, racial and ethnic lines. “The most diverse companies are now more likely than ever to outperform non-diverse companies on profitability”, according to a 2020 report by the global management-consulting firm McKinsey and Company1. Diverse teams are also more productive and creative, and bring different perspectives, says Mickens. Famously, non-diverse teams gave us seat belts that are not designed for pregnant people; facial recognition software that doesn’t recognize or misidentifies people of colour; and autonomous vehicles that cannot recognize darker-skinned pedestrians.

In the past few years, however, commitments and pledges from the tech industry on diversity have amounted to very little, according to a 2022 report2 from the non-profit Kapor Center and the NAACP, a civil-rights organization headquartered in Baltimore, Maryland. The current share of Black talent in technical roles has increased just 0.6% since 2018, it notes.

Freeman Hrabowski, former president of the University of Maryland, Baltimore County (UMBC) in Baltimore, gained an international reputation for success in preparing students from under-represented backgrounds to enter STEM fields. Of all US universities, UMBC awarded the most undergraduate degrees to Black students who went on to earn doctorates in this area.

In 2011, Hrabowski chaired a panel for the National Academies of Sciences, Engineering, and Medicine, and at that time only 2.2% of the PhDs in the natural sciences and engineering went to Black people. Ten years later, he says, that number is 2.3%. “With all the initiatives, we still are not at 3%. We have failed to move the needle,” says Hrabowski.

These much-vaunted initiatives have also failed to diversify the computing and technology work sector. Hrabowski spoke to about 2,000 employees this year at a major tech company, where the few employees of colour were doing the kinds of menial job that their parents would have done 50 years earlier. “For the most part, they were on the bottom rung. They were not professionals. I kept it real when I spoke to them and repeated what we all know now, which is that there are far too few people of colour in those companies.”

Hrabowski, Daily and Gilbert are among the many educators and computer scientists working to change the trajectory at universities and tech companies for Black people and other under-represented minority groups. They are realistic about the challenges but think that change is crucial — and possible.

Where to begin

Hrabowski says structural racism in academia hinders the nation’s ability to deal with some of its biggest challenges. To remedy or even mediate tech’s diversity problem, he says, academics and stakeholders must first acknowledge and then confront bias in all aspects, from university admissions to recruitment, hiring and promotion.

When it comes to succeeding in computer science, the tech talent pipeline starts early — and so do the disparities in access and outcomes. Many students from under-represented groups face structural and social barriers in both exposure and access to computer science from the beginning of their educational voyage (see ‘Missing students’). The Kapor–NAACP study reports that almost one-quarter of Black students lack access to computers or reliable high-speed Internet at home, and that just 75% of Black students go to schools that offer foundational computer-science courses. These kinds of courses, says Mickens, are essential to improving the number who graduate with STEM degrees.

Missing students: a graph that shows how Black secondary-school students are under-represented in two advanced computing courses

Source: College Board

“People always talk about pipeline issues, but the pipeline needs to be throughout a student’s entire academic life,” he says.

Alejandra Diaz was fortunate enough to have access to computer science at her high school in Middletown, Maryland, but there was very little diversity among the 1,100 students. “I was a minority in all my classes and in computer science. I was also the only girl,” she recalls.

She wanted something different for college. UMBC rose to the top of the list as much for its diversity as its reputation as a STEM powerhouse. She was accepted to all three of the university’s elite science fellowships. But Diaz says she still experienced microaggressions and scepticism about her capabilities, which she attributes to being a Latina.

“There were a lot of times where I felt like I had to prove myself to be equal — mostly to my peers and in upper-level classes,” she says. “Like they’d be explaining a concept and then look directly at me and say, ‘Do you understand?’ It’s very frustrating.”

Students from under-represented backgrounds frequently report feeling marginalized or dismissed. Yet Daily says that, too often, well-intentioned advisers and programmes make students of colour feel as if they are to blame.

“Many of the efforts to broaden participation in computing try to change the students instead of their environments. They focus on their deficits and what they are lacking, without paying attention to the toxic spaces they are in. That’s just setting them up for trauma or failure,” says Daily. “We have to think holistically about the people, policies and practices that create barriers for well-qualified students who could otherwise thrive.”

Victor Mbarika, an information and communications-technology researcher at East Carolina University in Greenville, North Carolina, says getting more Black and brown professors into classrooms would improve retention rates for students of colour. But that shift could be difficult to achieve. In an unpublished study last year, Gilbert surveyed the 194 PhD-granting computer-science departments in the United States, and found that there were only 106 Black computer-science faculty members at 70 institutions, leaving more than 60% of the universities without any Black faculty members in this area.

Part of the problem is that many Black and Hispanic computer-science students leave university after finishing their bachelor’s or master’s degrees, effectively opting for industry over academia. Those who choose the latter often face a hard path. Black people accounted for less than 6% of tenured and tenure-track faculty members and less than 4% of full professors at public and private non-profit four-year colleges in the United States in 2018, according to federal data analysed by the American Association of University Professors (see go.nature.com/3mtyeej).

Gilbert has been working to change those numbers since his first faculty job. With funding from the National Science Foundation, he created the African American Researchers in Computing Sciences (AARCS) programme in 2006. Its aim was to increase the number of Black PhDs in tenure-track faculty and research scientist positions in the computer-science education pipeline through networking, recruiting and mentoring.

Kyla McMullen, a computer scientist at the University of Florida, was in the second year of her PhD programme more than a decade ago when she attended her first AARCS conference. “I was so isolated in my programme and I didn’t have a lot of affirmations as a Black woman studying computer science, but I met all these people, which was like a metacommunity and a breath of fresh air.”

Despite being the first and, so far, only Black woman to earn a computer-science and engineering PhD at the University of Michigan at Ann Arbor and among the 1.5% of Black female tenured professors in the country today, McMullen credits Gilbert more than anyone for her success. “He’s the reason I even have a job today,” says McMullen, “We call him the Harriet Tubman of computer science!”

This lack of academic diversity in computer science is not unique to the United States, says Mbarika, who is also a professor at the University of Cape Town, the oldest university in South Africa and the oldest continuously operating university in sub-Saharan Africa. Nearly 30 years after the end of apartheid, Mbarika says looking around the campus would make you think you were at a US East Coast Ivy League university. “The administration and professors are predominantly white. You have some Black instructors, but for the most part, whites are still running the show in technology.”

Ways forward

Gilbert hopes the University of Florida will serve as an example for other institutions to recruit and retain Black students. Of the 162 PhD computer-science students there, 18 (11%) are Black — a sizeable number compared with other predominantly white institutions. According to a longitudinal study3 of thousands of US university students between 2004 and 2009, 40% of Black students switched from STEM subjects to other fields, compared with 29% of white students. Gilbert conducted a 2020 study4 that found that less than 50% of Black and African American students who enter computer-science doctoral programmes finish. He thinks that isolation and a lack of support are key factors in their decisions to leave their programmes.

“Getting a PhD is not something you do alone,” he says. “It’s critical to have a good mentor who is representative, because seeing someone else do it is encouragement that you can, as well.”

Mickens and Hrabowski point to the significance of creating a supportive community and matching students from under-represented backgrounds with study partners. Having a collaborative environment in which people help each other can be a big hurdle for students of colour in predominantly white universities, but these kinds of support can make a tremendous difference, says Hrabowski.

Thousands of students find these supportive environments at one of the 107 US institutions known as Historically Black Colleges and Universities (HBCUs). For nearly 200 years, HBCUs have served as havens for Black Americans pursuing higher education. Today, 25% of African American graduates with STEM degrees come from HBCUs.

These institutions also educate a disproportionately large number of Black doctoral students. Hrabowski compiled a list of the top 50 institutions that awarded science and engineering doctorate degrees to Black people. HBCUs account for seven of the top eight institutions awarding undergraduate degrees to Black students who went on to get doctorates in mathematics and computational sciences between 2010 and 2019.

Freeman Hrabowski, President of the University of Maryland Baltimore County, takes a selfie with an incoming student, 2022.

Freeman Hrabowski (right) has boosted numbers of under-represented students in STEM fields.Credit: Michael A. McCoy/New York Times/Redux/eyevine

On the basis of the numbers alone, there simply aren’t enough HBCUs to close the racial gap. Nine out of ten Black students do not attend HBCUs, so the other institutions that graduate three-quarters of Black STEM students need to do more to enrol and retain them, say educational leaders.

Support for pre-university students has come from a US National Science Foundation programme called CS for All, which aims to expand opportunities in computer science for all students. The effort launched in 2016 with a US$120-million, 5-year commitment to help equip secondary-school teachers to teach computer science. Other elements help teachers of children aged 5–14 to incorporate computer science and computational thinking in their classes, and enable school districts to create computing pathways across all grades.

Daily is part of two initiatives that seek to overhaul the students’ environments. One is the Alliance for Identity Inclusive Computing Education, which provides training activities and best practices, among other resources, for computer-science educators across the last two years of secondary school and first two years of university. Its aim is to address systemic inequities and inequalities in academic and professional computing environments.

Duke University computer scientist Nicki Washington directs a second effort called the Cultural Competence in Computing (3C) Fellows Program. This provides training to improve computing diversity, equity and inclusion for members of academia. Originally designed for faculty members in computing, 3C now includes other disciplines, particularly those with a computational or quantitative focus.

“Our work is really about making sure that people are culturally competent enough to interact with diverse sets of identities,” Daily says. “We’d like anybody who’s involved with the education of students to have an understanding of how to develop inclusive learning environments. Unless we pay attention to policy, most things we do will just be a Band Aid on broken systems.”

Daily says that her equity work is challenging, time-consuming, slow going and absolutely essential. “When I fell in love with engineering, I wasn’t thinking about doing this work. I wanted to build robots!” says Daily, with a laugh. “But with my experiences and the experiences of the people around me, I knew I couldn’t solely focus on that. I cannot do that work and ignore the situation.”

These kinds of programme can help people such as Diaz to navigate the negative attitudes and discrimination they often encounter in school and at work. Diaz realized that the feeling of needing to prove herself didn’t go away, even when she landed a coveted job as a cyber intelligence analyst at Northrop Grumman, an aerospace and defence-technology company in Columbia, Maryland.

Her first position included staffing the internal help desk. She recalls one caller who insisted she repeat her name several times and affirm that he had called the correct number before finally saying, ‘You don’t sound like an analyst.’ Cyber analysts are overwhelmingly white and male, so Diaz is accustomed to getting quizzical looks, but says she had never been questioned and dismissed so blatantly.

She also understands the importance of representation, which is why she also has an adjunct computer-science position at UMBC. “It’s really about having mentors or seeing people who look like you in those positions. I’ve had students come up to me and say, ‘You’re the first Hispanic woman faculty I’ve seen in computer science.’ I am there so maybe it won’t be such a terrible experience for future generations of students like me.”