I think your best bet is to identify a set to start with and find the ones in that set not connected over an edge with @filter(NOT has(<myedge>)). In a upsert, you can delete predicates from those nodes then.
Note you cannot actually delete nodes, just delete the predicates from them. Because of the storage being arranged by predicate, a node with no predicates takes no storage and is functionally ‘deleted’.