So you want to retrieve all customers, which aren't a specialization at all. Right?
Im not aware of a XPath expression to actieve that.
You could retrieve ALL Customers (incl specializations) retrieve all the objects of the Customer2 specialization and subtract the second list from the first repeat it for Customer3
Guess in JAVA you could achieve a direct retrieve. But not my expertise
I had the same problem and solved it by including this XPath expression in my retrieve:
[Module.Action_Result/Module.Result/id != empty]
This way i only get the objects from the Generalization (that have the association) en not the Specializations (that don't have the association).