The machine that automatically fed donuts to Homer in Treehouse of Horror IV (1993) can be seen in one of the classrooms that Bart and Lisa pass in the hallway.
The "sex view blockers" in the segment "A Clockwork Yellow" are a reference Eyes Wide Shut (1999) where foreground actors were digitally added to obscure some sex acts by Warner Bros. for the film's US release. Kubrick had final cut privilege on his films and had already approved a final cut of the film shortly before his death, but the film was given an NC-17 rating by the MPAA while he was contractually obligated to obtain an R-rating or lower. The digitally added foreground actors were added to avoid making any changes to the edits of the film.
During A Clockwork Yellow Marge is reading A Clockwork Orange, which this segment is based on, while Homer eats.
The Wilhelm scream is heard when Homer and Marge visit the school from Hell.