Our Gemara on Amud Beis, quoting our Mishna on Daf 27b, explains that Rabbi Yochanan predicted that a later generation of Sanhedrin will overturn Rabbi Akiva’s Kal V’chomer.  Maharitz Chayes on Daf 27 notes that this Gemara is a strong proof to the Rambam’s position (Laws of Mamerin (2:1) that a different Sanhedrin from a later generation can overturn rulings of a prior Sanhedrin based on derashos and limmudim, even of they are not greater in wisdom or numbers.  The Rambam holds that when it comes to edicts, a later generation that is not as great cannot overturn their rulings, but when it comes to Torah derivations which are based on logic and comparisons, the verse (Devarim 26:3) says, “You shall go to the priest who is in THOSE days.”  

Rosh Hashanah 25b expands on this idea:

 וְאוֹמֵר: ״וּבָאתָ אֶל הַכֹּהֲנִים הַלְוִיִּם וְאֶל הַשֹּׁפֵט אֲשֶׁר יִהְיֶה בַּיָּמִים הָהֵם״, וְכִי תַּעֲלֶה עַל דַּעְתְּךָ שֶׁאָדָם הוֹלֵךְ אֵצֶל הַדַּיָּין שֶׁלֹּא הָיָה בְּיָמָיו? הָא אֵין לְךָ לֵילֵךְ אֶלָּא אֵצֶל שׁוֹפֵט שֶׁבְּיָמָיו. וְאוֹמֵר: ״אַל תֹּאמַר מֶה הָיָה שֶׁהַיָּמִים הָרִאשׁוֹנִים הָיוּ טוֹבִים מֵאֵלֶּה״.

And it further says: “And you shall come to the priests, the Levites, and to the judge who shall be in those days” (Deuteronomy 17:9). But can it enter your mind that a person can go to a judge that is not alive in his days? What, then, is the meaning of the phrase “in those days”? It teaches that you need to go only to the judge in one’s days, i.e., he is authorized to judge and decide matters. And it also says: “Do not say: How was it that the former days were better than these? For it is not out of wisdom that you inquire concerning this” (Ecclesiastes 7:10). Instead, one must accept the rulings of the leaders of his generation.

However, rabbinic decrees follow a different system, as Rambam says (ibid 2:2):

בֵּית דִּין שֶׁגָּזְרוּ גְּזֵרָה אוֹ תִּקְּנוּ תַּקָּנָה וְהִנְהִיגוּ מִנְהָג וּפָשַׁט הַדָּבָר בְּכָל יִשְׂרָאֵל. וְעָמַד אַחֲרֵיהֶם בֵּית דִּין אַחֵר וּבִקֵּשׁ לְבַטֵּל דְּבָרִים הָרִאשׁוֹנִים וְלַעֲקֹר אוֹתָהּ הַתַּקָּנָה וְאוֹתָהּ הַגְּזֵרָה וְאוֹתוֹ הַמִּנְהָג. אֵינוֹ יָכוֹל עַד שֶׁיִּהְיֶה גָּדוֹל מִן הָרִאשׁוֹנִים בְּחָכְמָה וּבְמִנְיָן. הָיָה גָּדוֹל בְּחָכְמָה אֲבָל לֹא בְּמִנְיָן. בְּמִנְיָן אֲבָל לֹא בְּחָכְמָה. אֵינוֹ יָכוֹל לְבַטֵּל אֶת דְּבָרָיו. אֲפִלּוּ בָּטַל הַטַּעַם שֶׁבִּגְלָלוֹ גָּזְרוּ הָרִאשׁוֹנִים אוֹ הִתְקִינוּ אֵין הָאַחֲרוֹנִים יְכוֹלִין לְבַטֵּל עַד שֶׁיְּהוּ גְּדוֹלִים מֵהֶם. וְהֵיאַךְ יִהְיוּ גְּדוֹלִים מֵהֶם בְּמִנְיָן הוֹאִיל וְכָל בֵּית דִּין וּבֵית דִּין שֶׁל שִׁבְעִים וְאֶחָד הוּא. זֶה מִנְיַן חַכְמֵי הַדּוֹר שֶׁהִסְכִּימוּ וְקִבְּלוּ הַדָּבָר שֶׁאָמְרוּ בֵּית דִּין הַגָּדוֹל וְלֹא חָלְקוּ בּוֹ: 

The following rules apply when a court issued a decree, instituted an edict, or established a custom and this practice spread throughout the Jewish people and another court arose and sought to nullify the original order and eliminate the original edict, decree, or custom. The later court does not have this authority unless it surpasses the original court in wisdom and in its number of adherents. If it surpasses the original court in wisdom, but not in the number of adherents, or in the number of adherents, but not in wisdom, it cannot nullify its statements. Even if the rationale for which the original court instituted the decree or the edict is nullified, the later court does not have the authority to negate their statements unless they are greater.How is it possible that the later court will surpass the original court in number? For every Supreme Sanhedrin consists of 71 judges. The intent is the number of sages in the generation who consent and accept the matter stated by the Supreme Sanhedrin without opposing it.

This is the basis for the Rambam’s position. We might wonder what is the difference between a rabbinic edict and  a derasha? If anything, since an edict has no scriptural basis, I would think that it should be easier for a successor generation to override it.  Yet the opposite is true.  The answer to this depends on how one understands derashos made by Chazal. As we discussed in Psychology of the Daf Sotah 22, a rabbinic derash, though having the force of Biblical law, may have been designed for the rabbis of each generation to assess and decide how to apply them based on the needs of the times. These judgment calls can only be made by the authorities of that generation, no matter if they are inferior in Torah knowledge.  This is because, by definition, they are MORE knowledgeable and superior in regard to the needs of THEIR generation.  However edicts are laws which are made out of broad concerns and not subject to as much analysis.  Thus an inferior Sanhedrin of a later generation may lack the wisdom to know if the edict should be annulled. But as far as analysis and derivations from scripture, we can argue that God gives each generation’s Sanhedrin the insight to understand the Torah as they need to.