In 1915, Albert Einstein wrote a letter to the philosopher and physicist Moritz Schlick, who had recently composed an article on the theory of relativity. Einstein praised it: ‘From the philosophical perspective, nothing nearly as clear seems to have been written on the topic.’ Then he went on to express his intellectual debt to ‘Hume, whose Treatise of Human Nature I had studied avidly and with admiration shortly before discovering the theory of relativity. It is very possible that without these philosophical studies I would not have arrived at the solution.’It is amazing that anyone takes Einstein's egomania seriously.
More than 30 years later, his opinion hadn’t changed, as he recounted in a letter to his friend, the engineer Michele Besso: ‘In so far as I can be aware, the immediate influence of D Hume on me was greater. I read him with Konrad Habicht and Solovine in Bern.’ We know that Einstein studied Hume’s Treatise (1738-40) in a reading circle with the mathematician Conrad Habicht and the philosophy student Maurice Solovine around 1902-03. This was in the process of devising the special theory of relativity, which Einstein eventually published in 1905. It is not clear, however, what it was in Hume’s philosophy that Einstein found useful to his physics.
Einstein got relativity from Lorentz and Poincare, and spent his whole life lying about it. Saying that he got his ideas from some philosopher is just a way of denying credit to Lorentz and Poincare.