This is an example:
A scientist has found that an artifact, buried since approximately 1500 B.C., is encrusted with silk, a fabric previously thought to have been invented 1,000 years later.
I am not sure whether "have been invented" is past perfect or present perfect.
Sometimes I see structures such as "having done something" but I did not find any clue to determine their tense.
Please explain the example and give advice to find tense of such phrases.
Thank you.