WASHINGTON — Reports of sexual assaults increased at two of the three military academies last year and an anonymous survey suggests sexual misconduct rose across the board at the schools, The Associated Press has learned.

The data underscore the challenge in stemming such behavior at the military college campuses, despite a slew of programs designed to prevent assaults, help victims and encourage them to come forward. The difficulties in some ways mirror those the larger military is struggling with amid revelations about Marines and other service members sharing nude photos on websites.

Assault reports rose at the U.S. Naval Academy in Annapolis, Maryland, and the U.S. Military Academy at West Point, New York, while dropping at the U.S. Air Force Academy in Colorado. The Air Force decline was sharp, going to 32 last year from 49 in 2015, contributing to an overall decrease in the overall number of reported assaults at the academies. The total reported cases fell to 86 from 91 in 2015, according to details obtained by The Associated Press.

Pentagon and military officials believe more people are reporting sexual assaults, which they see as a positive trend because it suggests students have more confidence in the system and greater willingness to seek help.

But the anonymous survey results suggest more assaults and crime occurring. They showed more than 12 percent of women and nearly 2 percent of men saying they experienced unwanted sexual contact.

In that survey, the largest increases in sexual misconduct were also at the Navy and Army academies. A vast majority of students said they didn’t file a report on the assault because they didn’t consider it serious enough. Many women said they took steps to avoid the perpetrator, while more than a third of the men said they confronted the person.

Senior defense officials expressed disappointment. They were particularly concerned that more men and women said they experienced unwanted sexual contact. The rate two years ago was about 8 percent of women and 1 percent of men.