Previous derivation of the Thouless-Anderson-Palmer (TAP) equations for the
Hopfield model by the cavity method yielded results that were inconsistent
with those of the perturbation theory as well as the results derived by th
e replica theory of the model. Here we present a derivation of the TAP equa
tion for the Hopfield model by the cavity method and show that it agrees wi
th the form derived by perturbation theory. We also use the cavity method t
o derive TAP equations for the pseudoinverse neural network model. These eq
uations are consistent with the results of the replica theory of these mode
ls.