Generalization Guarantees via Algorithm-dependent Rademacher Complexity