The way Sam Adewumi sees it, the lack of diversity in New York City’s elite specialized high schools is largely a pipeline problem. And it starts with gifted education.

It worked for Adewumi, a black alum of Brooklyn Technical High School (class of ’84) and now a teacher there. Growing up in the Bronx, he attended gifted programs through middle school, which paved the way for his admission to one of the city’s elite specialized high schools, and later, to Cornell University.

“This is the legacy, to me, of the gifted and talented program,” said Adewumi, who also runs a test prep program to help students prepare for the specialized high schools test. “There’s not another generation of us coming forward. So right now, we lost a generation.”

While 70 percent of New York City students are black or Hispanic, they comprise less than 30 percent of the city’s gifted students. And black and Hispanic students received only 10 percent of offers to specialized high schools in the latest admissions round.

A new task force is attempting to address both deficits, but that raises a question not fully answered by Adewumi’s anecdote: Is gifted education really a pipeline for specialized high schools?

Based on a small analysis, the answer seems to be yes — and no.

From 2011 to 2015, there were 357 students who attended schoolwide gifted schools at some point between fifth and eighth grades. Of those, around 33 percent went on to specialized schools in the 2015-16 school year. That’s according to numbers crunched for Chalkbeat by Nicole Mader, a senior research fellow at the Center for New York City Affairs at The New School.

But the numbers don’t break down evenly: Of the white and Asian students, 40 percent went on to specialized high schools. Of the black and Hispanic students, only 14 percent did.

Another 14 percent of the black students ended up at other highly-selective high schools, as did 8 percent of the Hispanic students.

Most of the schools analyzed for this project are citywide gifted schools — a fact that could skew the numbers since admission to citywide gifted programs is more competitive, requiring a near-perfect test score. Seats in citywide gifted schools, which only enroll students who are gifted, represent about 13 percent of the total fifth-grade seats in all gifted programs, according to data from the city. The analysis also included P.S. 77 The Lower Lab School, since all students there are in gifted.

Although limited, the data is in line with previous findings that black and Hispanic students — even those who are high achieving — are less likely to attend competitive high schools.

To Adewumi, the results of Mader’s analysis are not surprising. Rather, they point to a bottleneck that begins with a lack of options for high-achieving students once they reach middle school.

“The pipeline breaks in the whole middle school process,” he said, rattling off middle schools in Brooklyn that once had gifted programs, but no longer do. “How do you create access?”

His hunch is confirmed by research. A cadre of elite middle schools send an outsized number of students to specialized high schools, according to a separate report co-authored by Mader.  That report found that about 60 percent of seventh-grade students who went on to specialized high schools came from only 45 middle schools — out of more than 530 total in the city.

That echoed the findings of a study by researchers at New York University, which found that “more than half of the students who were admitted to a specialized high school came from just 5 percent of the city’s public middle schools.”

Of the students in those top “feeder” schools, 58 percent were in programs, including gifted programs, that required tests for admission.

However, Sean Corcoran, who co-authored the NYU report, says the role of gifted education in preparing kids for specialized high school is unclear. Corcoran and co-author Christine Baker-Smith did not study whether there’s any consistent difference in gifted programs that gives students a leg up. Those feeder schools may just sort out students who are already high-achieving, he said.

“The kinds of kids who do well on the admissions tests, in general, are kids who would do well at other schools,” Corcoran said. “So it’s not like starting another gifted program will all of a sudden make a lot more kids more competitive.”

There are a number of factors that contribute to low representation of black and Hispanic students in specialized high schools, said Clara Hemphill, editor at the school review website InsideSchools. Although she has qualms about New York City’s gifted programs starting in kindergarten and basing admission on a standardized test score, she doesn’t necessarily oppose the creation more gifted programs.

“Anything that would increase the academic rigor for talented black and Latino kids is a good thing,” she said

“What you need is exposure to a demanding curriculum and a peer group of academically successful kids,” Hemphill added. “In the middle class neighborhoods, most of the ordinary zoned elementary schools have that. In poor and working class neighborhoods, not many do.”

Correction: This story has been corrected to note that the 357 students tracked by Nicole Mader attended schoolwide gifted schools at some point between 2011-2015. They did not all attend a citywide gifted school in 2011-12. The analysis also included P.S. 77 The Lower Lab School, which is a schoolwide gifted school, not a citywide gifted school.