BRST formalism for systems with higher order derivatives of gauge   parameters
  For a wide class of mechanical systems, invariant under gauge transformations with higher (arbitrary) order time derivatives of gauge parameters, the equivalence of Lagrangian and Hamiltonian BRST formalisms is proved. It is shown that the Ostrogradsky formalism establishes the natural rules to relate the BFV ghost canonical pairs with the ghosts and antighosts introduced by the Lagrangian approach. Explicit relation between corresponding gauge-fixing terms is obtained. 
Khazret S. Nirov