Melt the butter in a skillet over medium heat. Add the sliced onions and cook, stirring often, until they turn deep golden brown. Pour in the beef broth and simmer until most of the liquid evaporates. Set the onions aside to cool slightly.
Place the ground beef in a mixing bowl. Add the breadcrumbs, egg, thyme, salt, pepper, and 1/2 cup of the grated Gruyère. Mix in half of the cooled onions. Divide the mixture into four equal portions and shape each into a small loaf.
Arrange the loaves on a baking sheet. Bake at 375°F for 25 minutes. Remove the sheet from the oven and top each loaf with the remaining grated Gruyère followed by a slice of Gruyère. Return to the oven or broil briefly until the cheese melts and browns.
Spoon the remaining caramelized onions over the tops before serving.