Son of the distinguished Genoese painter Giovanni Agostino Ratti, Carlo Giuseppe received his early training from his father and went on to study in Rome with Placido Costanzi (1756-9). While in Rome, Ratti became a close friend and follower of Anton Raphael Mengs and Johann Joachim Winckelmann, both of whom were formative influences on his interest in historiography and his desire to reform and rejuvenate the Genoese artistic tradition through the academy. To this end, Ratti prepared two guidebooks, one on his native city (Istruzione di quanto può vedersi di più bello in Genova in pittura, scultura e architettura, 1766), the first guidebook to Genoa, and an accompanying guide to the Riviera (Descrizione delle pitture scolture e architetture ecc. Che trovansi in alcune città, borghi, e castelli delle due riviere, 1780). Ratti's major work was the 1768-9 edition of Raphaele Soprani's Vite de pittori (1674) containing his annotated comments, corrections, and additions and remains a critical text for the modern study of Genoese art and artists.
As a professional painter, Carlo Giuseppe Ratti held an important position as director of the School of Painting at the Accademia Linguistica, an influential post that earned him a number of important commissions throughout Genoa. Ratti worked in a neo-classical style influenced by the Genoese Baroque tradition. The present painting has been attributed to Ratti on the basis of the common physiognomy and type shared by the boisterous putti and the angels, seraphim, and children that populate the artist's largely religious oeuvre. The painting was clearly intended to decorate a domestic environment, perhaps a bedroom, as its playful subject matter has apparent erotic connotations. The goat is a traditional attribute of Lust and the struggle of the putti, messengers of profane love, to reign in its feral behavior, is an allegory of one of the perennial conflicts of mankind.