One of every four Oakland students - including 40 percent of its highest achievers - fled the district's public schools after finishing fifth grade in the spring, shunning the city's middle schools in favor of private, suburban or charter schools.

The exodus, which crosses all ethnicities and income levels, meant a loss of at least $6 million in state revenue. But perhaps more importantly, it shows the staggering brain drain that consistently leaves middle schools heavily weighted with struggling students.

It's a confounding problem for Oakland administrators: How can they improve the middle schools' test scores when the brightest students leave?

"The middle schools are saying, 'Come on. We're supposed to get these kids,' " Oakland Superintendent Tony Smith said. Oakland is the most improving large urban district in the state, but that's not showing up in middle school test scores, he said.

Smith asked district staff this year to examine enrollment figures to confirm his hunch that there was more to the precipitous drop in proficiency rates from elementary to middle school than what was happening inside the classrooms.

The numbers confirmed that the district was losing 40 percent of the advanced students as well as 28 percent of those who reached grade-level proficiency at an Oakland elementary school.

The result has been a drop in test scores from elementary to middle schools - scores that make it hard to then attract families of incoming sixth-graders.

For example, in 2010, 54 percent of fifth-graders were proficient or advanced in English, compared with 39 percent of sixth-graders. Next door in Berkeley, 63 percent of sixth-graders were proficient or better.

In short, many families feel their high-performing children can't maintain that kind of achievement at the district's middle schools, Smith said.

Leaving in droves

The flight from Oakland schools doesn't happen just at the fifth grade. The district struggles to retain certain subgroups of students.

Nearly three-fourths of the 364 white kindergartners who started at a district school in 1997 left by the 12th grade, leaving just 92 white seniors in the 2010 graduating class of 3,442 students.

And at Lincoln Elementary in Chinatown, a predominantly Asian school and one of the district's top performers, 77 percent of last year's fifth-graders left to attend middle school elsewhere. They eschewed nearby Westlake in favor of Alameda or American Indian Charter School, district officials said.

The transition to middle school is a big one for families. In Oakland, students from a wide range of neighborhoods converge at city middle schools, which are larger than elementary schools, have less parental presence and are full of newly minted adolescents.

Students from neighborhoods riddled with violence and poverty sit next to middle- or upper-class kids with soccer moms and children of immigrants with strict codes of conduct.

While students leave Oakland schools at many grades, the greatest percentage of them make the change when it's time to move on to middle school, with rates far exceeding other urban districts. In San Francisco, about 12 percent of fifth-graders leave after elementary school.

Oakland officials are now looking at why families leave and how to stem the flight.

A tough choice

Oakland parent Stephanie Pearl kept her first daughter in Oakland schools until ninth grade, but withdrew her second daughter in sixth grade.

The younger daughter, Kelsey, who has a learning disability, just started middle school at Saklan Valley School, a $15,000-per-year private school in Moraga.

Pearl said the private school's smaller classes - 15 students instead of the 30-plus common in the public schools - was a major factor.

"The education (Kelsey) is getting is far superior to what my older daughter got at Montera" Middle School, she said. Kelsey "was amazed when she first started there. She said, 'Wow, Mom, I can actually hear the teacher speak." '

Annual weeklong field trips, to Yosemite in the sixth grade, Hawaii in the seventh and Washington, D.C., in the eighth, are included in the private school tuition - extras public schools can't offer.

Pearl wishes she sent her eldest to the private school, too.

Although it was hard to walk away from the public schools, she doesn't regret it.

"If a kid is focused, they will learn," she said. "But it's not the same education."

A catch-22

To be sure, the district's middle schools need to boost the scores of every student who walks in the door, and work is under way to improve the quality of teaching and programs offered, district officials said.

But it's frustrating, they say, to watch 1 of every 3 fifth-graders who reached proficiency or beyond at an Oakland school in the 2009-10 school year walk out the door. That's 500 children.

The reasons they leave are complicated, district officials said.

They include concerns about quality and safety as well as issues that surround race, class and culture.

"I think it's the fear of the unknown," Westlake Principal Misha Karigaca said. "This is one of the biggest decisions a parent has to make in their lives, and it's also one of the scariest, especially for parents who have options."

Westlake, like most of the middle schools, is a reflection of Oakland, the good with the bad, the principal said.

"For children who are able to navigate those challenges, I actually think it will make them a much stronger person," he said. "They will also have the strong academics as well."

The Oakland middle school scene can be intimidating to families, and fears about safety and other issues can overshadow the rising test scores, daily orchestra classes, art, journalism, computer labs and other top-notch programs at Westlake and other district middle schools, Karigaca said.

"It all goes back to perception," he said. "The negative stories seem to travel farther and faster than the positive ones."

Choosing public

Jennifer Flattery and her husband Mark Vickness could have left Oakland Unified after their daughter, Lucy, graduated from Chabot Elementary last spring.

She got acceptance letters from three private schools as well as charter schools.

They chose their neighborhood public middle school, Claremont, which ranked in the bottom 20 percent of schools statewide a couple years back.

In making their selection, the family considered academics, social environment, proximity, and enrichment activities.

"I just got the sense there was a lingering stigmatism around the Oakland district as a whole and some particular problems that had existed in the past at Claremont," Vickness said.

Test scores at the school have risen dramatically the last two years.

"In the end it was a very brief conversation that Claremont was in our and our community's best interest," Flattery added. "We didn't want to take one more advanced student out of the Oakland schools."

Their daughter now takes orchestra everyday, plays sports and is academically challenged in her classes. Her parents say they have no concerns about her safety.

Fighting for change

Oakland isn't the only urban district dealing with the flight and associated brain drain of top students, but the city's rates are definitely high, said Anne Foster, national executive director of Parents for Public Schools, a Mississippi-based public education advocacy organization.

"We're just grappling with it in this country," she said. "There's fear, fear because people are different and their kids are getting older, and they are afraid of what the differences bring."

San Francisco is a model for parents coming together to promote the public schools and convince other families to attend, improving the schools and their communities, Foster said.

"You almost have to have parents whose children are on the receiving end of the product and tell the success stories," she said. "That's what Oakland has to have: families who will fight for those schools."

District officials say they hope to convince more families to stay by sharing data and information to combat stereotypes or preconceived ideas about test scores.

"I think Oakland suffers from a chronic inferiority complex," said school board member Jody London, who sends her two children to Chabot Elementary and Claremont Middle. "I am disappointed more people don't choose to stay in the system, because I think our schools have a lot to offer.

"But I don't want to leave it at 'I'm disappointed,' " she said. "I think it's incumbent on us to earn the students back."