Combinations of m out of n are ubiquitous to model a wide class of combinatorial problems. For an ordered sequence of combinations, the unranking function generates the combination associated to an integer number in the ordered sequence. In this paper, we present a new method for unranking combinations by using a gradient-based optimization approach. Exhaustive experiments within computable allowable limits confirmed the feasibility and efficiency of our proposed approach. Particularly, our algorithmic realization aided by a Graphics Processing Unit (GPU) was able to generate arbitrary combinations within 0.571 seconds and 8 iterations in the worst case scenario, for n up to 1000 and m up to 100. Also, the performance and efficiency to generate combinations are independent of n, being meritorious when n is very large compared to m, or when n is time-varying. Furthermore, the number of required iterations to generate the combinations by the gradient-based optimization decreases with m in average, implying the attractive scalability in terms of m. Our proposed approach offers the building blocks to enable the succinct modeling and the efficient optimization of combinatorial structures.