An invalid share can happen when a bit is flipped compared to how it should be in ideal conditions. This can happen when clock / voltage ratio on the compute core is not sufficient. It can happen either in core, or in memory – but core is less likely. The main reason are too high memory clock.
But why is core less likely?
Nvidias do not allow to modify the core voltage curve, so invalid shares are less likely because of core clock. With AMD - when data bits flip its also crucial for memory address calculation and that leads to full card crashes. So more often those are read errors on the memory.
What about the DAG?
The DAG itself is build very similar to how a hash/share is created, but with a difference. Each entry has 256 instead of 64 predecessors, and the width in bytes per element is smaller – but the mechanism is the same. If the memory is stressed (too high memory clock normally) so much that for example 1/2^20 memory access gets corrupted, then this means that 1/4096 of the DAG is defect. This will amplify very quickly to defect/invalid shares – about 1 out of 64.
Verifying and repairing DAG
Todays standard among the better mining software are verification – and also partially repairing of the DAG. Following from the previous example where 1/4096 of the DAG is defective – after its verified and repaired the error ratio would go from about 1 out of 64 – to only 1 defect/invalid out of 16384 hashes/shares – way more acceptable!