The Gelsenkirchen club have come up against both sides in recent weeks, losing 5-1 to Bayern in between the 6-1 and 3-1 defeats they suffered to Carlo Ancelotti's side in each leg of their Champions League last-16 tie.
And Keller believes that, while both sides are of a similar calibre, it is Pep Guardiola's charges who are the better of the two.
"Bayern and Madrid are both big clubs," he told Uefa's official website. "But I think Bayern make it a bit more difficult for opponents to get into possession and overall I think they are a bit stronger than Madrid.
"But there isn't much between them."
The 43-year-old went on to praise his side's performance in Tuesday night's clash against the Spanish giants, insisting it was a noticeable improvement on their first-leg humiliation.
"Two individual mistakes kept us from recording a draw here, but I was pleased with the display nonetheless.
"Ronaldo didn't become world player of the year for nothing. His qualities are outstanding.
"Everyone who watched the game saw that we restored our honour. The team displayed a fighting mentality.
"Obviously Madrid had several chances to score, but [Ralf] Fahrmann put in a world-class performance. The team rehabilitated themselves with that showing.
"I was pleased with the level of aggression but it's a shame that we didn't get a better result."