Recently there has been a few questions about anomalies in QFTs:
Why do some anomalies (only) lead to inconsistent quantum field theories
Classical and quantum anomalies
In these, people have been discussing anomalies that (let me know if I am wrong in my understanding here) come from essential symmetries which cannot be realised by finite energy unitary representations on a suitable Hilbert space.
Meanwhile, my understanding of "anomaly cancellation formulas" that appear for instance in 11d supergravity is that, a priori the action functional is not an honest function on the configuration space of the theory, but a section of a line bundle over the config space. Nontriviality of the line bundle prevents integration of the action functional. This is my definition of an anomaly. Anomaly cancellation happens for example when the bosonic and fermionic sectors have action functionals in dual line bundles, so that in the tensor product theory there is no anomaly, though either sector is by itself anomalous.
My question is: what is the relationship (if any) between these two perspectives?
I suspect there is some on the basis of the Borel-Weil-Bott theorem, but this is idle speculation.