Education Secretary Richard W. Riley said yesterday that the best solution to violence in schools is not more metal detectors or locker searches, but rather making the nation's high schools smaller and more personalized so that students feel connected to each other and caring adults.

Riley's prescription differed from what has been the prevailing view that tighter security measures and student discipline are needed in the wake of school shootings in Littleton, Colo., and elsewhere. "We need to find ways to create small, supportive learning environments that give students a sense of connection to each other," he said. "That's hard to do when we are building high schools the size of shopping malls. Size matters."

Riley cited a study by the National Association of Secondary School Principals that recommended an enrollment of 600 as the ideal size for a high school. Many high schools, particularly in rapidly growing suburbs, enroll three to four times as many students.

Given the expense of replacing large high schools with smaller buildings, Riley said that subdividing existing schools into smaller units called "schools within schools" was another way to "make young people feel more connected." He called for more mentors, guidance counselors and mental health professionals in high schools to help make sure every student has an adult they can turn to for advice.

Riley also suggested that many high schoolers may not receive enough parental attention at home. "Parents need to realize that they are still the most important source of guidance and support for teenagers," he said. "My message to parents is stay involved."

Riley offered his views on youth violence in an annual back-to-school speech that outlined his vision of high schools that would suit the information age economy.

Urging schools to change in areas where the federal government has a limited role, Riley said all eighth-graders should be tested before they enter high school and be sent to summer school if they have poor math or reading skills. He recommended that all states adopt graduation exams, as about half already have.

In addition, Riley said that every high school student should become fluent in a foreign language, although he stopped short of proposing it be a prerequisite for graduation.

Riley also noted that college-level courses are available in half the nation's high schools but said they should be available in every school in three to five years. The Clinton administration has asked Congress for $20 million to support the expansion of such Advanced Placement courses.