If the structure of the pattern is not the same then the pattern will usually not match and the replacement will not be done, even if the expressions are mathematically equivalent.
-1+2*Subscript[λ,1]^2*Subscript[λ,2]^4-Subscript[λ,1]^4*Subscript[λ,2]^8/.{
1-2*Subscript[λ,1]^2*Subscript[λ,2]^4+Subscript[λ,1]^4*Subscript[λ,2]^8->Subscript[δ,2]}
returns
-1+2*Subscript[λ,1]^2*Subscript[λ,2]^4-Subscript[λ,1]^4*Subscript[λ,2]^8
If the structure is the same then the pattern will usually match and the replacement will be done.
-1+2*Subscript[λ,1]^2*Subscript[λ,2]^4-Subscript[λ,1]^4*Subscript[λ,2]^8/.{
-1+2*Subscript[λ,1]^2*Subscript[λ,2]^4-Subscript[λ,1]^4*Subscript[λ,2]^8->-Subscript[δ,2]}
returns
-Subscript[δ,2]
Sometimes Simplify can be used to replace more complicated mathematically equivalent expressions with simpler expressions, even if the structure is not exactly the same
Simplify[
-1+2*Subscript[λ,1]^2*Subscript[λ,2]^4-Subscript[λ1]^4*Subscript[λ,2]^8,
1-2*Subscript[λ,1]^2*Subscript[λ,2]^4+Subscript[λ,1]^4*Subscript[λ,2]^8==Subscript[δ,2]]
returns
-Subscript[δ,2]