It is very possible that without these philosophical studies I would not have arrived at the solution

In a 1915 letter to Moritz Schlick, Einstein says he studied Hume’s Treatise of Human Nature “avidly and with admiration shortly before discovering the theory of relativity” (Einstein, 1998, p. 165). (The editors date this reading of Hume to 1902—Einstein, 1998, pp. 221f, 347f, German edition) Having just referred to “Kant and his successors,” along with Mach, Hume, and the neo-positivists, Einstein admits: “It is very possible that without these philosophical studies I would not have arrived at the solution” (Einstein, 1998, p. 165). He does not say which of Hume’s ideas influenced him or to what extent. Hume’s special role, therefore, might have had more to do with the timing of Einstein’s reading of the arch-skeptic’s work than with the closeness of Hume’s theories to his own